Arduino Nano-Based Ultrasonic Water Pump Controller with Relay
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit involves an Arduino Nano microcontroller, a 5V relay, an ultrasonic sensor, a 5V mini water pump, a 7.4V power source, a Nano shield board with a power switch, and a power jack. The circuit is designed to control the water pump based on the input from the ultrasonic sensor, with the relay acting as a switch for the 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
5V Relay
- Description: An electromechanical switch used to control high voltage devices.
- Pins: Normally Open, Common terminal, Normally Closed, In, GND, VCC
Ultrasonic Sensor
- Description: A sensor that measures distance by using ultrasonic waves.
- Pins: +VCC, Trigger, Echo, GND
5V Mini Water Pump
- Description: A small water pump powered by 5V.
- Pins: Positive pin, Negative pin
7.4V Power Source
- Description: A power source providing 7.4V.
- Pins: +, -
Nano Shield Board with Power Switch
- Description: A shield board for the Arduino Nano with a built-in power switch.
- Pins: A0, A1, A2, A3, A4/SDA, A5/SCL, A6, A7, VCC, GND, 3V3, D0/RX, D1/TX, D2, D3 PWM, D4, D5 PWM, D6 PWM, D7, D8, D9 PWM, D10 PWM/SS, D11 PWM/MOSI, D12/MISO, D13/SCK, AREF, RST, NC, VIN
Power Jack
- Description: A jack for connecting an external power source.
- Pins: POSITIF, NEGATIF
Wiring Details
Arduino Nano
- D0/RX: Connected to the "In" pin of the 5V relay via the Nano Shield Board.
- D2: Connected to the "Trigger" pin of the Ultrasonic Sensor via the Nano Shield Board.
- D3 PWM: Connected to the "Echo" pin of the Ultrasonic Sensor via the Nano Shield Board.
- GND: Connected to the "GND" pin of the Ultrasonic Sensor and the 5V relay via the Nano Shield Board.
- VCC: Connected to the "+VCC" pin of the Ultrasonic Sensor and the "VCC" pin of the 5V relay via the Nano Shield Board.
5V Relay
- In: Connected to the "D0/RX" pin of the Nano Shield Board.
- GND: Connected to the "GND" pin of the Nano Shield Board.
- VCC: Connected to the "VCC" pin of the Nano Shield Board.
- Common terminal: Connected to the "negative pin" of the 5V mini water pump and the "NEGATIF" pin of the power jack.
- Normally Closed: Connected to the "positive pin" of the 5V mini water pump.
Ultrasonic Sensor
- +VCC: Connected to the "VCC" pin of the Nano Shield Board.
- Trigger: Connected to the "D2" pin of the Nano Shield Board.
- Echo: Connected to the "D3 PWM" pin of the Nano Shield Board.
- GND: Connected to the "GND" pin of the Nano Shield Board.
5V Mini Water Pump
- Positive pin: Connected to the "Normally Closed" pin of the 5V relay.
- Negative pin: Connected to the "Common terminal" pin of the 5V relay and the "NEGATIF" pin of the power jack.
7.4V Power Source
- +: Connected to the "POSITIF" pin of the power jack.
- -: Connected to the "NEGATIF" pin of the power jack and the "Common terminal" pin of the 5V relay.
Nano Shield Board with Power Switch
- D0/RX: Connected to the "In" pin of the 5V relay.
- D2: Connected to the "Trigger" pin of the Ultrasonic Sensor.
- D3 PWM: Connected to the "Echo" pin of the Ultrasonic Sensor.
- GND: Connected to the "GND" pin of the Ultrasonic Sensor and the 5V relay.
- VCC: Connected to the "+VCC" pin of the Ultrasonic Sensor and the "VCC" pin of the 5V relay.
Power Jack
- POSITIF: Connected to the "+" pin of the 7.4V power source.
- NEGATIF: Connected to the "-" pin of the 7.4V power source and the "Common terminal" pin of the 5V relay.
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:
}
Additional Documentation (documentation.txt)
This documentation provides a comprehensive overview of the circuit, including a detailed list of components, their wiring connections, and the code used in the microcontroller.