Exercise Bike as Controller for MT Bike Simulator

Thread Starter

jvj

Joined Apr 25, 2013
5
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 :rolleyes: ..

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 :D


I know there are commercial simulators like this available, but they are insanely expensive:




That one is $7,000 !! :eek: and it only comes with a tiny monitor.


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





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

Thread Starter

jvj

Joined Apr 25, 2013
5
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 is how it works on this old bike:





There is a felt belt that is just tightened against the flywheel, the tension is controlled by twisting the knob on top:








This is the motor I want to use, it's tiny and I'm not sure it's powerful enough, but I think it will be ok as it's geared plus the tensioner is geared.


 

Thread Starter

jvj

Joined Apr 25, 2013
5
Everything printed and motor mounted:






Now I just need to write a small piece of code to see if it turns and if it's got enough power.

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.
 

Thread Starter

jvj

Joined Apr 25, 2013
5
A fairly simple controller board:



It's based on the PIC24H, a bit overkill for this purpose as it's really just sampling a number of analog and digital inputs plus controlling the stepper motor.

Analog inputs are:

Steering
Front Brake
Rear Brake
Gear Selector

Digital inputs:

Pedal pulse sensor
Keyboard (up, down, left, right, select, back)

UART I/O
And 4 ports for Steps

Here doing a bit of testing:

 
Top