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.

2600/11=236RPM.

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:

http://www.diyelectriccar.com/forums/showthread.ph...

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:

Comments

author
mdrafeeq.khan made it!(author)2015-03-04

I made it with guidance of

Markula (author) adding videos

wh uni.mp4
author
Markula made it!(author)2015-03-05

Cool! nice build :)

The next thing you chould do is attach some to lean your feets on. it will be a lot easyer to drive!

author
murray.dennis.3 made it!(author)2014-10-18

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.

author
Markula made it!(author)2014-10-20

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_CALIBRATE

//#define MODE_RUN

And you have to use:

#define MPU6050_X1_STEERING

#define PWM_PWM_CONTROLLER

You MUST read the README.txt file for instructions.

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

http://www.diyelectriccar.com/forums/showthread.ph...

author
murray.dennis.3 made it!(author)2014-10-20

Thanks a lot!

author
Leotiedt made it!(author)2017-01-03

Did you use 350W motors with a gearing??

Thank`s

Leo

author
Markula made it!(author)2017-01-05

"And the motor i use is 600W."

author
PeterJK made it!(author)2016-11-23

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

author
17tripodi made it!(author)2016-10-11

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

author
17tripodi made it!(author)2016-10-11

After I opened the code

author
soliveira9 made it!(author)2016-06-09

Hello Markula9

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

Congrats

author
Markula made it!(author)2016-06-09

Hi

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

author
soliveira9 made it!(author)2016-06-18

Nice, just like me!

Thank you

author
anuj1993 made it!(author)2016-04-13

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

author
Markula made it!(author)2016-04-14

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.

author
anuj1993 made it!(author)2016-04-04

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

author
Markula made it!(author)2016-04-05

Hi

Here is direct link to download.

https://github.com/ovaltineo/SegwayClone

author
soliveira9 made it!(author)2016-01-03

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?

Thanks

author
Markula made it!(author)2016-02-17

Hi

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

https://mega.nz/#F!RNdDmJIQ!Vp4YyIkteTZ8boVDs75mHg

author
biju+samson made it!(author)2016-02-17

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

author
Markula made it!(author)2016-02-17

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

author
fmullerbr made it!(author)2015-12-19

Does it work if I use a Brushless Geared hub Motor?

author
Markula made it!(author)2015-12-25

Hi

The motor controller that i use is for Brushed DC motors, not brushless. But if you use a Brsuhless speed controller you can use that.

author
HarizI made it!(author)2015-10-21

Hi! Can I have the coding of your project?

author
Markula made it!(author)2015-10-21

You find the code here:

http://www.diyelectriccar.com/forums/showthread.php/ovaltines-segway-clone-89471.html

author
JulL1 made it!(author)2015-08-26

http://solowheel.com/
try something like this but with more mileage...

author
AnasI made it!(author)2015-04-26

Sir,we are making electric unicycle project using Ovaltineo code but we are facing difficulties in editing it as we are not using steering and only one motor because orignal code is of segway. Can you please help us with it by telling us how to make this code work for unicycle and which file to run with arduino. We are using arduino, pwm pwm controller and MPU6050.

We will be very thankful to you...!!

author
Markula made it!(author)2015-05-22

You dont have to do anything to the code.

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_CALIBRATE

//#define MODE_RUN

And you have to use:

#define MPU6050_X1_STEERING

#define PWM_PWM_CONTROLLER

You MUST read the README.txt file for instructions.

You can use motor 1, or motor 2, PPM output.

author
AnasI made it!(author)2015-04-26

Reply soon...thank You

author
trampusblaz made it!(author)2015-03-31

did you have any problem with delay\slack in the chain ?

author
Markula made it!(author)2015-05-22

Hi

I have no trouble at all. If i take all apart, and install it. I have to ride it for 10 minutes, and tighten the slack. Nothing afther that.

author
drew2o made it!(author)2015-04-12

Would you recommend using a motor with a back mounting plate or one that mounts on the side like yours? It looks like you welded extra pieces of metal on to the unicycle to mount your motor. Also, do you think it would be a good idea to use a hub motor?

author
Markula made it!(author)2015-04-18

My have 3 small ears with M8 holes in the front plate of the motor. You have to se on your motor where the mounting is. I have tried to find hub motor, but not in the price range or is burshless.

author
rockmanx4 made it!(author)2015-03-14

I wanted to know how the body gets balanced. is there any other thing that balances body...and can I make a bike Like design using similar circuit

author
Markula made it!(author)2015-03-15

It's like balance a stick on your finger. If you cut the bike in 2 and use the back piece can work.

author
mdrafeeq.khan made it!(author)2015-03-05

some immags

blobblobblob
author
mdrafeeq.khan made it!(author)2015-03-05

adding some images

blobblobblob
author
zenz1 made it!(author)2015-02-24

Very good project.

but I understand two things. You use a Arduino nano v3 and post arduino uno schema connection. I think that is not the same.

you use a arduino btn 7960 and the code is for sabertooth. Need I to change the code for run well?

Thanks a lot!

ciao

Zenzeros

author
Markula made it!(author)2015-03-05

Hi

The Arduino UNO is the same pin laout as the NANO.

If you se in the code, it support many motor controller. Included sabertooth, and BTS 7960. If you read the README.txt file you will understand.

author
mdrafeeq.khan made it!(author)2015-03-04

I made it with guidance of

Markula (author) adding videos

wh uni.mp4
author
mdrafeeq.khan made it!(author)2015-01-06

Thanks a lot!

i will try with 350 w 300 rpm gear motor

author
mdrafeeq.khan made it!(author)2015-01-06

thank your very much for replay

i tested with 120 watt 24 v motor but not enought tourge it cant move if the load is 70kgs, can i use 350 w 24 v gear motor rpm 300 torque 1.11Nm or 350 w 24 v dc motor above 3500 rpm for 52 tooth sprocket for motor 13 tooth sprocket

author
Markula made it!(author)2015-01-06

You have to use 350w gear 300rpm motor with 20 and 52 on the wheel. Then you will have 120 rpm with a top speed of 11 km/h.

author
mdrafeeq.khan made it!(author)2015-01-05

Hi i would like to make this unicycle i collected all hard ware (
arduino uno , BTS 7960, MPU 6050 , ) can i use 24 volts 120 w 1800 rpm
PMDC motor and moped 20" wheel with 52 tooth sprocket for motor 13 tooth
sprocket
can i also reduce the speed of motor in Arduino sketch
please guide me

author
Markula made it!(author)2015-01-06

Hi

The first hardware is ok, but the motor and gear is to weak.

1:4 in gear ratio. that gives you 450 RPM on the wheel.

450RPM*1,59m*60Min/1000m(in 1 km)=43 km/h.

It way to fast and the motor dont have enought tourqe.

If you use 120W. I will think that you have to have a top speed of 5km/h so the motor is powerfull enought.

So i will not recemend that motor. I will say minimum is 250W with a top speed of 7-8 Km/h.

author
Markula made it!(author)2015-01-06

I use bike parts. But later i find ut that 6mm 50CC scooter gear is better since you get more teeth on the sprocket gear, and then dont have to use dual chain.

you will find a lot of 68, 78 and 80 tooth 6mm sprocket gear on ebay.

http://www.ebay.com/itm/Electric-E-Scooter-Bike-Chain-Wheel-Rim-Drive-Sprocket-6mm-25H-80T-80-Tooth-Cog-/161544474940?pt=LH_DefaultDomain_0&hash=item259ccd113c

author
Markula made it!(author)2015-01-06

I use bike parts. But later i find ut that 6mm 50CC scooter gear is better since you get more teeth on the sprocket gear, and then dont have to use dual chain.

you will find a lot of 68, 78 and 80 tooth 6mm sprocket gear on ebay.

http://www.ebay.com/itm/Electric-E-Scooter-Bike-Chain-Wheel-Rim-Drive-Sprocket-6mm-25H-80T-80-Tooth-Cog-/161544474940?pt=LH_DefaultDomain_0&hash=item259ccd113c

author
SamuelS4 made it!(author)2014-12-31

Samuel Oliveira de Souza(Brazil)

author
ibenkos made it!(author)2014-10-18

Smart idea! Thanks for shearig :)

author
richard.payne.7186896 made it!(author)2014-10-11

Couple more things, is the m on the wiring diagram the main relay? Also is the secondary cog between the drive and the wheel for chain tention? Thxs