Home made Segway
Robot Technologies
Tuesday, 24 March 2015
Thursday, 19 March 2015
Rideable Segway Clone - Low Cost and Easy Build
Intro
Intro: Rideable Segway Clone - Low Cost and Easy Build
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 s...
This Instructable will show you how to build a ride-able Segway clone. Here are its features:
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.
- 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.
- 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.
Remove these ads by
Signing Up
Step 2: How to Ride the Segway Clone
- With the Segway clone leaning forward, it's front edge touching the ground, toggle the power switch on.
- The LED will glow red. Wait about 8 seconds for the MPU6050 Accelerometer/gyro to calibrate.
- Lift up the board so it is parallel to the ground.
- Hold in the deadman switch. The LED will turn green.
- Step on the board.
- Lean forward to go forward and lean back to go backward.
- While you are moving, you can press the steering rocker switch to go left or right.
- You can press the tilt rocker switch to adjust the neutral balancing position of the board.
Step 3: How to Build the Segway Clone Video
This video is over 50 minutes long and includes detailed instructions on how to build this Segway clone:
Step 4: Electrical Schematics
This is the electrical wiring schematic. It was drawn in MS Visio and saved as a .PDF here.
segway_schematic.pdf176 KB
About Us
© 2015 Autodesk, Inc.
forgot?
forgot your password or username?
it happens.
it happens.
Enter the email associated with your account and we will send you your username and a temporary password.
Not a member? Sign Up »
reset password
We have sent you an email with a password reset code. Please enter it below.
Not a member? Sign Up »
Subscribe to:
Posts (Atom)
Member Account |
Check Order Status |
Favorite List |
Shopping Cart |
FAQ |
Login |
Signup |
Cytron Technologies - Robot . Head to Toe
Search by Product Code or Product Name
I am nearly finished building my segway clone and owe a massive thanks to you for a fantastic instructable. I haven't added handlebars yet as I'm working on a tilt steer system built in to a nice stainless steel cover. However in testing the system I'm getting a slight vibration randomly if there is no weight on the motors this can become quite severe. My signal wires are all single wires but are all less than 1inch long. I'm using slightly larger, geared, motors with a sabretooth 2x32.
I'll attach a video and you see it shake rite at the beginning then smooth out.
Could my gain be too high?
https://www.youtube.com/watch?v=zpauHnX9E_E
It looks surreal to see you riding the platform without handlebars... Nice build.
re: the start-up shake, did you let the MPU6050 calibrate by waiting for 8-10 seconds at the start? The accel numbers the MPU6050 puts out are really bad for those first few seconds after power up.
Other than that, if the problem were low batteries or noise, you would see the shaking effect after start-up as well.
Please post another video when you have a final build!
Its been a blast building and testing. Thanks so much for the help.
re: the gains, I'm not sure which to modify. You have to play with it like I did. There are 3 gains in the code. The bottom one ANGLE_GAIN makes it immediately tighter and more sensitive to angle change. The others are part of the control loop:
#define ACCEL_GAIN 18.0 //
#define GYRO_GAIN 5.0 //
const float ANGLE_GAIN = 1.20;
Thanks for sending the pictures. Your wires are way too long. It will never work like that. Please read the Instructable and the debug instruction section. If the motors are running in 2 different directions, swap the motor wires at the Saber controller to make it work properly.
I really like this project - well done!
I am just curious, how fast can it go? :-)
- Jacob
Thank you for the great project and for answering questions so long after you finished. I have just recently finished my segway and I am pleased with how easy you have made it for anyone to build. I deviated mechanically and went with wheelchair motors and atv tires, but I used your code and I am happy with it. One thing that I am changing in my design is the steering. I am going to use "tilt" type steering with a 10k potentiometer. Do you think your code could be revised to except variable steering from a 10k potentiometer? Also I have read through the code and I am wondering if there is a number I could play with to have the lean angle vs speed a little more sensitive so you would not have to lean as much? One more thing, When my deadman switch is let go my motors stop abruptly, I'm guessing this is because they are geared wheelchair motors, what do you think? Again thank you very much for all the useful information, I have never done any code before and still cant believe thanks to you that I was able to get this all to work.
re: the potentiometer modification, it can be done. Yes, the code could be modified for this. I didn't implement it this way because most people wouldn't have the mechanical ability to build the linkage for the tilt steering. It looks like you do.
To modify the code, a voltage would come off of the pot and be read by an ADC input. You would scale it from 0-255. You would have to calibrate it so 127 is neutral going forward. You would use the number to modify the SteerValue variable in the code. I can help you if you have any issues implementing it.
You can use a larger gain to make the lean angle more sensitive. The gain values are in the beginning of the code. Start with a small change and experiment.
I agree that the geared motors might stop more abruptly than the DC motors without gearing in this Instructable. That said, you should not let go of the deadman while balancing.
I am making your segway clone for a school project. While testing my segway, the error FIFO overflow keeps coming. I have put my debug off just like you said earlier. Also I have checked my cables, they are short. Also I have checked my resistors. But also those are all right. Could you help me pleas?
Thanks,
Alec V
Please read the text and search the comments for FIFO overflow.
What do you mean "put my debug off"?
Does the segway run? Do the motors turn? What help do you need?
At first, thank you for your answer.
When I say : I 've put my debug off I mean: watch picture 1.
I have downloaded your program into my arduino. My motors were turning (sometimes very fast and sometimes very slow) but my segway wasn't stabilizing at all.
Afther that I took a look at the serial monitor to see of I could see a error. This is what I saw: picture 2.
I saw that it was giving an" OVERFLOW FIFO"error so I started reading your texts about it. In the meanwhile I have checked my ressistors and ther are fine and good connected. Also my cables aren't too long.
I don't know what I am doing wrong : why is my segway not stabilizing?
Kind regards, Alec
I have made 3 videos when trying to use my segway:
the first:
the second:
and the third:
As you can see I also need to keep touching the deadman switch. In the first video, my segway is trying to stabilize but doesn't succeed at all. In the second and third video my segway is yust turning around for crazy. (video 2 is a close up on the wheels, video 3 is the whole body of the segway)
Thanks for have a look. Kind regards
Thanks for posting the videos. Nice build.
In the first video, your segway is shaking. I think that is because your wires are too long. Shorten the wire between the Arduino and the Saber. Also, shorten the I2C wires between Arduino and the MPU6050.
In the 2nd and 3rd video, it looks like one of your wheels is running in reverse. Flip the wires to one of the motors at the Saber. (DONT reverse the 24V Batt wires to the Saber by accident.) If you flipped the proper motor wires, when you tip the segway forward, it should go forward. If it goes backward in this experiment, flip both sets of Motor wires.
Let us know how this goes.
I have shorten the wires like you said. At the beginning my segway was acting in a very positif way.But afther a few seconds (30sec) he started doing crazy things again. While he was shaking, the error lamp on the Saber started to shine.
Kind regards
The batteries should never be allowed to drop below about 12V. They need to always stay charged. If they drop down, they will be destroyed and need to be replaced with new batteries.
The battery voltage of my 2 batteries are 12.5V. Do you have other tips?
Kind regards
For the other 2 videos, you have a motor wire swapped on the Saber. I bet it will balance if you fix that.
You can use the Arduino Pro mini I believe. You will need the 5V version. You can tie the MPU6050 to 5V instead of 3.3V as shown in the schematic. The MPU6050 has a regulator on the board. It looks like the Pro mini has 1/2 the Flash memory of the Uno. I don't remember how much was used in the Uno. You'll have to check that too.
You may want to consider skipping the custom board and using the UNO and just soldering the MPU6050 and all wires to it without using the solderless breadboard. Like this:
http://www.ebay.com/itm/2x-Prototype-PCB-for-Arduino-UNO-R3-Shield-Board-DIY-New-Version/261787527447?_trksid=p2047675.c100005.m1851&_trkparms=aid%3D222007%26algo%3DSIC.MBE%26ao%3D1%26asc%3D28774%26meid%3D887c0c7367d34c07b22fe57dae8150d7%26pid%3D100005%26rk%3D4%26rkt%3D6%26sd%3D371273374153&rt=nc
Try shortening up the wires to see if the jitter and slow motor issue goes away. Make sure the motors are spinning in the right direction for the tilt of the board. If not, reverse the wires at the Saber. DONT reverse the 24V Batt wires to the Saber by accident.
Don't let your batteries run down. They should both read over 12V.
Send us a video when you get it working!
project now. But I have a question .. If I mounted the electric box
underneath the base, is is gonna work fine? Or should I edit the code??
It looks like you have a controls engineering background. You would be a great candidate to improve the code! As you know, many real world control systems use just PD or PI. On one of my iterations of improving the code, I tried the actual Arduino PID library. It didn't improve things for me but I may not have tuned it right. I have implemented PID in FPGAs before and it took a while to optimize the machine. The Segway is a unique "plant." Your body weight makes up part of the system so it seems to behave differently for different size people. On another note, a real Segway has a much more powerful motor. These motors struggle to balance you if you are too far forward or back. (larger error)
The tilt offsets are not really part of the control loop. They just allow you to adjust the "setpoint" for the control system. This is done for rider comfort. It's awkward to ride a board that is tilting too far forward or back.
http://www.instructables.com/id/Self-Balancing-Upside-Down-Pendulum/