Arduino UNO Based Motion Detection and Distance Measurement System with Audible Alert
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
The circuit in question is designed to interface an Arduino UNO with an MPU-6050 accelerometer/gyroscope module, an HC-SR04 ultrasonic distance sensor, and a buzzer. The Arduino UNO serves as the central processing unit, controlling the sensor inputs and outputs. The MPU-6050 is connected via I2C to the Arduino for motion tracking, while the HC-SR04 is used for distance measurements. The buzzer is controlled by the Arduino to provide audio feedback based on sensor readings or other logic.
Component List
Arduino UNO
- Description: A microcontroller board based on the ATmega328P.
- Purpose: Acts as the central controller for the circuit, interfacing with sensors and providing outputs.
MPU-6050
- Description: A motion tracking device that combines a 3-axis gyroscope and a 3-axis accelerometer.
- Purpose: Provides motion tracking capabilities to the circuit.
HC-SR04 Ultrasonic Distance Sensor (Wokwi Compatible)
- Description: An ultrasonic ranging module that provides 2cm to 400cm non-contact measurement functionality.
- Purpose: Measures distances to objects and provides this information to the Arduino.
Buzzer
- Description: An electromechanical component that produces sound.
- Purpose: Provides audio feedback based on sensor inputs or other conditions defined in the code.
Wiring Details
Arduino UNO
- 3.3V connected to MPU-6050 VCC
- 5V connected to HC-SR04 VCC
- GND connected to MPU-6050 GND, HC-SR04 GND, and Buzzer GND
- A4 (SDA) connected to MPU-6050 SDA
- A5 (SCL) connected to MPU-6050 SCL
- D12 connected to Buzzer PIN
- D10 connected to HC-SR04 ECHO
- D9 connected to HC-SR04 TRIG
MPU-6050
- VCC connected to Arduino UNO 3.3V
- GND connected to Arduino UNO GND
- SDA connected to Arduino UNO A4
- SCL connected to Arduino UNO A5
HC-SR04 Ultrasonic Distance Sensor (Wokwi Compatible)
- VCC connected to Arduino UNO 5V
- TRIG connected to Arduino UNO D9
- ECHO connected to Arduino UNO D10
- GND connected to Arduino UNO GND
Buzzer
- PIN connected to Arduino UNO D12
- GND connected to Arduino UNO GND
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:
}
Note: The provided code is a template and does not contain any functional logic. It needs to be populated with the setup and loop routines to control the circuit components as per the requirements.