# One-dimensional velocity sensor

Discussion in 'Sensors and Actuators' started by Mark92, Nov 19, 2012.

1. ### Mark92

3
0
Nov 19, 2012
Hi all,

I am taking part in a project involving teams who are designing electronic components to be used in a small racing car. Our task is to design and build an optical speed sensor, which has to measure the absolute speed of the car relative to the ground. We researched optical mouse sensors, and understand the basic principle: a camera takes 'pictures' of the surface, which are then brought into a microcontroller where analysis on individual pixels is performed. A speed can then be calculated in the software, by observing the time taken for a pixel to 'move' from one area of an image to a different area of a new image.

Of course, with mouse sensors and computers, two dimensions are being measured. For our purposes, we find it suitable to only measure across one dimension. I was wondering if anyone on this forum has had any experience with this sort of technology. A mouse sensor takes roughly 1500 of these pictures a second, which might not give a high enough sampling rate to accurately measure up to 100 miles per hour. Is there a better way to do this, perhaps only using one dimension? We are also finding it difficult to research how exactly the software reads in the data from the camera, and how it can identify a lighter or darker pixel based on the pixels around it. There doesn't seem to be enough information on the web about that in particular.

Any help in getting us pointed in the right direction would be greatly appreciated!

Mark.

2. ### Harald KappModeratorModerator

10,808
2,438
Nov 17, 2011
It would be easy to point a laser light downwards onto the street and look for changes in the reflected light. That would be independent of direction.
However, unless you know what pattern will be reflected you will not be able to measure speed. Imagine two different types of race track: one having a rather coarse grained asphalt, the other having a fine grained or smooth surface. Even if you manage to regenerate clear pulses from the reflections and count those, you'd still need the distance between the grains to compute speed from the counted pulses.

To my mind comes an entirely different physical phenomenon: measure Doppler shift with ultrasound. Direct an ultrasound emitter in front of the car, have it point forward and down so it hits the asphalt a few 10 cm in front of the car. Measure the frequency of the reflected waves. From that measurement you can determine the speed. Note that you need to have a forward pointing component of the ultrasound setup. If you were to direct the sound directly vertical, you wouldn't see a Doppler shift because the relative velocity in the vertical direction is zero.

Harald

3. ### (*steve*)¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥdModerator

25,448
2,809
Jan 21, 2010
Optical mice actually have a sensor in them which is effectively a low resolution digital camera. They detect motion of the mouse by "seeing" the texture on the surface below them move.

I can't see any real reason you couldn't use this for a car-sized mouse, however cars travel faster than mice!

If you could focus on a larger area (the linear dimensions would need to be scaled using the ratios of the speeds) then it might work -- since the time for a piece of texture to cross the image would be similar.

Other issues would be lighting (both getting even lighting and reducing extraneous lighting)

4. ### Mark92

3
0
Nov 19, 2012
Thanks Harald. We actually looked into this doppler radar method, but the racing team are wanting us to use a purely optical sensing method. Apologies, I forgot to mention this in my post.

Thanks Steve. We could use a lens under the sensor to focus in on a smaller area. And we would use a high power red LED together with a different lens to illuminate the surface area which the sensor would be placed above. The problem of outside light interference would be minimal I believe, given that the this setup would be placed on the middle of the underside of the car.

The racing team have had groups try with the optical mouse before, and they've got close, but not close enough. They are encouraging us to look for an alternative optical method, but like I said, it's the hardware to software stage of 'reading in' the surface data which has us a bit lost.

5. ### Harald KappModeratorModerator

10,808
2,438
Nov 17, 2011
Could you have an additional freewheeling wheel mounted below the car? This wheel should touch the surface of the track and thus rotate directly proportional to the speed of the car.
Construct the wheel such that it has a large diameter running on the track and a smaller diameter next to this that doesn't touch the track. On the smaller diameter mark a regular pattern with dark and light bands.
Shine an LEd onto the pattern and read the reflections with a phototransistor. Count the changes in reflection and divide by the number of alternating stripes on the smaller wheel. This gives you the rpm of the wheel.
From the rpm compute the speed by multiplying with the known circumference of the larger wheel.

This is not purely optical, but gives you reliable pulses and a defined ratio of counts to distance.

File size:
26.2 KB
Views:
203
6. ### BobK

7,682
1,686
Jan 5, 2010
At 100 MPH at a sampling rate of 1500 samp / sec you will move a little more than an inch per sample. So a camera that views several inches of the road, say 5 or 10 should be able to work like a mouse for a car at that speed.

Bob

7. ### Mark92

3
0
Nov 19, 2012
Thanks guys. The 5th wheel is a great idea, which I hadn't thought about. I've got good experience with phototransistors and infrared LEDs for light detection from other projects. If we come to a dead-end with this optical sensing method, it would be a good thing to fall back on.

Doing more research on the processing of pixels in an image, autocorrelation seems to crop up a lot. Most examples, however, are based on the processing of periodic signals (for example, pitch detection in audio analysis). I'm not sure how similar or different the algorithms would be for pixelated image detection.

8. ### Raven Luni

798
8
Oct 15, 2011
Really? I didnt know that - just thought it was a phototransistor or something along those lines. Time to get-a-harvesting I think

Why not pulse a laser and take the frequency shift from the reflected light? Its basically the same principle as an FM demodulator - voltage is induced by the difference in frequency but in this case its just more constant rather than varying at audio frequency.

9. ### (*steve*)¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥdModerator

25,448
2,809
Jan 21, 2010
See http://spritesmods.com/?art=mouseeye

7,682
1,686
Jan 5, 2010