Arduino UNO Controlled Ultrasonic Distance Measurement with OLED Display and Water Pump Activation
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary of the Circuit
This circuit is designed to interface an HC-SR04 Ultrasonic Sensor, a 0.96" OLED display, a red two-pin LED, and a water pump with an Arduino UNO microcontroller. The HC-SR04 sensors are used for distance measurement, the OLED display for visual output, and the LED as a status indicator. The water pump is controlled by the Arduino and is likely used for applications requiring fluid movement based on sensor readings. The Arduino UNO serves as the central processing unit, controlling the sensors, the display, and the pump according to the programmed logic.
Component List
HC-SR04 Ultrasonic Sensor
- Description: A sensor that measures distance by emitting ultrasonic waves and measuring the time taken for the echo to return.
- Pins: VCC, TRIG, ECHO, GND
Arduino UNO
- Description: A microcontroller board based on the ATmega328P, widely used for building digital devices and interactive objects that can sense and control objects in the physical world.
- Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0-A5, SCL, SDA, AREF, D0-D13
0.96" OLED
- Description: A small display that uses organic light-emitting diodes to provide a visual interface for the user.
- Pins: GND, VDD, SCK, SDA
LED: Two Pin (red)
- Description: A basic red LED used for indication purposes.
- Pins: cathode, anode
Water Pump
- Description: An electric pump used for moving water or other fluids.
- Pins: VCC, GND
Comments
- Description: Textual annotations or notes that are not physically part of the circuit but may provide additional context or instructions.
Wiring Details
HC-SR04 Ultrasonic Sensor
- VCC connected to Arduino UNO 5V
- TRIG connected to Arduino UNO D4 (for the first sensor) and D2 (for the second sensor)
- ECHO connected to Arduino UNO D5 (for the first sensor) and D3 (for the second sensor)
- GND connected to Arduino UNO GND
Arduino UNO
- 5V used to power the HC-SR04 sensors and the 0.96" OLED
- GND used as a common ground reference for all components
- A4 (SDA) connected to 0.96" OLED SDA
- A5 (SCL) connected to 0.96" OLED SCK
- D4, D5 used to interface with the first HC-SR04 sensor
- D2, D3 used to interface with the second HC-SR04 sensor
- D6 connected to Water Pump VCC
- D7 connected to LED anode
0.96" OLED
- GND connected to Arduino UNO GND
- VDD connected to Arduino UNO 5V
- SCK connected to Arduino UNO A5
- SDA connected to Arduino UNO A4
LED: Two Pin (red)
- cathode connected to Arduino UNO GND
- anode connected to Arduino UNO D7
Water Pump
- VCC connected to Arduino UNO D6
- GND connected to Arduino UNO GND
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)
No additional documentation provided in the code input.