Temperature
Dependence
The ultrasonic pinger used in
this project can be utilized to
measure distance to nearly any
surface — solid or liquid. If
perhaps you are thinking of other
applications, I should mention
here that the performance of the
sensor is a bit dependent on air
temperature. This doesn’t imply a
defect in the pinger’s design; it’s
just a property of sound in air.
Sound travels faster in warm
air than in cold, and since we’re
using the time delay of the return
echo to determine the range,
temperature can affect the
distance reading. The folks at
Parallax provide a handy formula
on the pinger datasheet for
correcting the range
measurements. If you are after the
ultimate accuracy, you will need
to do this compensation.
This means adding a
temperature sensor to the system
and a bit of firmware to do the arithmetic. Not difficult to
do, if you need the accuracy; I chose to ignore this
problem for the garage sentinel since my garage stays
pretty much between 3 and 50 degrees C, resulting
in a possible error of about plus or minus four
percent. This amounts to just a few centimeters at
the closest approach. Not enough to worry about for
parking the car.
Future Upgrades
As mentioned, there is plenty of untapped
capability in the Propeller MCU on this project. I can
imagine adding a beeper or other audible alarm
when the car gets too close to the garage wall as an
additional warning besides the flashing LED. Or,
another cool feature might be to continuously
increase the LED flash rate as the car gets farther
past the comfort zone.
Also, it shouldn’t take much to add a second
pinger, arranged to give a wider coverage angle. This
would be useful if you have a wide garage, or more
than one car.
I may build up a future version of this device
using some of these upgrade ideas, but for the
present it suits my needs as-is. Now, I can always
ease the car into the parking comfort zone without hitting
anything, and with enough room to walk around the car in
front and back after the garage door is closed. NV
August 2015 39
■ FIGURE 4. The Propeller USB project board with all components mounted.
The calibration pushbutton is the red button in the left center
of the board. The cable from the optical sensor plugs into the
two-pin header labeled "SW."
■ FIGURE 5. The LED lamps mounted on the front panel of
the enclosure.