Introduction: Exercise Bike As Controller for MT Bike Simulator
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:
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:
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
OK, a wacky one too.
We have a be nice policy.
Please be positive and constructive.