# Measuring Car Speed

#### chrisw1990

Joined Oct 22, 2011
551
This project comes from a recent need for a speed warning sign at a country show..
basically i wanted to measure the speed of a car as it goes along a track, and show a message on an led board in a smiley face or unsmiley face, indicating their speed on the led board..
problem is i dont know how to measure the car speed accurately and cheaply.. i thought about two tubes with pressure sensors, when the car runs the tubes over it triggers the processor, which calculates the speed and bosh. shows it..
but there must be an easier way? as the distance between the tubes would have to be defined distance apart..
all thoughts much appreciated. thanks

#### wayneh

Joined Sep 9, 2010
17,168
Where I live the local police will set up a small trailer carrying a large sign that shows car speeds by radar. It flashes if you're above the limit and switches to a steady "Slow Down" if you're more than 5 mph over.

My point is, what you want already exists.

#### chrisw1990

Joined Oct 22, 2011
551
yes but i want to create one.. a) to find out how the radar stuff works and b) cos i can

#### tshuck

Joined Oct 18, 2012
3,534
If all the cars you are trying to measure are the same, the time between the wheels could be used.

Since that is probably not the case, the Doppler shift of a signal at a known frequency could do it, which, I assume, is the way the speed traps work.

You could also use a camera, but it would probably be more complex...

#### chrisw1990

Joined Oct 22, 2011
551
well yeh i mean i didnt know whether i should use an ultrasonic ranger, detecting the distance twice and calculating the speed between the two.. seems massively complex and ultrasonic rangers give up to 5m ish which is a bit short notice!

#### wayneh

Joined Sep 9, 2010
17,168
...but there must be an easier way?
Well OK but we're rejecting the easy way in favor of a less easy way.

The speed you are working with is a factor. At 60mph you need to detect the speed well before the driver is near the sign, so that there is time to show the result and for the driver to see and read the result. At really low speed like 5mph, a pair of sensors a few feet apart and wired to the display would be fine. The sign can be much smaller as well, since the driver is very close to it.

You could consider break-beam technologies. Not sure, but I think ultrasound should be able to provide a rate-of-change of distance as well. I think DIY radar would be frowned upon by the authorities.

#### chrisw1990

Joined Oct 22, 2011
551
probably.. they frown on a lot of things.. as its on a closed site i reckon the max speed is say 10mph, anything more can just be !! slow down mo'fo. type alert on the sign. but the max car speed is meant to be 5mph. and i figured a flashing speed sign would be more noticable than a stationary sign...

#### tracecom

Joined Apr 16, 2010
3,944

#### Dodgydave

Joined Jun 22, 2012
10,366
This project comes from a recent need for a speed warning sign at a country show..
basically i wanted to measure the speed of a car as it goes along a track, and show a message on an led board in a smiley face or unsmiley face, indicating their speed on the led board..
problem is i dont know how to measure the car speed accurately and cheaply.. i thought about two tubes with pressure sensors, when the car runs the tubes over it triggers the processor, which calculates the speed and bosh. shows it..
but there must be an easier way? as the distance between the tubes would have to be defined distance apart..
all thoughts much appreciated. thanks
Speed is DISTANCE/ TIME

SO the smaller the distance the smaller the time taken to complete the distance. you can measure it with an ultrasonic distance meter, or like you said two tubes on the road, and trigger a window countdown timer,set to the minimum time, if the second tube is pressed before the timer gets to zero , its speeding!

#### WBahn

Joined Mar 31, 2012
26,509
Speed is DISTANCE/ TIME

SO the smaller the distance the smaller the time taken to complete the distance. you can measure it with an ultrasonic distance meter, or like you said two tubes on the road, and trigger a window countdown timer,set to the minimum time, if the second tube is pressed before the timer gets to zero , its speeding!
If you use two sensors (of any type) this way then they have to be positioned so that it is a sure thing that your system can identify which signal maps to which.

How are you going to do this?

For instance your sensor detects six signals. How many cars went by? Three, you say? What it is it two cars each pulling a trailer.

Now, there are ways to deal with this and catch almost all of the possibilities, but you need to carefully identify and consider all of those possibilities.

As a related note, why 5mph. That a really fast walk. Is it really necessary for cars to travel no faster than that? Most cars in first gear will go faster than that idling. Many spedometers have 10mph as their first indication and needle may not even move off the peg at 5mph. Have you ever drive the road forcing yourself to stay at 5mph the entire distance? How likely is it that, short of ticket-issuing cops stationed there on a near-permanent basis, you will never get people obey that limit, no matter how many flashing signs you put up.

#### WBahn

Joined Mar 31, 2012
26,509
ultrasonic rangers give up to 5m ish which is a bit short notice!
Then how on earth were you planning to work with air tubes across the road since those require that the wheels of the vehicle actually roal over the second tube before you can do anything?

If you can move the tubes away from the sign, why can't you do the same with your untrasonic ranger?

#### WBahn

Joined Mar 31, 2012
26,509
You are giving contradicting goals. At first you want messages displayed and want it to be cheap. Then you want to do it so that you can learn. Then youi want it to be simple.

Seldom can you have all of these. Hell, it's pretty rare that you can have any two of them.

If you want it to be simple and/or cheap, then give up on displaying messages and just flash lights under different conditions. If you want multiple conditions, use lights of different colors. If you must have a message, have it printed on a screen/lens and turn on the lamp behind it.

It would help the discussion quite a bit if you could give the kind of budget you are thinking in terms of for this project.