How to hook up Arduino with Bike Wheel?

Is there anyway to get the Arduino to read data from like a bike wheel- for example, how fast it is turning or its speed (either in RPM or MPH) and just put the data on the computer or another place of choice?

Thanks guys

you could use an optical encoder, or like many of the bike speedos attach a magnet to the wheel and let it pass by a sensor

If I were to buy something like this: http://www.parallax.com/Store/Sensors/PressureFlexRPM/tabid/177/CategoryID/52/List/0/Level/a/ProductID/90/Default.aspx?SortField=ProductName%2CProductName

and then attach some arbitrary magnets to a bike wheel and then spin the bike wheel close to the part, should it work and be able to detect every time it comes around? Thanks

more or less yes, it will let you read the wheel's rpm which you can use against its circumference to calculate speed

if you want a more robust package, you can get a el-cheapo spedometer and disconnect it from its computer, like this 5$ gem at deal extreme

http://www.dealextreme.com/details.dx/sku.2682

which is probably not using a hall effect sensor, more like a magnetic reed switch (but whatever works)

Yeah that's actually cheaper then the part I was looking at before and would most likely be more accurate. That would have parts that I could disconnect and hook up to the Arduino? Sorry to ask so many questions. I just ordered my first board and I haven't done much with this so I'm still trying to get as much information as I can.

I'd like to read off the speed of a bike and have it go to my computer so it can be used in a program that I can write. For example: Ride on a bike for 5 minutes, have it constantly be giving the speed to the computer, after it is done, I could have the computer (with the program I write) use the data and spit out average speed, distance traveled, etc...

I could use this speedometer to do so? Do you know where I can find the schematics to do so? Thanks for your help. It's more useful then you could imagine!

http://www.urbanhonking.com/ideasfordozens/2009/11/stationary_bike_speedometer_wi.html

Or would you recommend something like that since I am looking for stationary reading.

that how a spedo like the one I linked to earlier usually works, its a reed switch that gets activated via magnet

usually there is only 2 wires, 1 for power or ground and the other attached to the other end of the switch, and you would hook it up to the arduino in the same way your tutorial shows

the only advantage is you have with "hacking" a premade setup is the moulded plasics and being already wired to a long cable (plus a free battery and speedometer cpu for something else later)

Sweet, so the speedo would be better then- or well same thing but just premade and molded and cleaner?

And it would be "easier" to hook up?

yea it would be cleaner looking, and as far as hooking it up, its the same as any other switch :wink:

[edit]for the record, a reed switch + resistor in their raw form would be half the price [/edit]

bah, half the price of around 5-10 bucks isnt that big of a deal! its also twice the amount of room for screwing up!

The usual rotation detector is a hall effect transistor and a magnet. You will need a way to detect that the very quick event has happened. Some time ago I made a simple bike wheel rotation detector for my pc. I attached a small piece of aluminum foil to the wheel and put two bare wire ends such that they would rub across the aluminum foil when it went past, making a circuit thru the wires. I attached the other ends to the rx and rts lines on my USB serial adapter. Software wise I made a program that checked the serial port buffer every ~30ms for input. If the buffer had contents, the wheel had made a rotation.

The usual rotation detector is a hall effect transistor and a magnet.

Not in bike computers. Hall effect sensors are used in robotics wheel sensing etc because of the fast rotations on a small wheel. All bike computers that I have come across use a reed switch.

Mowcius

bike speedo sensors work very well. good idea to debounce it and use an interrupt routine to catch the pulses. Bonus is that you can leave the speedo head intact to give you a reality check.

Bonus is that you can leave the speedo head intact to give you a reality check.

And it's waterproof (you hope) :wink:

Mowcius

If one wants a cheap magnet and reed switch, check the dollar stores. The local DollarTree store has the below alarms and similar led drawer lights for $1.

http://www.harborfreightusa.com/usa/itemdisplay/displayItem.do?itemid=92745

yea I LOVE dollar tree, and they often do carry those which could also work in many "low speed" applications

I never thought of the dollar store as a potential source of electronic goodies!

I'll have to go sometime this weekend and check it out.

Check out the hardware and toy isles. Inflation has taken away a lot of the good electronic gizmos, so I'm ready for the "Two Dollar Store" to get caught back up. The cookie pans and pizza pans are a cheap source for thin flat plated steel.

haha so consensus is that I can just use that speedometer? Anyone have any specs on how to rip it out and connect it to the arduino?

Thanks guys!

http://www.dealextreme.com/photogallery.dx/sku.2682~seQ.3

look at that image, you cut those 2 wires (any model should be the same)

now go back to

scroll down to the schematic (2nd image) each one of those wires is one end of the switch (the 0--/ ---0 lookin thing)