## Introduction: Wireless Car Parking Alarm

Are you or your wife/kids have just learned driving a car and are afraid of getting an ugly dent on it while parking it? Don't worry, this project is just for you!! The topic already tells much about the project but still telling, it is a wireless car parking alarm that consists of two arduinos connected wirelessly through rf modulation. The transmitter is present at the back of your car that detects the distance between your car and an obstacle. The distance is transmitted and received by the receiver present inside your car that gives you a beep signal. The rate of beeping determines the distance. Faster beeping means that your car is nearer to an obstacle and it can just bang on it if you don't stop your car.

As already told, the project consists of arduinos both in the transmitter and receiver linked through RF (radio frequency) transmitter and receiver modules. The distance is calculated using an ultrasonic distance sensor that can sense for upto 500cm. Both of them are powered using a 9v battery which makes them portable however the transmitter can be made smaller, hidden and can be powered using your car's 12v power supply if you want to make it permanent. The project is not very difficult to make and can be easily completed within 3-4 hours. I didn't add photos of it mounted on my car as it is not present most of the time.

The following are the beep rates of the receiver depending on the distance (in cm):

1. >200 ---- No beeping
2. <=200 and >150 ---- Beeping every 3 seconds
3. <=150 and >100 ---- Beeping every 2 seconds
4. <=100 and >50 ---- Beeping every 1 second
5. <=50 and >20 ---- Beeping every 0.5 second
6. <=20 ---- Buzzer remains on

If you have any doubt related to this instructable or found an error, please post it in the comment section below.

Please vote for me in the contests by clicking the orange icon on the top right corner of the page if you like this instructable.

## Step 1: Parts and Tools

The following parts and tools are required to make this project. The total cost of the project was around \$20 or 1200 INR.

PARTS:

Transmitter:

Common:

TOOLS:

• Soldering iron
• Soldering wire
• Hot glue gun w/glue sticks
• Wire cutter/stripper
• Pliers

## Step 2: Prep Your Enclosures

The first step is to prepare your enclosure and to make holes for all the parts. For the type of enclosure, you can use any small wooden or metal box but the best option can be to use a plastic one. Before selecting the size, make sure that all the components fit in easily.

For the transmitter enclosure, make holes each for ultrasonic sensor, LED and switch.

For the receiver, make holes for buzzer, dual LED, power indicator LED and switch.

## Step 3: Making the Receiver: Make a Shield for Arduino

This is the first step to make the receiver. To work with your pro mini and to connect your components easily, it is necessary to make a shield for your arduino. This is a much better option than soldering your pro mini to the project which makes ir difficult to remove it later or do any modifications.

Make a shield by soldering some female headers and then some male ones corresponding to each to of the female ones. Then connect all the male headers to their corresponding female ones. Check if your arduino fits in easily.

## Step 4: Making the Transmitter: Make a Power Supply for Arduino

Since your pro mini requires regulated 5v to operate (some require 3.3v as well), you need to make a power supply that would convert the 9v supplied from the battery to safer 5v to operate the arduino.

Refer to the schematic above and solder everything according to it. The circuit uses a 7805 low cost voltage regulator with a couple of filter capacitors.

## Step 5: Making the Transmitter: Connect the RF Receiver Module

RF receiver module is has a very important role here, that is to receive signals from the other arduino connected to the ultrasonic sensor and transmitter. In other words, it provides a wireless interface between two arduinos along with the transmitter module. Connect it according to the following:

1. Pins 2,3,8 when seen from the front ---- Arduino gnd
2. Pins 4,5 ---- Arduino 5v or Vcc
3. Pin 7 ---- Arduino digital pin 10

## Step 6: Making the Transmitter: Connect the Buzzer and LED

Connect the buzzer and LED by following the text below. The role of buzzer here is to beep whenever your car gets near to an obstacle. The rate of beeping increases as it gets nearer. The LED flashes along with the buzzer in red or green color.

Buzzer:

1. Posisitve terminal ---- Arduino digital pin 13
2. Negative terminal ---- Arduino gnd

LED:

1. Negative terminal ---- Arduino gnd
2. Green ---- Arduino digital pin 12
3. Red ---- Arduino digital pin 11

## Step 7: Making the Transmitter: Connect the Battery, Switch and Power Indicator LED

This part will supply power to the arduino. A switch is added to eliminate the need to remove the battery again and again for switching your arduino on and off. The role of LED is to tell you that the transmitter is on so you don't leave in on overnight. Connect them following the text given below or the schematic.

Battery:

1. Positive terminal ---- Terminal 1 of switch
2. Negative terminal ---- Arduino gnd connected to pin 2 of 7805

Switch:

1. Terminal 1 ---- Positive terminal of battery
2. Terminal 2 ---- Pin 1 of 7805
3. Terminal 3 ---- Not connected

Power Indicator:

1. Positive terminal ---- Arduino Vcc
2. Negative terminal ---- Arduino gnd

Connect Pin 3 of power supply to arduino vcc

After doing the electronics stuff, you need to upload the code to your arduino that will tell it what to do when. Since your pro mini does not have an internal programmer, we should have an external one to upload the code. We will be using the nano's programmer (or uno) however there are many options including an FTDI board and RS232. First you need to upload the ISP sketch that will tell your nano to act as a programmer. Do it according to the following steps:

2. In the ide, make sure that boards and serial ports are all correct (Board should be nano at this point)
3. In examples, open ISP sketch and upload it to your nano.

Then you should connect your pro mini to nano/uno in the following way:

1. 5v of nano/uno ---- Vcc of pro mini
2. Gnd of nano ---- Gnd of pro mini
3. Digital pin 13 of nano ---- D13 of pro mini
4. Digital pin 12 of nano ---- D12 of pro mini
5. Digital pin 11 of nano ---- D11 of pro mini
6. Digital pin 10 of nano ---- Reset of pro mini

Then refer to the following steps to upload the code to your pro mini:

1. Change your board in tools>boards to pro mini (or nano also works for me)
2. Change the programmer in tools>programmer to Arduino as ISP.

## Step 9: Making the Transmitter: Make a Shield for Arduino

So now here we start by making the transmitter that will transmit the distance calculated by it to the receiver. The first step to make it is to make a shield for arduino like it was done earlier for pro mini.

Follow the same steps as was done earlier but use 15 headers on one side in this case.

## Step 10: Making the Transmitter: Connect the Ultrasonic Tester

The ultrasonic sensor acts as the most important component here which calculates the distance between you car and obstacle then sends it to arduino for processing. Connect it following the text below.

1. Vcc ---- Arduino 5v
2. Gnd ---- Arduino gnd
3. Trigger ---- Arduino digital pin 11
4. Echo ---- Arduino digital pin 12

## Step 11: Making the Transmitter: Connect the RF Transmitter Module

Connect the RF transmitter module that will send the signals to the receiver wirelessly by following the text given below.

1. Vcc ---- Arduino 5v
2. Gnd ---- Arduino gnd
3. Data ---- Arduino digital pin 10

## Step 12: Making the Transmitter: Connect the Battery, Switch and Power Indicator LED

Like the receiver, I have also added a switch and a power indicator here. Follow the text below to connect them. Since there is an inbuilt voltage regulator on your nano, there is no need to make a power supply and it can be directly powered with a 9v battery.

Battery:

1. Positive terminal ---- Terminal 1 of switch
2. Negative terminal ---- Arduino gnd

Switch:

1. Terminal 1 ---- Positive terminal of battery
2. Terminal 2 ---- Arduino Vcc
3. Terminal 3 ---- Unconnected

Power Indicator:

1. Positive terminal with a 1K resistor ---- Arduino 5v
2. Negative terminal ---- Arduino gnd

## Step 13: Upload the Code to the Transmitter

Upload the code given below in the ino file to your nano. Since it already has a programmer so you don't need any external components.

## Step 14: Add an Antenna to Both of Them (Optional)

The range of your transmitter and receiver is around 100m. Adding an antenna can increase the range by around 100m which will make it 200m however this is not necessary.

For connecting your antenna, locate a pin named ANT on your transmitter and receiver module then solder a jumper wire with length 10-15cm to the ANT pin. You can roll the antenna like a coil to make it look small.

## Step 15: You're Done!

So you're finally done making your own car parking alarm system! Mount the transmitter at the back of your can and receiver on your dashboard or you can just keep it with you. Now will lose the fear of adding an ugly dent on your car while parking it.

The project can be extended even more to make a car theft alarm and parking alarm with 3 sensors which will make it more effective. Or you can even add bluetooth or WiFi to get the distance on your phone.

This brings this instructable to an end. Hope you liked it. Do post the pictures of your project if you've made one yourself or did any modifications. Feel free to comment or ask a question.

Please vote for me in the contests if you like this instructable.

Thanks for watching :)

First Prize in the
Car and Motorcycle Contest

Runner Up in the
Safety Challenge

Participated in the
Epilog Contest VII