I Make Projects . com
On the right project, some bad rust looks better than some good paint.

Main | Projects | About | Contact and Services

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.

The Concept

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:

  1. The ability to press the "X" button, and

  2. The ability to steer left/right using the left analog joystick.

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

First - 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 way.

Second - Build new handlebars. I made these out of PVC and they will be mounted to the frame using zip straps - I didn't follow a plan, just made it up using the manual method (also known as the "that-looks-about-right" method).



Note 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 joystick later.

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

  1. Start the game on the PS2.

  2. Get on a bike in the game.

  3. Have your exercise bike with your hacked controller positioned in front of the screen and plugged into the PS2.

  4. Pedal! A leisurely pedal should have you riding along at a relaxed pace. Pedaling faster will cause your in-game bike to go faster (since the "X" button is being hit faster the faster you pedal.) In BULLY, when you pedal faster your in-game character will stand up from the seat and pump the pedals for top speed.

  5. Steer! Steer with the PVC handlebars. Start out slow to get a feel for it, and if necessary adjust the position of the joystick with relation to the handlebar interface to get optimal performance (ie find the best handlebar-turn-to-joystick-movement ratio). It may take some tweaking to get something that feels best.

  6. Enjoy! When you have it adjusted well, it's simple (and in my case, ugly) but surprisingly immersive and fun. By the way, this is where you will discover all the weak points in your handlebar assembly - particularly when you turn HARD to avoid hitting something, or lean on something.



Things Learned

  • Make the joystick-to-handlebar interface and positioning easy to adjust. I accomplished this mostly by accident due to how I built it, but it was a lifesaver when it came to fine tuning. Getting just the right ratio of "real handlebar movement" to "joystick movement" is key to an effective control system.

  • Mounting the main controller somewhere you can easily reach comes in handy, beacuse at some point you might need to interact with the game in some way other than steering and hitting "X". For example, the square button comes in handy since it's the "reverse" button. You will sometimes come to rest in a bush or wall, after all.

  • The hacking I did to my controller is much more extensive, but really the only things actually required were to extend the "X" button out via a couple of wires, and extend the left joystick out on a cable. (While working on the controller I also extended the Triangle button and the right joystick as well in case I wanted to use them somehow, but both were unnecessary.)

  • Actually, with clever mounting and interface to the handlebars you probably don't even need to extend the joystick out at all. If I were to do it again, I would find a way to interface the handlebar directly to the joystick (still attached to the controller) instead of extending it out on a cable.



Possible Improvements

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)