Electric Unicycle Arduino DIY





Introduction: Electric Unicycle Arduino DIY

This is a cheap electric arduino self balance unicykle. Total cost is around 360 USD, and you get a range of 10-15KM. The unicycle works like a Segway just with one wheel.

Step 1: Step 1. Parts

To make this you need:

i have bought all on ebay.

  • Unicycle 20" Tire 80 USD
  • Motor 4-600W DC brushed motor 100 USD
  • Old normal 21 gear bike(gears and chain) 10 USD
  • BTS 7960 40A 25V motor controller 25 USD
  • MPU 6050 gyro 5 USD
  • Arduino Nano V3 5 USD
  • LM2596 DC DC 3A 5 USD
  • 22.2V 10C 10000MAH Nano Mars Lipo 100 USD
  • iMAX B6 LCD battery charger 5A 20 USD
  • 80A fuse, on switch, main relay. 10USD.
    • Total 360 USD.

Step 2: Step 2. Drivetrain

Her you need a large 48 tooth crankset. Remove the smallest 24 tooth and attach the largest with rubber bearings. Because is really difficult to attach it dead senter. So when you attach the chain is will prevent it to slip out.

I have a 2600RPM motor.

20"*2,54(to cm)*3,14/100=1,59M/RPM.

And i have first 1:3(6-18) in the first chain, and 1:2,7(13-48) in the other. That gives me a total of 1:11.


That gives me a top speed of:

236RPM*1,59m*60Min/1000m(in 1 km)=22,5 km/h. But the software limits it to 70%. So 15 Km/h.

Step 3: Step 3. Electronics

The code is from a segway. Is Ovaltineo that has wrote it and you can fint it here:


I use a 24V 10Ah and its have 240Wh, and it rated at 10C. So it can deliver 2,4KW.

The motor controller can deliver 40A, 960W. And the motor i use is 600W.

You have to find a box of some sort to solder everything together. i have also installed a Horn, and light on it to be a legal "segway" in my country.

Step 4:

4 People Made This Project!


  • Creative Misuse Contest

    Creative Misuse Contest
  • Clocks Contest

    Clocks Contest
  • Water Contest

    Water Contest

57 Discussions

Hey! I downloaded the zip file with all the code. I am using all the same boards as you (except im using an uno instead of the nano), and I'm wondering what bits of code you uploaded to the arduino? Is it just the MPU6065 code? Or is there another bit from the zip folder I have to upload as well? Thanks.

2 replies

You have to open the Segwayclone.ino file. Then you will get a lot of windows. Under segwayclone.h start by calibrate.


Uncomment one MODE below



//#define MODE_RUN

And you have to use:

#define MPU6050_X1_STEERING


You MUST read the README.txt file for instructions.

It is also over 1000 post in this forum you can search about it.


hello can you help me that 3 days I try to use the library but every time compilation error I would first like to make a prototype with an L298N, MPU6050 and a TT engine thanks

Did you use 350W motors with a gearing??



1 reply

"And the motor i use is 600W."

I love the idea! I'll try to make something like this :). Maybe a little bit smaller version of self balancing unicycle.

Once I pond the code how do I get it onto my ardwino board?

1 reply

Hello Markula9

Why do you use two step-down? One I think is for the Arduino and the other?


2 replies


I use the other too 12V 10W led front light, and 1W red back and horn. Is all 12V.

Hello, I am making a self balancing vehicle for my final year project using an MPU 6050, a Genuino board (might be a counterfeit), and a Cytron duo motor driver.

However I am encountering a problem. The gyro sometimes starts giving out random absurd values and at times stops communicating. Do you think a problem with the MPU or the Arduino?

Please do reply

1 reply

Well if you have problems try to just buy new MPU is 5$. But before dukument and then change to new MPU. Common problem nois, long cables, connections ?. Then also is it SW/HW problems.

Sorry..I could not get those codes from the above link. Could you please help?

1 reply


Here is direct link to download.


Hey Markula,

It is certainly a good project! And I'm doing a project based on your's, but I'm facing a difficulty: I downloaded the SegwayClone.ino file and I tried to change the code like you said previously in other comments but I can't get it work.

Can you please upload the code you use to help me?


1 reply


You can try this. But you still need to calibrate.


Hi am having an 24V 3300rpm 100w motor can u plz suggest me a drive...thanks.

1 reply

100W motor dont have the power you need. It will maybe work on hard ground downhill. Buy 350W from ebay (50 USD).