DIY hardwired trainer -- protocol emulation

709 views
Skip to first unread message

Jeff Borisch

unread,
Nov 5, 2015, 12:01:46 PM11/5/15
to golden-cheetah-users
Hi

Thanks to the GC team for all their hard work. 

I have an idea for making a device that I can hardwire my trainer to GC without the indirection of on-bike magnets, sensors and ANT+ transmitters.

I'm thinking that I can use an Arduino or similar device emulate whatever comes out of the USB ANT+ receiver.

Is there some other serial interface I can try to emulate to get GC to recognise it as one of its supported trainer types?

Can anyone point me to any suggested documentation to help get me started? 

I don't think I'll be able to invest the time or have the aptitude to understand the GC c++ source, but I think programming an Arduino is within my grasp.

Kind Regards,

--Jeff



Jon Escombe

unread,
Nov 6, 2015, 8:16:20 AM11/6/15
to Jeff Borisch, golden-cheetah-users
Hi,

Your best bet if you don't want to extend the GC code is probably
emulating the Computrainer serial protocol.

Fwiw I made a homebrew trainer with GC support a couple of years back,
mostly abandoned now as I'm (occasionally) trying to build a new one
that will use ANT FE-C instead of USB serial.

Anyway, if it gives you any ideas, the build blog can be found at
https://budgettrainerbuild.wordpress.com/. Should be a link to my github
code in there (for both AVR and GC parts).

Good luck!
Jon

Jeff Borisch

unread,
Nov 6, 2015, 10:32:24 AM11/6/15
to golden-cheetah-users, jeff.b...@gmail.com
Thanks Jon!

That will help a lot. 

My goal is considerably simpler than what you are up to but the concept is the same. 

  1. sense / count revolutions by Hall effect, optical or proximity sensors
  2. calculate speed / cadence
  3. translate speed to virtual power
  4. handle connection setup (getting device recognized as a Computrainer)
  5. figure out how to send serial data in the proper format
1-3 I know how to research and imagine an implementation. 4 and 5 I'm pretty unclear about at the moment.

Best,
Jeff

stsc...@gmail.com

unread,
Nov 6, 2015, 6:08:54 PM11/6/15
to golden-cheetah-users, jeff.b...@gmail.com
There is a document in the GIT that has information on the CompuTrainer serial protocol:


That will help with 5, but looking at it, the format is pretty painful. For 4, most Arduinos will already come with a USB port that functions as a virtual COM port or serial port - this is the same method that the CompuTrainer uses to communicate with a PC, so this part is pretty easy: you just need to configure the USART or serial receiver/transmitter on your Arduino with the same parameters as documented in the doc and GC should be able to communicate with it.

Jeff Borisch

unread,
Nov 6, 2015, 9:03:44 PM11/6/15
to golden-cheetah-users, jeff.b...@gmail.com


On Friday, November 6, 2015 at 6:08:54 PM UTC-5, stsc...@gmail.com wrote:
There is a document in the GIT that has information on the CompuTrainer serial protocol:



I should have thought to look there. Thanks for pointing it out. 
 
That will help with 5, but looking at it, the format is pretty painful. For 4, most Arduinos will already come with a USB port that functions as a virtual COM port or serial port - this is the same method that the CompuTrainer uses to communicate with a PC, so this part is pretty easy: you just need to configure the USART or serial receiver/transmitter on your Arduino with the same parameters as documented in the doc and GC should be able to communicate with it.

Yes the initial connection does sound simple like what I had to do when futzing with old sparcstations back in the day. Sending the data is going to take a bit of work to understand. I do have a bunch of capable people nearby to help me make sense of it, thank goodness.
 

Mark Liversedge

unread,
Nov 7, 2015, 3:38:15 AM11/7/15
to golden-cheetah-users, jeff.b...@gmail.com
Whilst using the CT protocol is a pain in the ass, it means your trainer would also work with TrainerRoad, Zwift, Peripedal, PerfPro since they use the same code.

Mark

Dantas

unread,
Jun 30, 2020, 12:59:55 PM6/30/20
to golden-cheetah-users
Did you get any results?
Reply all
Reply to author
Forward
0 new messages