Arduino and Raspberry Pi-Based Automated Water Pump System with Flow Sensor
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit involves two Arduino UNO microcontrollers, a Raspberry Pi 4B, a relay module, a water pump, and a water flow sensor. The circuit is designed to control the water pump based on signals from the water flow sensor, with the relay module acting as a switch. The Raspberry Pi 4B is used for additional control and monitoring.
Component List
Arduino UNO
- Description: A microcontroller board based on the ATmega328P.
- Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0, A1, A2, A3, A4, A5, SCL, SDA, AREF, D13, D12, D11, D10, D9, D8, D7, D6, D5, D4, D3, D2, D1, D0
Raspberry Pi 4B
- Description: A small single-board computer.
- Pins: 3V3, 5V, GPIO2, GPIO3, GND, GPIO4, GPIO14, GPIO15, GPIO17, GPIO18, GPIO27, GPIO22, GPIO23, GPIO24, GPIO10, GPIO9, GPIO25, GPIO11, GPIO8, GPIO7, ID_SD, GPIO5, GPIO6, GPIO12, GPIO13, GPIO19, GPIO16, GPIO26, GPIO20, GPIO21, ID_SC, TR01_TAP, TR00_TAP, TR03_TAP, TR02_TAP, RUN, GLOBAL_EN
Relay Module 5V-30V
- Description: A relay module used to control high voltage devices.
- Pins: common contact, normally open, normally closed, trigger, V-, V+
Water Pump
- Description: A pump used to move water.
- Pins: VCC, GND
Water Flow Sensor
- Description: A sensor used to measure the flow rate of water.
- Pins: Signal, Vcc, GND
Wiring Details
Arduino UNO (1)
GND connected to:
- Raspberry Pi 4B GND
- Relay module 5V-30V V-
- Arduino UNO (2) GND
5V connected to:
- Relay module 5V-30V V+
A5 connected to:
- Arduino UNO (2) A5
- Raspberry Pi 4B GPIO3
A4 connected to:
- Arduino UNO (2) A4
- Raspberry Pi 4B GPIO2
D8 connected to:
- Relay module 5V-30V trigger
Arduino UNO (2)
GND connected to:
- Raspberry Pi 4B GND
- Relay module 5V-30V V-
- Arduino UNO (1) GND
- Water flow sensor GND
5V connected to:
- Water flow sensor Vcc
A5 connected to:
- Arduino UNO (1) A5
- Raspberry Pi 4B GPIO3
A4 connected to:
- Arduino UNO (1) A4
- Raspberry Pi 4B GPIO2
D2 connected to:
- Water flow sensor Signal
Raspberry Pi 4B
GND connected to:
- Arduino UNO (1) GND
- Arduino UNO (2) GND
- Relay module 5V-30V V-
GPIO3 connected to:
- Arduino UNO (1) A5
- Arduino UNO (2) A5
GPIO2 connected to:
- Arduino UNO (1) A4
- Arduino UNO (2) A4
Relay Module 5V-30V
V- connected to:
- Raspberry Pi 4B GND
- Arduino UNO (1) GND
- Arduino UNO (2) GND
V+ connected to:
- Arduino UNO (1) 5V
trigger connected to:
- Arduino UNO (1) D8
common contact connected to:
- Water Pump VCC
normally open connected to:
- Water Pump GND
Water Pump
VCC connected to:
- Relay module 5V-30V common contact
GND connected to:
- Relay module 5V-30V normally open
Water Flow Sensor
Vcc connected to:
- Arduino UNO (2) 5V
GND connected to:
- Arduino UNO (2) GND
Signal connected to:
- Arduino UNO (2) D2
Documented Code
Arduino UNO (1)
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
Arduino UNO (2)
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
This documentation provides a comprehensive overview of the circuit, including a summary, detailed component list, wiring details, and the code used in the microcontrollers.