Bike Trainer Computer: Speed, Cadence, Heartrate, Trainer Temp

[Kurt] was using a bike trainer to get in shape for warmer and dryer biking months. Unfortunately it’s pretty hard to train if you don’t have reliable data concerning how hard you’re working. There’s commercial solutions for trainer computers but he’d read some rough reviews about them and decided to build his own trainer computer. He’s done a great job of integrating a lot of different data collection sources. He picked up two replacement bike computer sensors to use on the back wheel for speed (the front wheel is stationary with this type of trainer) and on the crank for cadence. He also wears a heart rate monitor and sourced a SparkFun heart rate module to gather that data. Finally, an LM235 analog temperature sensor was combined with a spring clamp to detect the temperature of the trainer’s resistance module.

Data from the sensors is collected with a PIC16F73 microprocessor and fed to a computer over a serial connection. He’s got a screenshot of the realtime graphs that he’s using for feedback while on the bike. This is a useful and practical setup but when he get’s tired of exercising he’s just a few lines of code from converting this into a gaming controller.

[Thanks Justin]

13 thoughts on “Bike Trainer Computer: Speed, Cadence, Heartrate, Trainer Temp

  1. I love this idea, but wish the hack was a bit more ‘homebrew’. As in less combining of pre-built modules and more building it all from scratch. I know how hard it is to make/buy sensors and make them accurate, but that’s half the fun.

  2. This is very cool! Especially for a health person like me, and it doesnt use an Arduino! ;)
    Im not sure why one PIC doesnt do it all given software debouncing is fairly easy, there are not that many sensors and it would eliminate the annoying 1/2byte communication… However the software and java implementation is nice, simple or not Java is one of the few mainstream languages I have never played with and this has helped me decide to play with it (Im not good with GUI stuff other than C# in VS).

  3. Pretty nice, and you can’t complain of the lack of documentation.
    He seems to derive the power from the speed of the wheel, but why not derive it from the heat of the dissipator on the fluid unit ?
    Also if the writer reads this, RXTX (http://www.rxtx.org/) is a better alternative to javax.comm.

  4. @Spork but what isn’t made up of modules these days? Even the PIC is a module of sorts! @Chris I recently rode an endurance road event with a few mates and may have been tweeting as I was riding (hitting 100km, half way, 200km etc) – an automatic way to do that as you’re riding would be great!

  5. Seems overkill to me on a stationary bike. You need a reed switch and a serial cable to attach to your PC running some code. Then you could auto-tweet workouts, update a database so you have a workout log automatically, have it email you when you haven’t worked out in 24 hours.

    Now obviously you can’t take a PC on the road…

  6. @Janin – Kurt Kinetic publishes the power curves as a function of wheel speed. So that’s what I used :) It’s easier.

    FWIW – I did this two seasons ago, and put it up for some college buddies of mine across the country who were big cyclists. I’m incredibly surprised anyone found this, let alone linked it. I was a little confused by the e-mails in my inbox this morning referring to a “cool project” and it took me a bit to figure out what happened!

    The choice of the USB PIC board w/ HRM chip was purely based on availability of the HRM chip, and other scrap in the junk bin of parts. A single PIC is more than capable of the USB, sensor inputs, A-D, etc.

    I’ve put a small machine shop together in the interim; I’d probably use a stepper motor now and electronically vary the resistance myself in response to training curves, and it’d be much easier than approximating a power curve.

    It still won’t tweet, though. Tweeting your cycling performance? Really? Seriously? :)

    1. Hi – this is a long shot asking on a post that is 6 years old but I’ll try anyhow… just wondering if you did anything further with the automated resistance side of this project ? What did you use the temp sensor to vary/control or did you just want to see how hot the resistance gears got?

  7. Holy crap, I’ve been wanting to do this for a year now, temp sensor and all. I have a fluid trainer, and I know that it’s resistance varies with temp. A buddy of mine has a powertap wheel that I can use to calibrate my trainer. I also got my TI Chronos dev kit in the mail this week, I’m hoping to integrate that too.

    I’ve been too lazy to put it all together, but you’ve inspired me, and given me a great jumping off point to boot. I never figured that there was anyone else who would have come up with this. Boy was I wrong. Thanks again!

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.