“I recently added a wood rack to my garage, which unfortunately reduced the car parking depth. I now have to pull up to a few inches of the rack to allow adequate space behind the car to access the rest of my garage. Clearly, it would be nice to have something that helps reliably park very close to the wood rack without actually running into it.
I know it would be easiest to attach a tennis ball to a string and hang it from my garage ceiling in front of my windshield. Clearly, not a 21st century solution! Why do something simple when you can use an ultrasonic sensor, a micro controller, LEDs, and a 3D printed housing?
I tested the measurement range of a readily available (and inexpensive!) ultrasonic sensor and found it should work well for this application. So I designed the Garage Parking Sensor to look like a stop light using a HC-SR04 ultrasonic sensor, an Arduino Nano and Expansion Shield, and three sets of LED, green, yellow, and red. The Nano software is designed around the SR04 code library with some additions, discussed in the software section. The result is a wall-mounted sensor that transitions from green LEDs on from 8 feet away, to yellow LEDs at about two feet, then red and yellow LEDs at about 12 inches, and finally red LEDs at about 4 inches from the the desired position. The final assembly is shown in the picture.
The HC-SR04 Ultrasonic Module provides real time distance to an object using an Arduino Nano. A potentiometer is used to tune when the red LEDs are turned on, so you can park 30 inches from the wall mounted sensor, which is 4 exactly 4 inches from the wood rack. I decided it was simpler (and more fun) to develop a custom PWB for the LEDs and drive circuits (see schematic below). All the Gerber files for the custom PWB (see note Step 1), and the arduino code is provided below. Of course, the sensor has to be housed in an enclosure, which was designed using Fusion 360 and 3D printed. The .stl files are also included below.
The whole project can be built for under $35, including purchasing the custom circuit board. (You might have to spend more to buy multiples of parts to get the best price, but you’ll have lots of parts left over for your next project!)
The Ultrasonic Garage Stop Light parts list is provided above. Essentially all of the parts are available from Amazon, but you may find lower prices if you look elsewhere. If you are an arduino hobbiest, you probably already have many of the parts lying around.
In addition to the specific parts needed for the project, access to a 3D printer is needed, some 3D printer filament (i.e. PLA), a soldering iron and solder, and a variety of hand tools.”