Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

Arduino-Controlled Ultrasonic Sensor with RGB Indicator Lights

View and Edit Project In Cirkit DesignerImage of Arduino-Controlled Ultrasonic Sensor with RGB Indicator Lights

Circuit Documentation

Summary

This circuit is designed to interface an HC-SR04 Ultrasonic Sensor with an Arduino UNO microcontroller. The circuit includes three LEDs (red, green, and yellow) and two tactile switch buttons. The HC-SR04 sensor is powered by the Arduino and is connected to two digital pins for triggering and receiving echo signals. Each LED is connected to a separate digital pin on the Arduino for individual control. The tactile switches are also connected to the Arduino to possibly serve as input devices. The ground connections are shared among the components and tied to the Arduino's ground.

Component List

LED: Two Pin (red)

LED: Two Pin (green)

LED: Two Pin (yellow)

HC-SR04 Ultrasonic Sensor

Arduino UNO

Tactile Switch Buttons - 12mm Square (x2)

Wiring Details

HC-SR04 Ultrasonic Sensor

LED: Two Pin (red)

LED: Two Pin (green)

LED: Two Pin (yellow)

Tactile Switch Buttons - 12mm Square

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 is the template code for the Arduino UNO. The setup() function is intended to contain initialization code that runs once at the start, such as pin mode declarations. The loop() function is meant for the main code that runs repeatedly, which could include reading sensor data, controlling LEDs, and reading button states. The actual implementation details will depend on the specific requirements of the circuit's operation.