Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Project Documentation

Arduino Nano Controlled Dual HC-SR04 Ultrasonic Sensors with Buzzer Alert System

Image of Arduino Nano Controlled Dual HC-SR04 Ultrasonic Sensors with Buzzer Alert System

Circuit Documentation

Summary of the Circuit

This circuit integrates an Arduino Nano microcontroller with two HC-SR04 Ultrasonic Sensors and a buzzer. The Arduino Nano serves as the central processing unit, controlling the ultrasonic sensors to measure distances and triggering the buzzer based on certain conditions. The ultrasonic sensors are used for distance measurement by emitting ultrasonic waves and receiving the echo. The buzzer is used as an output device to provide an audible alert.

Component List

Arduino Nano

  • Microcontroller board based on the ATmega328P
  • It has a variety of digital and analog I/O pins
  • Can be powered via USB or an external power supply

HC-SR04 Ultrasonic Sensor (x2)

  • Ultrasonic distance measuring module
  • Operates on a 5V power supply
  • Has TRIG and ECHO pins for triggering distance measurement and receiving the reflected signal

Buzzer

  • An electromechanical component that produces sound
  • Typically requires a digital signal to operate

Wiring Details

Arduino Nano

  • GND connected to the ground pins of both HC-SR04 Ultrasonic Sensors and the buzzer
  • D8 connected to the buzzer's signal pin
  • D9 connected to the TRIG pin of the first HC-SR04 Ultrasonic Sensor
  • D10 connected to the ECHO pin of the first HC-SR04 Ultrasonic Sensor
  • D11/MOSI connected to the TRIG pin of the second HC-SR04 Ultrasonic Sensor
  • D12/MISO connected to the ECHO pin of the second HC-SR04 Ultrasonic Sensor
  • 5V connected to the VCC pins of both HC-SR04 Ultrasonic Sensors

HC-SR04 Ultrasonic Sensor

  • VCC connected to the 5V output from the Arduino Nano
  • GND connected to the ground on the Arduino Nano
  • TRIG and ECHO pins connected to specified digital pins on the Arduino Nano for triggering and receiving

Buzzer

  • PIN connected to digital pin D8 on the Arduino Nano
  • GND connected to the ground on the Arduino Nano

Documented Code

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}

The provided code is a template with empty setup() and loop() functions. The setup() function is intended for initialization code that runs once at the start, while the loop() function contains code that runs repeatedly, forming the main logic of the microcontroller's program. Specific functionality for interacting with the HC-SR04 Ultrasonic Sensors and the buzzer should be implemented within these functions.