In this Instructable,
We will be making a simple Arduino based Detection System using the Ultrasonic Senor,a servo motor and a Piezoelectric buzzer which starts to ring when the sensor detects an object within its range. This is a simple project that can be done within an hour and this will also add to your knowledge on the Arduino and the components that are used.
So Lets get Started!!!
Step 1: Working
The working of this system is as follows -
The Ultrasonic Sensor which has a Range of 400 cm is placed on a servo motor and as it rotates the sensor will detect if any obstructing object is present.
If a obstructing object is present the sensor will detect it and send a signal to the buzzer which in turn starts to ring and the distance at which the object can be viewed in the serial monitor of the Arduino IDE.
This data of the Sensor is also sent to the Processing IDE Software which then creates a graphical map displaying where and what distance the object is present.
Step 2: Components & Tools Required
1. Arduino UNO and Ethernet Cable
2. Ultrasonic Sensor - HC-SR04
3. Servo Motor - MG-995
4. Piezoelectric Buzzer
5. Bread Board
6. Male - Male Jumper Wires
7. Female - Male Jumper Wires
8. Fevikwik - 2
9. Small Plastic Box
Step 3: Connections to Be Made:
> Connect the Trigger Pin of the Sensor to Pin 2 of the Arduino
> Connect the Echo Pin of the Sensor to Pin 3 of the Arduino
> Connect Vcc and GND of the Sensor Supply and Ground respectively
> Place the buzzer on the breadboard
> Connect its Positive End to Pin 10 of the Arduino and connect the Negative End to ground
> Attach the black and red wire of the servo motor to ground and supply respectively
> Attach the yellow wire of the servo motor to Pin 9 of the Arduino
> Connect 5V terminal of the Arduino to supply and GND terminal of the Arduino to ground
After Finishing these connections, place the entire circuit inside the as shown in the figure
Now Its time to Code
Step 4: The Plastic Box
A s you have seen in the images, we have used a medium sized plastic box.
Cut the Lid of the box into two pieces as shown in order open half the lid to adjust the connections while the motor is not disturbed.
Cut a small square hole in the bottom of the box as shown in the image in order to plug in the Ethernet Cable into the Arduino.
Step 5: Code
This Projects Consists of two codes, one for the Arduino IDE and the other for Processing IDE.
The Processing IDE is used for creating the radar where all the objects get mapped in their locations.
The software can be downloaded here.
The code is available below -:
Step 6: Final Touches
After Finishing the connection and uploading the code into the Arduino place the circuit carefully into the plastic box as shown and also carefully place the Ultrasonic sensor onto the Servo motor as shown in the figure and place the Servo motor on the lid of the box and stick it with fewikwik.
If the buzzer is not working, please recheck the connections of the buzzer and also the sensor.