Introduction: Parking Sensor

The parking sensor is an external device that can be mounted to a wall or set on a surface. It reads the distance of any object in it's path and responds accordingly to give you some reference of how close you are to the wall.

It is versatile and a great replacement for the hanging tennis ball trick!

Supplies

  • Arduino Uno ($23)
  • UltraSonic Sensor ($5-8)
  • Neopixel LED light ring ($8)
  • Piezo Buzzer ($1.50)
  • Bread Board ($6)
  • Male to Male wires ($1.50)
  • Selfie Stick ($5)
  • Electrical Tape
  • A box (check or old phone boxes work great)
  • Spray Paint
  • Soldering Iron
  • Battery Pack

If you’re building this without possessing any of the materials needed you’ll end up spending just short of $50. If you have some of these things already lying around though, it’ll make it a lot cheaper

Step 1: Preparation

You can begin by grouping your materials into the internal and external!

The breadboard, Arduino, wires, LED light ring, buzzer, and Ultrasonic sensor will be part of our internal sector of design where we code and test.

The Selfie stick, box, battery pack, and other materials are part of our external design for the presentation and physical aspect of our project!

Step 2: The Guts

The first step for our internal design to do some basic setup for our coding and coding testing. You can do this by making temporary attachments between your Arduino, breadboard, and sensors. This allows you to identify the pins you will use in your coding and run tests as you go to make sure everything is responding accordingly.

For my project I made the following connections between all of my materials.

Piezo Buzzer:

  • GND-GND
  • BuzzIn-Digital Pin 2

Ultrasonic Sensor:

  • VCC-5V
  • TrigPin-Digital Pin 10
  • Echo Pin-Digital Pin 9
  • GND-GND

Neopixel Light Ring

  • PWR-3.3V
  • DataIn-Digital Pin 6
  • GND-GND

Step 3: Coding

For these pins and the distance that was desired for my personal use this code will fulfill work for coding this project:

You may need to download the following Arduino libraries for it to properly work and upload:

Adafruit Neopixel Library by Adafruit Version 1.10.4 or newer

Keep in mind you may need to change the distances for it to be compatible for your personal purpose.

Step 4: Assembly

Now that our connections and coding is all done we can move on to the look and aesthetic of our device.

I used a selfie stick as it had a base and telescoping feature but may items would work for this purpose.

Personally, I painted my check box to give it a nice look and cohesive feel. Then I used a styrofoam block to lift the sensor higher to accommodate for a tab being in the way of the sensor if I left it. This is not necessary if your setup has no obstructions.

I placed the bread board on the block and placed it in the box. I then used some electrical tape to mount the Arduino to the back of the box.

Then I cut out some holes for the ultrasonic sensor to stick out from the box.

I made 2 cuts in the top and side of the box to feed wires. 1 fed to the LED light ring that was mounted at the top of the telescoping stick with electrical tape. The 2nd fed to the battery pack I attached to the outside of the box.

The battery pack can go inside but for me I wanted my power source to be accessible so I can turn off power easily!

From there you can attach the front of the box and use some tape to seal it together.

At this point you should have a clean looking device that can accommodate the telescoping of your selfie stick so you can reach the desired height.

Step 5: Tips and Ideas

At this point you should have a completed parking sensor.

Mounting it to the wall is a battle I personally didn't chose a complicated long term solution for. I just used some duct tape on the selfie stick. You could look into bolts, command strips, or some other solution if taping isn't a great long term solution for you.

For the standing model I used a ruler to provide some stabilization so the weight would be better distributed and could handle itself.

As I mentioned earlier you may want to swap out your base for mounting but I like the telescoping feature as it allows for you to put the sensor and light ring at the ideal location to read the most protruding part of the car and be visible at the height of the windshield.

This design could be easily modified with a more powerful speaker which would provide better feedback than the Piezo Buzzer as it cannot reach a super loud volume.

This design could also likely be reworked for other similar tasks. One that may be interesting to look into would be a trailer backing sensor. This may require more ultrasonic sensors as it would ideally be able to use the light ring to convey distance and appropriate distance to turn to center the trailer hitch.

It has a lot of potential for backing vehicles and working with poor visibility situations.

Step 6: Issues/Solutions

I didn't have too much trouble with any parts of my design.

The only issues I ran into were coding a passive phase so the device would turn off, this required some tolerance to keep consistency but was all resolved in the code.

I also had some issue with my wiring as one of my soldered connections was not properly done.

The overall product was very achievable, just took a little time and thought.

One possibility is that your parking space is tight enough that including the box the width of the breadboard may not leave enough room, if this is the case you could solder your ultrasonic sensor so it can be mounted as the only object between the wall and your car. This would just take some manipulation with placement and support of the sensors and Arduino.

I hope you have fun coding and designing your own parking sensor!

Step 7: Credits

I used a few different resources to learn and compile my code:

/a_atef45@yahoo.com www.zerosnones.net +201153300223 (Buzzer with Ultrasonic code)

/ Arduino Ultrasoninc Sensor HC-SR04 // Re-writed by Arbi Abdul Jabbaar // Using Arduino IDE 1.8.7 // Using HC-SR04 Module // Tested on 17 September 2019 (Ultrasonic sensor basics)

https://forum.arduino.cc/t/state-machines/580593 (State Machine code)