Step 19: Electronics
See my comment on intro page regarding use of a 6dof "Razor" IMU from Sparkfun instead as this 5dof one is becoming difficult to obtain any more.
There is a 5 degree of freedom inertial measurement unit (IMU) from Sparkfun.
This is cheapest one they do that will do the job - a situation that is always changing by the way.
It has a 3 axis accelerometer. We will only use one of these.
It has 2 solid state gyroscopes. One is used with the accelerometer (using a "combination" filter) to make the thing balance.
The other is used to allow machine to resist sudden changes in direction (one wheel hitting a pebble for example) so it does not spin you off. This is easier and more reliable possibly than using wheel speed encoders which is the other way to do this.
I like ribbon cable as it is neat. I also use blu-tack when doing this sort of soldering as it holds wire in exactly the right spot as well as holding the little circuit board still.
I tin the wire ends then solder them to the holes.
NOTE: Someone has already found a cheaper (different) IMU here:
You would have to work it out for yourself and modify code perhaps but it also looks ideal for a project like this. It is amazing how these things have come down in price. The one-axis gyro in my monowheel was about £100 ($150) on its own.