I Make Projects . com
On the right project, some bad rust looks better than some good paint.
This is an older site. For my professional site and contact information, visit AE Innovations. You can also visit my new site at It Came From The Workshop.
VR Bike Simulator
What This Is
Using an exercise bike equipped with a few modifications, you can effectively simulate riding your exercise bike in and around the fictional town of Bullworth in the Playstation2 game "BULLY" by Rockstar.
You pedal and steer on the exercise bike, and these actions are mirrored in the game, allowing you to virtually ride your bike in and around the town and surrounding areas in the game, complete with cars and pedestrians sharing the roads and sidewalks with you. The faster you pedal on the exercise bike, the faster you go in the game. This whole method should in theory also work with GTA:San Andreas which also has a similar bike mechanic (but a much larger and more visually varied game world than BULLY has).
This is essentially a custom controller interface to an exercise bike, but in addition to the controls it's also the positioning of the bike in front of a big screen like a projector (my projector is from Lumenlab) and the choice of a game with a good matching "bike" presentation that really makes this whole greater than the sum of its parts.
I remember seeing a very expensive setup on the news once where an exercise bike had a large screen in front of it. Pedaling the bike resulting in a simple first-person view of a country road rolling by, as though you were riding. Neat, but it had a number of limitations. For example, you were riding on a "rail" (no choice as to where to go - just ride down an endless country road forever). You could not steer to go anywhere you liked, and the scenery looked awfully bland. I didn't think much more of it until later.
Ever since discovering just how well the bike-riding (and driving!) is done in the Rockstar game GTA:San Andreas (and later in BULLY), it occurred to me that using one of those games as the "engine" for a VR bike simulator should be well within a tinkerer's reach. After all, all you need to use the bike in the game is the left joystick (to steer left-right) and holding or repeatedly hitting the "X" button (hold or tap slowly to ride at an easy pace, tap quickly to pedal hard.) A very basic exercise bike could be interfaced to a PS2 controller, and the game running on a big screen - preferably a projector - in front of the bike would result in a great simulator. You can get your exercise while exploring the large and very dynamic environments of the game. So that is what I did.
How It Works
In the game, to ride a bike you need at minimum two basic controls:
Assuming your exercise bike is already placed in front of a large screen with a PS2 and a copy of the game, you now need some way to work those controls from the exercise bike.
Modifying the Controller
All you really need is the left joystick (steering) and the "X" button (pedal). When I took apart the controller I did much more than that - I extended BOTH joysticks and extended out the "X" and "Triangle" buttons (I wasn't entirely sure what I was or wasn't going to use at the time).
There were two wires per button, and a total of 11 wires per joystick for all connections. (See the THINGS LEARNED section near the end of this page before going through this yourself - you might save some time and effort!)
The Handlebar Interface
- An exercise bike's normal handlebars are just something to hold
on to. They don't turn, so we need to get them out of the way so
we can put in something that does. In my case I disassembled the
handle part and re-mounted it upside-down to get it out of the
the built-in turn radius limiter, so there is only so far you can
turn the handles. Turning too far one way or the other makes the
rod on the bottom bump up against one of the supports. This makes
them easier to use as well as making it easier to interface to the
Third - Build a support of some kind for the analog joystick. Turning your handlebars will in turn move the joystick left or right. I completely took apart and extended the joystick out from the controller. If I were to do it again, I would probably choose to interface the handlebars directly to the joystick right on the controller itself without going through the hassle of extending it out.
You can see the simple method I used in the animation; turning the new handlebars results in turning the potentiometer that used to be in the joystick. A thin metal rod simply pokes through a hole inside the PVC tube and serves as the interface between the two.
The Pedal Interface
First - Attach a couple paddles to the pedals. These will be what activates the switch (which will be the new "X" button") on each pass.
Second - Next, select an appropriate switch. I used a microswitch - it works by having a long spring-loaded lever as the "button". This will be our new "X" button, and it will be placed on the bike such that pedaling will activate it repeatedly. The faster you pedal, the more (and faster) the "X" button gets tapped.
Mount the microswitch in an appropriate spot, such that the paddles we installed hit the switch with each pass. Mount this all as flush as possible - you don't want your foot or pant leg hitting it on the way by. Hot glue should do the trick.
How It Is Used
Compliant handlebar-joystick connection. Using a spring or something similar as part of the connection between the handlebars and the joystick "stick" would provide smoother operation and be more tolerant of imperfect alignment between the components.
Elastics or springs to provide passive resistance to your handlebar turning would provide a better overall feel.
A fan positioned in front of the exercise bike that turns on when you pedal hard (so you feel wind when you pick up speed) would be really cool!
Head tracking implemented by using the right-side joystick on the controller (for looking around) would be interesting. Perhaps a systems like this homebrewed XBOX headtracker would work.
Things Learned the Hard Way
1. Plan for needing to manually push "upwards" (which makes you walk when on foot) on the joystick! To steer the bike you only need left-right, but you will need to walk around to GET to a bike in the game in the first place, and you'll need to walk back to the bike if you crash and fall off. So plan to be able to walk by somehow pushing the up direction on that joystick! Otherwise you'll find yourself plugging in an unhacked controller just so you can walk to your bike.
2. Expect to run into #1 regularly if playing BULLY, where you can't stay awake past 2AM in the game (you fall asleep and wake up on foot otherwise).
Main | Projects | About | Contact and Services
Original Content - Copyright 2010 (Except where specified)