Tazling
Published © GPL3+

USBcycle: Ride Through Your Virtual World!

An exercise bike game controller: a standard bicycle and trainer stand, plus 2 Leonardos to emulate keyboard/mouse, and joystick inputs.

IntermediateShowcase (no instructions)10,577
USBcycle: Ride Through Your Virtual World!

Things used in this project

Hardware components

Arduino Leonardo
Arduino Leonardo
A nice little workhorse Arduino with (this is essential) USB HID capability. This capability is found on the ProMicro, Leonardo, Due, Zero.
×2
Adafruit Trellis Keypad
Probably the prettiest button pads on the market -- a little pricey but worth it!
×2
Adafruit 7 segment i2c backpack
I didn't like this as a backpack, but being i2c it doesn't have to be anywhere near the Arduino controlling it!
×1
AS5601 breakout by ams
You can get this device on an Evaluation Board, or as a bare IC that you have to package. I recommend the eval board.
×1
Honeywell Linear Hall Effect Sensor
There are tons of these cheap linear Hall breakout boards out there. Check Ebay.
×1
Rotary potentiometer (generic)
Rotary potentiometer (generic)
Make sure your control knob pots are Linear, not Log. Unless of course you want a logarithmic response curve. I prefer linear.
×1
SparkFun 7-Segment Serial Display - Red
SparkFun 7-Segment Serial Display - Red
I actually used a cheaper Ebay 2-digit display. In the next version I'll use only i2c displays -- so much easier, and leaves more pins available.
×1
LED (generic)
LED (generic)
I don't know if it was exactly 50, but It was a lot. I used 32 3mm LEDs for the 2 Trellis keypads, and a bunch more for indicator lights. It's good to have tons of these in stock.
×50
Resistor 221 ohm
Resistor 221 ohm
Again I'm not sure if I used exactly 20 of these, and they varied in value from 470R to 330R, 220R, etc. Every LED needs a resistor. Your i2c bus may need some higher-value resistors. Keep a supply of resistors handy: you can find kits on Ebay of 20 each of 50 popular values, and they're cheap.
×20
Protoboards
Protoboards are essential, in various sizes. After using cheap Ebay imports, medium-grade produce, and fancy Adafruit protoboards I have to say that unless you never make mistakes, the pricier Adafruit boards are worth it for their durability and resistance to resoldering. Cheaper boards tend to start lifting traces if you have to resolder a pad more than once. You can cut proto boards on a bandsaw to make smaller ones. Keep a stack of them around; you'll always be needing another one.
×4

Software apps and online services

Apple OSX EL Capitan

Hand tools and fabrication machines

Hot glue gun (generic)
Hot glue gun (generic)
Soldering iron (generic)
Soldering iron (generic)

Story

Read more

Schematics

High Level Schematic for USBcycle Prototype

Not a finely detailed circuit diagram, but shows pin assignments and i2c bus devices
Wiringdiagram wyuerxinc7

Concise Data Flow Diagram for USBcycle Prototype

This overview drawing shows how functionality is split between the two Leos and why they have to talk to each other.
Logicdiagram iyfxfzuqwv

Code

Github Repo for EBS

Github repository for Arduino project code

Credits

Tazling

Tazling

1 project • 5 followers

Comments