Arduino UNO-Based Water Level Monitoring and Motor Control System with IR Sensor
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit involves an Arduino UNO microcontroller interfacing with a water level sensor, an IR sensor, and a DC motor controlled by an L298N motor driver. The circuit is powered by a 9V battery. The Arduino UNO reads inputs from the sensors and controls the motor driver to operate the DC motor.
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
Water Level Sensor
- Description: A sensor used to detect the level of water.
- Pins: SIG, VCC, GND
L298N DC Motor Driver
- Description: A dual H-bridge motor driver that allows control of the speed and direction 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
9V Battery
- Description: A battery providing 9V power supply.
- Pins: -, +
DC Motor
- Description: A motor that runs on direct current.
- Pins: positive, negative
IR Sensor
- Description: An infrared sensor used to detect objects.
- Pins: out, gnd, vcc
Wiring Details
Arduino UNO
- 5V connected to vcc of IR Sensor
- GND connected to gnd of IR Sensor
- GND connected to GND of Water Level Sensor
- A1 connected to SIG of Water Level Sensor
- GND connected to - of 9V Battery
- GND connected to GND of L298N DC Motor Driver
- D13 connected to out of IR Sensor
- D11 connected to IN1 of L298N DC Motor Driver
- D10 connected to IN2 of L298N DC Motor Driver
- D9 connected to ENA of L298N DC Motor Driver
- D7 connected to VCC of Water Level Sensor
Water Level Sensor
- SIG connected to A1 of Arduino UNO
- VCC connected to D7 of Arduino UNO
- GND connected to GND of Arduino UNO
L298N DC Motor Driver
- IN1 connected to D11 of Arduino UNO
- IN2 connected to D10 of Arduino UNO
- ENA connected to D9 of Arduino UNO
- GND connected to GND of Arduino UNO
- GND connected to - of 9V Battery
- 5V connected to + of 9V Battery
- OUT1 connected to positive of DC Motor
- OUT2 connected to negative of DC Motor
9V Battery
- - connected to GND of Arduino UNO
- - connected to GND of L298N DC Motor Driver
- + connected to 5V of L298N DC Motor Driver
DC Motor
- positive connected to OUT1 of L298N DC Motor Driver
- negative connected to OUT2 of L298N DC Motor Driver
IR Sensor
- vcc connected to 5V of Arduino UNO
- gnd connected to GND of Arduino UNO
- out connected to D13 of Arduino UNO
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 detailed list of components, wiring details, and the code used for the Arduino UNO microcontroller.