For my first instructable, I'd like to present The Parking Spotter. This is not a new concept, I know. However, this build was done specifically to suit my needs/wants/materials already in my possession. Typically, a project begins with an idea, parts are then gathered, and the building commences. In my case I looked around at the parts and material that I had on-hand, browsed Instructables (a daily occurrence), and found inspiration from others. I shouldn't fail to mention the site of wooden saw horses in front of my sister-in-laws $30k car to protect the $200 bicycle!! So, let's dive in!

BOM (bill of materials):

* Arduino Uno, clone (Freeduino, etc.), compatible (Perfboard Arduino, etc.)
* SRF04 Ultrasonic Ranging Sensor
* (8) 5mm LED's for indicator lights (I used red, yellow, and green for this project; but you can use whatever colors you would like)
* (4) Appropriate resistors for your LED's (I used 100 Ohm for red & yellow, and 82 Ohm for green)
* (9) LED holders of your choosing (I used LED Holder Model:276-079 for the indicator lights, and LED Holder Model:276-080 for the power indicator/pathway light)
* (1)Power-On/Walkway 5mm LED & resistor(for pathway illumination in front of your car)
* SPST switch (power)
* Power source - I used a wall wart with 7.4v DC output because, well, I had one on my bench. You can use a 9v battery & battery clip. I just don't want to mess with batteries.
* Wire
* Heat-shrink tubing and/or electrical tape
* An enclosure (I used the plastic 4" x 6" enclosure from Radio Shack)
**     Optional:
     * One row of (5) male header pins
      *Hook-up wire with female connectors: (5) for the LED's & (4) for the sensor
* PCB standoffs
* cyanoacrylate (super glue, finger nail glue)


Soldering iron, solder & fume extractor
Drill or drill-press
Appropriate drill bit for your LED holders
5/8" drill bit for the sensor holes
Screwdriver for the enclosure
And, anything that you feel you need to make your task easier.

I am going to assume that you are, at least, familiar with the Arduino development platform. If you are not, I suggest visiting the Arduino homepage. Study the hardware and software. Learn the basics. Build some circuits (actually, this could be your first! It's not that hard!) When you have reached that point, learn more! I've been learning this stuff on my own with TONS of help from the wealth of information on the Arduino site, great Instructables members and the web in general.

Step 1: Layout Design

As I said, the choice is up to you as to what Arduino or Arduino-compatible board you use. As for me? Well, I built my own board based on this Instructable - Perfboard Hackduino (Arduino-compatible circuit) by jmsaavedra and the paper breadboard overlay from Sparkfun. Pay close attention to the 5v regulator part of the circuit in the Perfboard Hackduino 'able, though. Read the entire 'able & comments before you start. It's good, but can be confusing if you don't pay attention.
Referring to the photo 1 notes, there are two sets of red/black wires. The set toward the top of the picture is for a power indicator LED & the other is for power. I used a wall wart with an output of 7.4v DC. You can use a 9v DC battery, if you prefer, but I didn't want to have to mess with changing batteries.

Once my perfboard had the ATMega circuit on it, I prepared my enclosure. I laid out the parts (8 LED's with resistors & ultrasonic sensor) on the lid of the enclosure to determine two things: aesthetics & roughly how much wire I would need (Sorry, no pics of this step). The placement can be of your own liking. I got my inspiration from yet another Instructable, Ultrasonic Parking Sensor by atatistcheff. I like a lot of LED's. :)
I remember someone posting something like this; he pointed out that you can get salvage ultrasonic rangers from auto scrapyards for very cheap. Obviously more involved to get it wired up, but if you want to cut BoM costs maybe look into it.
Chinasaur, I actually got mine on Ebay for about $2US. I just won another bid - (2) for $4.35US with free shipping. I've read that there are more accurate ultrasonic sensors available, and maybe you can find one of those. That is a very cool idea. However, I'll probably just stick with these.<br> BTW, I like the name!<br> <br> Thanks,<br> <br> Apt
<p>I just purchased the same ultrasonic sensor for $.60.</p><p>Free shipping.</p>
<p>First of all, thank you for doing this AptPupil. I definitely needed this in my garage as the old microswitch on a lever and LED was a very ugly sensor :) . After about an hour of debugging my issues, I can say that I am very happy with the result. I found that the LED's were kind of flickering during the reading for some reason, so after tweaking, and looking at Michale LeBlanc's code, I mashed the both, and changed the LED's a little bit to behave more like a visual measurement gauge.</p><p> First it lights green.<br>Then green and yellow1. <br>Then green, yellow1 and yellow2. <br>Then all. <br>Then yellow1, yellow2 and red. <br>Then yellow2 and red. <br>Then flash all.</p><p>[code]</p><p> // convert the time into a distance</p><p> inches = microsecondsToInches(duration);</p><p> if (inches &gt; 24) {</p><p> digitalWrite(GRN_1, LOW); // No LED</p><p> digitalWrite(YEL_1, LOW);</p><p> digitalWrite(YEL_2, LOW);</p><p> digitalWrite(RED_1, LOW);</p><p> }</p><p> else if (inches &lt;= 24 &amp;&amp; inches &gt; 18) { </p><p> digitalWrite(GRN_1, HIGH); // green LED</p><p> digitalWrite(YEL_1, LOW);</p><p> digitalWrite(YEL_2, LOW);</p><p> digitalWrite(RED_1, LOW);</p><p> }</p><p> else if (inches &lt;= 18 &amp;&amp; inches &gt; 12) { </p><p> digitalWrite(GRN_1, HIGH); // green LED</p><p> digitalWrite(YEL_1, HIGH); // yellow LED 1</p><p> digitalWrite(YEL_2, LOW);</p><p> digitalWrite(RED_1, LOW);</p><p> }</p><p> else if (inches &lt;= 12 &amp;&amp; inches &gt; 8) { </p><p> digitalWrite(GRN_1, HIGH); // green LED</p><p> digitalWrite(YEL_1, HIGH); // yellow LED 1</p><p> digitalWrite(YEL_2, HIGH); // yellow LED 2</p><p> digitalWrite(RED_1, LOW);</p><p> }</p><p> else if (inches &lt;= 8 &amp;&amp; inches &gt; 6) { </p><p> digitalWrite(GRN_1, HIGH); // green LED </p><p> digitalWrite(YEL_1, HIGH); // yellow LED 1</p><p> digitalWrite(YEL_2, HIGH); // yellow LED 2</p><p> digitalWrite(RED_1, HIGH); // red LED</p><p> }</p><p> else if (inches &lt;= 6 &amp;&amp; inches &gt; 3) { </p><p> digitalWrite(GRN_1, LOW);</p><p> digitalWrite(YEL_1, HIGH); // yellow LED 1</p><p> digitalWrite(YEL_2, HIGH); // yellow LED 2</p><p> digitalWrite(RED_1, HIGH); // red LED</p><p> }</p><p>// make this bit FLASH!</p><p> else { </p><p> digitalWrite(GRN_1, HIGH); // ALL LEDs ON</p><p> digitalWrite(YEL_1, HIGH);</p><p> digitalWrite(YEL_2, HIGH);</p><p> digitalWrite(RED_1, HIGH);</p><p> delay(250);</p><p> digitalWrite(GRN_1, LOW); // ALL LEDs OFF</p><p> digitalWrite(YEL_1, LOW);</p><p> digitalWrite(YEL_2, LOW);</p><p> digitalWrite(RED_1, LOW);</p><p> delay(250);</p><p> }</p><p> delay (100); //from mentor to stop flickering of LED's</p><p>}</p><p>[/code]</p><p>Once again, thanks :)</p>
<p>That is pretty much how I did mine as well, just no blinking. I also added a button that I can use to set the preferred distance and save to EEPROM so I don't have to go back into the code to change it. I set the various LED stages to be percentages of the set point, so it scales out as you increase the distance of the set point. Lastly, I added an LCD that will display the current sensor reading as well as the set point along with a button to turn the backlight on and off.</p>
Sounds cool ydoucare :) The Arduino community is so awesome and sharing.
<p>Sure is! :)</p>
<p>Oh yeh, I have the distance values low, as I was testing from my desk and it was easy to just wave my arm towards the arduino than pushing a car around. haha!</p>
This is going to be a good project with my smARtCORE U
I spent the last 45 minutes checking it out at <a href="http://smartduino.com/smartcore/smartcore-u/" rel="nofollow">smARtDUINO &ndash; Do it yellow&hellip;</a> , as well as, your Kickstarter page. Wish I had seen it in Nov.! Very cool!! I'd like more info. on your products. I'm not sure as to the method of connecting, for example, the ultrasonic sensor. Solder? Plug? Can you post a link to more info? Are you developing your own line of smARTsensors to plug in like your other pieces? I am intrigued!!<br> <br> BTW, I am glad you like my project!!<br> <br> Apt
You want to buy the super deluxe kit I'll sell you mine! I have a ton of extras as well. SmARtMAKER disappear from the face of the earth! No one will answer my questions and I'm still owed more parts I never got!!
Great ible man! <br>Congratulations!
I made something almost exactly like this a few months back, but added a motion sensor so that would sleep until I needed it. I used the 'green, yellow, red' LED method some others mentioned here as well.
Cool. I've thought about adding motion to it in that way as well. Been to busy lately, though.
Thanks alot for giving the files together in Zip file. hope others do the same.
If you go to www.smARtMAKER.com you will find everything you need to know! I am a backer of this Kickstarter project. You went to the wrong site they changed it a few weeks back. All the smARtMAKER products connect together by a bus system, there are a whack load of sensors and cpu's all Arduino compatible written in Arduino code but much easier to use. I backed this project the 1st day I seen it. Let me know what you think! I'm looking for Ideas for new projects to do with this system.
Very nice construction technique ...great job! <br>Build_it_Bob
Thanks Bob!
One of my first projects, with the Arduino, was such as this, but a little less equipment.. I do like the dedicated case &amp; extra LED's though.. the one I concepted, used just a 3 LED's, 1 each red, yellow, &amp; green.. the concept was as soon as you got within 6 feet, it would turn on the green LED, less than 4 feet it would change to the yellow, then 2 feet the red.. Anything closer than 1 foot, all three would flash rapidly. Never got too far on it, though.. Very good design!
Great idea! I will try to adapt using a buzzer to indicate how close the car is in addition to leds. This will make easier to reverse parking. Thanks for sharing. My father in law will love this device.
hi, im louie from the philippines, i am interested on doing your project, i am a beginner on the arduino and your atmega 168 is just an IC, may i ask, how will you burn the code into your IC what tool will you use? <br>by the way this is so cool that's why i want to build it :)
on the actual picture of your prototype you use 6 capacitor while in your schematic diagram you only use 5 capacitor? im confused on the missing capacitor and where to place it, and also what is its value. i also open the ArduinoParkingSpot.fzz in fritzing and it open, i also find out that it also has 1 capacitor missing. i hope you will respond on my query because i seriously want to try this project :) <br>by the way very great project
Tolstoyan: Good eye. I forgot to add the 100nf capacitor to the breadboarded picture (Fritzing layout). If you follow the instructable mentioned in the intro (<a href="https://www.instructables.com/id/Perfboard-Hackduino-Arduino-compatible-circuit/" rel="nofollow">Perfboard Hackduino (Arduino-compatible circuit) by jmsaavedra</a>) to build your circuit &amp;/or look at the breadboard overlay, you will see that it goes to both chip-pins 7 &amp; 8. It is part of the Arduino circuit. If you are using a pre-built board (Arduino Uno, Freeduino, etc), you don't need to worry. It's alraedy there. I'm not exactly sure what it does in the circuit. Someone else may be able to answer that. I will fix that a.s.a.p.<br> <br> Thanks,<br> Apt
if i am going to use a arduino uno all i need to buy is the proximity sensor, LED's and its resistor?. is the pin configuration of the (https://www.instructables.com/id/Perfboard-Hackduino-Arduino-compatible-circuit/) is the same with the arduino uno? can you provide me a schematic diagram of it using an arduino uno? im worried on which pin to put in each pin, because im a beginner and im not really an arduino jockey. hope you can understand THANKS :)
Hi Louie. Thanks for viewing &amp; the comment! To answer your question, there are several ways to program your chip. I have an Arduino Uno &amp; ATMega 2560. I uploaded the sketch to an ATMega 328 with bootloader while it was in the Uno board. Then I extracted the chip &amp; placed it into the IC socket on the Perfboard Arduino (step 11 of the Perfboard Arduino 'Ible mentioned) . Here is another method that I've used before, shown on the <a href="http://arduino.cc" rel="nofollow">Arduino.cc</a> site: <a href="http://arduino.cc/en/Tutorial/ArduinoToBreadboard" rel="nofollow">From Arduino to a Microcontroller on a Breadboard</a>. There are programmers. Many more <a href="https://www.google.com/#hl=en&tbo=d&spell=1&q=options+to+program+an+ATMega328+chip&sa=X&ei=-5P3ULuTPMPxqQH1x4GYBQ&ved=0CC8QBSgA&bav=on.2,or.r_gc.r_pw.r_cp.r_qf.&bvm=bv.41018144,d.aWc&fp=8fc414e20917cd3d&biw=917&bih=579" rel="nofollow">options to program an ATMega 328 chip</a>. Browse, and you shall find. :)<br> <br> Let me know how your project turns out!<br> <br> Thanks again,<br> <br> Apt
Your Instructable is very Good. I'm in the process of designing one for my wife's car, but instead of starting from scratch, I believe I'll be using your concept. For just starting out in electronics you are very good at it. I have been teaching myself the hobby for the past two years, and people like yourself and all the others on this site have been invaluable in my learning process. <br>Thank you.
Thank you so much for the kind words!! Let me know how yours turns out.<br> <br> <blockquote> <p> &quot;others on this site have been invaluable in my learning process&quot;</p> </blockquote> <p> I couldn't have said it better myself!!</p>
You are welcome, and keep on having fun.
Great instructable! I have a pair of these ultrasonic sensors, I've to try to make this parking spotter.
Thanks!! Let me know how it turns out!
wouldn't it be possible to integrate it in your car in the rear bumper? Perhaps extend to use 4 sensors?
Great idea. Here's one. This guy has great knowledge and Instructables! <a href="https://www.instructables.com/id/Arduino-reverse-obstacle-sensor-for-cars/?ALLSTEPS" rel="nofollow">Arduino reverse obstacle sensor for cars by liudr</a>
I have a tennis ball on a string in our garage, and that's fine for my purposes, but we really need something like this in public parking areas. They could sound an embarrassing alarm if anyone takes up more than one parking space, or in paid garages, perhaps they could send a signal to the check-out that will result in the person being charged double. Great!
Great ideas! In the meantime, <a href="http://shelf3d.com/1u8XtnU97Xo#Arduino%20Parking%20Lot%20%28%20Filled%20%29" rel="nofollow">check this out</a>.
I assume this fastens to the garage wall?
Thanks. I've updated the final step to say that it is to be installed on the garage wall.
Yes! Sorry. It attaches to the garage wall, which makes it stationary. This is not meant to be attached a vehicle.

About This Instructable




Bio: Jeff B. Wayne County Indiana
More by AptPupil:Arduino Ultrasonic "Parking Spotter" 
Add instructable to: