Introduction: Exercise Bike As Controller for MT Bike Simulator

I've had this old exercise bike lying around for a long time as I have been wanting to do this for some time. So gf asked me to throw it out and that kind of triggered me to have a closer look at actually turning it into a bike game/simulator controller. While old, I can't say it's got much mechanical wear  ..

So this is the plan:

Modify the bike and add sensors for pedal rpm, steering, breaks and add some motor control for the load tensioner.
I'll need to replace the existing fixed handle bars with something that actually turns.
Find some existing games that will work with such a device. Or just make my own 3D simulator with reasonable accurate physics, I mean how hard can that be


I know there are commercial simulators like this available, but they are insanely expensive, the one shown is $7,000 !!

Of course I could just take my real MTB for a spin, but that's not the point :D

Quick video of me biking around in my track:




Step 1: Exercise Bike As Controller for MT Bike Simulator

Anyway, this is what I've got to work with. 

Doesn't look like much, but it's got everything I need: Saddle, handles, pedals and a tension system.


Step 2: Exercise Bike As Controller for MT Bike Simulator - Tension Control

As the first step I want to have a look at being able to control the tension through USB, for that to happen I need to add a motor on the currently manual tensioner.

This model just got a belt that is tensioned against a flywheel via a cable controlled by rotating a knob.

I want to replace the knob with a motor.


Step 3: Exercise Bike As Controller for MT Bike Simulator - Tension Control

This is the stepper motor and driver I want to use. It's small, cheap and not very powerful, but it's geared so it should have enough torque to turn the tensioner.

It's fairly simple, the controller is nothing more than an ULN2003 driver, simply darlington coupled transistors in a package with build in diodes to prevent reverse voltage spikes.

4 output ports are needed for control, the step sequence is like this:

0001
0011
0010
0110
0100
1100
1000
1001

Repeat that sequence to make the motor turn clockwise, for counter clockwise, run the sequence backwards.

Step 4: Exercise Bike As Controller for MT Bike Simulator - Tension Control

I'll be using my 3D printer to make the motor mount and the coupler.

Here are a couple of quick drawings:

Step 5:

And the motor mounted on the bike tensioner using the printed parts


Step 6: Exercise Bike As Controller for MT Bike Simulator - Steering Wheel

Next I made some handlebars for the bike, the existing one only got fixed handles. But I want to be able to steer it, so again the 3D printer comes in handy.

I made mine out of PVC pipe, but this is the a very sturdy variant, not the usual electric or water pipe type, you need something that will take a lot of force as it's natural to put your weight into the handlebars. Also the printed part reflects that, in it being very sturdy.


Step 7: Exercise Bike As Controller for MT Bike Simulator - Control Board

To control the pedal load tension and read all the sensors for steering, brakes, gears, pedal rpm etc, I've made a quick circuit board.

It's based on the Pic 24 H series of micro controllers and generally very simple, just basically a lot of analog inputs, some digital and some outputs to control the stepper motor

Step 8: Exercise Bike As Controller for MT Bike Simulator - Brake and Gear

Simple pot based controls for brakes and gear change

Step 9: Exercise Bike As Controller for MT Bike Simulator - Environment in Unity

Created some believable physics and environments in Unity to bike around in.

http://www.youtube.com/watch?v=8rZmLgJB0Tk

What is up with the video embedding btw? .. Why doesn't the editor just auto add the embed code? 

OK, a wacky one too.

http://www.youtube.com/watch?v=gY1Rlpux4UQ

It was really painful uploading this, the editor UI is pretty horrible IMO.