I am trying to figure out the best method of calculating speed.
Sounds easy right? Well, not really as it turns out...
I want to build a little something to strap on my bicycle which will read out my current speed. Now, I know everyone is shouting "Hall Effect! GPS! LASERS!" but that is just too easy! The LCD readout is easy, its the method of sensing that has me thinking.
I want this little guy to be completely standalone - one box. I also want it to be able to be used on any wheeled vehicle with no modifications to the box, only the method of mounting. Plug and play.
Thus far I have come up with two options.
1). Optical Flow sensor. I see this as a pretty good option. Sadly I don't have one to test at the moment and my local tinker-toy-shop move hundreds of kilometres away so I will have to order and wait.
The limitations I can think of are cost, calibration (wouldn't distance make have an effect?) and the need to keep the lens clean - mountain biking in mud would be out of the question.
2). Sonar. Mount this at an angle facing behind you and calculate the speed using two distance readings divided by time... like so Speed = (distance1 - distance2) / (time1 -time2)... I think. I see one potentially major limitation here; I don't know if the accuracy will be very good because of the speed at which a particular sonar module may operate, resulting in a large deviation at higher speeds, perhaps no redout at all.
Can anyone provide some input? I've never tried this sort of thing and I would quite like to defeat my imagination for coming up with the challenge. I am sure there must be other methods - LASERS! perhaps... I dunno, I am sort of leaning towards the sonar if I'm honest... am I being silly?
GPS is the only one that is plug & play with no modications other than box mounting.
Hall effect requires sensor mounting with a cable that plugs into the box.
An Arduino couldn't do this, but a digital camera pointed at the ground can use image processing the same way that optical mice do to determine distance traveled. Perhaps one of the embedded ARM SoCs could do this.
Assuming you don't bike in windy conditions, a MD0550 or similar wind sensor can sense airspeed.
An accelerometer can be used to estimate velocity. Each time you change velocity you'll lose a little accuracy, though.
Using a suitable fusion algorithm, you might get reasonable results combining an accelerometer with an airspeed sensor.
As for sonar, I don't see how a ping sensor would work unless you are continually biking past stationary objects. An alternate sonar idea is to use Doppler sonar aimed straight at the ground:
Scroll down to the bottom of that page and it says you will still get a Doppler shift from sound waves reflecting off the moving object (the ground in this case), even at right angles (transverse). However, this effect is very tiny and hard to detect. These guys have a way to do it with phasing though: