Introduction: Virtual Exercise Bike Race
Here's how I used an old exercise bike as a remote control for a virtual reality bike race. The harder you pedal the faster you race.
I've spent many hours in VR gaming, while sitting in a rotating chair. Spinning my chair and looking around inside virtual reality was the extent of motion required to play . Besides head tracking, most VR apps use gaze controls (looking at buttons to select options) or game controllers, for interaction with the game. Very few apps use hand tracking or the phone's ability to count steps as a means of control. Wizard Academy is an exception, which uses both methods of natural user interface.
After a couple hours in VR my wife suggested I take a break and move around a bit and get some exercise. I decided to find a way to combine exercise and virtual reality, for a natural way to interface with a game.
Step 1: Virtual Reality
First a quick intro to virtual reality. If you aren't familiar with Google Cardboard you should check out their website https://www.google.com/get/cardboard
The Cardboard will work perfectly for this project. A Cardboard headset and a smart phone is all you need to get started in VR. Virtual reality has recently exploded into the mainstream market with consumer products available like the Samsung Gear VR and Oculus Rift. The app we'll be using is an Android app, I don't know if there is a comparable iPhone product. I'll be using my Samsung Gear VR headset, but Cardboard or Durovis Dive work great. For more information on virtual reality you can check out some of my other instructables or go to my website DIVIDEWORKS.COM
Step 2: The Android App
After some searching in the Google Play app store for a VR app that included a first person bike ride that would require user input to propel the bike forward, I found exactly what I was looking for.
This app is specifically designed to be used with MyFitVR hardware. you can check out their website http://www.myfitvr.com/
They are doing some really cool stuff with virtual reality and NUI natural user interfaces.
In the next step I'll show how added hardware to my existing exercise bike by adding a sensor to use each rotation of the pedal to send a command to the game.
Step 3: Hardware
After playing with the MyFitVR app, I know that the X button on my Moga 2 Power Pro bluetooth controller worked for pedalling control. I searched for a method to duplicate the X button output, using an Arduino, but I was not successful. I'm sure there's a way using a Bluetooth HID protocol, but I decided to Keep It Simple.
Turned out I had everything I needed. In addition to the VR headset I needed the following.
an exercise bike
one roll of metal hanger strap
1/4" bolt and nut with plastic cap
First I used the hanger strap to secure the bike to the plywood.Then another piece of strap needs to be carefully curved to work as a spring that will deflect with each rotation of the pedal. Then one more piece of strap to secure the controller to the plywood. It is important in this step to make sure you can fasten the 1/4" bolt so that it with depress the X button each time the pedal deflects the spring. This will sense the speed of the pedals and send the output signal to the VR app. The last two photos in this step show how I set up the spring to sense each time the pedal comes around. In the video, you can barely see the pedal making contact with the spring. The goal is to have about 3/16" of deflection.
I was very pleased with the end result. A truly emersive VR experience that combines VR graphics with head tracking and a natural user interface that makes you move your body and get some exercise if you want to play. Check out the end result in this video.
We have a be nice policy.
Please be positive and constructive.