How to wire a Cycle Computer to a PC
August 23, 2006 8:01 AM Subscribe
Cycle Computer to Computer conversion. I would like to run the wire from the magnetic sensor to my laptop and then handle the data programmatically. What is the best and cheapest way to do this so I can read from the port using established methods? Parallel port, USB? Cannibalize a cycle computer or build from scratch?
I can't imagine what this would do for you that a GPS wouldn't, since you get position, speed, and time/date with one. If you want cadence data, perhaps, but this is a very heavyweight solution to achieve that - especially when there's the excellent Edge 305 for $300 or so these days.
posted by kcm at 8:15 AM on August 23, 2006
posted by kcm at 8:15 AM on August 23, 2006
Perhaps sboisvert wants to rig a stationary bike to a computer. I hope so, anyhow.
All that said (and as I'm sure sboisvert knows), all the sensor does is use a magnet to close a reed switch. Which probably wouldn't be hard to rig using spare parts, but might be faster using a cheap off-the-rack one. I'm guessing you'd need to step up the voltage to read the pulse for either parallel or USB.
The computer interface to use is beyond me, but I'd imagine it would come down to which one had a better programming toolkit.
posted by adamrice at 8:43 AM on August 23, 2006
All that said (and as I'm sure sboisvert knows), all the sensor does is use a magnet to close a reed switch. Which probably wouldn't be hard to rig using spare parts, but might be faster using a cheap off-the-rack one. I'm guessing you'd need to step up the voltage to read the pulse for either parallel or USB.
The computer interface to use is beyond me, but I'd imagine it would come down to which one had a better programming toolkit.
posted by adamrice at 8:43 AM on August 23, 2006
Response by poster: I do want it for stationary use though I suppose I could put the laptop in my backpack if I wanted to go mobile.
Mostly I wanted it so I could track data while using a turbo trainer with warnings when speed drops lower than a certain level plus it would be nice to do things like mock up a particular route in software with indicators of when to increase resistance to simulate hills...etc.
Recording speed at specific times would also be interesting.
It would also be fun to code up some speed based games...
It's the nitty gritty of the electronics that I need to know (and am close to useless at but with sufficient pointers to resources etc I could probably fudge my way through)
posted by srboisvert at 8:54 AM on August 23, 2006
Mostly I wanted it so I could track data while using a turbo trainer with warnings when speed drops lower than a certain level plus it would be nice to do things like mock up a particular route in software with indicators of when to increase resistance to simulate hills...etc.
Recording speed at specific times would also be interesting.
It would also be fun to code up some speed based games...
It's the nitty gritty of the electronics that I need to know (and am close to useless at but with sufficient pointers to resources etc I could probably fudge my way through)
posted by srboisvert at 8:54 AM on August 23, 2006
You can do this with a parrellel port easily with a cable and a breakout box. My CNC notes are at home, I'll post some information later if no one else has broken it down for you.
posted by Mitheral at 9:49 AM on August 23, 2006
posted by Mitheral at 9:49 AM on August 23, 2006
The magnetic sensor is a momentary-make switch, exactly the same as the hundred switches in your keyboard, and exactly the same as those under your mouse buttons. Buy a cheap USB mouse or keyboard, solder the wires from the sensor to either side of one of the switches, and you're done. Every programming language in the world can monitor keypresses and mouse input.
The soldering will be easier if you use a mouse, but the program may be more elegant if you use a keyboard.
posted by cillit bang at 11:43 AM on August 23, 2006
The soldering will be easier if you use a mouse, but the program may be more elegant if you use a keyboard.
posted by cillit bang at 11:43 AM on August 23, 2006
I've thought about this a little for myself actually.. Not for stationary use though, so I was thinking microcontroller.
If you are doing it stationary, just feed the signal into a sound card. You should add some clamping diodes to protect the input, but it should work flawlessly.
Processing the data will be easy, or hard, depending on what you want to accomplish.. Recommendations for sound card as data logger software would be great, in this respect.
posted by Chuckles at 11:59 AM on August 23, 2006
If you are doing it stationary, just feed the signal into a sound card. You should add some clamping diodes to protect the input, but it should work flawlessly.
Processing the data will be easy, or hard, depending on what you want to accomplish.. Recommendations for sound card as data logger software would be great, in this respect.
posted by Chuckles at 11:59 AM on August 23, 2006
From the edge 305 link:
posted by Chuckles at 12:08 PM on August 23, 2006
In addition, the Edge 305 incorporates a barometric altimeter for extremely accurate elevation and vertical profile data.Cool! How accurate is "extremely accurate" though?
posted by Chuckles at 12:08 PM on August 23, 2006
Also, I've had some experience with cheap wireless trip computers, and they are completely useless in the city - every taxi creates false signals, and many store security systems cause you to be "travelling communications/h". Great for your odometer, but since you know they aren't your miles it is pretty irritating!
posted by Chuckles at 12:11 PM on August 23, 2006
posted by Chuckles at 12:11 PM on August 23, 2006
The Racermate Computrainer does everything you describe and more. It does cost, however, $1,300.
posted by randomstriker at 12:38 PM on August 23, 2006
posted by randomstriker at 12:38 PM on August 23, 2006
Second mitheral and cilit bang. The only practical way you're getting this data in through USB or a "legacy" RS232 serial port is with a bit of circuitry and, definitely for USB and probably for RS232, a microcontroller, and you don't want that. (You could maybe hack it for the RS232 port without a microcontroller by using the RS232 control lines, but I don't know how fast you can poll them for pulses.)
From what I understand the parallel port is easy to use for stuff like this, but I've never done it, and the modification of a USB mouse/keyboard is a nice trick. The only thing I'd worry about - what's the frequency/duration of the pulses? My keyboard will pass keys when I type as fast as I can and when I press the button for the shortest time I can, but if the switch produces shorter or more frequent pulses it might not work well. This could actually be a problem with the parallel port as well.
posted by TheOnlyCoolTim at 12:56 PM on August 23, 2006
From what I understand the parallel port is easy to use for stuff like this, but I've never done it, and the modification of a USB mouse/keyboard is a nice trick. The only thing I'd worry about - what's the frequency/duration of the pulses? My keyboard will pass keys when I type as fast as I can and when I press the button for the shortest time I can, but if the switch produces shorter or more frequent pulses it might not work well. This could actually be a problem with the parallel port as well.
posted by TheOnlyCoolTim at 12:56 PM on August 23, 2006
A 26" wheels circumference is about 2m (2.150 if you have big knobby tires, apparently). So, if you are going an effective 50km/h you are talking about 7 pulses per second. The pulse width will depend on speed, which might get interesting.
You would want sensitivity in the range from 1-10 pulses per second, at least.
I bet the sound card will read these pulses no problem, given that there is nothing to learn, it really should be your first step. There are lots of sound card oscilloscope programs.. I don't have enough experience to recommend one though.
posted by Chuckles at 5:40 PM on August 23, 2006
You would want sensitivity in the range from 1-10 pulses per second, at least.
I bet the sound card will read these pulses no problem, given that there is nothing to learn, it really should be your first step. There are lots of sound card oscilloscope programs.. I don't have enough experience to recommend one though.
posted by Chuckles at 5:40 PM on August 23, 2006
There is a freeware program called CDVcounter designed to data-log clicks via the soundcard mic jack. A copy seems to be here
It's designed for logging the readings from geiger counters, but works with anything that you can use to make an audio click. It will allow you to output the data in a text format so you can import it into spreadsheet. It will also update a graph to a webserver so that you can have a realtime readout on your website.
posted by -harlequin- at 6:19 PM on August 23, 2006
It's designed for logging the readings from geiger counters, but works with anything that you can use to make an audio click. It will allow you to output the data in a text format so you can import it into spreadsheet. It will also update a graph to a webserver so that you can have a realtime readout on your website.
posted by -harlequin- at 6:19 PM on August 23, 2006
Ok, turns out this is slightly more complicated than I remembered, all the CNC stuff I used was running a real time OS.
Anyways parallel ports have five pins that can be used for simple logic input and in the case of a simple reed switch like found in cheap bike computers you can just hook the switch up to the appropriate pins on the parallel port. The five inputs can then be read with practically any programing language. The problem comes with how promptly the port is reporting the the events. This may not be a factor for you, a short time average may be good enough.
Ian Harries has a good page on putting it all together.
With a parallel port relay board you could both monitor the input and have the computer turn indicator lights on or even adjust the resistance as you follow a real life route. Instructions on rolling your own.
posted by Mitheral at 7:02 AM on August 24, 2006
Anyways parallel ports have five pins that can be used for simple logic input and in the case of a simple reed switch like found in cheap bike computers you can just hook the switch up to the appropriate pins on the parallel port. The five inputs can then be read with practically any programing language. The problem comes with how promptly the port is reporting the the events. This may not be a factor for you, a short time average may be good enough.
Ian Harries has a good page on putting it all together.
With a parallel port relay board you could both monitor the input and have the computer turn indicator lights on or even adjust the resistance as you follow a real life route. Instructions on rolling your own.
posted by Mitheral at 7:02 AM on August 24, 2006
I've had trip computers that provided sensor strength readings to help you position the magnet and pick-up, so at least some are not reed switches.
Now that I think about it though, whether it is a switch or a Hall effect sensor, you probably have to bias it (i.e. with a pull-up).
And -harlequin-, that is awesome!
posted by Chuckles at 8:58 AM on August 24, 2006
Now that I think about it though, whether it is a switch or a Hall effect sensor, you probably have to bias it (i.e. with a pull-up).
--< +vcc br> | | \ / 10kohm \ / | |---| | pick-up| |--- | | |--- ground ->If you wanted to use the sound card, Vcc would be ~1v, for parallel port I suppose it would be 5v (some of Mitheral's links say 6v).
And -harlequin-, that is awesome!
posted by Chuckles at 8:58 AM on August 24, 2006
You use the signal between the pick-up and the resistor to drive the computer input, of course. Should have been labeled..
Infact, let me try that again..
posted by Chuckles at 9:03 AM on August 24, 2006
Infact, let me try that again..
--< +vcc | | \ / 10kohm \ / | |-----> to computer |---| | pick-up| |--- | | |--- ground -And 10k ohm isn't fixed in stone, just a good starting place.
posted by Chuckles at 9:03 AM on August 24, 2006
This thread is closed to new comments.
if not, then i'd suggest coming up with a way to store the data in your cycle computer until you can download it via usb at a later time. you'd probably have to build something with a flash drive and canaballized bike computer to do that.
and just curious: my bike computer gives me speed, distance, average speed, time ridden and fastest speed reached. what additional info are you looking to get through this modification?
posted by lester at 8:11 AM on August 23, 2006