Following the popularity of our self balancing scooter and the SciChair we decided to try something a little edgier, the Self Balancing Unicycle.

This project reuses a lot of stuff from our previous projects, using an arduino as the brains behind the scenes.

Step 1: Ready your tools

Before we begin lets ensure we have everything we need. For this project you probably want to be fairly comfortable with welding as you need to build a rigid frame.

Additionally you will need:

•Steel square tubing for frame
•24VDC 300W motor
•Arduino UNO - Check your local suppliers or eBay.
•Sabertooth 2x25 Motor Controller ( www.dimensionengineering.com or a local supplier)
•5 DoF analogue IMU - available on ebay (to be replaced with digital IMU at some point)
•Scooter wheel, sprocket, chain and axle - available as a kit
•Shielded multi core cable for the accelerometer and heavy power cable for the motors
•Deadman switch
•Toggle switch for adjusting balance position.
•DC connector for Arduino.
•DIL pins to suit Arduino
•Double sides tape
•Screws etc
•Drill and drill bits
•Welding equipment and saftey gear
•Soldering iron and solder
•Wire cutter and wire strippers
•Heat shrink and hot air gun to shrink it

Step 2: Frame and motor

The seat is sourced from a second hand unicycle as we are lucky enough to work in an office where you can rely on someone having a unicycle they don't ride much anymore. The shape of the seat is important as you need to be able to shift your centre of gravity forward and backward on the seat, something more difficult on a regular bicycle seat. We attached it to the frame with a simple steel pipe, nut and star hand knob tightening screw.

The wheel, sprocket, chain, and axle all came in a kit designed for a scooter.

We used 25x50mm tubing for the frame and 25mm for the foot pegs. A couple of plates across the middle of the frame served to mount the single motor with a piece of acrylic to which we glued or screwed the electronics.

The axle was set in a channel which allows the two sprockets of the motor and wheel to be moved so the chain can be easily fitted.  A bolt above the axle stops it from suddenly sliding upwards when in use.

Step 3: Connect arduino to Switches


We built this model with an ardunio nano but are in the process of transitioning to an arduino uno to keep our projects on a standard platform. The code and pin-outs provided here are for an arduino uno.

To connect the Arduino to the 3 position rocker switch to adjust trim and the push button kill switch:

Arduino - Switch
GND   -> 3Pos cen, push button -ve
D9      -> Push button +ve
D10    -> 3Pos 1
D11    -> 3pos 3

Step 4: Arduino to ESC

Now to hook the motor speed controller up to the serial interface on the electronic speed controller (ESC).

Arduino   ESC
GND -> 0V connect this to the same rail that you were using for the sensor
5V     -> 5V
D13   -> S1

This would also be a good time to set the DIP switches on the Sabertooth to the right settings for serial control.
1 - On
2 - Off
3 - On
4 - Off
5 - On
6 - On

Step 5: Arduino to IMU

Next we will connect the Arduino to the IMU (Inertial Measurement Unit). As we're still waiting on the libraries for the new digital IMUs this project was created using the now harder to obtain analouge IMU, previously sold by sparkfun, now available on ebay (link).

A0    -> Y4.5
A1    -> Z Acc
A2    -> Y-Rate
A3    -> X-Rate
3.3V -> 3.3V

Step 6: ESC to Batteries

Finally it's time to connect your ESC to the battery packs, motor and master switch.

B+    -> Pos battery terminal - optional - In & VCC on voltmeter
B-     -> Neg battery terminal - optional - GND on voltmeter
M2A -> 24VDC on motor
M2B -> Motor GND

If you have wired two 12v batteries in series you can place the master switch in the middle.

Step 7: Code

This is the same code used for the self balancing scooter with the steering sections commented out, again credit goes to XenonJohn.

I have added the code but you need to change .txt extension to .ino

A final note on testing

This vehicle requires a little more skill on the part of the rider than the Scooter or SciChair, it also requires a little leap of faith on take off. This faith should not be easily given however, one silly mistake, like wiring the motor backwards (cough) will result in this machine throwing you face first into the dirt. As such I strongly recommend laying the unicycle down on the ground, switching it on then lifting the seat up with both hands ready to lift it off the ground if it decides to fully engage the motor. Once you're happy that it is properly sensing its tilt lower the wheel onto the ground and slowly lean on it to test its responsiveness. Only after all this should you attempt to climb aboard and even then, a helmet is strongly recommended.

Good luck!

<p>Hello.</p><p>I am making a uni-cycle on reference to your post.</p><p>I am using a MPU6050 and arduino uno to make it.</p><p>But when motor runs and arduino communicates with MPU6050 by I2C communication, arduino freezes.</p><p>Did u have a same problem??</p>
<p>Hello,</p><p>can i get electrical schematics? because I can not tie electrical work</p><p>Please</p>
<p>Nice project! </p><p>But I think there is one thing left... Can you put photos showing all the connections? I think that is what all people want to see!</p>
<p>does the rpm of the motor matters?</p><p>i mean do we need the rpm to be in a certain range, or it will work for any range of rpm</p>
<p>can i use BTS 7960 b instead of sebertooth controller</p>
<p>Fun project! well done.</p><p><strong>what is the weight of the SBU?</strong></p><p>I bought a <a href="http://www.moCycl.com" rel="nofollow">moCycl</a> at and they say it is the lightest SBU.</p>
please.. can you make the battery specs available. ?
<p>Great for all of those skillful techies out there who likes the idea of a self build. For us with laziness as a way of life, just head over to <a href="http://mocycl.com/" rel="nofollow">moCycl.com</a> and order a ready made one delivered to your doorstep. cheerio</p>
<p>This Russian one is best properly controllable design I have seen with steering and a seat. Does not come up on any search engines but check out the video. Quite low priced too.</p><p><a href="http://www.youtube.com/watch?v=q3S1YWMmXbQ" rel="nofollow">http://www.youtube.com/watch?v=q3S1YWMmXbQ</a></p>
<p>Im planning to build one, is it possible to build it with an inhub dc motor typically found in ebikes?</p>
<p>Hub motors these days are almost all brushless. This means you need a brushless motor power controller that can be controlled by your arduino. It can be done but expensive.</p>
<p>guys is there any book that has orderd programming tutorials on arduino</p>
<p>You can take LEGWAY into consideration, it's amazing motor scooter, here is a video in youtube, believe you will like it. </p><p> <iframe allowfullscreen="" frameborder="0" height="281" src="//www.youtube.com/embed/vnXZ0VDaDOM" width="500"></iframe></p>
<p>Cool project. Liked it a lot. I am thinking of trying it, but I am experiencing a problem choosing correct battery. Could you please suggest the right one, like if you tell the one you have used, it will be excellent and helpful.</p><p>Thank you.</p>
<p>Do you guys like self balancing unicycle without a chair?</p>
Where is the code??
<p>Step 7 - Code.<br>Open the txt file and copy the contents into the Arduino IDE or rename the file extension to .ino</p><p>They will not allow a file with .ino on Instructables.</p>
Thanks for the fast answerse, but, in step 7, here in my PC, I could not, found file for download. I think something is wrong here... Please, can someone send me for email the code. frediwenzel@gmail.com
Where is the code?
Sorry, but i could not found it...<br>
hello, <br> <br>I have a quick question concerning the toggle switch for balance position. <br> <br>Are you using a SPDT Rocker Switch and is it monetary? <br> <br>I also plan on build a unicycle very similar to yours and I'm currently the sourcing parts. <br> <br>thanks <br>-Dana
Hello <br> <br>Super unicycle <br>I'm also building <br>I would like to have the dimensions of the frame <br>to the same <br> <br>Thank you in advance <br>
Hello, <br>congratulations on your new tutorial, and thanks for the valuable advice you give. <br>Sincerely, <br>Gerry.
What size wheel is that and what size sprocket?
It is a 12.5&quot; wheel with a 80 tooth sprocket from http://www.oatleyelectronics.com/ <br>Under wheels.
Where did you get the wheel, sprocket, chain, and axle kit?
They were bought from http://www.oatleyelectronics.com/ <br>
Awesome project. Looking forward to see a 3 axis self balancing steadicam. :)
How much did the arduino cost?
The arduino uno is about $33 AUD on Sparkfun but you can find them for around $12 on ebay.
PLEASE use a standalone arduino!
Of all the cool gadgets I saw on TV, cartoons and in comics growing up, I would not have guessed that B.C.'s ride would ever be made into reality. You guys are great. Keep building stuff just because.
Hello, <br> <br>Great, I'd like more details on the construction of the frame Self Unicycle <br>ribs, material, etc.
Looks cool, but... video?
A gross oversight. Video is up now.
Cool. I like arduino and Mobility devices. Great way to make a unicycle that Segwayed into a robotic mobility device. (sorry for the humor attempt). Thanks for posting.
Cool project, and that final note on testing is fantastic.
Everyone is thinking it so I'm gonna' just say it: <br> <br>The first photo just looks &quot;wrong&quot;. <br> <br>
What has been seen, cannot be unseen.

About This Instructable


355 favorites


More by ScitechWA: Multi Sega Case Retopie sega case mark 1 Sweeping Ultrasonic Rangefinder Build a Paint Spinner
Add instructable to: