Today's fancy cars come with all sorts of options, from power mirrors to working seat belts. Some of us condemned to live in the reality of capitalist recession have no car, or perhaps a very modest one. But your modest car can still have some cutting edge technology wedged into the trunk and dashboard if you know what you want and where to look for parts. Today, we make a parking sensor using a sonic range finder, just like in the vehicles our owners drive!
- Ping sonic range finder
- Light or buzzer
Step 1 Using the Ping Sensor
We've used a ping sensor before in our wildlife camera project. One circle emits a high frequency sound wave and the other catches the echo. Based on the difference between the time the sound is made and the time the echo is received, the ping sensor can tell how far away an object is. We will be using ours to detect obstacles in front of and behind our car.
Wire your ping sensor to your Arduino as shown below.
Step 2 Output
What do you want your output to be? Do you want to see a light when you are too close to an object? Would you prefer to be alerted by a buzzer? Figure out what works best for you. I chose to wire a buzzer into the circuit. Place the positive end of the buzzer on pin 8 and the negative end on a ground pin.
Step 3 Code
Load up the example Arduino code for the ping sensor. Navigate to File > Examples > Sensors > Ping. Sonic range finding is a bit of a task and the hardware on the ping sensor cannot do it all for us. The code does the final math necessary to translate the ping values into readable distances.
Now that you have seen the ping code, download this version I made for the parking sensor. The code sets off the warning buzzer when you come within a foot of a parking obstacle. You can change this distance by changing the highlighted section of the code, as shown below.
Step 4 Installation
This is the fun part. How you install your sensor will depend entirely on your materials and the shape of your car's bumper. You could try epoxy or zip ties—even duct tape. I decided to run my wires through my trunk to the driver's seat. My sensor just hangs from the trunk.
Put one of these modules on each end of your car. A front mounted sensor will tell you when you are getting too close to other cars in traffic or on the highway. The back one will help you with your miserable parallel parking skills. For a final iteration, you may want to use giant magnets like the FBI uses to attach radio transmitters to bumpers.
Don't forget! We are currently accepting entries into our photo contest for a chance to win your very own lucid dreaming goggles kit! Just post a picture on the corkboard of a project you have made or are currently working on. All projects are welcome. Here is my example entry.