Arduino UNO Bluetooth-Controlled Ultrasonic Water Level Detector
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit integrates an Arduino UNO with a Bluetooth module, an HC-SR04 Ultrasonic Sensor, a Water Level Sensor, and a Rocker Switch (SPST), all powered by a 9V Battery. The Arduino UNO serves as the central processing unit, interfacing with the Bluetooth module for wireless communication, the HC-SR04 for distance measurement, and the Water Level Sensor for detecting the level of water. The Rocker Switch is used to control the power supply from the 9V Battery to the circuit.
Component List
Arduino UNO
- Description: A microcontroller board based on the ATmega328P.
- Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0-A5, SCL, SDA, AREF, D13-D0.
Bluetooth Module
- Description: A wireless communication module for Bluetooth connectivity.
- Pins: en, vcc, gnd, txd, rxd, start.
HC-SR04 Ultrasonic Sensor
- Description: A sensor for measuring distance via ultrasonic sound waves.
- Pins: VCC, TRIG, ECHO, GND.
Water Level Sensor
- Description: A sensor for detecting the level of water.
- Pins: SIG, VCC, GND.
Rocker Switch (SPST)
- Description: A single-pole single-throw switch to control the power supply.
- Pins: 1, 2.
9V Battery
- Description: A standard 9V battery to provide power to the circuit.
- Pins: -, +.
Wiring Details
Arduino UNO
- 5V connected to VCC of Bluetooth, HC-SR04, and Water Level Sensor.
- GND connected to GND of Bluetooth, HC-SR04, Water Level Sensor, and one terminal of Rocker Switch.
- Vin connected to the + terminal of the 9V Battery.
- A0 connected to SIG of Water Level Sensor.
- D11 connected to RXD of Bluetooth.
- D10 connected to TXD of Bluetooth.
- D9 connected to TRIG of HC-SR04.
- D8 connected to ECHO of HC-SR04.
Bluetooth Module
- VCC connected to 5V of Arduino UNO.
- GND connected to GND of Arduino UNO.
- TXD connected to D10 of Arduino UNO.
- RXD connected to D11 of Arduino UNO.
HC-SR04 Ultrasonic Sensor
- VCC connected to 5V of Arduino UNO.
- TRIG connected to D9 of Arduino UNO.
- ECHO connected to D8 of Arduino UNO.
- GND connected to GND of Arduino UNO.
Water Level Sensor
- SIG connected to A0 of Arduino UNO.
- VCC connected to 5V of Arduino UNO.
- GND connected to GND of Arduino UNO.
Rocker Switch (SPST)
- Terminal 1 connected to the - terminal of the 9V Battery.
- Terminal 2 connected to GND of Arduino UNO.
9V Battery
-
- terminal connected to Vin of Arduino UNO.
-
- terminal connected to terminal 1 of Rocker Switch.
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:
}
Note: The provided code is a template and does not contain any functional code specific to the components used in the circuit. The user is expected to fill in the setup and loop functions with code to initialize and control the Bluetooth module, read data from the HC-SR04 Ultrasonic Sensor and the Water Level Sensor, and manage power with the Rocker Switch.