Arduino UNO Controlled Water Level Detection with Servo Adjustment
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary of the Circuit
This circuit consists of an Arduino UNO microcontroller, a Micro servo 9G, and a Water Level Sensor. The Arduino UNO serves as the central processing unit, controlling the servo based on the input from the water level sensor. The servo is powered by the 5V output from the Arduino and receives pulse-width modulation (PWM) signals to control its position. The water level sensor provides an analog signal to the Arduino, indicating the current water level.
Component List
Arduino UNO
- Description: A microcontroller board based on the ATmega328P.
- Pins Used: 5V, GND, D10, D12.
Micro servo 9G
- Description: A small and lightweight servo motor suitable for small-scale projects.
- Pins Used: GND, +5V, PWM.
Water Level Sensor
- Description: A sensor for measuring the level of water in a tank or other container.
- Pins Used: SIG, VCC, GND.
Wiring Details
Arduino UNO
- 5V: Provides power to the Micro servo 9G and Water Level Sensor.
- GND: Common ground for the circuit.
- D10: Sends PWM signals to control the Micro servo 9G.
- D12: Receives the signal from the Water Level Sensor.
Micro servo 9G
- GND: Connected to the common ground.
- +5V: Receives power from the Arduino UNO's 5V pin.
- PWM: Receives PWM signals from the Arduino UNO's D10 pin.
Water Level Sensor
- SIG: Sends an analog signal to the Arduino UNO's D12 pin.
- VCC: Powered by the Arduino UNO's 5V pin.
- GND: Connected to the common ground.
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:
}
This code is a template for the Arduino UNO and does not contain any specific functionality. It consists of two primary functions: setup(), which runs once when the microcontroller is reset or powered on, and loop(), which runs continuously as long as the microcontroller is powered.
To implement the control of the Micro servo 9G based on the Water Level Sensor input, the user would need to add code within these functions. For example, initializing the servo on a specific pin in setup() and reading the water level sensor in loop() to determine the position of the servo.