Circuit Documentation
Summary of the Circuit
This circuit is designed around the Arduino UNO platform, interfaced with a piezo buzzer, an LED with a current-limiting resistor, and an HC-SR04 ultrasonic sensor. The Arduino UNO serves as the central processing unit, controlling the buzzer and LED, and reading distance measurements from the ultrasonic sensor. The Adafruit Proto Shield R3 is used as a convenient way to connect these peripherals to the Arduino UNO without the need for a breadboard or custom PCB.
Component List
Arduino UNO
- Microcontroller board based on the ATmega328P
- It has 14 digital input/output pins, 6 analog inputs, a 16 MHz quartz crystal, a USB connection, a power jack, an ICSP header, and a reset button.
Piezo Buzzer
- An electronic device that produces a tone, beep, or sound when provided with electrical power.
Resistor (220 Ohms)
- A passive two-terminal electrical component that implements electrical resistance as a circuit element.
LED: Two Pin (green)
- A green light-emitting diode that emits light when a current flows through it.
HC-SR04 Ultrasonic Sensor
- An ultrasonic distance sensor that can measure distances by emitting ultrasonic waves and measuring the time it takes for the echo to return.
Adafruit Proto Shield R3
- An add-on board that stacks on top of an Arduino, providing a convenient way to attach components and create a circuit.
Wiring Details
Arduino UNO
- D9: Connected to the TRIG pin of the HC-SR04 Ultrasonic Sensor.
- D10: Connected to the ECHO pin of the HC-SR04 Ultrasonic Sensor.
- D11: Connected to pin 1 of the Piezo Buzzer.
- D13: Connected to pin 2 of the Resistor.
- GND: Connected to pin 2 of the Piezo Buzzer.
Piezo Buzzer
- pin 1: Connected to D11 on the Arduino UNO.
- pin 2: Connected to GND on the Arduino UNO.
Resistor (220 Ohms)
- pin1: Connected to the anode of the LED.
- pin2: Connected to D13 on the Arduino UNO.
LED: Two Pin (green)
- cathode: Connected to GND on the Adafruit Proto Shield R3.
- anode: Connected to pin 1 of the Resistor.
HC-SR04 Ultrasonic Sensor
- VCC: Connected to +5V on the Adafruit Proto Shield R3.
- TRIG: Connected to D9 on the Arduino UNO.
- ECHO: Connected to D10 on the Arduino UNO.
- GND: Connected to GND on the Adafruit Proto Shield R3.
Adafruit Proto Shield R3
- GND: Provides ground connections to the LED and the HC-SR04 Ultrasonic Sensor.
- +5V: Provides power to the HC-SR04 Ultrasonic Sensor.
Documented Code
Arduino UNO Code (sketch.ino)
void setup() {
}
void loop() {
}
The provided code is a template with empty setup()
and loop()
functions, which are the standard structure for Arduino sketches. The setup()
function is intended to contain initialization code that runs once when the device is powered on or reset. The loop()
function is intended to contain the main logic of the sketch, which runs repeatedly as long as the device is powered.
Additional Notes
- The code for the microcontroller is currently a placeholder and needs to be completed with the logic for controlling the buzzer, LED, and reading data from the ultrasonic sensor.
- The
documentation.txt
file is empty and does not contain any additional information.