Poor-man's Radar Gun
--------------------

By W1nt3rmut3

You know you speed when driving, don't lie. You know you are looking constantly for that shiny blue and red, ready
to peg ya for doing double. Wouldn't be cool to have a radar gun for your own use? Let me explain....

Science:

This is "Poor Man's Radar" because this isn't real radar. It's really ultrasonic pulses. The good thing is ultrasonic
pulses are easier to understand unlike real radar. To the science.

Speed is the distance traveled over a time period. To find the distance, we need to find how far our pulse traveled to
object we are pointing at. But we need a one-way measurement, not round trip, so we divide by 2. Sound travels at 340 
meters per second. That's the speed of our pulse as well. So, if the pulse was sent out, and "came back" in one second,
the round trip of the pulse is 340 meters. We to know how far the object traveled, so do this twice, subtract the values,
and find the absolute value of the answer. Why the absolute value? If the object was going away from us, we would have a 
negative answer, so the absolute value would get rid of the negative. 

We also need the time. We know the pulse took once second to come back, but we need to divide by 2 since we need only the
one way time. we subtract to measurements, and find the absolute value. Divide the distance by the time, and you have the speed.

Parts:

Pringles Can (THIS DOESN'T INVOLVE eight-oh-too-dot-eleven-bee)

BASIC Stamp (www.parallaxinc.com)

Board of Education (www.parallaxinc.com, or any Printed Circuit Board)

Devantech SRF04 UltraSonic Ranger (http://www.robot-electronics.co.uk/shop/Ultrasonic_Ranger_SRF082001.htm)

Solder, wires, and patience

Assemblage:

The Ranger above will actually give us the distance to the object, so less work for us, but we still need the time. Easy
enough. By rearranging the equation Speed=Distance/Time, we get Time=Distance/Speed. The distance is the reported distance,
and the speed is the speed of sound. 

The Basic Stamp microcontroller is perfect for this, since it is small, and uses the I2C ( http://www.semiconductors.philips.com/buses/i2c/ )
interface, which the Ranger uses to report the distance. Here's the psedocode for the project, cause giving you the code gives
you no challenge:

Define the varibles:

distance_1
distance_2
time_1
time_2
dist_diff
time_diff
speed

loop:

Get distance, store in distance_1
Get distance, store in distance_2
Subtract distance_1 from distance_2, get absolute value, store in dist_diff

distance_1/340=time_1
distance_2/340=time_2

Subtract time_1 from time_2, get absolute value, store in time_diff
dist_diff/time_diff, store in speed

display speed

goto loop

Of course, your gonna have to convert values along the way, I didn't include that part. And your gonna have to be pointing straight on at the
object, since this isn't real radar, which finds the doppler shift of the pulse. Go find a science book for more info.But these instructions 
should get you on the way to building a Poor Man's Radar Gun!

Shouts: Back of Nuts and Volts for the inspiration.





