Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Project Documentation

Arduino Nano-Based Smart Water Pump System with Ultrasonic Sensors

Image of Arduino Nano-Based Smart Water Pump System with Ultrasonic Sensors

Circuit Documentation

Summary

This circuit involves an Arduino Nano microcontroller interfacing with multiple HC-SR04 ultrasonic sensors, a L298N DC motor driver, a water pump, and a toggle switch. The circuit is powered by a 12V 5A power supply. The Arduino Nano is programmed to control the sensors and the motor driver, which in turn controls the water pump.

Component List

Arduino Nano

  • Description: A small, complete, and breadboard-friendly board based on the ATmega328P.
  • Pins: D1/TX, D0/RX, RESET, GND, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11/MOSI, D12/MISO, VIN, 5V, A7, A6, A5, A4, A3, A2, A1, A0, AREF, 3V3, D13/SCK

HC-SR04 Ultrasonic Sensor

  • Description: A sensor used for measuring distance by using ultrasonic waves.
  • Pins: VCC, TRIG, ECHO, GND

L298N DC Motor Driver

  • Description: A dual H-Bridge motor driver module that allows speed and direction control of two DC motors.
  • Pins: OUT1, OUT2, 12V, GND, 5V, OUT3, OUT4, 5V-ENA-JMP-I, 5V-ENA-JMP-O, +5V-J1, +5V-J2, ENA, IN1, IN2, IN3, IN4, ENB

POWER SUPPLY 12V 5AMP

  • Description: A power supply unit providing 12V DC at 5A.
  • Pins: 220V Positive Pole (AC), 220V Negative Pole (AC), GND, GND (DC), 12V-24V Output (DC)

Water Pump

  • Description: A small DC water pump.
  • Pins: VCC, GND

Toggle Switch

  • Description: A simple on/off switch.
  • Pins: L1, COM, L2

Comment

  • Description: Placeholder for comments in the circuit.
  • Pins: None

Wiring Details

Arduino Nano

  • VIN: Connected to VCC of all HC-SR04 Ultrasonic Sensors.
  • GND: Connected to GND of all HC-SR04 Ultrasonic Sensors and Toggle Switch (L1 and COM).
  • D2: Connected to TRIG of one HC-SR04 Ultrasonic Sensor.
  • D3: Connected to ECHO of the same HC-SR04 Ultrasonic Sensor.
  • D4: Connected to L2 of the Toggle Switch.
  • D5: Connected to TRIG of another HC-SR04 Ultrasonic Sensor.
  • D6: Connected to ECHO of the same HC-SR04 Ultrasonic Sensor.
  • D7: Connected to IN4 of the L298N DC Motor Driver.
  • D8: Connected to IN3 of the L298N DC Motor Driver.
  • A7: Connected to ECHO of another HC-SR04 Ultrasonic Sensor.
  • A6: Connected to TRIG of the same HC-SR04 Ultrasonic Sensor.
  • A5: Connected to ECHO of another HC-SR04 Ultrasonic Sensor.
  • A4: Connected to TRIG of the same HC-SR04 Ultrasonic Sensor.
  • A3: Connected to ECHO of another HC-SR04 Ultrasonic Sensor.
  • A2: Connected to TRIG of the same HC-SR04 Ultrasonic Sensor.
  • A1: Connected to ECHO of another HC-SR04 Ultrasonic Sensor.
  • A0: Connected to TRIG of the same HC-SR04 Ultrasonic Sensor.

HC-SR04 Ultrasonic Sensor

  • VCC: Connected to VIN of the Arduino Nano.
  • GND: Connected to GND of the Arduino Nano.
  • TRIG: Connected to various digital and analog pins of the Arduino Nano.
  • ECHO: Connected to various digital and analog pins of the Arduino Nano.

L298N DC Motor Driver

  • 12V: Connected to 12V-24V Output (DC) of the POWER SUPPLY 12V 5AMP.
  • GND: Connected to GND (DC) of the POWER SUPPLY 12V 5AMP.
  • IN3: Connected to D8 of the Arduino Nano.
  • IN4: Connected to D7 of the Arduino Nano.
  • OUT3: Connected to VCC of the Water Pump.
  • OUT4: Connected to GND of the Water Pump.
  • 5V-ENA-JMP-I: Connected to 5V-ENA-JMP-O.
  • +5V-J2: Connected to ENB.

POWER SUPPLY 12V 5AMP

  • 12V-24V Output (DC): Connected to 12V of the L298N DC Motor Driver.
  • GND (DC): Connected to GND of the L298N DC Motor Driver.

Water Pump

  • VCC: Connected to OUT3 of the L298N DC Motor Driver.
  • GND: Connected to OUT4 of the L298N DC Motor Driver.

Toggle Switch

  • L1: Connected to GND of the Arduino Nano.
  • COM: Connected to GND of the Arduino Nano.
  • L2: Connected to D4 of the Arduino Nano.

Documented Code

Arduino Nano Code (sketch.ino)

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}

Documentation (documentation.txt)


This documentation provides a comprehensive overview of the circuit, including a detailed component list, wiring details, and the code used for the Arduino Nano.