Arduino-Based Water Sensor Controlled DC Motor with Relay and Battery Power
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit is designed to control a DC motor using an Arduino UNO, a 1-Channel Relay, and a water sensor. The Arduino UNO serves as the main controller, receiving input from the water sensor and controlling the relay to switch the DC motor on and off. The circuit is powered by a 9V battery.
Component List
DC Motor
- Description: A motor that converts electrical energy into mechanical energy.
- Pins: pin 1, pin 2
9V Battery
- Description: A battery providing 9V DC power.
- Pins: -, +
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
Water Sensor
- Description: A sensor to detect the presence of water.
- Pins: -, +
1-Channel Relay (5V 10A)
- Description: A relay module that can switch high voltage devices.
- Pins: NC, signal, C, power, NO, ground
sa
- Description: A component with unspecified functionality.
- Pins: V, gnd, DO, v
Wiring Details
DC Motor
- pin 1 is connected to NO of the 1-Channel Relay.
- pin 2 is connected to - of the 9V Battery.
9V Battery
- + is connected to C of the 1-Channel Relay.
- - is connected to pin 2 of the DC Motor.
Arduino UNO
- 5V is connected to power of the 1-Channel Relay.
- GND is connected to ground of the 1-Channel Relay.
- Vin is connected to v of the sa component.
- GND is connected to gnd of the sa component.
- D6 is connected to DO of the sa component.
- D3 is connected to signal of the 1-Channel Relay.
Water Sensor
- - is connected to gnd of the sa component.
- + is connected to V of the sa component.
1-Channel Relay (5V 10A)
- power is connected to 5V of the Arduino UNO.
- ground is connected to GND of the Arduino UNO.
- signal is connected to D3 of the Arduino UNO.
- C is connected to + of the 9V Battery.
- NO is connected to pin 1 of the DC Motor.
sa
- v is connected to Vin of the Arduino UNO.
- gnd is connected to GND of the Arduino UNO.
- DO is connected to D6 of the Arduino UNO.
- gnd is connected to - of the Water Sensor.
- V is connected to + of the Water Sensor.
Documented Code
Arduino UNO 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 summary, detailed component list, wiring details, and the code used in the Arduino UNO.