by supersuk » Mon Dec 02, 2013 4:32 pm
Are you riding this out? or is a trainer bike in your living room with your computer available?
Could just get a pic, arduino, atmel, motorolla or other cheap microcontroller, plus one of those dev board things so you have expanded memory and connections for i/o for about 30-40 dollars. Some packages come with pinouts for serial communications. Send data samples back to your computer through rs485 or 232 or other means. Thats probably the cheapest I can think of. You can write your own driver or software for your computer to grab it from the pic over the 485 or 232. I did something similar with a DC motor drive for a school project with about 150 dollars worth of electronics. If you build your own instead of getting the dev kit, and use a cheaper micro controller it would probably be alot less. Materials would probably cost you $5 for the controller, 5 bucks for a breadboard or pcb with lots of holes. A couple of small opto relays, voltage regulator, caps, wires and soldering for another 10 dollars. Extra memory and memory map chip for another 5 bucks.
You could probably just use a Raspberry pi, it has a GPio that you can wire up your sensor to. Probably want to put some sort of isolation between it and the sensor, optically isolated relay or something. Write your own software to convert the pulses from the IO.
You could also get PCI io cards for your computer to pick up any io you want. Not sure how cheap these go for but i'm' willing to be you can find a used one cheap on ebay or craigslist or something. The technology hasn't changed in the last 10 years or so with these. You could just use something like that if your trainer bike is at home and you have your computer nearby.
Last option is to use the fan feedback pin on your computer if its not used. Sometimes motherboards have a pin that hook up to fans that are able to provide feedback. Wheel spinning, fan spinning, same thing. If you're not using this, you can wire to this instead and write your software to grab from that address. You'll get rpms but i'm sure you can easily calculate speed and distance from that.