Arduino-Based Ultrasonic Water Pump Controller with Relay and Battery Power
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit is designed to control a 5V mini water pump using a 5V relay and an ultrasonic sensor, all managed by a Vietduino Uno USB-B microcontroller. The circuit is powered by a 9V battery. The ultrasonic sensor detects the distance to an object and triggers the relay to control the water pump based on the distance measured.
Component List
5V Relay
- Pins: Normally Open, Common terminal, Normally Closed, In, GND, VCC
- Description: A relay used to control the water pump.
- Purpose: To switch the water pump on and off based on the signal from the microcontroller.
9V Battery
- Pins: -, +
- Description: A 9V battery used to power the water pump.
- Purpose: To provide power to the water pump.
5V Mini Water Pump
- Pins: positive pin, negative pin
- Description: A small water pump that operates at 5V.
- Purpose: To pump water when activated by the relay.
Ultrasonic Sensor
- Pins: +VCC, Trigger, Echo, GND
- Description: A sensor used to measure the distance to an object.
- Purpose: To detect the presence of an object and send a signal to the microcontroller.
Vietduino Uno USB-B
- Pins: AREF, GND, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 3V3, 5V, RESET, VIN, A0, A1, A2, A3, A4, A5
- Description: A microcontroller board based on the Arduino Uno.
- Purpose: To control the relay and process signals from the ultrasonic sensor.
Wiring Details
5V Relay
- Normally Open: Connected to the negative pin of the 5V mini water pump.
- Common terminal: Connected to the positive terminal of the 9V battery.
- In: Connected to pin 8 of the Vietduino Uno USB-B.
- GND: Connected to GND of the Vietduino Uno USB-B.
- VCC: Connected to 5V of the Vietduino Uno USB-B.
9V Battery
- +: Connected to the Common terminal of the 5V relay.
- -: Connected to the positive pin of the 5V mini water pump.
5V Mini Water Pump
- positive pin: Connected to the negative terminal of the 9V battery.
- negative pin: Connected to the Normally Open pin of the 5V relay.
Ultrasonic Sensor
- +VCC: Connected to 5V of the Vietduino Uno USB-B.
- Trigger: Connected to pin 3 of the Vietduino Uno USB-B.
- Echo: Connected to pin 4 of the Vietduino Uno USB-B.
- GND: Connected to GND of the Vietduino Uno USB-B.
Vietduino Uno USB-B
- Pin 8: Connected to the In pin of the 5V relay.
- Pin 3: Connected to the Trigger pin of the Ultrasonic Sensor.
- Pin 4: Connected to the Echo pin of the Ultrasonic Sensor.
- GND: Connected to the GND pin of the 5V relay and the GND pin of the Ultrasonic Sensor.
- 5V: Connected to the VCC pin of the 5V relay and the +VCC pin of the Ultrasonic Sensor.
Code
No code provided for this circuit.