Login required to started new threads

Login required to post replies

Re: New 3D Trainer Program w/pics (ANT+, MAC/PC) [twoadays]
twoadays wrote:
This is leagues ahead of what's available commercially, bravo. I'd gladly pay for a licence if you ever decide to sell it. I'm not sure if you've modeled drafting, but I think that the steering element opens up some options in drafting strategy.


As a digital systems designer, I'm also curious about your hardware setup. Do you pull your ANT+ data through the regular USB stick or through your hardware? How many updates/second do you see for the different sensors? Do you do any smoothing or just report instantaneous data? What kind of board and controller? What does your wireless setup look like? Software side, what did you write it in? Does it feel smooth at the ~30-40fps, and does it affect your cycling when the graphics start to chug?

Pardon the post full of questions.


When I wrote the first version back in 2010 I had to "crack" the ANT+ packets, which took me a couple weeks....weeks after I finished figuring out what the packets meant, the ANT+ group released full specs to everybody. At that point, I figured there would be all sorts of commercial apps available so I didn't work on this thing almost at all during 2011. I just used it for my workouts, and that was that. Now that its April 2012, I'm still pretty shocked there aren't half a dozen things like this commercially available.

ANT+ data comes through a normal ANT+ usb stick. I haven't messed with the ANT+ stuff in over a year so I couldn't tell you right now the update rates, but I do know that HR packets seemed pretty random, cadence/speed was about once a second (and at slower pedaling speeds repeat packets would be sent with no differences between the previous packet), and PowerTap I simply don't remember. The app has a full built-in command console and ANT+ logs can be enabled, and the whole thing dumps raw data out to a txt file so I could look sometime later if people were really curious. I do smooth the speed data a little, but I'm not totally happy with that. I need to add in the 3s/10s/30s power displays, right now watts is instantaneous. Every test run I've done, I also recorded on a Garmin Edge 500, and once uploaded to Garmin connect both my and garmins fit file pretty much match exactly so I think the data I'm grabbing is "good enough" right now.


As for graphics chugging, the whole graphics system is configurable. It'll run at 640x480 with no realtime shadowmapping, no antialiasing, etc at 400fps on my machine, or, as in my screenshots, you can crank it up to 1080p with 4x AA and it goes 40fps. All depends on what your PC can do and how much you care about graphics. On PC and MAC, I use OpenGL for graphics. On PC I use XAudio for 5.1 surround sound generation, and on MAC I use OpenAL (which *should* give me 5.1, but I can only get 2ch audio out of it right now. *shrug*).


There is no more "controller" or custom circuitry for anything ANT+. The joystick I built uses a USB chip that makes it super easy to create a fully MAC/PC compatible joystick, so I went with that. I think it updates at 30hz or so. I doubt I'll want to get into the custom joystick manufacturing biz, and steering is 100% non-essential (it's neat for 'game' type stuff, but for workouts its just not needed) so I may just keep that stuff to myself.


There is one last party trick this thing does, which will never see the light of day...when I do plug my old obsoleted Arduino microcontroller board in, it has an X-10 chip in it and will control an X-10 dimmer switch anywhere in your house. Plug a fan into that X-10 dimmer, and voila....the fan speeds up and slows down with your speed on the trainer. Full blast is hit around 18mph. Again, this will fry half the fans on the market (the motors don't like the type of dimming the X-10 switch does...its really meant for incandescent bulbs), so it's a "me only" kinda thing. Still fun to see it work.
Last edited by: jmX: Apr 14, 12 22:19

Edit Log:

  • Post edited by jmX (Cloudburst Summit) on Apr 14, 12 22:19