Arduino-Based Ultrasonic Distance Sensor with Servo Motor Control
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit involves three Arduino UNO microcontrollers, a Servo motor, and an HC-SR04 Ultrasonic Sensor. The components are interconnected to perform specific tasks, with each Arduino controlling different parts of the circuit. The Servo motor is controlled by one Arduino, while the Ultrasonic Sensor is interfaced with another Arduino to measure distance.
Component List
Arduino UNO
- Description: A microcontroller board based on the ATmega328P.
- Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0, A1, A2, A3, A4, A5, SCL, SDA, AREF, D13, D12, D11, D10, D9, D8, D7, D6, D5, D4, D3, D2, D1, D0
Servo
- Description: A motor that can be controlled to move to a specific position.
- Pins: gnd, vcc, pulse
HC-SR04 Ultrasonic Sensor
- Description: A sensor used to measure distance by using ultrasonic waves.
- Pins: VCC, TRIG, ECHO, GND
Wiring Details
Arduino UNO (1)
- 5V connected to Servo vcc
- GND connected to Servo gnd
- GND connected to HC-SR04 Ultrasonic Sensor GND
- Vin connected to HC-SR04 Ultrasonic Sensor VCC
Arduino UNO (2)
- D10 connected to Servo pulse
Arduino UNO (3)
- D9 connected to HC-SR04 Ultrasonic Sensor ECHO
- D8 connected to HC-SR04 Ultrasonic Sensor TRIG
Code Documentation
Arduino UNO (1)
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
Arduino UNO (2)
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
Arduino UNO (3)
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
This documentation provides a comprehensive overview of the circuit, including a summary, detailed component list, wiring details, and the code for each microcontroller.