Using just a small dc motor, a rotor from a Powerball toy (or something round and heavy that can be spun by a motor) - you can make a gyroscope that will balance itself on two legs. This is a simple project that you probably already have the stuff lying around to make it with. And when you first turn it on and it stands by itself - you will be amazed.
To make this gyroscope I had the following components:
One 6 volt dc motor (size 170 with 2mm shaft) - but any small dc motor that spins at high rpm should work
One rotor from a Powerball toy to serve as the gyroscope rotor - you can fabricate one from brass, steel or aluminum if you have access to a machine shop or can take one out of a toy gyroscope though that might be on the small size and will be more difficult to keep balanced.
One shaft connector - this is the only specialized item that must be acquired unless you can make one. My shaft adapter connects a 2mm (dc motor) to a 4 mm shaft (the Powerball rotor). The tighter the fit the better as you do not want any unnecessary vibration.
Any wood, or acrylic or fiberglass or aluminum to construct the gimbal (frame to hold the gyroscope).
A variable power supply to adjust the speed of the motor.
UPDATE: it seems you must have an unbalanced rotor (weight is more on the rotor side) to make this work. I made a gimbal that put the CG of the motor/rotor in the center of the frame and it would not balance. Perhaps using a rubber band would make it work.This could be the same reason a top heavy rotor (or motor) will balance if the axis is horizontal - the heavy weight pulls the frame back into a balanced position when the frame tilts - could be the same if the axis is horizontal too.
UPDATE: I calculated the approximate total weight to torque ratio that is required to keep a self-balancing gyroscope balanced.
In my case it worked out to be
(weight of entire gyroscope) divided by (torque (calculated from weight of gyroscope rotor and rpm which = mass))
350 grams / 1.35kg = 26%
The 1.35kg torque was calculated using the math program at gyroscopes.org. using a 5cm by 1mm width rotor. The rotor is not actually that dimension but I had to finagle the dimensions to achieve a mass of 150grams. Then I used an rpm of 11000 which yields 1.35 kilograms of torque at the axle end points (axle ends about 10cm apart). I measured the rpm using a cheap laser digital non-contact tachometer.
Step 1: Construct a Motor Support Axle
The first thing to make is something to support the motor in a vertically oriented axis. I used a piece of acrylic ruler and drilled a hole for the motor bearing to fit into and a hole for one of the motor mounting screws. I was too lazy to use both screws but should have as it will prevent some of the vibration the motor produces. Instead, I then epoxied the motor to the ruler.
Next I drilled two small holes in each end of the acrylic motor support and epoxied a small length of steel axle I got from a toy car axle. Doesn't matter what size shaft you use.
Then I pulled the Powerball rotor out of the toy, cut away some of the plastic to allow access to the rotor shaft.
Finally I joined the Powerball rotor to the motor using the shaft adapter.
The gyro gimbal is now complete.
UPDATE: it turns out the gyro must be heavier on either the motor or the rotor side as I made an axle that centered the weight of the rotor and motor over the center of the frame and I just could not get it to balance. It might be similar to having a top heavy rotor (or motor) when the gimbal is vertically oriented rather than horizontally as this one is. Perhaps that is why a rubber band is used on the working self balancing gyro example that I included above that someone else had constructed. These are questions I just don't have a sure answer to.
Step 2: Construct the Gyroscope Frame
The frame is used to house the gyroscope and allow it to rotate freely. It also is provides support on two legs.
The frame can built of just about anything but be sure to keep it light as possible. Mine uses some aluminum brackets I had from a robotic arm kit, some hobby plywood, an acrylic ruler and two chop sticks for the legs.
The bottom support for the motor/rotor axle just sits in a small hole drilled partially through the bottom frame support. I actually hotglued a plastic servo arm to the frame and used that.
The top hole for the motor/rotor axle is drilled all the way through the top support. The hole has to be larger than the diameter of the axle so that it spins freely with very little friction. I drilled and used several holes in different positions to see how it affected the performance of the gyro. Seems the more vertical the support stands, the better it performs. Now you might be thinking you could use bearings for the axles but I have found they still cause too much friction and will not let the gyro balance. Perhaps you can if your gyroscope produces a tremendous amount of torque but for my little rotor and vibrating motor - it doesn't work well.
So basically the frame is just a housing built around the gyroscope and that supports the two motor support axles and the two legs. There are no magically dimensions - just make it light as possible, and as straight as possible.
Step 3: Operating the Gyroscope
I use a variable dc power supply that allows to me to vary the voltage - this allows me to adjust the speed of the motor and find the ideal rpm which does not produce a lot of vibration.
Insert the top motor support axle into the top support hole and set the bottom axle into its hole.
Start up the motor and try to get the frame to balance at the lowest possible rpms as higher speeds produce unwanted vibration.
NOTE: fast spinning objects are dangerous - do not get in front of the rotor because if it comes off it will bounce off the floor and then who knows where it will go. Ideally a cage should be built around the rotor to contain it in this event.
If the frame does not balance on its two legs then you probably do not have a heavy enough rotor or high enough rpm.
If the gyroscope does not stay in one position but swings to one side then the motor axle is probably not vertical.
Ideally the cg of the motor/rotor should be in the center of the frame but mine is not as the rotor sticks way out on one side - yet it still manages to balance but the closer the cg is to the center of the frame - the less torque is required to balance the frame (I now think this paragraph is incorrect)
Currently I can balance this gyroscope on about 6.5 volts and 11000 rpm. 10000 rpm just won't do it and it will eventually fall over.
Step 4: Unanswered Questions
There has not been a lot of information provided publicly about self balancing gyroscopes so anything you discover while building and experimenting with one is probably new information except to universities or companies who use these and tend not to make their results known.
For instance, does the gyroscope balance with less torque on short legs or tall legs - who knows?
Does the size and shape of the top support hole affect the performance of the gyroscope. Is friction on the axle necessary to make it work correctly?
How much torque (rotor mass and speed) required to support the total weight of the frame and gyro? How can that be calculated.
Lots of interesting questions still remain about these contraptions.
The C-1 motorcycle (Litmotors)uses two gyroscopes to balance it and keep the motorcycle upright in all kinds of conditions. Unfortunately it will probably never see production as there seems to be problems using gyros at speed. Their motorcycle uses over 30 sensors just to keep the gyros and bike vertical - probably a recipe for disaster.
Gyros are successfully used to keep boats and ships stable in rocking waves. Also they are used in spacecraft and aircraft.