Introduction: Arduino Parking Assistant

Picture of Arduino Parking Assistant

Those of us who have small garages know the frustration of parking a little bit too far in or a little too far out and not being able to walk around the vehicle. We recently bought a larger vehicle, and it has to be parked perfectly in the garage to walk around the front and back.

To appease my frustration I decided to design a device that would allow me to park in the exact spot every time. I love working with arduinos, leds, sensors, and nearly anything else electronic, so I knew from the start that it would probably end up as a contraption with an Arduino inside and a bunch of LEDs on the front!

I tried my best to document every step of this project well, but please note that it has some complicated, tight soldering; it probably shouldn't be your first project.

Step 1: You Will Need...

Picture of You Will Need...

All of these materials are cheap and easily available. I'm not affiliated with any of these suppliers, they're simply where I bought the supplies.


  • 1x 2x4 - at least 8" long
  • 8x Philips Screws - Preferably 1" Long
  • 1x Power Supply - 5 volt, 850mA Here
  • 1x Arduino Pro Mini - 5 volt, 16MHz Here
  • 1x HC-SR04 Ultrasonic Distance Sensor Here
  • 12x Through-Hole Resistors - 220 ohm, 1/4 watt Here
  • 8x Green LEDs - 5mm Here
  • 4x Red LEDs - 5mm Here
  • 1x Tactile Pushbutton - 6mm Here
  • 3x Four Conductor Wire Sold by the Foot - 22 gauge Here
  • 1x Stranded Wire - 28 gauge Here


  • Wire Stripper
  • Bandsaw
  • Soldering Iron
  • Solder - I use 60/40 Rosin Core
  • Hot Glue Gun
  • Speed Square
  • Stick Glue
  • Philips Screwdriver
  • Pencil
  • Drill
  • 7/64" Drill Bit - this depends on the size of your screws
  • 3/16" Drill Bit
  • 1/4" Drill Bit
  • 1" Forstner Bit
  • Computer with the Arduino IDE Download Here.
  • FTDI Programmer Here

Step 2: Print and Cut!

Picture of Print and Cut!

The first step in this project is to make the enclosure. We're using a technique I wrote about in an earlier Instructable, Easy 2x4 Enclosures.

Print the PDF Pattern included below. Be sure you're set to print at 100% scale.

Now cut out the pattern and glue it to the 2x4. Be careful to line it up with the edges. It's only temporary, so only glue it lightly.

Step 3: Cut to Length!

Picture of Cut to Length!

Use your bandsaw to cut the 2x4 along the edge of the pattern. You could also use a chop saw or table saw.

Step 4: Cut the Lid!

Picture of Cut the Lid!

Now we need to turn this thing from a 2x4 into a box! Use your speed square to mark a line lengthwise on the side of the 2x4 about a quarter of an inch from the back of the box.

Go back to the bandsaw and cut directly on the line. This will cut a separate piece that will become our lid. You'll be cutting close to your fingers; Please be careful!

Step 5: Bore It Out!

Picture of Bore It Out!

Using your pencil, mark a rough square on the back of the larger block about a half inch from all the edges.

Now use your 1-inch to drill bore out the rectangle. You need to drill as deep as possible without coming through the front. Don't drill too deep!

Step 6: Drill! Drill! Drill!

Picture of Drill! Drill! Drill!

Chock up your 3/16 inch drill bit and carefully drill each of the holes marked on the front of the pattern. I found it works best if you make a small indention with an awl before you drill.

Next drill a 3/16 inch hole roughly in the center of the bottom. This will be the hole for your calibration button.

Now use your 1/4 inch drill bit to drill two more holes in the bottom. These will be holes for the wires.

Step 7: Finish the Control Box!

Picture of Finish the Control Box!

Now you're using pattern. Peel it off as cleanly as possible.

Take the lid and lay it on the bottom. Turn it around if you have to, you need it in the original orientation.

Next use the 7/64 drill bit to drill a hole about a quarter of an inch from each corner. Drill about a quarter of an inch deep; don't drill through the front!

Use the screwdriver and screws to fasten the lid.

You don't have to, but it makes the box look a whole lot better if you give it a good, through sanding.

Step 8: Insert the LEDs!

Picture of Insert the LEDs!

It's time to electronicfy this box! (Who says that isn't a word?) The LEDs should be arranged in two rings; a large green ring on the outside with a smaller red ring inside that.

Take a LED and stick it in a hole. Align it so the cathode (shorter lead) is toward the outside. Then put a little hot glue around it!

Repeat this process until all the LEDs are in their holes. Be careful to put the right color in the right hole!

Step 9: Sand the LEDs!

Picture of Sand the LEDs!

For a more seamless look, sand the LEDs flush with the wood. It works best to sand before the wires are in. (Unlike I did!)

At this point I realized my holes were too big! (I used a size bigger than 3/16")

Wood filler to the rescue!

Step 10: Solder the Grounds!

Picture of Solder the Grounds!

Bend the shorter lead on a LED and touch it to the short leg on the next LED. Solder these two together and continue around the circle. A needle-nose pliers is a big help!

Step 11: Solder the Resistors!

Picture of Solder the Resistors!

Cut a short length of wire, about two inches long, and strip it! Twist it around a leg of a resistor, it doesn't matter which end. Use your soldering iron to make the connection permanent! Do this for all your resistors.

Next, grab a resistor-wire pair and carefully solder the free end of it to a LED. Be sure not to let the leads touch any other wires! Do this for each LED, and double-check for shorts.

Finally, solder a short length of wire to the leg that was left when you soldered the grounds.

Step 12: Solder the Button!

Picture of Solder the Button!

Cut and strip another short length of wire, and solder it to one of the button's leads. Then clip all the button's legs off except the one adjacent from your solder joint.

Place the button in the box so you can push it from the outside through the hole. Solder the free lead of the button to the ground connections of the LEDs.

Finally, drizzle a bit of hot glue over the button to keep it in place!

Step 13: Solder to the Arduino!

Picture of Solder to the Arduino!

Solder the pin-headers to the programming port of the Arduino. Then push the two wires (from the power supply and the one for the sensor) through their holes and use a bit of hot glue to keep them from falling out.

Strip the wires from the LEDs and button and solder them to the Arduino according to the wiring diagram above. Below is a printable version of the diagrams for your convenience.

Step 14: Create the Sensor Enclosure!

Picture of Create the Sensor Enclosure!

Now we need to make the enclosure for the distance sensor. I previously wrote about this in another Instructable, so I won't go over that here.

Follow the directions in Easy 2x4 Electronic Enclosures to make the box, then use your 1/4 inch drill bit to drill a small hole in the bottom of the box.

Step 15: Finish the Sensor Connections!

Picture of Finish the Sensor Connections!

Push the free end of the sensor wire through the hole in the box, then strip it and solder it to the sensor module as in the picture.

  • Black goes to GND
  • Blue goes to ECHO
  • Green goes to TRIG
  • Red goes to VCC

Use a bit of hot glue to secure the sensor in the case, then use another dab as stress relief for the cable. Screw the lid on, and you're done!

Step 16: Program the Arduino!

Picture of Program the Arduino!

Notice - March 25, 2017: As suggested by commenter "MuchTall" I have updated the code to include an LED countdown during calibration. Please download the new version of the code below.


In order to read the sensor, we need the NewPing library. You can download it here, I also included it below for your convenience. In the Arduino IDE, click on Sketch > Include Library > Add Zip Library... and point it the '' folder.

Next, extract the other zip file and open 'ParkingSystemV1.1.ino' in the Arduino IDE. Upload the sketch to the arduino. See this article or this article if you need help.

Screw on the lid, and you are done!

Step 17: Mounting and Use!

Picture of Mounting and Use!

Mount the sensor on your garage wall where it can sense a flat surface on your car's bumper, not the grill! Mount the control box higher up where it's visible from inside the vehicle.

Park your car in the best position, and use a long object like a pencil to push the button on the bottom. This will calibrate it. The LEDs will begin lighting one by one to give to you time to move aside. Be sure to give the sensor a clear view to the car! The LEDs will flash green to indicate a successful calibration. Red means it couldn't sense anything within range.

When you drive into your garage, slowly approach the parking assistant; the green LEDs show your distance to the ideal parking spot, red shows you when to stop to park in the perfect position!


I had a lot of fun making this project, and I've found it to be really handy! I'd love to see your versions! Feel free to comment with ideas, thoughts, or even your own version. All feedback is welcome!


beul (author)2017-09-21

maybe im late, but i like it , thanks for share

RoshoC (author)2017-08-26

Hey where did you used FTDI Programmer??

I am new to arduino please explain why and when it is used in this project.

michaelumoru (author)2017-07-06

Amazing project and the casing looks absolutely beautiful.

My question, can a buzzer be incorporated into this? If yes, could you upload the codes or post helpful links. Thanks!

Hi! In my initial testing, I had a buzzer hooked up, but I took it out because I didn't see a use for it, and every time you walk between the sensor and the vehicle, it would think the car moved and beep the buzzer.

However, if you want to put a buzzer in the system, it's fairly easy.

Buy a buzzer like this one: and hook the black wire to the ground on the Arduino and the red wire to pin A3.

Then, put "pinMode(A3, OUTPUT);" (without the quotation marks) just below "void setup() {"

Finally, change the lines:

else if (distance <= idealDistance) { //if in the stop position
setLEDs(0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1);


else if (distance <= idealDistance) { //if in the stop position
setLEDs(0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1);

tone(A3, 8000, 1000);

If my calculations are correct :) this should run the buzzer for 1 second when you reach the stopping position.

Thanks for your interest!

zhollett (author)2017-05-03

I also bread-boarded it out with an Arduino Uno R3. Works like a charm.
I will be mounting this under my workbench as the tennis ball keeps getting in my way. Thanks a bunch. I'll post pics when I get it finished, just waiting for the Pro-Mini's to arrive in the mail.

Great! I can't wait to see the pictures!

milad2233 (author)2017-04-25

This is my first arduino project and I purchased everything listed and I am recieving the errors "avrdude: stk500_recv(): programmer is not responding"

and avrdude: ser_open(): can't open device "\\.\COM2": Access is denied.

I do not know what I am doing wrong, I have windows 10 and my circuit is fine because if i plug in the power supply I get a green ring with a red dot.

Your computer isnt communicating with your programmer. Make sure you've selected the right serial port in the "tools" menu of the IDE. lf that doesn't fix it, try doing a Google search for possible fixes for that error code.

I would suggest trying to upload the "blink" example first.

illinbah (author)2017-04-17

Great project. Simple and works a treat. My first Arduino project and it worked first time.

Paul Andrews

SUMITS113 made it! (author)2017-04-13

Tried on breadboard. Awesome Instructable.

bonnette (author)2017-04-02

I created a 3D printed case and made modifications to your code to use a WS2812 (adafruit neopixel) 16 led ring.


Great job! It looks nice.

bonnette (author)2017-04-02

And... nice job. Thank you for shareing with us.

ubobi (author)2017-03-28

Why not mount the sensor on the front of the car and place the LED box on the dashboard? You could then use the car to power it and it would be a parking assistant anywhere.

I would also explore using an ATTiny but I think the number of LEDs may be a problem. To solve that perhaps use just one green and one red LED.

The green one should flash at an increasing rate as you approach the flat surface finally light steady green and light the red one if you go too far.

I love this project and thanks for sharing.

addictedToArduino (author)ubobi2017-03-28

Putting the sensor on the car has been mentioned several times, but these sensors can't get wet. This sensor was mentioned before and looks like it might work on a car.

I've been wanting to get started with ATTINYs but haven't had the time. I would probably use a piezo buzzer instead of leds, like the system built into some cars.

Building a system on a car is a great idea! You could mount sensors on all sides and make a lane-change avoidance system, or simply keep from backing into other cars in parking lots. :) I see a lot of potential in a project like that!

It's not just a matter of getting wet. It's heat, cold, relentless vibration, and power spikes as the car is started. All of the connections to all of its components needs to be solid and protected as well as the main board. And if you're using it as a lane-change sensor it (and the programming) needs to be dead-on reliable.
The standards for automotive electronics reliability are orders of magnitude higher than for hobby electronics like the Arduino. I'd be surprised if an Arduino board lasts more than a few weeks under average automotive conditions, no matter what you do to try to protect it.

ubobi (author)TimothyJ9992017-03-30


My initial reaction to your comment was, "why so negative"? But then i thought, this is the essence of engineering. You provided valuable questions and pointed out possible pitfalls without belittling. This is what drives incredible innovation and I for one thank you.

TimothyJ999 (author)ubobi2017-03-31

Thanks for the even-handed reply. I really wasn't trying to be negative. It's just that most people don't realize how robust automobile electronics are and how rigorously they're tested. We sort of take it for granted because most of the time they work, but it's because they've been subject to incredible stress testing and legal liability tests over the years, and only the best-engineered designs have survived.

The specs on vehicle electronics are amazing considering they're mass-produced. A typical consumer electronic part like an Arduino just isn't in the same league.


gravityisweak (author)2017-03-25

Great job, this looks really useful! I especially love the way you calibrate it by pressing a button when your car's in the right spot. Perfect! I plan on using this idea for sure. Just as soon as I start learning Arduino.

Thank You! Arduino is really easy to learn, just read some of the example sketches and modify them! Adafruit tutorials are good, start on the last page and head toward the more complicated ones.

Thanks, I will check this out. Just ordered an arduino starter kit! I did take some programming WAY back in high school so I won't be totally lost I don't think.

zap88 (author)2017-03-26

Very low tech alternate solution, by my father-in-law:

Hang a tennis ball on a string from the garage ceiling. Locate it so that when you are perfectly parked, it just touches the windshield directly in front of the steering wheel.

addictedToArduino (author)zap882017-03-26

Great idea, but who wants a low tech solution when you can make something like this! ;)

tec13 (author)2017-03-26

Great idea the calibration. I will to study your code

addictedToArduino (author)tec132017-03-26


ecolon3 (author)2017-03-25


GaëlB6 (author)2017-03-21

Looks great!

How do you power it?

I'm looking to do the same, but embedded into my car, but if it's not possible, i think i will try your idea, but i don't have any powersource i my park.

loskop100. (author)GaëlB62017-03-23

Have a look at this waterproof sensor.

Those are cool! I've never seen anything like that before! They're just like the sensors in cars!

Patrick_74 (author)GaëlB62017-03-21

The problem on your car is the water, rain or humidity. That sensor is not made for that !

Use a USB car charger and cut the end off.

That's a great idea! Message me on Instructables if you need advice or have problems. I would be glad to help!

MikeD11 (author)GaëlB62017-03-21

Use your car power and a 12v to USB charger. About $1 on eBay.

muchtall (author)2017-03-21

Cool idea! Maybe consider adding a timed delay to the calibrate function (with a slick LED count down) to allow you to get out of the way.

Thats a great idea! I thought there was some way to optimize that! I'll have to update the code!

Scuba7 (author)2017-03-21

Use a LED strip for simpler wiring and greater colour possibilities.

addictedToArduino (author)Scuba72017-03-21

Good Idea!

Manoj BR (author)2017-03-21

Nice idea .
I think you can also add a buzzer to sound when it is too near.
Case is very neat.


MikeD11 (author)2017-03-21

Very cool, i really like the calibrating idea too!

Thanks! I previously made one where the distance was hard-coded; that was a pain!

cczesak (author)2017-03-21

Recommend using a potentiometer to calibrate. Park where you want to set, then turn the pot to set. This way when you loose power it will remember setting when turned back on. Next fun experiment is to port it to an ATTINY. Cheaper, smaller and can run at a wide range of voltages.

Apparently you didn't read my code! :-) I used EEPROM (arduino's internal memory) to save the distance. In my opinion, a button is less hassle than a pot would be.

Great idea with the ATTINY! I haven't played with them before, but now might be a good time to start!

Surajit Majumdar (author)2017-03-21

Great project


Surajit Majumdar (author)2017-03-21


Tanmay Deuskar (author)2017-03-20

Cool idea! This would be very helpful!


KarloHorcicka (author)2017-03-20

Doesn't work on arduino uno or any other that I tried to change to in "tools"

Really? What error codes are you getting?

About This Instructable




Bio: I'm officially one of those people that spend almost all their time connecting wires, typing code, and doing other stuff people call 'boring.' I ... More »
More by addictedToArduino:Arduino Parking AssistantEasy 2x4 Electronics Enclosures
Add instructable to: