Picture of Easy build self balancing electric skateboard

What is it?
Twin wheeled skateboard that works like a Segway. Electric skateboards exist already with powered rear wheels. Plan here was to build something like a Segway but in the form of a skateboard. It knows which way is "up" via a combination of gyroscope and and accelerometer sensors, using a complementary (not complimentary) filter which reads and combines data from both 100 times per second. Steering by a simple rocker switch in hand controller (or a rewired Wii-Nunchuck as in photos if you are more ambitious).
Upper photo is original budget version with two lead-acid batteries and solid wheels. Lower photo is 2013 not-so-easy-build version, with pneumatic tyres and Headway LiFePO4 batteries just to see how far I could push this overall concept. More on the new one is here:

UPDATE regarding IMU's and CODE (December 2014):
This Instructable is a little old now and the IMU used is no longer available. Therefore I have removed the pages that describe the IMU wiring and the code as it is confusing people.

If you use a digital Sparkfun 6dof IMU (which is much more easily available) then for instructions on how to use this with an Arduino, to control a self-balancing skateboard, with code, then look at this new Instructable of mine here:

Also there is a scooter I have made inspired by the 1970's Raleigh Chopper with updated (December 2014) software using the same easily available digital IMU from Sparkfun: Raleigh Chopper inspired self-balancing scooter.

If you want to build a big unicycle check out this one I built with two friends for the 2014 Hackaday competition, called the MediCycle:

Can I buy one ready built?
Well, looks as if you now can. The German S-Walker looks strangely familiar!

Also there is the "One-Wheel" single wheeled skateboard which was a recent Kickstarter project: One-Wheel

For a good electric unicycle you can buy check out this very recent Russian one (about US$1000): Russian electric Monocycle

How does it stay level?
It controls the wheel motors so the wheels always stay under your centre of balance, like balancing a broomstick on your fingertip. This is called a "PID" control system and is used for all sorts of control situations. Think of the 363 feet high Apollo rockets used in the moon landings..........
Q: How come they didn't just fall over when they took off? They took off incredibly slowly for the first few seconds, tailfins would have no effect, far slower than Shuttle launches. Watch this video - it takes a full 10 seconds just to get to 100m and clear the launch tower:
A: They had engines mounted on swivelling mounts hydraulically controlled by a PID control system (lots of analog electronics I think involved too). First stage projected guidance system failure rate was approx. 1 in 256 which was considered an acceptable risk (!)

In 2008 I saw a YouTube video by Ben Smithers of his one-wheeled self balancing skateboard whizzing around a car park in Norwich UK. Video:
It turns out he was a Lotus cars controls system engineer - which makes sense.
Also see Trevor Blackwell's site:
Meanwhile I wanted to teach myself microcontroller programming and, totally underestimating the task, thought this would be a great fun way to do this. Advantage of two wheelers is that they turn more easily and can turn and balance even when stationary - which is fun. I (used to) prefer skateboards to segway clones as you just jump off if it goes wrong without tangling in the handlebars.

Why an Instructable?
Having learned lessons the hard way I thought it would be worth redesigning the project around an Arduino microcontroller, then seeing how low-cost and easy-build I could possibly make it. Something like this is not for the complete Arduino beginner, nor is it that "easy" however this is about as easy as a self-balancing machine is realistically ever going to get.

Projects like this lend themselves to being built as a team. Some examples below were built as college projects. There are
i) some electronics (not making circuit boards, just wiring and soldering) to master,
ii) some mechanical fabrication; this version is designed to require no welding, just nuts bolts and some woodwork. Wheel/sprockets/axles/bearings come as a unit (electric scooter rear wheel assemblies).
iii) some programming; the programs (Arduino sketches) you need, including those to help debugging, are attached (P43 - 47).
There are; IMU tester, motor tester, balances-nothing-else, rocker switch steered and potentiometer steered code examples.

How much does it cost?
I realised when costing them up that the cost of a self balancing robot would only be a little lower than that of a ride on machine, therefore I went for a ride-on machine! For me the cost was about $300 equivalent PLUS whatever batteries you choose to use. I recommend starting with lead-acid batteries then make improvements later once you have a working machine.

Why do it?
i) For the challenge of doing something original. Segway skateboards have been invented in principle BUT there is huge room for improvement.
ii) Making something that is practical and intuitive to ride is quite a challenge in terms of both electronics/software and fabrication/packaging. Cannot all be done on a computer. Eventually you have to actually build something then incrementally improve it. Despite the myth of "Eureka" moments, the truth is that this is how most innovations come about, by slow incremental development and hard work. Edison did not invent the lightbulb. He developed the first practical lightbulb.
iii) To educate yourself, you might become a world expert, there are no textbooks so you are genuinely pushing into the unknown with each machine you make. Few things as an individual hobbyist allow you to truly do this.
iv) These machines are really good fun to ride!

This instructable:
There are a large number of pages in this. This is deliberate, if you are serious about building one then you need every single step documented.

Additional information:
I have documented all my machines both good and bad on another website here:

Can I do this as a beginnner?
The fabrication has been deliberately kept really simple.
The soldering between sensors and arduino board needs to be good quality!
If you are new to Arduino I would recommend buying an Arduino starter kit. These come with some ancillary sensors etc. and a set of about 12 tutorials. Work through them all (about 2 days work) and read a beginners book to Arduino. You will then be ready.

Can I build a SegwayTM clone?
Yes. Australian SciTech group have built a very low cost machine using a version of the Arduino code from this Instructable:
Here also is the Thatch No-Way Segway using my code almost unaltered: and more recently the Jackal: Jackal

Has anyone else built one?
Ages currently range from 12yrs to 81yrs.
This Instructable is over a year old now, so yes indeed, people have. Here are a few I know of:
1) Skateboard:
2) Skateboard:
3) The Velociryder:
4) Great board video - Buffalo State College senior project:
5) Another board based on this Instructable:
6) A board based on old FIRST robotics parts + code from this instructable (FIRST robotics was started by Dean Kamen who also invented the Segway, to encourage youth to get interested in engineering):
7) Carbon fiber racing car seat with 2 - the SciChair:
8) Carey's self-balancing platform, good video:
9) Really cool video (on clifftop path by the sea): Skate auto-balancé
10) The KSLURP board from Malaysia:
11) The MIT Seboard, video clip:
12) The SITWAY sit-on machine by the 81year old gentleman above, with video:
13) This one has nothing to do with me but is such a really cool inspirational project I include it here, the TILTER skateboard, with hub motors and a suspension system:
14) New one wheeler from team cosmos with some technical information and video here:

Potential areas of improvement
It would be cool if people took this design and improved upon it.
The only way I can envisage further improvements in terms of weight reduction and compactness on my 2013 design with Headway cells and pneumatic tyres would be as follows:
a) Make frame from welded alloy.
b) The cheap scooter motors are quite heavy so use equally powerful but lighter, smaller combat robot motors.
c) To reduce length and make even more compact, someone, say a mech eng student, could design a neat hub motor for each wheel using epicyclic reduction gears.

You build these at your own risk. If tilted they WILL accelerate to correct the tilt. If you are not on the board, this means it can fly across a room or into your head. This is why you have to have an emergency hand switch that cuts the power if you let go of it. If it develops a fault it does not have multiple redundant systems like a real segway, most likely you will fall off! The code is not guaranteed against any bugs. If you don't believe me here is a video of Clint Rutkas developing a similar machine, also featuring some holes it punched in the walls of his apartment!

Have fun. Treat it as an adventure. Once you get it to balance there are many ways to improve it.


Remove these adsRemove these ads by Signing Up
1-40 of 592Next »
what was the autonomy with these two batteries?
what was the autonomy with these two batteries?


can I use MPU6050 (6DOF) gyro instead of 5DOF gyro..

Thank you.

danmellow7 months ago

this is a free ride :-)

Tjoydavi8 months ago

Hello,Im in search of someone that has the skills to build an electronic device.

If you can be of service let me know

umerji100010 months ago

is there any way to build this without the hand controller

anthology10 months ago


i have found your code for grove analog gyro and accelerometer with the nunchuck

but actually i cant found it

can you publish this ?

thanks a lot

zetowe1 year ago

i found this IMU it is a reliable website

XenonJohn (author)  zetowe1 year ago


Just pointing out that the IMU above is a digital output one that does not work with the code in this instructable that was written to work with analog (variable voltage) output IMU's. These are becoming quite hard to find however.

This is why I have had to recently rewrite the code and add a new related instructable that shows you how to make a balance control system using a digital IMU.


Oh, i already ordered this IMU, i even started the project. I am making more like a onewheel-frame. i got all the aluminum parts and cut them up to shape, i picked the aluminum frame up from the welder today, i am using a small 24 volt DC motor. i got 4 small 7 ah 6 volt batteries and a velleman P8004 motor controller. I dont know if it works with my arduino UNO yet but its what i have (i am using a cigarette lighter 24-5 volt adapter as a power supply for my arduino, they're really cheap and function well) , otherwise i will buy an arduino motor controller like the sabertooth. Also, i am planning to add a light sensor as a dead-man switch, that way when somebody steps off the board it stops, i dont need a steering switch etc so i think i am just gonna remove those lines of code. i added pictures (the pics of the frame have low quality because my camera sucks at low-lighting). maybe i am going to upload videos someday. Thanks for the new code, helps a lot!

Sorry, i dont know why but my English is sort of broken today, usually it's better. :/ (i am dutch).

XenonJohn (author)  zetowe1 year ago

Looks good. I have no idea if the digital IMU you have bought will work with my new digital IMU code as I have only tested it with the 6dof digital IMU from Sparkfun. I am sure you will find out soon enough!


If you want, let me know maybe i can send pictures in the future.


XenonJohn (author)  zetowe1 year ago

Please do. Your metalwork looks really neat and tidy.


zetowe XenonJohn10 months ago

Hello XenonJohn,

I have not done an update in a long time (i think about 2 months). I have been working on it but i ran into a lot of problems and i didn't quite get the time to fix them because school is busy lately. No time for excuses tough. I am gonna do an update once it is finished, nothing in between. I will make a video of me riding it and showing the inside lay out etc. I will post it right here. See you then!


Ok, no problem, but please note, i am not doing this project bcause i know how to do it, i am doing it to learn how to do it so there might be a bit of a time-gap between every update.


You are a great genius John!

Congratulations, you have given new hope to all of us,



Hi zetowe,

can I please ask what is the logic you intend for your light sensor?

Without your advice I am thinking it is like a solar cell and if you block it with your foot and so your logic is drive the motor when the sensor is not generating or sending any voltage (if solar cell). But problem in my mind is if you put some dirt from your shoe on the sensor then it stay in drive mode when you are off it?

Such that I am interested to learn what you think about the logic for this process. thanku

XenonJohn (author)  eyrecamp1 year ago

Another option is the Sharp infra red rangefinder available from robot sites. It fires an infrared beam at an angle and looks at the reflected light. If you have it facing upwards and you are on the board, it will see light reflected from your foot. If not on the board it will not. You would have to recess it about 3cm into the board (for the shortest range one they make).

Another option is a cheap pressure sensitive resistor mounted under a rubber disc. Look how its resistance changes, set up a voltage divider with another resistor, feed the changing voltage into an analog input and with some adjustment of the limits in the code it will work.

You can also use a rugged metal push to make foot switch that you stand on, - recess it into the deck. These exist as foot switches to trigger alarms by shop cashiers for example.

Hello eyrecamp,

You have a very good point, but i think that my shoes don't get dirty enough to completely block the light sensor, i live in a city with mainly pavements, i dont think dirt will be a problem for this idea. (i included a pic of the light sensor)

(general update)

I also just got the IMU in the mail! It has the right voltage and the pins have the same names (i included a pic of the soldering so far), i hope it works, if it doesn't it will be hard to determine what doesnt work, its either the IMU not working with the code or it's the motor controller not working with arduino. i still need to find the 2 100 Ohm resistors. I really hope it just works, that way it stays simple.



Hi zetowe,

you are fortunate that you can keep your shoes so clean!

Personally I cannot yet bring myself to trust this as a fail safe.

Do you have any specific identifier data on that light sensor?

I would like to learn more about that one.

My current thought is a two wheel unit with a pressure sensitive system. No pressure applied is signal to cut out the motor, then I'd like to be able to bias left and right side pressure to bias drive to one motor in order to steer. Probably there are some floors with this concept.

Hello eyrecamp,

Personally i have decided to use a switch because it indeed is more reliable. If you are still interested here is some info.

I hope this was helpfull to you.


Great mate, thanks I had no problem finding this option.

Hello to all,

can anyone tell me if the IMU is oriented correctly?

Thank you, Regards

XenonJohn (author)  gerrymazzotta1 year ago

Other way up. The edge with the two large holes in it faces upwards. Then run the IMU tester sketch.


Ciao Giovanni, ho ruotato l'Imu di 180 ° e allegato inviare le immagini del monitor seriale. Pensi che i valori sono coerento o sto facendo qualcosa di sbagliato? Grazie, cordialità, Gerry
Platform level.JPGPlatform tilted back.JPGPlatform tilted forward.JPG
XenonJohn (author)  gerrymazzotta1 year ago

Hi, we can correspond by email and I am sure we will sort this out.


XenonJohn (author)  XenonJohn1 year ago

We did sort this out and his machine works now.


eyrecamp1 year ago

Hi, I'm needing to get a copy of the code for this project!?

my mail is

further, I am considering using the hub motors (8 or 9 inch), in order to reduce mass. Do you know if sabertooth motor driver will provide the power and control through to these motors....? I will chase up some specs if necessary.

XenonJohn (author)  eyrecamp1 year ago

The Sabertooth only works with brushed motors. There are some small brushed hub motors out there, but in general, hub motors tend to be brushless nowadays. I have built a machine like a segway with brushless hub motors and a very expensive Roboteq Brushless motor controller but that is another story. It can be done but it was expensive and it would not go up any kind of slope (lack of torque).

Also, hub motors do not generate as much torque (twisting force) as a regular wheel with a sprocket chain or toothed belt drive from a motor, i.e. small sprocket on motor and big one on wheel). With self-balancers a generous amount of torque is very useful to have, rather than a high top speed.

so what I can determine is that I can get a hub motor (9inch) to give 12N.m of Torque which would allow drive up a slope incline of 0.054 (on a 0 to 1 scale), I guess if I had two of these it would double the Torque capacity and allow for slope incline of 0.108 (all based on a 100kg loading). This suggests capability to climb a 9 degree slope best case.

So now I am interested to find what your design rates in terms of Torque generated through the motor and sprockets. Maybe your design can carry a 100kg load on a 20 degree slope!?

Here is links to the 8 inch and the 6 inch hub motors.

Seems that the 6 inch motors are reversible, there is a 9 inch version that has variable speed options, however i have a feeling that a control circuit should be able to provide such convenience with any of these hub motor selections (??)

eyrecamp1 year ago

thanku for the feedback on the hub motors. It is unfortunate that there is a problem with the torque. I assumed that because they are advertised for scooters and wheelchairs that torque would not be lacking.
DR42961 year ago

Suppose I wanted to build one of these... but I wanted to add a third caster wheel and not worry about the whole self-balancing thing. I just want something I can stand on, be self-propelled, and be able to turn it by some really simple means.. What all electronics could I eliminate? Just the IMU's? Can anybody point me to maybe a SIMPLER Instructable that might show me such a thing?

XenonJohn (author) 1 year ago

Hi everyone,

Big development: I have finally managed to get all this to work with the Sparkfun DIGITAL 6dof IMU Code No: SEN-10121.

It has taken 2 years but there we are.

Uses code from all over the web chopped and changed and merged with my existing code. Use the very clever Kalman balance filter algorithm too.

See the new Instructable here:


_Champ1 year ago

What electrical output does your skateboard produce?

XenonJohn (author)  _Champ1 year ago

Motors 250 Watt (times 2 as there are 2 motors) and whole things runs at 24V

nsandland1 year ago
Would a 24V battery charger work OK?
Noaharfarf1 year ago
I am building a regular electric skateboard with four wheels that tilts forward for acceleration. I am using a 2G accelerometer to measure the forward tilt but it does not go full power unless I tilt the board to almost a 90 degree angle. Should I use a higher G accelerometer like the ones capable of measuring up to 250G so that it can go full power at less than a 45 degree angle? Or should I use a gyroscope sensor instead? I am just using analog accelerometer that outputs 0-5 volts to the generic speed controller as I do not know how to program. Any help will be much appreciated. Thanks!
XenonJohn (author)  Noaharfarf1 year ago
Alternative to the above is to use a 1G accelerometer that will give faster rising voltage as you tilt it.
1-40 of 592Next »