Great project from Stuart Mace up on Hackster.io.
My garage tends to get a bit messy due to my Wife and I working in there on projects multiple times a week. I like to leave space in front of the work benches so that we have room to work so when I pull into the garage, I try to pull in as little as I can with the garage door being able to close. Before having the “Tennis Ball Stop Light” I often got in and out of my car at least once before I was in a parking spot that allowed the garage to close.
In this tutorial I will show you step by step how to make one of these on your own. Let’s talk about how it actually works. The “Ultrasonic Distance Sensor” actually uses sonar ping to calculate how far away the object in front of it is. This communicates with the Arduino and tells it when to trigger the lights. First I will tell you how to wire the physical circuit. It shouldn’t take long as it is not many components. Also, If you don’t have a stop light laying around, feel free to run LEDs instead. They may require resistors depending on the LED. The circuit is wired as shown in the following figure.