Introduction: Self Balancing Scooter Ver 2.0

Picture of Self Balancing Scooter Ver 2.0
Unfortunatly the IDG500/ADXL335 chips unsed on the accelometer is End of Life.
So they will no longer be manufacturing those chips and therefore the accelometers.

There are digital versions out there but a complete code change will have to be done to get it working.
Hopefully soon we will have a solution.

Solution has been found


After building the first Self Balancing Scooter as a test platform, we found it to be quite cool so we built another with a few extra features.

This time we added:
  • 2 x 14.4Volt Li-ion batterys
  • Solid frame for motor and wheel mounts
  • Adjustable height handle
  • A nice CNCed platform
  • And Tread Plate!

The exact same parts used on the first scooter were utilized to build this one.

Code bug updated on the 24th Feb 2012.
Issue with timing routine.


Step 1: Details About the Build

Picture of Details About the Build

Issues encountered with the first unit were fixed with this version.

The main issue was that the rear end of kids scooters were a cheap pressed plate that would buckle and bend when under weight so stronger, metal plates were laser-cut to replace the frame which holds the motor and wheels.

The frame was made from 25mm tube and reinforced to hold more of weight.

The front handle was made adjustable so smaller people can ride it too.

Because there wasn't any cheap torches that used the chosen batteries, a holder was made to store the batteries.

A tread plate was added to make it look professional.

Step 2: Parts

Picture of Parts

Unfortunatly the IDG500/ADXL335 chips unsed on the accelometer is End of Life.
So they will no longer be manufacturing those chips and therefore the accelometers.

There are digital versions out there but a complete code change will have to be done to get it working.
Hopefully soon we will have a solution.

We have found a solution


The parts are the same as the previous build except different batteries were used. 

Parts Needed:

•Arduino UNO - Check your local suppliers or eBay.
•Sabertooth 2x25 Motor Controller ( or a local supplier)
•5 DOF accelometer ( ****** new replacement IMU 11/04/2012****** no longer available****
•2 rear end off kids scooters or buy motors and wheels separately ( or eBay) Have a look around your area.
•Batteries - SLA batteries are good and cheap. Power drills can be quite inexpensive too or LiPo's if your game!
•Shielded multi core cable for the accelerometer and heavy power cable for the motors
•Deadman switch
•Toggle switch for turning.
•Toggle switch for adjusting balance position.
•DC connector for Arduino.
•DIL pins to suit Arduino
•Double sides tape
•Screws etc

Step 3: Tools

Picture of Tools

Basic  tools are needed.

Also, someone with the skills and equipment needed to weld the frame

And some additional tools:

•Drill and drill bits
•Soldering iron and solder
•Wire cutter and wire strippers
•Heat shrink and hot air gun to shrink it

Step 4: Frames/Motors

Picture of Frames/Motors

The frame was made a lot stronger using 25mm RHS tube and laser cut plates for the wheel/motors mounts. This stopped the twist in the frame which occurred in the previous version.

The front handle was made adjustable and nice grips were added to the top.

Step 5: Electronics

Picture of Electronics

The electronics are quite basic as per the circuit diagram and are exactly the same as for the previous version.

All cabling for the switches and IMU should be shielded cable except if the IMU is right next to the Arduino.

The IMU needs to be mounted under the centre of the platform or in front if possible. We mounted ours in a box out the front.

Everything fitted in the box and the kill-switch, L/R steer and tilt adjust were run up to the handle.

The batteries were mounted on top of the motors.

You need to change the DIP switch setting on the sabertooth
Set them to the following.

1on, 2off, 3on, 4off, 5on, 6on

Step 6: Code

Picture of Code

The code is basically the same as XenonJohns code but some of the power/torques values were adjusted. At the start of the code there are 2 variables to alter in order to adjust the power and torque.


alex_peters (author)2017-02-21

Awesome project - have booked a few weeks over summer to give it a go!

jprada (author)2016-03-17

hi this elements is not available? Which it is his replcement?

rizqiakanishi (author)2016-02-22

hello.. I want to do this project.. :D but there's no seller in my country which sell sabertooth dual motor driver.. and i want to replace that with BTS7690 motor driver.. do u think it will work or not? please help me.. :)

waiting for your answer.. :)

rajatnegi (author)2015-08-20

please can you send me electronic connection and codes of it at my email address is

ks4 (author)2014-12-01

Need the motor specifications for designing a self balancing two wheeled vehicle

jonnybo111 (author)2014-09-04

How smooth is the turning? Is it very jerky or slow turning?


could you go into more detail about this frame please

XenonJohn (author)2014-03-07

Hi folks,

Just letting you know I have (finally) managed to get a self-balancer working with one of the newer and much easier to obtain DIGITAL IMU's from Sparkfun.

I have done a quick Instructable on it here:

Hope it helps somebody.


ScitechWA (author)XenonJohn2014-03-09

Thanks for the update John. I'll check out the code and adapt it to ours.

ScitechWA (author)2014-02-19

You push the switch on the top, either forward or back to adjust the upright position.

gerrymazzotta (author)2014-02-19


how to use the buttons to adjust the tilt?



CUSTOMIZER (author)2013-05-02


regarding the Ebaylink for the new IMU. that IMU uses ADXL335 and IDG650 not IDG500!!!

Will it work??

ScitechWA (author)CUSTOMIZER2014-02-16

Yes they work ok.

chenjian (author)CUSTOMIZER2014-02-15

Hello,which IMU could make it works,I can't find the 5DOF GY-66 accelometer anywhere,please something could replace it please tell me ,thanks

CUSTOMIZER (author)chenjian2014-02-15

hi bro

I have this one

It's working perfectly but I have some tourqe issue that I can't solve it soon

chenjian (author)CUSTOMIZER2014-02-15

Thanks very much.but I can't get this from eBay in China, and I found the oldest one(the red one)on Taobao

But it's expensive. T.T

ScitechWA (author)CUSTOMIZER2013-05-02

Yes it does. Someone has used it and works ok!

chenjian (author)2014-02-07

hello, if i want it could change the direction ,what should i do

ScitechWA (author)chenjian2014-02-07

The turn switch in the middle of the handle bars.

chenjian (author)ScitechWA2014-02-14

hello,i have a new problem, i can't find the 5DOF(5DOF module accelerometer + dual-axis gyro instrument IDG500/IDG655 650 ADXL335) on local store and ebay(in fact, i cant buy anything from ebay in China), i don't know should i do ,if anything could replace it, please tell me ,and thank you very much.

chenjian (author)ScitechWA2014-02-10

i get it , thanks very much ,i made this now thanks for your sharing. it's cool

aol1044 (author)2012-02-27

I can`t seem to find the 2x52 motor controller, would a 2x25 be ok to use?

ScitechWA (author)aol10442012-02-27

Lol. Sorry fixed that mistake.
Yes the correct one is the 2x25 sabertooth controller.

aol1044 (author)ScitechWA2014-01-31


smasaye (author)2013-12-19

if i use seedstudio 2 single axis gyros what pins should i connect to analog pin 0,2 and 3 from arduino

XenonJohn (author)2013-12-15

December 2013:
If it helps anyone I have just found out that Seedstudio sell analog accelerometers and gyros still.

The "Grove" series of analog sensors from Seedstudio. Details below. The scaling factors in software may need tweaking but at least they are still available to buy:
3 axis analog accelerometer
Buy here:
and here:

Also they do an analog 3 axis accelerometer:
Buy here:
and here:

smasaye (author)2013-12-12

i ordered the 5dof from ebay but its not recieved it for 5 mnths now.any other trusted sites from where i can get it..

_Rommel_ (author)2013-09-20

Which is better:
Chain or belt?
And how much RPM motor should i choose?

gbredemeyer (author)2013-09-14

Hey guys, great work! I'm in the middle of a build using xenonjohns code as well and am running into some trouble. I commented on his project, but was hoping I might be able to see what you guys think...the comment includes some of my values and a link to a video of my bot. Comment can be found here: any help would be greatly appreciated!

csewell2 (author)2013-09-03

with the sabertooth is there any substitutes i can use

ScitechWA (author)csewell22013-09-03

There are other motor controllers but we have used this one because of the reliability and robust against burning out!

csewell2 (author)2013-09-02

when i test the codding on the audrino app it says

sketch_sep02a.ino: In function 'void initSabertooth()':
sketch_sep02a:58: error: 'BYTE' was not declared in this scope

As of Arduino 1.0, the 'BYTE' keyword is no longer supported.
Please use Serial.write() instead.

sketch_sep02a.ino: In function 'void set_motor()':
sketch_sep02a:513: error: 'BYTE' was not declared in this scope

As of Arduino 1.0, the 'BYTE' keyword is no longer supported.
Please use Serial.write() instead. what do i do please help

ScitechWA (author)csewell22013-09-02

Open it with a pre 1.0 version of arduino.
eg version 0023

We haven't updated the code to version 1.0 or greater as we are rewriting it to suit the digital IMU.

smasaye (author)2013-08-20

hello sir,
since where i live m not able to get the required electronics bt me and my friend have decided to build our segway,i somehow managed to get imu n uno bt again sabertooth unavailable,bt i gt a same specification motor controller.will it cause changes in coding???it has same pins as per sabertooth.need ur guidance sir
thank u

ScitechWA (author)smasaye2013-08-25

If the controller is exactly the same then it should work!

jaz me (author)2013-08-15

Greetings sir,
Do u have a code and drawing diagram for a detailed instruction for a newbie like me using a single ebike hub without controller? i want to use just a single wheel. email ...

ScitechWA (author)jaz me2013-08-18

Nope sorry!

smasaye (author)2013-08-14

Sir the replacement u provided for the IMU also is not available in my proximity,will it b fin if i use IMU Digital Combo Board - 6 Degrees of Freedom ITG3200/ADXL345,wat necessary changes would be required

ScitechWA (author)smasaye2013-08-14

That would require a complete software change!
We are looking at this and hopefully have software sometime soon.

smasaye (author)2013-08-13

sir is it possible to use a joystick for steering plz reply

ScitechWA (author)smasaye2013-08-13

Yes just use the code and circuitry from here.

sravanrkappen (author)2013-07-26

greetings sir,
my motors are not responding as per the tilt of the IMU is responding slower...
do i want to go for the program edit or check the functionality of the sabertooth board??

ScitechWA (author)sravanrkappen2013-07-28

Have you changed the dip switch setting as per instructions?
Are they working at all? What IMU board are you using?

bujanglayo (author)2013-07-24

don't you use any encoder?

ScitechWA (author)bujanglayo2013-07-28

Nope. Not yet. Soon.

Ganhaar (author)2013-07-27

Hi Rod,
Have you come across anyone who has tried bldc bike hub motors for a segway build? I can see various pros (ease of mounting, no chains or belts) and cons (price) and torque characteristics should be ok. A couple of things that I am unsure about is would BLDC controller response affect ability to balance, are there any problems continuously changing forward and reverse at slow speeds and if you use large bike wheels and have the load platform and centre of mass a lot lower than the axel about which everything pivots, I presume this would make it more stable when stationary, how does it affect driving dynamics?

ScitechWA (author)Ganhaar2013-07-28

Hi Wayne,
I have seen a unicycle that uses a BLDC.
It was called SBU and was on mythbusters.
So it works and you don't have to worry about lowering the mass below the alex. It doesn't matter.
I'd say you need a custom controller for the low speed.
Someone here was going to look at a BLDC segway at some stage but it's a long way off.


MaleBuffy (author)2013-07-25


i think I got everything. However my scooter is flying off at full speed once I try to balance it. I am using a 24v battery but 36V 300W motors. What Torque and Power do you suggest? Is 1 and 0.1 or 2 and 0.2 too low? With your settings this thing is going to fly!

MaleBuffy (author)2013-07-22

Since one motor looks at the opposite direction from the other, do I have to wire the motors on the sabertooth so that the one is connected inverted? Or does the software takes care of that?

ScitechWA (author)MaleBuffy2013-07-23

You are going to have to sit it up on something to test the direction.
You will have a 50/50 of getting it wrong! lol.
I didn't write the original code.

About This Instructable




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