loading

This instructable was created in fulfillment of the project requirement of the Makecourse at the University of South Florida (www.makecourse.com)

Most people drive many many miles everyday and it is no secret that a lot of crashes happen simply because of tailgating which is entirely avoidable. It is frustrating when someone is driving dangerously close behind you but you are unable to change lanes, or you can't speed up because of traffic, or ... any other reason. This idea for the project came about as a way to remind the tailgating drivers that they are dangerously close to the vehicle in-front of them.

This particular version of the project is just a table-top version to demo exactly what it does and how it does it. Everything about the model can be replicated on a car which would act as what is the black box here. This is a highly customizable project. These instructions provide a basic shell to get everything working, and some features to get you started. From there, it can be modified in any number of ways.

Step 1: Tools and Materials

Tools:

Dremel Tool or a hand saw
A file (even a nail file will do)
Drill
3-D Printer

Materials:

1x Arduino Uno
1x HC-SR04 Ultrasonic Range Sensor
1x Loctite Super Glue
1x Mini breadboard with a power rail
1x 9V batter OR Arduino compatible USB cable
2x Standard servo motors
A pack of male-male wires
A pack of female-male wires

Step 2: 3-D Printed Parts

Some parts will need to be 3-D printed - especially the 'arm' and the 'hand'. I have attached the CAD files (.stl) for the ones shown here but they can be modified to any design desired.

Step 3: Control System

The control system for this project is rather simple. The proximity sensor is attached on the outside of the box. For the table-top device I have, it is on the side surface. If this was on an actual car, the sensor would have to go somewhere on the back of the car.

The HC-SR04 sensor has 4 pins out of it:
VCC - Will connect to Power IN
Trig - Will connect to pin 3 on the Arduino
Echo - Will connect to pin 2 on the Arduino
Gnd - Will connect to ground

Arm Servo:
Black/Brown wire - This will usually be the ground but consult servo documentation for your specific servo
Red wire - This will usually be the power in but consult servo documentation for your specific servo
White/Orange wire - Will connect to pin 6 on Arduino

Hand Servo:
Black/Brown wire - This will usually be the ground but consult servo documentation for your specific servo
Red wire - This will usually be the power in but consult servo documentation for your specific servo
White/Orange wire - Will connect to pin 5 on Arduino

And make sure the breadboard power-rails are properly connected to the Arduino. The '+' rail to 5V on arduino and the '-' rail to the GND pin on arduino.

Step 4: The Code

The code uses a default Arduino library 'Servo.h'
Ensure this library is present in your libraries folder for Arduino before running the code.

The code initially defines all variables and pins. Following this, it sets-up the proximity sensor to read. The reading is then converted to inches to obtain the distance of the nearest object.

The way the code works is:

a) No object closer than 6 inches: The arm servo sits at a midway position, while the hand servo does the same. The midway position for the arm servo is aligned to be horizontal - parallel to the ground. The midway point for the hand servo is aligned so that the hand is facing down, parallel to the ground.

b) Object within 6 inches: As soon as an object appears within 6 inches of the proximity sensor, the arm servo would first move to a position that would make the arm perpendicular to the ground. As this is taking place, the hand servo will also rotate to turn the hand position 90 degrees. When the object goes out of range, it goes back to position (a)

The distance for triggering the system is 6 inches for this table-top version but the distance can be changed to a desired value by changing the 'distin' value in both the if-statements in the code. Attached is the arduino code which can be directly uploaded to your set-up.

Step 5: Assembly

The assembly is probably the easiest part of this build. The most important part are the cuts in the box for the various equipment.

a) Two holes will have to be drilled out where the proximity sensor would go. Get the largest drill and then enlarge the hole using an exacto knife or a widening drill bit.

b) Cut out a slot for the arm to move around.

c) Determine where the arduino will go and cut out a tiny square for the USB cable if using the cable. This is unnecessary if using a battery pack.

d) Affix the arduino, and the breadboard to the base of the box leaving enough space to also affix the arm servo to the same base.

e) Attach all wires to the breadboard and place the proximity sensor in its slot. With the two cylinders of the proximity sensor sticking out from a hole each, it should be able to hold its own. Use electrical tape if necessary.

f) Attach the arm to the arm servo. Place the hand servo in the enclosure on the arm and attach the hand to the hand servo. These attachments should be made using appropriate sized screws. If these screws were not part of the package with the servos, cable ties, electrical tape, or super glue may be used instead.

g) Glue the arm servo, along with the arm assembly, to the base of the box. Consider placing a small wooden strip under the arm servo to keep it slightly above the box surface to allow for any overshoot.

h) Screw on the top of the box and your creation is all set to be put to use!

<p>Sometimes you rather want a bazooka to be fired xD</p><p>Instead of a winking sign it's probably better to light a LED signal. Or maybe additionally to it.</p>
<p>Cool project. You should enter it in the First Time Author contest.</p>

About This Instructable

255views

3favorites

More by Telpuialion:Tailgate Detractor (Table-top) 
Add instructable to: