This Instructable will show you how to build a ride-able Segway clone. Here are its features:

  • Easy to build with no welding, no complicated steering linkage and minimal soldering.
  • Uses a readily available $3 digital MPU6050 accelerometer/gyro IMU board.
  • Total parts cost is under $400 (including shipping). A real Segway is $5000!
  • No salvage, dumpster diving or Craigslist parts.
  • A detailed parts list and ALL purchasable sources are included.
  • Well documented with over 50 minutes of HD how-to video, pictures and a detailed plan.
  • Uses the very common Arduino UNO processor board.
  • All Arduino processor code is included. NO additional Arduino libraries need to be installed.

This is a great learning project. It involves:

  • wood working
  • metal working
  • plumbing techniques
  • wiring from schematics
  • micro controller (Arduino) C like coding
  • accelerometer/gyro basics

I would say that a motivated middle schooler (12+ year old) with a parental figure could tackle this project. If the motivation isn't in the technical learning and assembly, it will be in the riding fun!


UPDATE 12/24/2014: There is a separate Instructable here to strengthen the Segway Clone PVC to Wood junction.

Step 1: Introduction Video

This video shows some action shots of the Segway clone!
<p>Sir,</p><p>As You Suggested I have uploaded the video of my progress for my version of this Project.</p><p>The Problem I am Facing is that the scooter is not able to take its own weight.</p><p>The details of the project are shown precisely in the video I have uploaded :D</p><p><a href="https://www.youtube.com/watch?v=izXGBri9mLI&t=70s" rel="nofollow">https://www.youtube.com/watch?v=izXGBri9mLI&amp;t=70s</a></p>
Hi Devesh,<br>Nice build and video. You are very close. My first question is what is the voltage on your batteries? Both should be at least 12V when the switch is off. If not, they need to be recharged or replaced if they wont hold a charge anymore. THese lead acid 12v batteries can be permanently damaged if they are over discharged.<br>Is the led flashing on the saber when you have the segway on the ground?
Sir ,<br>anxiously and eagerly waiting for your reply .
<p>The wires should be the size of an extension cord wire. If possible, get 2 car batteries and try that as an experiment. It's still possible that your batteries are weak or are not rated at 7A each.</p><p>Once you get close, you may want to increase the gain settings at the top of the code. Your video shows that the Saber is cutting out due to an overcurrent error so that is not the issue yet.</p>
<p>Hello Sir,</p><p>I have checked the batteries when the switch is off it shows 12V always and yes the RED LED (ERROR) and the S2 LED (BLUE) of the sabertooth also flashes when the scooter is on the ground.</p><p>Also will the gear ratio matter in the build ? </p>
<p>The red flashing LED means over current error. Sometimes the Saber will vibrate the motors to let you know you have this condition.</p><p>The power requirement of the motors are fixed. If you drop the voltage, you will increase the current needed to run them. That will cause the over current error.</p><p>Either your battery is too low or your wires are too thin. Check both carefully under load this time. Or, your wires are too thin for the load. Make sure they are the size of electrical extension cords as used in the Instructable. If they are thin wires, there will be a voltage drop.</p><p>Yes the gearing matters. 1:1 is not good but I dont think it would cause the severe problem you have. Not sure. You should try to match the gearing of the Razor scooter gears and chain used in this Instructable.</p>
Okay Sir , <br>I will Change the wires and check .. <br>any specifications of the wires <br>also I dont Need to change anything in the code right ?
<p>he sir i am using 32x2 sabertooth driver and 250w motor and i have connected exactly how u described in schematic but when i connect battery one which is connect to m1a m1b starts rotating on its own i seams there is some different dip switch configuration for 32x2 board pls can u tell me the solrution ASAP </p>
<p>Hey, </p><p>I had a similar problem in the early stage of the making of this project. The problem got solved by placing the MPU6050 fixed on proper position and also twisting the wires used for connection. </p><p>You can try these and check</p>
<p>did u use same 32x2 sabertooth driver.?? because i have tried placing the board in every possible way but it is not working </p>
<p>i have even tried twisting wires i saw your video on youtube i did same on breadboard what actually happening is that when i power in that circuit and even though the deadman switch is open one motor rotates at full speed changing is direction of rotation on its own </p>
Hey , <br>Did You try fixing the bug in code as well as shown in step no.8/38 under notes .. The First Code fix which sir has given .. <br><br>also I have used 2x25A sabertooth that shouldn't matter much as it depends on the battery readings and types of motors you are using
<p>yes i have tried it as well and 2x32 is different from 2x25 because 2x25 can only work in serial mode while 2x32 can work in 4 different mode and what i came to know from datasheet of 2x32 is that it is pre configured to 9600baud rate and u have to just set dip switch to get it work in serial mode but that also is not working </p>
<p>hey there is mistake yes 2x25A board can work in all above modes hey can u just upload the photo of ur dip switch configuration </p>
<p>Hello IHurt,</p><p>I made a segway as per your steps but, i faced a problem. When i give a power, motor start shaking and sometimes it start to run on full speed. When i put segway on the ground it self balanced but not work when person stand on the segway it does not go forward or backward but without person segway balance it self. I also found that my one battery discharge and one not because i used different batteries may be this problem occurred due to using different batteries. Give me your suggestions as early as possible.</p>
It sounds like a battery issue if it won't work under load. The batteries need to both be over 12V when you start out. They should be 7A minimum each as shown in the Instructable. The batteries do fail if they are too depleted and not charged in time.
<p>Hello Ira,</p><p>Last week, I sent a message, but pictures were not added.</p><p>So, you ask me to make a video.</p><p>Here is the link to read it (I do hope this time it will be ok)</p><p>So save your time, I treid to make it clear as possible.</p><p>Best regards,</p><p>Jean-Claude from France</p><p><iframe allowfullscreen="" frameborder="0" height="281" src="//www.youtube.com/embed/dhEFSYjlB3Q" width="500"></iframe></p>
<p>Hi Ira,</p><p>Still on the infernal machine...</p><p>Back to my video :</p><p>1 - Well seen, around 47 seconds, you noticed two wires on S1 at the Saber. It&rsquo;is a very short lenght of wire which is use to grip the oscilloscope probe.</p><p>2 &ndash; I confirm that there is a direct link beteween S1 at the Saber and Pin 13 at hte Arduino. This wire is twisted with ground connection</p><p>3 &ndash; you tell me to modify arduino code in order to test the Sabertooth. I am unable to do this job. So, I have dowloaded a test progamm witch take in acount exactely the same hardware. I shall tell you the result of the test.</p><p>4 - I have read one more time the instructable, and I have discovered one thing I have not done properly.</p><p>I have not added one individual wire to both twisted pair. I consider if you mention to do so, it must be useful.</p><p>5 - One more question : Has the metalic cabinet to be grounded on the same common point ?</p><p>@+</p><p>Jean-Claude</p><p>PS : I tried to add pictures to this message, but it seems that it doesn't work. When I upload the file, the picture appears at the bottom of the message, but it is a tiny square</p>
<p>One other thing comes to mind since this is an intermittent problem. </p><ul><br><li>Make sure your batteries are fresh. Each battery should measure at least 12V when not under load. If not, replace your batteries.</ul>
<p>Let me know how the saber &quot;test program&quot; test goes.</p><p>The metallic cabinet does not have to be grounded. </p><p>I can see one picture which looks larger when I click on it.</p><p>Debugging is tough. I do it a lot. It will feel great when you solve the problem!</p>
<p>Sorry for the reply delay Jean -Claude. Just returned from vacation. </p><p>The video looks good. at around 47seconds in, It looks like there are 2 wires connected to S1 at the Saber. Why is that? It should be only 1 wire.</p><p>On the green wire from S1 to Arduino board, this should go to pin 13. It's hard to tell in the photo but it looks strange. </p><p>All the wires from the steering and tilt switches should be twisted with grounds. If not, it can couple noise to the Arduino. You can see my son doing this with a drill in the Instructable video.</p><p>I still think you have I2C noise getting into the system or a wiring issue. If you have ruled all these above problems out and really think the Saber is a problem, try: </p><p>modifying the Arduino code to just drive the saber wheels with a delay. No I2C accel readings at all. For example, Mot0 clockwise for 2 seconds at a slow speed then stop for 1 second then CCW for 2 seconds and repeat. Try the same for Mot1. This will prove out the Saber. </p><p>Let me know how it goes.</p>
<p>MPU6050 connection successful</p><p>Initializing DMP...</p><p>Enabling DMP...</p><p>Enabling interrupt detection (Arduino external interrupt 0)...</p><p>DMP ready! Waiting for first interrupt...</p><p> fifoCount: 1024 mpuIntStatus: 19FIFO overflow!</p>
<p>@SafetyfirstS Did you happen to find solution for this problem or found out what was causing this issue?</p>
<p>I am making this as my final year project. But sabertooth motor driver is not available. Can you suggest any other motor driver for this project? And what all changes have to be done in programming with the new motor driver?</p>
<p>Hi guys!</p><p>I'm currently making my own Segway clone as a college project but I've run into difficulties with the MPU6050. When the deadman button is pressed the motors go 100% in one direction and the gyro seems to have no effect on them. </p><p>Everything else works perfectly (LED, Steering, Deadman button)</p><p>Any assistance would be greatly appreciated. </p>
Hi Niall,<br>I assume that you have the segway up on a bucket when you push the deadman switch. Does the segway respond at all when you tip the board or just slam to 100% no matter what you do? <br><br>Is the MPU 6050 oriented as shown in the picture and up on the top of the board in a box?<br><br>Are you sure the I2C communication is good? Pullups, twisted wires? Noise can easily couple in and you will get bad Accell gyro readings. The debug section shows how to use the serial monitor to see the actual Accell gyro readings from the MPU6050. It's cool and you should try it.<br><br>Re-read the instructable and check the schematics carefully for the I2C connections and the S1 connections.<br>
<p>The motors slam to 100% no matter what orientation the gyro is at. I'll check the wiring again for noise and such, but nothing seems to be making any difference to it. </p><p>I'll try the debug. Thanks for replying!</p>
<p>I've tried the fix mentioned above, changing the number from 0x01 to something higher, but that still has no effect. </p>
<p>great instructable! Is there any way I can build this with just a castor wheel attached to the front, without the Segway balancing? If there is could you explain the how I would do it, and what extra parts I would need. Thank you! :) </p>
<p>Yes, the Arduino code could be modified to ignore the Accel Gyro and just follow the steering switch. What are you using this for?</p>
<p>Hi!</p><p>I have built the clone as per your direction.</p><p>Kindly let me know how you set the dimension for the segway measurements.</p><p>Whether you use equations or something else.</p><p>Kindly let me know.</p>
<p>The dimensions for the segway were found experimentally. For example, I measured the size of my foot and the box needed to determine the size of the platform plywood. No advanced mathematical calculations or formulas were used for that. Does that answer your question?</p>
<p>Thank you ihart !</p><p>But if you know about any mathematical calculation or formula for segway dimensions kindly let me know.</p><p>Thanx</p>
<p>Hello Ira,</p><p>A few months ago I posted some questions of course about the construction<br>of the segway clone.</p><p>At the time, there were several dysfunctions. Then, I modified the wiring,<br>and I changed the gyro card, so things<br>got a bit better.</p><p>For personal reasons, I put the construction a bit off, and I'm recovering<br>now.</p><p>There is something weird about the Sabertooth card. That's what happens:</p><p>I turn on the power (24V)</p><p>I wait for 8 seconds</p><p>I do not press the deadman switch</p><p>If I connect a voltmeter to the M2A / M2B output of the Sabertooth board, I<br>measure 0 V with a voltmeter in DC <br>position and +/- 3.75 in the AC position. So, the motor rotate very<br>slowly. Here is the picture of the signal.</p><p></p><p>f I do the same on the M1A / M1B output, I measure 0V both mode (DC and<br>AC). Here is the picture of the oscilloscope on this channel</p><p><br></p><p>In addition, here is a picture of the signal that comes out on pin 13 of<br>the Arduino card (still without pressure on the dead man switch)</p><p></p><p>If I press the deadman switch, the operation is eratic with apparently an<br>IC2 bus break.</p><p>Of course, all your advice has been followed (wires twisted by pair +<br>connection as short as possible + pull resistors + battery fully charge + DIP<br>configured as indicated in the instructable).</p><p></p><p>To be sure to be completely free from possible<br>parasites, I tried to power the arduino card with a 9-volt battery, but that<br>does not change anything</p><p>Here are some questions:</p><p>Since the fact that motors do not turn, I consider that<br>parasites cannot interfere on the system &ndash; Yes or no ?</p><p>Why are the signals on the two outputs different?</p><p>Is it normal to have a signal on pin 13 of the Arduino card without<br>pressing the deadman switch ? To me, it would be seem more logic to get no<br>signal at all.</p><p>What kind of signal should be read on the pin 13 either without pressure or<br>pressure on deadman switch ?</p><p>Is my signal seen by the oscilloscope on pin 13 correct ?</p><p>An Arduino card is very cheap and easily available. So, I<br>could try to connect a new one. On the other side, a Sabertooth car is<br>expensive. How could I be sure that my sabertooth card is fully<br>fonctionnal ?</p><p>Many thanks for your help.</p><p>Best regards </p><p>Jean-Claude (France)</p>
<p>Hi Jean Claude,</p><p>None of your pictures came out. Please send a video of what happens when you try to ride the Segway. Show the twisted wires and pull up resistor. I am not sure from your description what you are saying. There is an I2C bus break?? Obviously this will cause many problems. There should be signals on pin 13. The code will send serial commands to the saber to stop. Verify all your wiring against the schematic again please. Check that the grounds tie to a common central point.</p>
<p>Our middle school project is underway. One question I have is about your wiring schematic. You do not have a wire coming from the S2 on the Sabertooth Driver. Should there not be a wire on S2 and S1?</p><p>Thanks for sharing such a well done Instructable.</p>
Don't think there is an s2 on the saber in here. Maybe on the 60amp version. Check the spec.
<p>Sorry. S2 is not used here. Leave it unconnected.</p>
Hey Ira !<br>I have built the clone as per your directions, but there are a few issues out there.<br>1) When the power switch is turned on, even without pressing the deadman swith the motors start rotating/vibrating.<br>2) Also the motor on the left side is spinning at full speed, while the other one is completely idle.<br>3) In debug mode the FIFOoverflow message pops up so its not possible to see the motor outputs.<br>4) As discussed in many comments I had tried changing the last digit in the line 0&times;02..... ( from 0 to 17) in the MPU6050motionapps library. But still the problem persists.<br><br>I have used 350W motors and Sabertooth 2x32 A motor driver. I have set the DIP switches same as in your 2x12 A. I<br><br>Please do help because I realy want to finish this awesome project.<br><br>In the mean time here are a few previews.
<p>Hi Madbots,</p><p>You are really sticking with this project! Check all your wiring per the schematic and make sure the wires are twisted. Especially check the I2C wires and motor wires. If they are not twisted, they are susceptible to EM interference from the motors. Make sure the correct value pullup resistors are on the I2C lines.</p><p>Dont worry about #4. There is no evidence that it made any difference and I did not implement that.</p><p>Send a detailed youtube video if it still doesn't work.</p>
<p>im so excited with your article and this is so clearly, you explained to us step by step that was great, </p><p>may i ask you about about the imu, if i want to change the imu with imu combo board v1 2 dof, is it possible with your program? or it cant work?</p><p>thank you so much</p>
<p>I am a middle school teacher and robotics team coach. We are excited to go beyond build our Lego kits in the robotics world and build a segway. I have been doing quite a bit of research and many of the other projects I have seen use PID control. I am a rookie with the arduino, MPU6050, and 24V motors. Your project seems quite a bit simpler than most. Can you enlighten me on the PID control or lack there of?</p>
This would be a great project for middle schoolers. My son is actually in middle school now. <br><br>PID (Proportional, Integral, Derivative) is one type of control system which uses feedback. In real world application, all 3 of the terms are not usually used. The code here uses a front end filter to smooth out the input from the accel/gyro. It then uses a type of proportional control to stabilize the platform. <br><br>I bet some of the kids can help you with the arduino if you have issues. ;-)<br><br>Read through the instructable and some of the comments. Let me know if you have issues. Good luck.
<p>I reached out within our community and a local hospital has donated 5 - Jazzy wheelchair/scooters with dead batteries. I am having trouble finding the specs on the motors so we are going to purchase the largest Sabertooth 2x60 motor drivers to use. One of my student's father is our high school metals teacher and a local machine shop has offered to help, so we are going to weld up a frame for this project. We also are going to modify ours to have another mpu6050 for steering rather than switches. Ordering parts today. I will keep you posted with our progress. Very excited to get started.</p>
I would not advise using the mpu6050 for steering on the initial model. Start with the switch in the intractable. Switch to a potentiometer if you want mechanical steering.
im dhanu a student<br>your segway clone make me so excited right now,this is amazing! i will try it<br>god bless you
<p>Can you share where to order the motors and wheels?</p><p>Thanks,</p><p>Mike</p>
<p>Can you share how we can purchase similar motors and wheels?</p><p>Thanks!</p>
<p>Hey Ira,</p><p>Can you explain what the deadman switch, tilt and steer switches do? I just read the code and i can't understand what these switches do.</p>
Did you read the Instructable?

About This Instructable




Bio: I'm an Electrical Engineer with "engineer disease." I need to always be making, fixing or learning about something.
More by ihart:Update: Segway Clone - Stronger Design Modification Wood Bike Rack for 5 Bikes, Fast and Low Cost Build Rideable Segway Clone - Low Cost and Easy Build 
Add instructable to: