Instructables
Picture of Google Bike
Has the winter weather got you down? Is the snow preventing you from training for the next Tour De France? Or are you afraid to ride outside with all those cellphone weilding drivers? Google bike is the answer for you! Now you can ride anywhere in the world in the climate controlled safety of your home.

Google bike is a virtual bike riding program. Using a few simple electronic components and some software hackery you too can ride in virtual style!

Here is the bike in action!
 
Remove these adsRemove these ads by Signing Up

Step 1: Overview and Parts

Here's the gist. A sensor from a bike computer is used to detect the rotation of a bike tire. The output of this sensor and the turning angle (controlled by the thumb joystick) is read by an Arduino and relayed to a computer over a usb cable. The computer reads the number of rotations and angle of the joystick and uses these values to control a virtual bike within google earth!

Stuff you will need:

  • Indoor bike stand (or suitable stationary bike)

  • Bike cadence sensor (or reed switch and magnet)

  • Arduino

  • Small thumb joystick or harvest this from a PS2 controller

  • Computer with windows or osx (sorry linux :( blame google for not releasing the google earth browser plugin for linux)
W9RAN1 year ago
Has anyone found a way around the Google Earth issue for Linux since this was originally posted? Looks like Goggle Maps is putting emphasis on WebGL but there are some strict hardware limitations. It would be nice to run this app on cheap Linux hardware.
I've been working on this for about a week now with limited success. The bike on the screen goes backwards and counterclockwise. It does not appear that it is responding to the joystick input. The output from the python server look good, showing a range of 0-1023 for the x/y inputs and 0/1 for the push button. The cadence output increases incrementally with each input.

Problem with the python server, maybe?
braingram (author)  greatgoogamooga2 years ago
Yeah, it sounds like a problem with the javascript. I'm not quite sure what though :-/

I hooked up the press button on the joystick (press down and hear a click) to make the bike go backwards.

I also ended up only using the V component of the joystick (the H component broken on mine).

If the python server output looks ok I'd say add some alerts or something to the javascript code to see what ARDUINO_V and ARDUINO_C are doing. If they're misbehaving than it sounds like a problem between the python server and javascript code.
vince_rmf3 years ago
This is the coolest idea. 

Unfortunately I do not have the skill to build my own.  For some reason there is not too many ready-made controllers out there.  I only found a couple:
Cyber ExerCycle http://www.cyberbiking.com
XR Kit http://www.xrgame kit.com

I am not sure how well they would work with Google Earth. Has anyone tried them?

nicky233 years ago
Interesting, I'll try it.
Umm, Google earth is out for linux....
bazzargh3 years ago
Might be interesting to hook this up to opensprints. They use an open http-based protocol to serve up the data from their arduino sensors, so multiple software frontends exist. With preset steering info, eg from a GPS trace, you could have a circuit race (up the Champs Elysee?)

Another option that I keep meaning to try (when I find my ANT+ stick...lost in a box somewhere) is to use libusb to get the cadence or speed events from Garmin sensors - again, getting the steering from a GPS trace. There's code for reading those events floating around t'internet.
Craig83 years ago
Great Idea...! Some suggestions for your consideration:

- Hook it up to a projector and have the streetview projected large-scale in front of the rider.
- Designing a mechanism to adjust the resistance of the magnetic flywheel to match the gradient of the road - getting data from google earth height info.
- Design the joysick to mount to the headset with a link to the stem/handlebars so small movements in the steering to control direction - removing the need to let go of the handlebars.
- Put a desktop fan in front of the cyclist - the speed of the fan could be controlled by the riders speed - to mimic wind/air resistance whilst keeping the cyclist cool.

Good work.!! Really like it.!
ltnemo20003 years ago
LINUX USERS!!!!
you can run google earth through wine and do great!
runs really well.
(also, as a cyclist i would pay for this setup in a sleeker case attached to my rear wheel.
patent it.
???
profit.)
thanks for the tips
-hack life
>G
pecospearl3 years ago
Put a patent on it and make your fortune! I think you have a winner!
magic19693 years ago
very cool. i'll try it.......
earlye3 years ago
I once worked at a company that provided its employees with a gym. It included several bikes that were networked together. You would play Azteca, a game based on an Aztec progenitor of soccer - you could steal the ball by riding into your opponent, and you would shoot the ball by pressing a button on the handle. Stearing was accomplished by leaning the recumbent bike like you would if it were a real bike. It was *very* fun. It'd be cool to take what you've done and basically turn your controller into a joystick controller.
merijnvw3 years ago
this is GREAT!!! I have to have this for the winters here. I can't train outside but cycling inside is too boring, this is the best solution
Wonderful idea, I may use your idea and modify it for a treadmill.

Paul
braingram (author)  messyworkbench3 years ago
Nice! My dad expressed some interest in making another or modifying the current project for use on an elliptical machine for my mom. I seem to remember someone setting up a treadmill to 'run' through world of warcraft, they might have some documentation on the setup that could be useful. Good luck!
Dr_Stupid3 years ago
Google Earth is available in Linux. (don't know why you'd mention "sorry Linux") in reference to Google Earth.
braingram (author)  Dr_Stupid3 years ago
Please see my reply to skidawgs comment. The problem is that there is no google earth browser plugin for linux.
jennnnnnn3 years ago
Sweet!!!!
skidawg3 years ago
I just looked at Google Earth's site, and there is a Google Earth 6 version that can be downloaded for Linux, at least for Debian/Ubuntu and Fedora/openSUSE. It also looks like the pySerial package can also be installed from source on Linux.

Is there anything else that causes this to not be able to run on Linux? I am not seeing anything.
braingram (author)  skidawg3 years ago
Google bike runs through your web browser and uses the google earth browser plugin. You are correct that you can download google earth and the necessary python stuff for linux. Sadly, the browser plugin does not exist for linux :( If you find otherwise please let me know as I'd love to get this running on linux (my os of choice). If you do find the plugin, getting google bike to run should be almost identical to the osx instructions (the serial port should be /dev/ttyUSB0 or something like that).
rimar20003 years ago
GENIUS!

I envy your brains!
Dr. Pepper3 years ago
cool!
Ranie-K3 years ago
Cool! Here's how some guys ride the Bergensbanen railroad with a bike: http://www.rullesykling.com/Bergensbanen.html