Dual Arduino Nano Controlled Ultrasonic Measurement System with Servo and Buzzer Alert
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary of the Circuit
This circuit incorporates two Arduino Nano microcontrollers, two HC-SR04 ultrasonic sensors (one being Wokwi compatible), a servo motor, and a buzzer. The primary function of this circuit appears to be distance measurement using the ultrasonic sensors, with the servo and buzzer likely providing some form of output or indication based on the distance measurements.
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 Distance Sensor (Wokwi Compatible)
- A distance measuring sensor with a range of 2cm to 400cm
- Operates on a 5V supply
- Has a Trigger and Echo pin for initiating and receiving ultrasonic pulses
HC-SR04 Ultrasonic Sensor
- Similar to the Wokwi compatible version, used for distance measurement
- Also operates on a 5V supply and uses Trigger and Echo pins
Servo
- An actuator that can be positioned to specific angles using PWM signals
- Typically has a control range of 0 to 180 degrees
Buzzer
- An audio signaling device
- Can be used to generate tones or beeps
Wiring Details
Arduino Nano
- Digital Pin D2: Connected to the Echo pin of the Wokwi compatible HC-SR04 Ultrasonic Distance Sensor
- Digital Pin D3: Connected to the Echo pin of the HC-SR04 Ultrasonic Sensor
- Digital Pin D4: Connected to the Trigger pin of the Wokwi compatible HC-SR04 Ultrasonic Distance Sensor
- Digital Pin D6: Connected to the Trigger pin of the HC-SR04 Ultrasonic Sensor
- Digital Pin D7: Connected to the PWM pin of the Servo
- Ground (GND): Common ground shared with the Servo, Buzzer, and both HC-SR04 sensors
- 5V Pin: Supplies power to the Servo, Buzzer, and both HC-SR04 sensors
HC-SR04 Ultrasonic Distance Sensor (Wokwi Compatible)
- VCC: Connected to the 5V output from the Arduino Nano
- TRIG: Connected to Digital Pin D4 on the Arduino Nano
- ECHO: Connected to Digital Pin D2 on the Arduino Nano
- GND: Shared ground with the Arduino Nano
HC-SR04 Ultrasonic Sensor
- VCC: Connected to the 5V output from the Arduino Nano
- TRIG: Connected to Digital Pin D6 on the Arduino Nano
- ECHO: Connected to Digital Pin D3 on the Arduino Nano
- GND: Shared ground with the Arduino Nano
Servo
- PWM: Connected to Digital Pin D7 on the Arduino Nano
- VCC: Connected to the 5V output from the Arduino Nano
- GND: Shared ground with the Arduino Nano
Buzzer
- PIN: Connected to the 5V output from the Arduino Nano
- GND: Shared ground with the Arduino Nano
Documented Code
Arduino Nano (Primary Microcontroller)
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
Arduino Nano (Secondary Microcontroller)
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
Note: The actual functionality of the microcontrollers will be determined by the specific code written within the setup() and loop() functions. The provided code snippets are templates and do not contain any operational code.