loading
NOTE:
May 2011: This instructable is now quite old (relatively) and I could now rebuild this project more simply with an Arduino as the controller.
I am currently working on a unicycle with the same OSMC motor controller and an Arduino. When I get that to work I will also add the code to this instructable as the principles will be almost the same (one wheel one motor).

NOTE Jan 2013: I now have WORKING ARDUINO CODE that works well with an OSMC. The main points are outlined here:
https://sites.google.com/site/onewheeledselfbalancing/Home/twin-wheel-self-balancing-skateboard-lightweight-version/code4

Shameless part:

JUNE 2014: I am entering the Hackaday Competition with Nick Thatcher and another friend. The entry is the Medicycle, yes it will have one wheel and yes it will be really cool. Best project yet hopefully. If you want to follow us, and we would very much like you to, here is the link:

http://hackaday.io/project/1156-Medicycle---Urban-...


After reading a Make magazine article on the self balancing unicycle of Trevor Blackwell I thought about trying to build a one wheeled skateboard style device. I then found a self balancing skateboard on the net built by Ben Smithers and decided I would definitely have a go at this.
For more information and pictures of my earlier designs please go to:
http://sites.google.com/site/onewheeledselfbalancing

Also:
Trevor Blackwell unicycle and SegwayTM clone: http://tlb.org/scooter.html
Ben Smithers skateboard which inspired me to build this one:
http://www.youtube.com/watch?v=HGbbag9dklU

Also check out this self balancing unicycle:
http://www.enicycle.com/media.html
and this video of same machine from the Gadget Show (wait for the sponsor message to pass)
http://fwd.five.tv/gadget-show/blog/anywhere-anytime-enicycle

Also, many people have tried to build self balancing robots with 2 wheels. There are many on the web. If you do this using a gyroscope, accelerometer, microcontroller and geared motors from a robotics store, you will spend almost the same amount of money as this machine cost to make. The mechanical parts are kart based and often available on ebay. Some robotics mechanical parts are pretty expensive. I thought if I was going to do the "self balancing" thing then I might as well make a robot I could ride!

VIDEO 3/1/09 below.
Video shwing stability and ability to cope with small obstacles. I have since lowered the ride height to make it more controllable in terms of steering at speed.



This is the latest (March 09) lighter weight version with same power as the monowheel but split between 2 motors + same battery power using lighter LiFePO4 battery. Now based on a real skateboard and has 2 wheels so can turn on the spot. Also only 30lb so you can pick it up easily:

 
Remove these adsRemove these ads by Signing Up

Step 1: Intro (2)

Picture of Intro (2)
Here is photo of me riding the first version of this design that I actually managed to get to self balance. This was summer 2008 after a few months of on and off work.

Step 2: Parts and resources guide

Here is a guide to the main parts you will need by popular request (see the comments attached to this unstructable from other visitors). They can be obtained from more than one place - i.e. this list is not cast in tablets of stone. You will need to be creative and resourceful otherwise you are unlikely to succeed:

1) Control system: ATmega32 controller on a development board. This is one of a family of processors made by Atmel called the AVR series. The ones from robot project suppliers are ideal:
http://www.active-robots.com/products/controllr/active-boards.shtml
Note the "AVR isp downloader" on the same page. Get this to allow you to transfer your program from your PC to the microcontroller. Software comes with these on a CD. Google "AVRStudio4" and download a free copy of the software from Atmel website that you will run on your PC to write the program whic you will eventually transfer to the memory of your AVR microprocessor.
2) A solid state accelerometer and solid state gyroscope. Since I built the project, they can now be both obtained pre-soldered to a board. This is what I would use if doing it again:
IMU Combo Board - 2 Degrees of Freedom - ADXL320/ADXRS150
http://www.active-robots.com/products/sensors/sparkfun/imu-gyros.shtml
The accelerometer I actually used was:
Accelerometer Interface Board ADXL202JE �un)
and the gyro I actually used was the Silicon Sensing Systems CRS-03 gyro: http://www.siliconsensing.com/CRS03packaged
3) Motor. This is the motor I used, 24Volt 420 Watt. It was a reasonable price but quite heavy. There are others with better power and lighter weight (but cost more) also cheaper ones from China on ebay for electric scooters (google "electric scooter motor" and you will find a selection of alternatives). My motor was the 2.8Nm one at the bottom of this page:
http://www.motioncontrolproducts.co.uk/index.php?cPath=25&osCsid=1905800baa1799fc97c0a97697db22fa
4) Motor controller. Takes signals from microcontroller and uses them to control how much power it transmits from batteries to motor. Has to be capable of handling high currents. Several exist for control of heavyweight combat robots (google around the "robot wars" type websites and you will see what I mean). The OSMC one I used is high power, has extra circuits to stop you breaking it, and is actually a reasonable price for the current it can handle (it still is not exactly cheap though)- see the OSMC towards the bottom of this page:
http://www.robotpower.com/catalog/
5) When you buy the motor, you need to look at the diameter of the spindle. Over this spindle you need to fit a small sprocket (wheel with teeth for a chain to go around). I knew nothing about karting before I built this, this is what the internet is for, finding out the things you do not know. I found (one of many) kart spares websites and I ordered a sprocket with as few teeth as possible to fit my particular motor spindle diameter:
Azusa engineering in the US do about every sprocket size and spindle size imaginable: http://www.azusaeng.com/Sprockets/AzSDno219.pdf
6) Chain: I used 219 chain, this is a thin chain size more often used in karts in Europe than the US. There are others that in the US might be easier to get. If you put 219 kart chain into ebay you will find loads of suppliers. To shorten it to the length you want, take it your local bike shop, they do this all the time.
7) The big sprocket on the main axle: Any online kart shop sells these in many sizes. They bolt to a standard sized carrier (the red thing in centre of my axle in following photos) with 6 bolts. Therefore you can buy a few different diameter sprockets and experiment. Just one sprocket carrier will do for all of them. These are example links only:
Big sprockets for 219 chain: http://www.talon-eng.co.uk/talon-karts.asp?c_urn=&bike=&show=
Sprocket carrier for 30mm axle: http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=280227333529&cguid=d7fe085c11c0a0aad24491c4ffeeb887
Bear in mind karts have axles in various diameters. You might well choose a smaller diameter axle. The only reason I chose 30mm was that I managed to buy a single kart wheel second hand on ebay and it happened to have a 30mm axle requirement.
8) Wheel: Biggest rear kart wheel you can find on ebay or kart shop in your town: Example: http://www.kartingnortheast.com/kart-shop/wheels-tyres-and-accessories.htm
These are UK examples but there are online karting shops in the US too. For one single wheel I would definitely try ebay. You do not need the latest magnesium wheel hub, just a cheap battered used one will do fine.
9) Get a kart axle, about $40 online. Diameter does not matter just make sure it is same as the hub for your wheel and the sprocket carrier is also designed for the same diameter axle. This can all be done via the net and ebay. Do an afternoons worth of research online, find best suppliers and prices in your area, then order everthing so they all match up as a set.
10) Finally you need bearings for your lets us say 30mm axle. Example of a US supplier who could probably supply you with all you need (cheaper to root around on ebay though):
http://www.mfgsupply.com/GoMiniAxlesKits.html
11) Laser cut steel side panels: First of all you can do this just as well with a hacksaw but it will require more effort! Any machine shop near you can copy a cardboard template for you in steel. Offer to pay cash. Another option is to go to a metal sheet supplier and offer them cash for their offcuts lying in a heap behind their big sheet cutting machines. Take home a few sheets and experiment.
Failing everything, mock up your entire frame in cardboard, take it to a metal fabrication business ( the sort of company that make steel shelving etc and advertise in local directories) and simply ask if they can copy it for you in sheet steel. Again offer some cash. Don't be afraid to look silly, otherwise you never learn anything.
12) Batteries. Mine were lead-acid 12V each, 12 Amp-hour. However have a read about big motors and big batteries for combat robots here and work out which combination would be best for you (and your wallet):
Here is a link to a US website/shop which has loads of info on battery packs, motors etc for large combat robots - read and learn:
http://www.robotcombat.com/products/batteries_battlepacks_nimh.html
13) Don't know how to program in "C" or how to program a microcontroller? Well neither did I. Check out the links to other projects on my website (link on page 1 of this instructable). Some have downloadable code - study it. For free downloadable tutorials on "C" hit the web again. Here is one example: http://winavr.scienceprog.com/short-introduction-to-c/
This website is also one of many on so called "AVR programming" i.e. how to program the Atmel series of AVR processors, of which the ATmega32 is but one. There are forums (full of robot builders) for AVR programming. e.g. "AVRFreaks" for example.

On page 1 of this instructable you will find a link to my website. this site has links to every segwayTM clone others have built, self balancing model robots, other skateboard projects from around the world and some unicycle designs. Each of these sites has more information you can dig into. I have also described my (imperfect) software with explanatory notes on what each line of code is for. Some of the fixes I suggest took me weeks to solve. I have saved you hours and hours of stress! This site represents months of research on the web. It may not contain everything you need but I humbly suggest it will give you a very good start. This instructable is intended as a guide to get you past a few of the main stumbling blocks and blind avenues that kept me puzzled for very long periods. It is not a nut and bolt guide otherwise it would have 200 pages. It is however probably one of the best guides to DIY one wheeled vehicles out in the ether so far.

You almost certainly will NOT have all the skills at present you need to build this project. Few people if any have ever been "formally" trained in ALL of; i) Metalwork, ii)Mech engineering, iii)Electrics iv)Electronics (v) Microcontroller programming, vi) "C" programming. I am not an engineer of any type and am not a computer programmer. If your deficiencies put you off at this early stage then do not bother. On the other hand I work by the maxim that "anyone can learn anything to a basic standard after about 50 hours of work" if you believe this to be true then you can do this project and it will also help you in life. This project will stretch your mind and patience. Are you someone who gets things done or one who says "I could have done this if only for X or Y"? I am not saying this is easy by any means but do not give up because there is some aspect you do not (yet) understand......hit the internet and find out. That is what it is there for. If you are good at the mechanical side you may have no idea how to program the microcontroller and those who may find the programming dead easy may struggle with the mechanical parts. This is why it is such a good challenge and why colleges sometimes get groups of students, rather than individuals, to build segwaysTM copies as projects.
Break the task down into smaller sections and have a go. The cost can be spread because this will take weeks or months to complete if just using odd periods of spare time.

Best of luck, have a go!

Step 3: Overview

Picture of Overview
Here is the finished machine with the top deck and one side removed. Folded alloy panels run across width of machine and the two sides are made from 3mm laser cut steel. The sides were designed in "emachineshop" software downloadable from an engineering materials website of the same name. They could easily be hand sawn but the laser method allowed (most) of the holes to be cut neatly in the correct places.
From right to left: Box containing an Atmel ATmega32 microcontroller (small computer in a chip), plus an accelerometer, plus a solid state gyroscope. This takes voltage inputs from accel and gyro then decides how much power to send to motor to keep level if tipping over. A signal is sent to a motor controller in box on far left, which then sends the appropriate amount of power to the motor (to right of the central wheel). Motor is 420W golf cart motor and drives wheel by a chain. Wheel is widest available kart rear wheel that is sold.

Step 4: First step Metalwork and construction

Picture of First step     Metalwork and construction
The project can be divided into metal fabrication / construction of the running gear and electronics/programming. The fabrication can be as clever or straightforward as you wish. Someone has even built a "SegwayTM" style vehicle out of wood using wheelchair motors for example.
I started by mocking up the 2 steel side panels in cardboard. Although these were made as shown in the image initially, I later removed the raised sections at each end to permit a flat deck across the top.
Note regarding batteries: Lithium batteries give most power for their size and weight followed by Nickel Hydride followed by lead-acid. I used lead acid batteries because (a) cheap, (b) can give large current for small periods if needed when hitting obstacle for example, (c) complex chargers not required.

Step 5: Fabrication

Picture of fabrication
Here are the side panels now in steel. You will notice I put the motor spindle hole in the wrong place and had to manually cut a new one. Note that motor bolt holes are slotted to allow motor to be moved back and forwards a small amount. The reason for this is that unlike for example a bicycle, the motor will be working in BOTH directions, therefore I want the tension on the chain to be just right with as little slack as possible. To do this I will make chain the perfect length then move motor back and forth until just a very slight amount of slack in the chain.
The red object is a carrier for the big sprocket (toothed wheel) that will attach to the axle of the main wheel. Wheel, chain, sprockets, go kart axle all acquired cheap or second hand from ebay. Note: These projects work much better if there is an EXCESS of power in reserve. Use a motor bigger than you think you might get away with. If computer "tells" motor to deliver more power quick as falling over, you want it to react instantly without struggling in any way. False economy to under power your vehicle.

Step 6: Fabrication

Picture of fabrication
Close up view of the go-kart bearing each side. Bearing is clamped between two "bearing carriers" which then bolt to frame. Axle will slide through and be held in place by a grub screw which you can just see to lower right of bearing.
I used a 30mm axle but other sizes exist for karts. Make sure your sprocket carrier, wheel mounting, bearings etc are all correct for your chosen axle size before you buy them!

Step 7: Fabrication

Picture of fabrication
Here is photo of first attempt at finished frame. I tried to create folded box sections where possible to increase torsional stiffness without adding too much extra weight as will already end up as quite a heavy machine (batteries and motor are unavoidably pretty heavy things). A bit like a stressed monocoque racing car from the 1960's (well not really).
Once top deck bolted down this will also add strength.

Step 8: Fabrication

Picture of fabrication
Here is a top view of an early chassis. The batteries shown here are 12V 7 Amp-hr each. These are perfectly powerful enough but later on I swapped these for larger 12V 12Amp-hr batteries to give much better endurance. For compactness I am keeping clearances between wheel/body, motor/wheel etc as small as possible.
One side of the chassis is rivetted on while the other is held on by lots of small nuts and bolts. This allows one side to be removed in about 10 minutes to get at axle components etc later (or indeed to inflate the tire).

Step 9: Fabrication

Picture of fabrication
Here is a side view showing the chain arrangement. For now I have used a large sprocket on the wheel and a very small one on the motor (from Azusa engineering in the US). Chain is 219 kart chain. Beware there are about 3 types of chain at least in karting world - do your research carefully, make sure you are buying the right one and that the sprockets match up with it.
The high gear ratio means that the board will not go too fast while I am learning to ride it and it will go up hills. The way to burn out a motor controller is to stall the motor. The computer will tell the controller to put full power through to the motor, this is fine for short burst but not if motor unable to turn, i.e respond, because wheel is stuck against an obstacle for any length of time. As well as having biggest motor you can fit, you need a beefy motor controller to cope with it too.

Step 10: Control system

Picture of control system
You are going to spend a lot of time developing your control system which will almost certainly not work straight away. Some manual tweaking and tuning of the software will be needed. Make life as easy for yourself as possible. I have a makeshift office/project lab at home and I used a cheapo bedside cabinet to one side of my desk as my on/off electronics workbench for this project. The drawers are useful for all those little bits and bobs you will accumulate and 4 socket electric mains extension gives you somewhere close by to plug in the soldering iron, glue gun, drill, temporary power supplies, etc.
To get my head around the microcontroller and interfacing it to the accelerometer, gyro and motor controller I temporarily mounted them onto a piece of wood which also had a plug in development board on it for testing various wiring arrangements. Also, by tilting the wooden base, it was then easy to test out various gyro/accelerometer software responses, simulating movement of the finished skateboard.

Step 11: Control system

Picture of control system
Top left is the microcontroller on a board with power regulator ready assembled from a robot webstore. To right of it is the tiny accelerometer on a small board of its own. This gives a voltage of 0-5V output depending on the angle it is at. It knows which way is "up" and does not drift with time. The problem with it is that it is sensitive to vibration so best approach is to average out its signal over time. The gyro is from Silicon Sensing Systems in the black box. This outputs a voltage proportional to the RATE it is being turned, the downside is the zero point drifts slowly with time but the upside is that it is insensitive to vibration. So for "are we tipping?" we use the gyro and for "are we level?" we use the accelerometer signals. The way these are mixed so the accel (reliable indicator of "up") gradually corrects the drift in the gyro is the absolute key to getting the machine to balance. Motor is top right and cable to program microcontroller from a PC can also be seen.

Step 12: Control system

Picture of control system
Here you can see everything assembled so we can test the response of tilting the wooden board upon the spin of the motor shaft. The circuit visible bottom right is an OSMC open source motor controller available from the US for control of heavyweight combat robots. It has a lot of protection circuits that help you not to ruin it easily. Designed to take large currents without exploding. Not cheap but again, remember, you need a big reserve of power to make a project like this work without tears. It can be bought as a kit or ready assembled. Quite a few surface mount parts so buy ready assembled unless you are really good at soldering.

Step 13: Control system

Picture of control system
OSMC is now being crammed into a small plastic project box. Use thick wires between batteries/motor controller/motor as may be carrying very high currents at times.
For more on computer code consult my website (see link on page 1). Briefly, the ATmega32 is programmed via a serial cable from your PC. Software written in "C" and compiled using "AVRStudio4" which can be downloaded for free. This converts it to a form in which it can be sent to the little computer on the microcontroller board where it then sits in its memory, even when skateboard is turned off. The software that was actually used to load it from PC to the microcontroller board was called "PonyProg" and is again a general purpose program designed to do this job. It took me ages to get this worked out but only because I was new to all this. The info is all on the web, but to save you weeks of stress I have collected them all in a links page on my website.

Step 14: Control system

Picture of control system
The microcontroller has to be connected to the motor controller (OSMC) so it tells the OSMC how much power to send to the motor, and in which direction - forwards or reverse. There is a safety signal that tells the OSMC whether to lie dormant or go "live", there are two other pairs of wires controlling the type of pulsed signal to send to the motor. The microcontroller sends a pulse width modulated signal (on and off very fast) at 5V to the OSMC. The OSMC then sends a high power equivalent of this signal to the motor, so controlling its speed. This so called PWM signal is such that the more of the time the +5V is "on" relative to it being "off" i.e. 0V, the more power is sent to the motor. This "on/off" PWM signal cycles very fast e.g. 20KHz which incidentally is why the motor makes a high pitched whine. Here you can see the ribbon cable from the microcontroller running to the OSMC.

Step 15: Control system

Picture of control system
It took me ages to work this one out. This diagram describes which pin in the socket on the OSMC you need to send which component of the control signal to from the microcontroller.
Again, see my website (link on page 1) for more info on control software principles etc.

The basic idea is this:

gyroangledt=amount of tilt from gyro since last reading was taken

newangle(of tilt from vertical)=(0.99*(oldangle+gyroangledt)) + (0.01 * accelerometerTilt)

This gives the new angle of tilt from vertical. Note how 1% of accelerometer signal is inserted each time with 99% of the gyro-derived short-term angle change calculation. This smooths out variations in accelerometer reading with time (averages out the noise so it self cancels), slowly corrects any zero-point drift in the gyro BUT still allows the gyro to handle the instantaneous short term changes in tilt.
linearvelocity = linearvelocity + (0.00004*angle)

This means "are we STILL tipping?" and if so slowly increase power to the motor. This is how you control the speed manually; if you keep the board continually tilted, it will slowly accelerate in the direction you are tilting it.

level=((k1*angle) + (k2*anglerate) + linearvelocity) * overallgain

"anglerate" is from gyro i.e. is the immediate short term "rate of tipping"
Level controls POWER to be sent to motor (the PWM duty cycle).
k1 is about 4.5
k2 is about 0.5
Overallgain is just that - sort of an "accelerator" knob on control panel - if set too low board feels sloppy, too high and it oscillates wildly!

Finally, the whole thing only works because this program is looping about 100 times per second.

Step 16: Control system

Picture of control system
Having spent a while programming your microcontroller and testing it with the motor, you might feel ready to box it all up ready for transplant into your frame.
It is very easy to wire up and/or mount your gyro and accelerometer back to front making motor behave in mysterious ways. This is why it is worth working out such simple "bugs" before putting it all into the frame.
Here we have the microcontroller in the box on top left with plug on side to allow it to be reprogrammed while in the frame, gyro and accelerometer in small box and OSMC in grey box.
For early testing I made a hand controller which had potentiometers for K1, K2, program cycle time interval, overallgain so I could, by manually changing voltages from 0-5V being sent to the microcontroller inputs, manually control the key parameters in the balance algorithm while actually riding the board.

Step 17: Control system

Picture of control system
This is a small thing but I soldered 320 Ohm resistors to each end of the carbon track of each 10K potentiometer. This stops you sending too much current through microcontroller input pin by accident which might possibly damage it. There is a webpage on the net about this somewhere on the AVR tutorial websites and similar forums.

Step 18: Control system

Picture of control system
This is the inside of the hand controller. Also important to have some sort of switch that you have to keep pressed to keep the machine live. If you let go of it (i.e. fall off) the machine has to STOP. It is heavy and will hurt you badly if it rolls at full power into your head for example.
The problem with my very clever hand controller was that it was too complex. With a 10 core cable to the board, display LED's (top) etc there was just too much to go wrong with real world use. Therefore after using this to develop the algorithm I removed it and replaced it later with a much simpler control unit that just had one single potentiometer for "overallgain" and a dead-man cut-out button only. The other variables were hard coded into the software.

Step 19: Final assembly

Picture of final assembly
Here is a top view of everything installed including the big batteries.
Left to right: OSMC, Motor, Wheel, 2 Batteries, Box with microcontroller + gyro + accelerometer in it.
Note frame now modified to take a flat wooden deck.

Step 20: Final assembly

Picture of final assembly
Here is a view of me programming the microcontroller with a new version of the software using a ribbon cable from an old laptop. The program used to actually do this transfer is "Ponyprog" available on the net.
This is an early effort at packaging the internals, where the smaller original batteries were used.
Battery connections soldered (use big soldering iron or two normal ones together). If a battery connection comes loose while whizzing along, you will know it as machine stops dead and you keep moving.
There is enough to worry about with software glitches early on without having unreliable electrical connections on top. Try to construct everything so connections are reliable, cannot be pulled loose etc.

Step 21: Final assembly

Picture of final assembly
Here is another view of final packaging solution. Programming cable now plugs in at one end (grey plug). The black headphone plug allows me to connect an oscilloscope to the microcontroller. I have arranged for the microcontroller to send out a +5V pulse every time the program loops (about 100 times per second). By looking at these pulses on the scope I can work out the cycle time. I need to know this because whenever you add something to the software, the program loop time may slow down slightly. You need to know the new loop time so the correct values can be put into the algorithm. For example to work out "how far have I tipped since the last cycle of the program?" from the gyro, we need to know how long it has been since the last time the program cycled and asked the gyro to give it a reading.

Step 22: Final assembly

Picture of final assembly
Here are the spikes coming up on my oscilloscope. I use a PC based oscilloscope but you can get them really cheap off ebay and some advanced multimeters have a similar feature. You just need to know how much time has passed between two +5V pulses.

Step 23: Final assembly

Picture of final assembly
Here is the new much simplified hand controller I mentioned earlier. It is light enough that if you drop it, it will not smash. There is just an "overallgain" knob and a button which you have to hold pressed in at all times else the motor cuts out for safety.

Step 24: Final assembly

Picture of final assembly
Here the final top deck has been added.
You can also see a foot grip (as found on kiteboards) to help control when you are riding it. You steer by tilting board to one side and deforming the tire. The footgrip helps you do this. It also stops you sliding off when it is tilted when you first start to ride it. This grip is set to a loose grip as if I fall off I do not want my ankle broken (think of skis).
I had a rounded surfboard style top originally but this new angular one matches the angularity of the metal frame better.
The main (high current) on/off switch simply connects the two batteries together in the middle as they are wired in series.
When off they are therefore disconnected from each other so allowing each battery to be separately charged from a 12V (not 24V) charger.
There is also an LED battery charge indicator you can see glowing as a row of red/green LED's protected by a clear polycarbonate cover. This gives a rough idea of how much power you have left in the batteries and is simple to wire up. They come from a robotics kit supplier in 12V, 24V, 36V forms.

Step 25: Final assembly

Picture of final assembly
Here is a closer view of the battery level meter.

Top deck is made from quite thin marine ply. This is good because, low weight, stiff, electrical insulator (stops batteries shorting out with metal deck), adds extra stiffness to overall structure as bolted down all the way around with very small nuts and bolts.

Step 26: Final assembly

Picture of final assembly
Test test and test it some more.

You might think it would just tip over and stop on anything other than a smooth surface. This was true early on when just getting it to balance was the overriding issue.
However now it will easily go over a 1 inch high obstruction and stay level. Have not tested it with anything larger yet. The term in the equation "how fast am I tipping?" from the gyro, goes very high very fast as soon as you meet an obstacle. The power to the motor then also goes very high very fast. Assuming you have the power excess I spoke of earlier plus a hefty power controller, then the board will do a slight wobble and just power over the obstruction. The response time in this circumstance obviously needs to be very short, which is another reason why you need the program to loop at 100 times per second. It would otherwise probably balance OK on level ground if looping slower than this, say 25 times per second.
The term that asked "are we STILL tipping?" is what makes it move along: If you deliberately hold the board tipped, this term will slowly increase like an accelerator, moving you along. The thing on the far end is an LED headlight.

Step 27: Video (slightly old)


Here is an old video taken when the machine first balanced last summer (2008). The new machine responds a lot faster and stays level. The latest video is on the first page.

Step 28: Have fun!

Picture of Have fun!
Here it is finally finished after over 6m work (mainly due to my lack of programming skill). Toying with the idea of calling it the "Hot Wheel," not sure yet.

Teenagers may scoff that you cannot do "tricks" with it but that is not the point. This is always going to be a heavy machine. The point is the challenge and satisfaction of getting something "impossible" to work, the skills I have learned along the way and simply doing something completely out of the ordinary.

When you finally get it to balance after struggling away for ages there is a real feeling of achievement.

It is also great fun to ride. This is hard to explain in words but it feels as if you are riding on something that is "alive" and constantly intelligently adapting to your input rather than following it blindly. It should do about 7 or 8 mph in this configuration. When I am confident enough I will fit a smaller sprocket on the main axle (karts come with multiple sprocket sizes) to increase the speed. You steer it by the way by tilting it to one side, the tyre deforms and you gradually turn. To turn sharply, you stop or slow right down, tilt onto tyre edge and twist body to flick it round.

Remember if you build one of these it is at your own risk. There are no safety features or redundant sytems as in a SegwayTM for example. However one advantage over a SegwayTM clone may be that you can easily jump off, especially if you keep the top speed down early on while you are learning.

Have fun! You will never learn anything practical or innovative unless you just have a go.
1-40 of 98Next »
jnekrasov7 months ago

Can you suggest some good brush-less hub motor, which will fit to the kart wheel with minimum adoptation?

hamletjunior11 months ago

Excelent instructable!

Look at this Kickstarter: https://www.kickstarter.com/projects/4422853/onewh...

It's like exactly your idea, but costs $1300. You could've made a lot of money.

XenonJohn (author)  Pizzapie5001 year ago

Actually they may have raised $650,000 but that is not all spending money, that is as orders for machines. They will now have to honor those orders!

It was not actually my idea, it was Ben Smithers who first made one of these around 2007, here is the original video on YouTube:

John

Its $1499 now https://www.trycelery.com/shop/onewheelstore

Could you adapt this system to a one wheeled electric bicycle?
XenonJohn (author)  jackjackboom1 year ago
Yes,

Have rebuilt this entirely as a one wheeled machine with unicycle seat and it works surprisingly well. I added handlebars which are useful as allows you to shift position more easily relative to the frame to maintain lateral balance and for careful turns.
Used and e-bike battery in latest machines. More expense but do not go dead after a year or so like the lead-acids tend to.
John
I think BIcycle implies two wheels. maybe electric UNIcycle? lol
everybody makes mistakes man.
although a two wheeled unicycle is something i
would love to see.
fozz182 years ago
how do I change the balance point. also how to make the soft start softer
Thrifty UK2 years ago
man thats wicked, do you think this could be done using a sphere?
ramasubbu2 years ago
the site is very use full thank you and its easy to understand
salazam4 years ago
I really love this thing a lot! Are you working on making a better model? What's going on with it? How's the two-wheeled one going? Why does it go so slow?

I was watching videos on the McLean McWheel and was thinking how great it would be if the two technologies were somehow combined! If the gyro-balancing were applied to the monowheel, you wouldn't have to be afraid of over-braking and flipping all over the place!

What if you used 1 wheel but it were more beveled? Would that make turning easier? I'm so going to make one of these one day!
XenonJohn (author)  salazam4 years ago
More responses to your questions:

- bevelled wheel would make turning easier. Would need flat centre section for stability in a straight line.
- Since a rugby ball shaped wheel does not exist you could do this by having 4 wheels on same axle, 2 larger diameter ones in centre with slightly smaller diameter outer ones.

Re Monowheel, yes, this sort of electronics could be linked to the throttle control to prevent "gerbilling" (going head over heels).

For research of this kind you would need a custom biker type of guy who also can build a self-balancing board and there is one such person I know called Dave Southall.
He has built a small McLean monowheel, a diwheel and also a self balancing board. He currently trying to merge the best aspects of all 3 to get some sort of control over the monowheel:

http://redmaxmonowheel.co.uk/uniboard.html

Best wishes

John
XenonJohn (author)  salazam4 years ago
The one wheeler has morphed into the "THING" a stand up one wheeled scooter - just to see if it would be possible to ride with 1 wheel - it is just about.

The twin wheeler is in 2 forms:
An arduino based version built around a proper skateboard deck, and more extreme machine with a deck filled with LiFePO4 cells, pressure sensitive steering and/or wireless Wii Nunchuck control.

See this video:
http://www.youtube.com/watch?v=MyQ-N-pxh10&feature=mfu_in_order&list=UL

Best wishes

john
cool=-E
how much did it cost overall
XenonJohn (author)  BIGHAIRYDUDE4 years ago
Cost (estimates from memory):
(£1 = about US$1.5)

Motor about £80
OSMC: Expensive but very powerful - about £160 at the time
Microcontroller £32
Gyro and accelerometer: V Expensive BUT now, in 2010, much much cheaper than they were back when I made this, about £40 for both now.
Batteries: 2 x £30
kart axle, sprockets, wheel, chain all second hand from ebay, about £90

Plus metal sheet, rivets, nuts and bolts.

Remember though, start with motor, sensors, micro, motor controller and see if you can get motor to behave right in response to turning the sensors one way then the other. When you have this worked out (primarily software), spend money on the mechanicals later.

John
thanks
waffleman5 years ago
what if you had 2 wheels side by side, to promote easier turning? as in telling one wheel to turn one way and having the other wheel turn the other?
XenonJohn (author)  waffleman4 years ago
I have since done this, stripped it right down to the basics and posted an instructable on it.

Also have a website documenting all previous versions as I progressed up the learning curve of vehicles with too few wheels, mounted in the wrong place:

http://sites.google.com/site/onewheeledselfbalancing/

The attraction of this admittedly strange hobby, is that no matter how much theory you read and how much clever simulation you might want to do, eventually you have to find out what works and what doesn't by actually attempting to build the things. A voyage of discovery.

John



Lemcott6 years ago
XenonJohn... I went through the entire instructable, the idea and your finished piece is quite the accomplishment and is something that not only I but many other people would love to do. The problem is, a lot of people on instructables aren't able to do everything you did, that's why we come here. We can do other people's ideas and learn from them for our own later. without a set materials list or estimated price a lot of us will have to set this idea off to the "someday maybe" pile, which is really a shame. even if you dont want to give one because you think that it'll be different for everybody, it's still nice to have a standard original materials list and estimated price. Thanks for the Idea, hope I can try it out someday.
XenonJohn (author)  Lemcott6 years ago
Hi Lemcott and BuildWiz.
I am not an engineer of any sort and could not program except in BASIC before I attempted this. Incidentally I knew nothing about karting either. The internet provided all the information. Get a big lever arch folder and just spend a month collecting information in each category and educating yourself, before you buy anything. I learned a lesson many years ago that "you can learn anything to a basic standard after about 50hrs work" which for me has turned out to be true. I know many highly intelligent people who are somehow "unable" to put a shelf up or change a diaper! They are only "unable" because they simply do not really want to learn how. Seriously though, no single person will have all the skills required to complete this project. Some will have to be learned along the way. The programmers may be poor at fabrication while those who mess around with old cars will find the fabrication easy and the electronics/programming difficult. I have now put up a parts list and resource guide for you near the start of this instructable. It does not include every nut and bolt though, just the main components you will need. I have also inserted links to example websites for each component. You may well find more suitable or cheaper equivalents if you spend some time on the net and via ebay. Also, if you check out my website (link on first page) you will find I have linked every single similar project from around the world that may be useful to you. This alone was a huge amount of work. Have a look at all of them. Many, as well mine, have software you can study for ideas. When you look at the software of some of the others you will for example realise how I have gone down the KISS (keep it simple stupid) route to get around my limited programming skills. Find ways around your own limitations. I built my machine on the (incomplete) information gleaned from all these sites, I am not the first to build something like this by any means. I hope that this instructable helps others do the same and gets you past some of the major stumbling blocks I encountered. This project will not be easy, but I hope this at least helps save you some time, money and frustration.
The total price for parts will probably not give you much change from $500-700. However do not be put off, it will probably take you a few months not a few weeks to build one of these. Spread the cost out and if you are unsure of your abilities, get the electronics and balance side of it working before you "commit" to buying any of the big mechanical parts, motor or motor controller which are the most expensive. You could even build a balancing model then scale it up - the balance control sytem will be exactly the same.

Go for it! Stretch your mind. You learn things by experience as well as by being taught.
but thats not what we asked... I agree whole-heartedly with what you have said, problem is it's just non-sequitur to the original request. great speech, but we just wanted an estimated price (or what you actually payed for the project) and a materials list. Thanks for your reply though.
XenonJohn (author)  Lemcott6 years ago
I know. Others read this too however. I don't want people to be put off attempting this just because it seems daunting at first sight. I have tried to provide more than you personally asked for. Hopefully there is now enough information to keep everyone happy, or at least fairly happy. If not, everyone do please feel free to keep sending me questions and I will do my best to answer them.
Excellent points dear author, quite superb. Keep on giving "too much" detail! Better to have T.M.I. [Too Much Information] overall even if some things are left out (like prices) because the variables are too loose to nail down.
bobwar505 years ago
is it possable to use a

IMU 5 Degrees of Freedom
IDG500/ADXL335

instead of a

IMU Combo Board - 2 Degrees of Freedom - ADXL320/ADXRS150 ?

cheers, ben.


Bad Maxx5 years ago
More of this type of project from the same guy?? Although I find this whole project to be fantastic, you are starting to make me feel mighty lazy... I have no fewer than 5 "Instructables" projects started and laying around in various stages of unfinished.. You are a true inspiration!
Keep up the great work!
noneedto5 years ago
:P were can i get a Go-Kart wheel ........
Gamer9175 years ago
how do you turn this thing
by leaning
lol it would be easier than turning a regular skateboard
rimar20005 years ago
 Sos un capo, viejo! (you are great, old!!)

CONGRATULATIONS!
DarkRage35 years ago
I'm in the early stages of designing a form of extreme sport transport that could probably use your input on the self balancing of a hubless wheel; too much said already. THEIVES EVERYWHERE I TELL YOU! LOL! but seriously I would love to talk about design possibilities. Ones that are not segway-esque
Tbvck5 years ago
 My compliments to whoever built this thing. I really like the quality workmanship and engineering.
matrix435476 years ago
Nice you could probably market this
 i second that, this thing is sweet, try contacting some skateboard or bike or something similar company i'd buy it
Copyright infringement would be a problem. The guy that invented the Segway already has a patent on this design. Doesn't keep you from making your own though.
mangomango5 years ago
This would be really cool and I think I might do it but the only problem I see is stopping after you've been moving fast. Is their something in there about that?
ReCreate6 years ago
Hot Wheel, Ha I get it! :P
1-40 of 98Next »