Iknow, I know ... a tennis ball suspended from the ceiling at just the right spot is the classic solution, but with more than one person using the garage —
possibly driving different cars or just backing in — that just
wouldn’t cut it. Also, it would be in the way for somebody
walking through the empty garage.
Some of the commercial garage parking aids that I
reviewed also had their drawbacks: One system used a
laser beam shining down onto the dashboard of the car;
others had only a limited range of adjustment or warning
lights that were too dim. The situation seemed ripe for a
custom electronic solution.
The System’s Approach
I’m always attracted to projects that involve firmware
as well as hardware development, and it seemed that a
microcontroller — plus some way to sense the location of
a car — would be a good start. As feedback to the driver
of the car, I envisioned a series of bright lamps mounted
on the rear garage wall which would come on as the car
passed through three “zones:” 1) when the car was nearly
inside the garage; 2) when it was in the prime parking
area — which I think of as the “comfort zone;” and 3)
when it had gone too far and was close to hitting the wall.
This job is simple enough that almost any
microcontroller would do. I have used the Propeller multicore processor by Parallax ( www.parallax.com) for a few
projects, and a survey of my supply cabinets turned up an
unused Propeller USB project board. This board features —
in addition to the Propeller microcontroller unit (MCU) —
voltage regulators, clock crystal, USB interface, and a
good-sized area for additional components. It would be
ideal for this application.
I began to kick around ideas to sense the distance to
a car. I considered a motion detector or a diode laser
beam reflected off the front of the oncoming vehicle.
Neither approach seemed accurate enough, and the laser
spot idea wouldn’t work if you backed the car in. I could
also anticipate setup problems with these schemes.
Eventually, I settled on a non-contact approach using
an ultrasonic range finder to measure distance. Parallax
sells these devices, good for distances up to three meters
(about 10 feet), so I sent for one.
Next, my thoughts turned to the signal lamps. These
had to be bright enough to be easily seen in broad
daylight. I stewed about this for a time, considering and
rejecting several ideas; for instance, using relays to control
incandescent bulbs. I found my answer in a local
automobile parts store. For just a few dollars each, I was
able to pick up some running lights — also knows as
clearance lights — of the type used on big truck trailers.
These lamps contain several high-intensity LEDs; are very
visible — even in bright sunshine; and run nicely on 9–16
volts DC. The lamps come in two colors (red and amber),
so I bought one of each and decided I would use
firmware to show when the driver had strayed into the
third zone (mentioned above) and needed to back up.
Refining the Idea
I didn’t want the system to run 24 hours a day —
mainly as a power conservation measure — but also to
turn off the ultrasonic pinger when it wasn’t needed, since
bats, moths, and (I suppose) other creatures are sensitive
to these frequencies. So, I looked for some way to apply
power to the system when the garage door opened, leave
it on for a few minutes while the car was being parked,
and then automatically shut down.
A micro switch activated by the garage door opener
was the most direct approach. However, there were some
mechanical difficulties involved in my case, so I began
looking for another plan. Like most overhead garage door
systems, mine features an overhead lamp which turns on
when the door opens and remains on for about five
minutes. Just what I wanted!
To avoid any modification or direct connection to the
existing door opener (and possible grounding and safety
problems), I decided to go with an inexpensive cadmium
sulphide (CdS) light-sensitive resistor which I would locate
inside the overhead light fixture, close to the bulb. The
change in resistance when the overhead light came on
would turn on a MOSFET which would apply power to the
MCU board and the signal lights.
Now, I felt I had the basic system design pinned
down. With the huge capability inherent in the Propeller
and the ease of programming it, any reasonable
refinements could come later.
A Few Preliminary Tests
My first priority was to see if the components I had in
mind were adequate for the job.
First, I checked the current requirements for the LED
lamps and found them to be fairly modest — only about
40 milliamps at 12 VDC for each lamp. Adding in 30
milliamps for the ultrasonic range sensor and 20 mA for
the Propeller microcontroller board meant that the whole
thing could easily be powered from a small wall wart
Next, I soldered about 30 feet of twisted pair to the
terminals of the CdS photoresistor and mounted it inside a
clear plastic bottle. Refer to Figure 1. I fastened it with
tape inside the garage door opener overhead lamp close
to the bulb, and hooked up my digital multimeter to
measure the resistance. I was pleased to see that with the
August 2015 35