0% found this document useful (0 votes)
940 views29 pages

Easy Build Self Balancing Skateboardrobotsegway

This document provides instructions for building a self-balancing skateboard or robot platform using inexpensive parts like scooter wheels. It includes 32 steps detailing how to assemble the frame, attach the wheels and motors, add an Arduino board for control, and wire everything including a hand controller. The goal is to create an easy-to-build self-balancing transportation device.

Uploaded by

c42222
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
940 views29 pages

Easy Build Self Balancing Skateboardrobotsegway

This document provides instructions for building a self-balancing skateboard or robot platform using inexpensive parts like scooter wheels. It includes 32 steps detailing how to assemble the frame, attach the wheels and motors, add an Arduino board for control, and wire everything including a hand controller. The goal is to create an easy-to-build self-balancing transportation device.

Uploaded by

c42222
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

Home Sign Up!

Browse Community Submit


All Art Craft Food Games Green Home Kids Life Music Offbeat Outdoors Pets Photo Ride Science Tech

Easy build self balancing skateboard/robot/segway platform


by XenonJohn on March 20, 2010

Table of Contents

License: Attribution Non-commercial Share Alike (by-nc-sa) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

Intro: Easy build self balancing skateboard/robot/segway platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

step 1: Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

step 2: Scooter wheel as it comes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

step 3: Closer view of scooter wheel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

step 4: Dismantle each wheel assembly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

step 5: Reassembling wheel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

step 6: Frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

step 7: Axle brackets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

step 8: Trial fitting the axle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

step 9: Fitting axle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

step 10: Axle mounts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

step 11: Wheels fitted . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

step 12: Motors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

step 13: Alternative layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

step 14: Chain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

step 15: Chains fitted . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

step 16: Chain tension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

step 17: Chain tension 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

step 18: Electronics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

step 19: Arduino board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

step 20: Wiring arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

step 21: Wiring arduino 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

step 22: Arduino wiring part 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

step 23: Arduino wiring part 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

step 24: Arduino power supply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

step 25: Gyros orientation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

step 26: Motor controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

step 27: Sabertooth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

step 28: Battery connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

step 29: Hand controller wiring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

step 30: Hand Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

step 31: Handcontroller assembled . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

step 32: Handcontroller input wiring to Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

http://www.instructables.com/id/Easy-build-self-balancing-skateboardrobotsegway-/
step 33: Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

step 34: Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

step 35: Anti-tamper power cutoff key . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

step 36: Working . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

http://www.instructables.com/id/Easy-build-self-balancing-skateboardrobotsegway-/
License: Attribution Non-commercial Share Alike (by-nc-sa)

Intro: Easy build self balancing skateboard/robot/segway platform


Plan : Lowest possible cost easy-build self balancing segway / robot / skateboard base unit. Can be used as basis of a self-balancing skateboard, Segway clone
or perhaps an R2D2 or similar.

Why? : I took my self-balancing skateboard to a recent Maker Faire, March 2010 Newcastle UK, (see video 1 below ) and was inundated by people of all ages wanting a
ride and teenagers wanting guidance on how to build one. I have been working on these for a couple of years now. I built a one wheeler first which took me 3 months to
get to balance (badly) then a lighter no holds barred twin wheeler steered by a wireless Wii Nunchuck - my current machine. That machine was very expensive and not
easy to construct. I was seeing how far I could push the concept (and I still am).
My long term goal is to make something like a real practical "i-slide" (which was a design concept only - "hydrogen fuel cell powered" - yeah, right).
www.engadget.com/2007/09/19/islide-the-skateboard-segway-hybrid/
I envisage something you can ride a round a campus on, then pick up with one hand and take indoors. Therefore has to have wheels and motors not too large, and be
light enough to pick up!That in turn is why I wanted the top deck flat ideally, so you can carry it easily at your side with a handle. I am getting towards that goal in small
increments.

This instructable : The plan with this instructable however is to pare everything down to basics to see how simple and low cost I can make this tech, rendering it less
scary as a build proposition, yet still capable of carrying an adult. Hopefully a community of builders will emerge. How about a builders forum anyone?
Watch video 2 below then carry on through the instructable.

How costly is "low cost"? These obviously cost more than a few pounds and can run into the thousands. The parts for this, all new, however come to <£300 plus
whatever batteries you choose to power it. As with many electric scooters, get going with lead-acid then spend money on more exotic batteries later.

It would be great to see younger people having a go at building these. This is exactly why I have developed this lower cost version. You don't what your father
to have a heart attack as soon as you ask him for the money for this "educational" project.

I have used the KISS (keep it simple stupid) design ethos!

Easy build? Clearly this is not something for the complete beginner but as self balancing ride-on projects go, this is about as simple as it is realistically ever going to get.

Arduino microcontroller this time too. I have tried to describe every single step with no gaps, so yes there are lot of photos but that is a good thing if you are serious
about building one.
No welding either just hardware store nuts bolts and brackets.

Code is very well commented. Message me if you want a copy of the sketch, or....

Arduino sketch also here on my website:


sites.google.com/site/onewheeledselfbalancing/Home/easy-build-low-cost-arduino-self-balancer
Have also made a note of the project on the Arduino forum here:
www.arduino.cc/cgi-bin/yabb2/YaBB.pl

Summary of costs (all new):


Sabertooth motor controller £97
Motors: very variable on ebay but about £35 each
Chain: £9
Arduino: £20
IMU: £52 (see comments, someone has found a cheaper one already).
Razor E100 rear wheel sets (x2): £24.99 each from online electric scooter shop spares dept.

Total £273 including purchase tax which I think is pretty good for any self balancing vehicle. Batteries would take you over my £300 target but not by much. Also
compares well with cost of conventional 4 wheeled (one motor on one of back wheels) electric skateboards.

UK pound weak at present £1 = approx US$1.5 right now. Sparkfun and Razor scooters are US based, which suggests that you could do this at even lower cost in the
US.

Also Segways are legal on sidewalks in US (at least in some states) as far as I know, so maybe you could openly ride around on a seg-skateboard unlike here in UK.

KITS: I am being sent messages regarding kits. All I can say is, if some entrepreneurial type wants to message me then feel free to do so. This for me is a hobby, I have
a proper job too. However I have started up small companies in past. Open mind on the subject. It is genuinely highly educational - has been for me anyway!

Also, if considering a monowheel variant take at look at the "enicycle" unicycle for some real inspiration and check out the amazing steering mechanism geometry:
www.youtube.com/watch

http://www.instructables.com/id/Easy-build-self-balancing-skateboardrobotsegway-/
step 1: Parts
Here are the parts laid out on floor

http://www.instructables.com/id/Easy-build-self-balancing-skateboardrobotsegway-/
step 2: Scooter wheel as it comes
Razor scooter E100 chain driven back wheel.
This is great as it fits under board, has axle and bearings all with it, sprocket is ready fitted.
Reduces your work considerably.

step 3: Closer view of scooter wheel


We need two of these assemblies.

There is a threaded rod running through entire wheel. There is a tubular sleeve each side, one is short and one is long. The nuts each end clamp tubes to bearing in
wheel so everything locks up tight (bearing can still spin though).

http://www.instructables.com/id/Easy-build-self-balancing-skateboardrobotsegway-/
step 4: Dismantle each wheel assembly
Wheel is dismantled and reassembled so the long metal tube is on the other side to the one it was originally and the short one is swapped over too. This will allow wheel
to be on outside of vehicle with sprocket on inner edge of wheel.

step 5: Reassembling wheel


Another view of this process

step 6: Frame
Frame cannot be simpler. Everything will bolt to a 24cm width slab of 2cm thick marine-ply. Anything will do so long as not flexible otherwise tension of drive chains will
vary in use.

http://www.instructables.com/id/Easy-build-self-balancing-skateboardrobotsegway-/
step 7: Axle brackets
Brackets to hold the axles cannot be simpler either, steel angle brackets from a large hardware store.

step 8: Trial fitting the axle


You can see how this is going to work. 2 brackets face each other and are bolted down to deck. Axle goes through 2 holes, one in each bracket.
Holes have to be drilled to EXACTLY opposite each other.

http://www.instructables.com/id/Easy-build-self-balancing-skateboardrobotsegway-/
step 9: Fitting axle
Axle has to be fitted with one of the large washers in this position else there is not enough thread free for the end nuts to tighten everything up solid against the short and
long tubes that run over the axle.

Tip: Bolt the axle up like this and tighten everything.

Then, and only then, mark the amount of overlap of the L shaped brackets underneath the wheel where they will bolt to the deck.

Clamp them together and drill the holes through both layers that will be used to bolt them to the wooden deck. I just used a pair of locking adjustable pliers. I also left the
axle bolted in place while I drilled the holes (from underneath). Make sure the drill does not suddenly go through and drill a hole in the side of the polyurethane wheel! My
baseplate holes are located so the drill bit tip missed the wheel when I made these holes!

This way everything then bolts up straight and true with no headaches!

http://www.instructables.com/id/Easy-build-self-balancing-skateboardrobotsegway-/
step 10: Axle mounts
If one of the angle brackets is resting on top of the other, remember to drill the end holes for the axles to take account of this fact! In the end I drilled the holes off to one
side as you will see in subsequent photos.

step 11: Wheels fitted


Here are the wheels fitted and bolted up to board.
Note if you want minimum width wheelbase, as for a self balancing skateboard then you can trim the inner ends of the axles as I have done here.

step 12: Motors


Motors are electric scooter motors from toy scooters. You can get them from electric scooter suppliers or ebay. These are 250Watt 24V each and come with an 11 tooth
sprocket already fitted which has teeth spacing that matches those on the wheel sprockets - conveniently.

You could try 300 watt ones (that look almost the same). Just make sure they are the same as each other.

http://www.instructables.com/id/Easy-build-self-balancing-skateboardrobotsegway-/
step 13: Alternative layout
I am going to describe simplest layout.

However here is an alternative layout which might be OK for a skateboard and which would mean the batteries will fit under the deck while motors go on top - you would
have to make a feature of them though. Chains run vertically. Has a certain symmetry. The "Emanual" board used this layout.

http://www.instructables.com/id/Easy-build-self-balancing-skateboardrobotsegway-/
step 14: Chain
Chain is ASA 25-1 chain
I bought 2m of it from "Bearing Boys" UK. Also on rght is connecting link for when you shorten it.

If unsure how to shorten a chain, bike shops will do it for you.

step 15: Chains fitted


Chains must not be too tight or too loose.
Too tight and motors bind.
Too loose and get lots of rattling and judddering when balancing in stationary position as motors go one way then the other very quickly.

Tempting to make the motor bolt holes slotted then slide motors forward and back until tension just right. I avoided this as on a previous project the motor was so
powerful it just pulled itself along the slot so chain went loose.

If you can I would measure, measure again, then drill (circular) bolt holes for the motors only after great care taken.

I suggest: Locate motors in exact position to get just a little bit of slack on the chain. Get a pencil and sharpener and sharpen it until it is just a stub about 1 inch long.
Carefully poke it through the 4 bolt holes in baseplate of the motor, without moving the motor, and mark on the wooden base where to drill the holes.

This way they should end up in exactly the right place.

M6 bolts go straight into 4 threaded holes on underside of motors.

http://www.instructables.com/id/Easy-build-self-balancing-skateboardrobotsegway-/
step 16: Chain tension
Here is a chain that is slightly too loose. It is important to get this right.
There is a way to take up a small amount of slack like this:

step 17: Chain tension 2


Insert washers under inner 2 bolt holes for motor. This lifts motor a tiny bit and chain slack is taken up.
Surgery forceps very useful in this project - also for holding wires for soldering etc.

step 18: Electronics


There is a 5 degree of freedom inertial measurement unit (IMU) from Sparkfun.
This is cheapest one they do that will do the job - a situation that is always changing by the way.

It has a 3 axis accelerometer. We will only use one of these.


It has 2 solid state gyroscopes. One is used with the accelerometer (using a "combination" filter) to make the thing balance.

The other is used to allow machine to resist sudden changes in direction (one wheel hitting a pebble for example) so it does not spin you off. This is easier and more
reliable possibly than using wheel speed encoders which is the other way to do this.

I like ribbon cable as it is neat. I also use blu-tack when doing this sort of soldering as it holds wire in exactly the right spot as well as holding the little circuit board still.

I tin the wire ends then solder them to the holes.

NOTE: Someone has already found a cheaper (different) IMU here:


www.gadgetgangster.com/find-a-project/56.html
You would have to work it out for yourself and modify code perhaps but it also looks ideal for a project like this. It is amazing how these things have come down in price.
The one-axis gyro in my monowheel was about £100 ($150) on its own.

http://www.instructables.com/id/Easy-build-self-balancing-skateboardrobotsegway-/
step 19: Arduino board
Arduino microcontroller used.

My previous machines used robotics AVR boards but the Arduino is cheap, has huge active forums if you get stuck, books on how to get started and is easy to program
and load software onto via a USB lead.

Code: send me a message with your email and I will respond.

Past versions of the code and how it has developed can be seen on my website of past self-balancing projects:
http://sites.google.com/site/onewheeledselfbalancing/

This diagram comes out small so I have enlarged sections of it on next 2 pages.

step 20: Wiring arduino


Here is previous photo just showing left (analog inputs mainly) side of the Arduino.

This diagram is important.

analog pin 0: to Y4.5 on IMU


analog pin 1: Voltage in from a potentiometer (used to set the overall gain manually)
analog pin 2: to X-rate on IMU
analog pin 3: to Y-rate on IMU
analog pin 4: to z-acc on IMU
analog pin 5: spare

http://www.instructables.com/id/Easy-build-self-balancing-skateboardrobotsegway-/
step 21: Wiring arduino 2
Here is the wiring of the right hand side of the Arduino (mainly digital inputs).

digital inputs:

Pin 4: steer right from hand controller


Pin 5: Steer left from hand controller
Pin 6: From balance point fine tune switch on hand controller
Pin 7: From balance point fine tune switch on hand controller
Pin 9: From deadman button on hand controller

digital output:
Pin 8: Pulses to oscilloscope, one per loop of program, allows me to measure the cycle time of the program which we need to know to do some of the maths for tilt angle.
You dont need to worry about this. The cycle time is 5.55milliseconds per cycle and this won't change much unless you modify my software a lot.

http://www.instructables.com/id/Easy-build-self-balancing-skateboardrobotsegway-/
step 22: Arduino wiring part 2
More on wiring up the Arduino pins.

You need a newish Arduino with the 3.3V output pin on it as the IMU runs off this at 3.3V.

http://www.instructables.com/id/Easy-build-self-balancing-skateboardrobotsegway-/
step 23: Arduino wiring part 3
Detail on the connections I have used to the Arduino board.

step 24: Arduino power supply


Arduino powered by a separate 9V battery in little box with an on/off switch.

This has several advantages:

a) Nice and safe - I fried a £100 gyro once connecting it to one of the 12V batteries (the wrong one)
b) You can debug the software without the main motor controller being powered up.
c) Cheap.

step 25: Gyros orientation


Can be tricky to get your head around which gyro is doing what and in which axis of rotation.

Accelerometer used because will give accurate data on which way is upright (direction of gravity). However it is very sensitive to vibration and we have a lot of that over
anything other than smooth flooring.

Gyro gives instant real time data on rate of rotation (i.e. rate of tipping over of our machine), is insensitive to vibration BUT drifts slowly with time.

If you wire up the IMU as I have in the photos then the diagrams on the right will hold true.

The IMU is interesting as the gyros each have 2 output pins with a varying voltage on each. One is relatively insensitive but works up to a rotational speed of 500 degrees
per second. The second is more sensitive and works over a range up to 110 degrees per second. The arduino software is therefore written to read the insensive one
when tipping fast, but switch to the other higher resolution one when tilting more slowly.

The "complimentary filter" uses best bits of each: the gyro is used to measure very short term changes in tilt and the accelerometer readings are averaged over time to
give a stable value of which way is "up." This is then used to correct the drift of the gyro.

http://www.instructables.com/id/Easy-build-self-balancing-skateboardrobotsegway-/
If you read around this on the net it is called PID tuning. There is also a very complicated way of doing the maths called a Kalman filter. However an engineer told me that
ths is only optimal when you know the control inputs as well (as in an aircraft). In this case the "skateboard" is dumbly just trying to stay upright, it does not know if I am
leaning more on one end or the other or how flexible my joints are etc. Therefore he told me the complimentary filter is actually the more appropriate technique to use.
I am not an engineer so I am sure there are some out there who will expand on this or correct me if I am wrong.

Anyway, bottom line is that the complimentary filter works fine. Also, no matter how much modelling people do they all seem to in the end have to fine tune their devices
by hand (there are links to many other segway type projects on my website).

step 26: Motor controller


This is a Sabertooth 2 x 25Amp (40Amp peak) robot motor controller for medium sized robots with 2 motors.
Each motor has to be able to go forward and reverse, and switch direction frequently and rapidly without mishap.

The ones I have are 250 Watt 13.7 Amp peak (that is what it says on them). Watts = Amps x Volts and I have 24 Volts so that makes 10.4 Amps using that calculation.
Anyhow, well within limits of the Sabertooth.

Also it has to be able to handle a lot of power as if falling over, motors have to be big enough to allow machine to accelerate fast to bring itself beneath you once again.

Therefore unless you really know what you are doing, designing your own is out of the question.

The sabertooth can handle many types of misuse but you mustn't connect the batteries to it back to front!

The Arduino can send control data to it in several ways but I have chosen a mode called simplified serial mode. The Sabertooth website has a lot of downloadable
information on all this.

It isn't exactly low cost but worth the money.

http://www.instructables.com/id/Easy-build-self-balancing-skateboardrobotsegway-/
step 27: Sabertooth
The Sabertooth is configured for data streams of various types and various battery types, using a set of dip switches.

The configuration you need for simplified serial, 9600 baud rate, and lead acid batteries is shown here. All this is also available for download from their websiite.

step 28: Battery connections


I have used 2 simple 7AmpHour lead acid batteries in series to give 24V.

The main power switch is in the middle and essentially "joins them together."

Diagram below.

Again, make sure power leads go into the Sabertooth the correct way around.

step 29: Hand controller wiring


My "de-luxe" self balancing skateboard has a wireless Wii Nunchuck as the control system.

However here we are interested in reducing cost.

Therefore we have a cable with a hand controller on the end.

This has a dead-man switch (cuts motors if you let go i.e. fall off)
Also has steering left and steering right plus a switch to fine-tune the balance point of the platform.

Here is wiring diagram:

"D" is the 1500 Ohm resistor.

http://www.instructables.com/id/Easy-build-self-balancing-skateboardrobotsegway-/
step 30: Hand Controller
Here is a view of handcontroller internals in a small plastic box.

I used 2 cable ties to locate the end of the cable so it cannot easily be ripped out of the end of the box. Cheap and simple.

Dead man button is on the end.

step 31: Handcontroller assembled


Image of assembled handset

http://www.instructables.com/id/Easy-build-self-balancing-skateboardrobotsegway-/
step 32: Handcontroller input wiring to Arduino
Arduino analog inputs all used apart from one for balancing etc.

All handcontroller inputs go in through the digital input pins on other side of the Arduino board.

The cable is fixed to the deck using simple cable ties again so the wires are not stressed where they are soldered to Arduino input pins. The cable itself is screened cable
with 6 or more wires inside it.

You can also see the 10K potentiometer used to control the "overall gain" function. This allows simple user adjustment of the machine between feeling "squishy" and
"tight" as you ride it.

Have fun!

step 33: Inputs


Finally, remember you need pulldown resistors about 10K each between each digital input pin and ground. Fiddly.

My soldering looks great to the naked eye but horrible when zoomed in like this!

http://www.instructables.com/id/Easy-build-self-balancing-skateboardrobotsegway-/
step 34: Testing
I fixed the IMU with blu tack to start with as you always end up with it back to front or the wrong way around!

When you get it working then fix it properly. Protect it from debris from the wheels and keep it near to centre of the deck by the way - it works best there.

http://www.instructables.com/id/Easy-build-self-balancing-skateboardrobotsegway-/
step 35: Anti-tamper power cutoff key
One last thing. At recent maker faire I left my monowheel on a table while I went for a look around.

When I came back there was a small child playing at one end of the table while ??his father was flicking the on/off switch and pressing every button on the hand controller
trying to make it "go" - while it was tilted to one side.

Luckily for him the batteries were flat and it wasn't working properly.

If he had been successful, this heavyweight hunk of metal would have thought it was tipping hard over and would have hurled itself at the child with the full 500W motor
power. No doubt I would have been blamed.

If you plan to take your creation anywhere public like an exhibition, and leave it for any period of time, I suggest you fit some sort of disabling device like an ignition switch
and high current relay (from car spares shop) perhaps, or easiest would be one of these which is a race/rally car emergency battery cut off switch with a key you can
remove and carry with you. It will easily handle the high current and adds very little weight.

step 36: Working


Here it is balancing.
This version has same motors and motor controller as my previous twin wheel self balancing skateboard so should perfom the same.
Wheelbase is 24cm but if you spaced them further apart clearly you could build a Segway style vehicle.
The idea is that you just bolt whatever you want to the top of it, Segway, skateboard deck, R2D2 or whatever takes your fancy! One of those R2D2 trash cans if modified
would fit just perfectly on top.

Main parts (all new):


Sabertooth £97
Motors: very variable on ebay but about £35 each
Chain: £9
Arduino: £20
IMU: £52
Razor E100 rear wheel sets: £24.99 each from a big online electric scooter shop spares department.

Total £273 including purchase tax which I think is pretty good for any self balancing vehicle. Batteries would take you over my £300 target but not by much. Also
compares well with cost of conventional 4 wheeled (one motor on one of back wheels) electric skateboards.

UK pound weak at present and Sparkfun and Razor scooters are US based, which suggests that you could do this at even lower cost in the US.

Might possibly be worth trying to buy a used Razor E100 electric toy scooter as this would give you one rear wheel unit, one motor (but might be too small), some
batteries to get started with and a charger, then buy the rest as above.

http://www.instructables.com/id/Easy-build-self-balancing-skateboardrobotsegway-/
Related Instructables

Self balancing Arduino, How to take a


one wheeled Gyroscope and fall
Angle Wireless Wii Transition Steampunk Best of 2009:
electric Nunchuck Processing by (Skateboarding)
measurement skateboard by otaviousp Electric Segway ( Best of Each by Dj hentai
controlled
using gyro, XenonJohn Scooter. by saul Legway ) by Category (guide)
accelerometer Arduino by
bdring by fungus
and Arduino by XenonJohn amungus
otaviousp

Advertisements

Comments
50 comments Add Comment view all 53 comments

PerfectionLost says: Mar 25, 2010. 2:38 PM REPLY


What is the top speed? You dont seem to cover distance in any of your videos either.

XenonJohn says: Mar 25, 2010. 3:17 PM REPLY


Not sure why so many (on other forums mainly to be fair) find the top speed so important. When you are riding on 2 wheels being balanced by a
computer you are limited by raw fear rather than the mechanicals. Not the best design for outright speed.

500Watts of combined motor should push you along pretty fast on the level if you have courage enough. My 2 wheeler seems to peak at about 10mph at
the moment but that may be software related (always need some power in reserve in case you are tipping forward at speed so it can speed up some
more to correct it). Monowheel has a buzzer warning you when at 75% of max power to motors (have never been brave enough to make it go off).
Distance: Segways, electric scooters, go-peds etc all banned from public sidewalks in UK. Will actually be stopped by police. Private land only i.e. my
front driveway in early videos (which slopes).
Makerfaire video was first time I had big space to ride it round (a large marquee and an indoor exhibition centre). Also rode around large open square
(not filmed).
UK much smaller, built up and densely populated than US!
Maybe should take it to the Netherlands: big, flat, open, everyone cycles, segways legal. Someone there may build one by the look of it.

For speed I would get an e-skateboard, the big ones do up to 35mph.

The advantage of these are actually low speed control: I could ride it between all the visitors at any speed down to completely stationary (but still
balanced) also able to turn round while stationary. The visitors didn't have to jump out of the way when they saw me coming.

John

PerfectionLost says: Mar 25, 2010. 4:57 PM REPLY


Top speed is important, though I suppose actual speed is just if not more important. My car can probably go around 200 mph even if I usually only
drive it around 65.

Maybe a better question is, would I want to use this for a short commute, where I would be walking otherwise. All the videos seem to be using it in a
fairly confined space. That would make this a novelty item. If you could use it for a short commute, or while bar hopping that extends it to something
that is generally useful and awesome.

As someone who has never been on a device like this its somewhat important for a frame of reference. I've biked distances, and I tend to go
http://www.instructables.com/id/Easy-build-self-balancing-skateboardrobotsegway-/
between 10-15 mph.

Fox-san48 says: Mar 23, 2010. 8:11 PM REPLY


Uk rules :D,

and i love it, altho i dont know what that aurd... thing is, i have seen it in loads of insturcibles

XenonJohn says: Mar 24, 2010. 11:19 AM REPLY


The Arduino is an AVR microcontroller (a small computer on a chip) mounted on a small circuit board. The board has power supplies sorted out for you
plus pins down one side that accept variable voltages from sensors for example (0-5V) and pins on the other side to that can be used to control other
devices (in my case the unit sending power to the motors).
It is open source so anyone can make and sell them. Anyone can write software for them and put them on the forums. Loads of code on the forums you
can use and modify for what you need to do. They are great for beginners as you program them in a version of the language "C" that essentially has had
most of the tricky bits taken out and done for you.
You program via a USB cable. You can send data (various variables in your code for example) from the program back to the screen of your PC very
easily to help debugging. Also they are quite cheap for what they do.
If you look on Amazon for example, there are books on getting started with Arduino. If you are more keen on getting something up and running fast than
having perfect code, at reasonable cost, with huge friendly forums to help if you get stuck, Arduino is a great way to go.
Hope this helps,

John

Fox-san48 says: Mar 24, 2010. 4:22 PM REPLY


thanks, although is "C" easy to learn, atm i know Batch basicly and some html. i looked Arduino up, im guessing having a soldering iron would be
useful for connecting to other devices? unless ofcourse they have those screw connetion things. sorry about my bad techical language, funny i did
electronics last year and year before only reason i stopped is i moved to australia (sucks i know, england is better still lol) anyway getting off topic
thanks anyway :)
it did help

XenonJohn says: Mar 25, 2010. 7:35 AM REPLY


I bought an arduino beginners kit which some websites sell that gives you an Arduino board, a breadboard, a set of small peripherals (simple
temperature sensor, small motor, some LEDs and so on) and a set of tutorials that take you through basics of writing code, reading from sensors
and controlling things as a result.

Work through that (wouldn't take that long) then start looking at examples of code on the forums.

I would say that is probably fastest way to learn.

Don't need to solder to get that far just use the breadboard and jump wires.

I think for projects generally though it would be worth learning to solder. It's a bit like how you learn to weld (get some old steel and just start
having a go) but a lot easier - just get some old components and boards and start having a go!

Maybe start by trying to make up one of those small electronic project kits where everything is in the kit.

Hope this helps,

John

Fox-san48 says: Mar 25, 2010. 3:59 PM REPLY


ah thanks, i was just wondering, i know how to solder though, did it during electronics
thanks :)

Fox-san48 says: Mar 23, 2010. 8:15 PM REPLY


Arduino*

gabo90 says: Mar 25, 2010. 12:16 PM REPLY


Congratulations!!! I think it woulb be so cool if the board was made of plexiglass instead of wood, so people could see through and how it works... ;)

XenonJohn says: Mar 25, 2010. 2:11 PM REPLY


Motors bolted to deck to avoid welding. Has to be pretty rigid else chain tension would vary as base flexed. Maybe very thick plexiglass might be OK!

Could put motors on top and batteries underneath, see page 13, that would give you a machine with loads of visible moving parts.

Also, I spent so much time dismantling an e-bike battery and arranging the cells flat in the deck of my own twin wheel board that I did make the underside
of clear polycarbonate.
Here:
sites.google.com/site/onewheeledselfbalancing/Home/2010-twin-wheeler-rebuild
Also I can then see if anything is melting when I am charging it!
Unfortunately as the cells are pink it looks like rows of sausages.

http://www.instructables.com/id/Easy-build-self-balancing-skateboardrobotsegway-/
godofal says: Mar 25, 2010. 5:58 AM REPLY
this looks pretty interesting, and im thinking of building one, but i could use some more specs on the parts, especially the battery, the motors and the wheels
that you used.

and any chance on an instructable with the nunchuck version?

godofal says: Mar 25, 2010. 11:28 AM REPLY


btw, i just realized.
isnt it cheaper to just use an atmega328 with some components like the crystal and such soldered to eachother on a protoboard of some kind?
just use a 6pin header for the programming (use a DAPA cable if you want it really cheap)

maybe im talking really dumb atm, i havent exactly looked at the prices, but i cant imagine that a loose chip, some components and a piece of protoboard
is more expensive than a full arduino...

XenonJohn says: Mar 25, 2010. 2:04 PM REPLY


Yes, you are probably right.

There were 2 aims, low cost but also relatively easy buildability (no welding for frame for example).

I am using a standard Arduino board just to make the microcontroller part as simple as possible to build and program.

XenonJohn says: Mar 25, 2010. 8:03 AM REPLY


Find an electric scooter website thats sells the Razor E100 scooter.
Early versions had a belt drive but most now have chain drive.

Go to spares section and find an "E100 rear wheel assembly" this gives you entire wheel, with sprocket fitted, bearings, and axle all assembled for you.

Go to ebay and look under "electric motor".

Among all the rubbish, some motors that look exactly like the ones I have used will come up. They just vary in maximum Wattage rating up to about
500W. They have a small sprocket already fitted.

One or two old stock smaller ones have toothed belt drive wheel fitted - you do not want one of those. Check the image before you order and check there
is a chain sprocket on the motor spindle.

I dont want to really post links to any specific sites but google will find them for you.

John

XenonJohn says: Mar 25, 2010. 7:52 AM REPLY


Battery was nothing special. Two 12Volt 7 Amp/hr lead-acid batteries in series to make 24V. Can be any physical shape. My monowheel has 2 x 12V 14
Amp/hr batteries - just gives you more endurance.

NOTE: Don't put 24V into Arduino board - the smoke will come out. This is why in mine I gave it its own 9V battery.

Car batteries would be fine for playing about but way too big for finished vehicle.

Electronics shops like Maplin just have them in stock all the time, as do robot websites if nowhere local has something you can use.

godofal says: Mar 25, 2010. 11:37 AM REPLY


thanks for the quick response!

ive been looking at the razor site, but they dont ship to the netherlands as far as i could tell...

as for the motors, i can find alot of 24V 250W motors that look like the ones that you used, and the price is about the same, but shipping is about the
same price as the motor itself, did you have this also?

as for the battery, how long do you last with those 7 amp/hour?
i can find alot of 12V lead-acid batterys, so that shouldnt be a big problem...

XenonJohn says: Mar 25, 2010. 2:22 PM REPLY


OK, here we go, this is the webstore in UK I got the rearwheels from. Scroll down page to the E100 rear wheel (has picture to left of it):

www.skatehut.co.uk/acatalog/Razor_replacement_whees.html

They may not ship from US, but you may be more lucky with an EU distributor like this regarding shipping to Netherlands.

Motors are strange. 2 years ago there were masses of them on ebay. Now far fewer. Not sure why. Again if you are desperate, the scooter shops
themselves sell them of course.
NOTE: the “proper” motor for the Razer E100 is actually quite small. You need motor designed for a bigger scooter (if you are trying to get it
from a scooter shop spares dept, around 250Watt or more I would say).

http://www.instructables.com/id/Easy-build-self-balancing-skateboardrobotsegway-/
godofal says: Mar 25, 2010. 11:47 AM REPLY
one more question, how do you charge those batterys?

XenonJohn says: Mar 25, 2010. 2:26 PM REPLY


Electronics catalogues have small 12V trickle chargers with clips on end of red and black wires. I got mine from a local Maplin store. Not fast
but safe. Buzzes when battery fully charged (overcharging can shorten battery life).
All online robot shops have chargers too.

Car charger might be too fierce.

EmmettO says: Mar 25, 2010. 10:25 AM REPLY


I've been slowly collecting parts for a personal vehicle like this (slightly larger). Other than the Sabertooth I have all the parts! The code for the Arduino will
be very helpful. If I'm ever rich (unfortunately don't bet on it) I'll gladly fund your ultimate skateboard project.

One question. I have two lead acid battries that are for a lawn tractor. They're not as big as full car batteries, but a bit bigger than the ones you show here.
The question is, would they have enough juice to do things like climb hills? I'm using big knobby tires so I would like it to be able to handle grass etc. Do you
think these motors with lead acid batteries would hack it?

XenonJohn says: Mar 25, 2010. 11:09 AM REPLY


I am not sure is honest answer.
Lead acid batteries would give high current no problem and get you up hills, the endurance would be the unknown factor. Huge amount of discussion on
this on ebike forums by the way. They obsess over battery types / motor ratings. Vehicles are different but the maths is probably similar.

For a big machine going up hills the bulletproof way is to use two OSMC controllers. These can take huge currents, but cost a lot more than Sabertooth
as you need two of them. The Sabertooth is described as being for "medium sized robots" You need something that will run uphill with maybe 100-120kg
total all up weight.
This is where the costs and the size of the machine start going up. Really big motor controllers are not cheap.

Take a look at this website for example. It is a segway clone called the "Meta" by Geoff Bennett with biggish lead acids and two OSMC's. It illustrates
these points.
www.netcraft.com.au/geoffrey/meta/

Based on original segway clone by Trevor Blackwell.

EmmettO says: Mar 25, 2010. 1:58 PM REPLY


So I should keep it light or pony up for a pair of OSMCs. That's actually why I've been waiting to finish the project. I think I'll try the Sabertooth and
see if it's enough. If it isn't I can use it on another project.

PerfectionLost says: Mar 25, 2010. 6:20 AM REPLY


Could you add the cost of each item on this page?

XenonJohn says: Mar 25, 2010. 7:38 AM REPLY


Can do.

It's on page 36 at moment.

£273 plus batteries, a few cheap switches and a some thick wire.

John

PerfectionLost says: Mar 25, 2010. 1:35 PM REPLY


Actually, I meant to put that on Step 1. A list of each part and price w/ the pictures would be a huge help. I think I might give this project a shot with a
friend.

mspark400 says: Mar 22, 2010. 11:44 AM REPLY


Excellent project and excellent documentation. The world of diy self balancing projects was really in need of a step by step low cost solution, myself included.
One question however. your motors peak at 250W each. your motor controller is much much less than that. Now i understand that you would probably need
to have a death wish to try an use all of the motors power but couldn't speed be greatly increased (if desired) by using a higher wattage motor controller. This
might increase cost a little but an OSMC (1 or 2) might be an option to consider for those seeking speed. The batteries would be able to provide more
amperage (shorter ride time of course) but also higher amp hour batteries would increase speed and runtime if the constructor was willing to pay a little
more. However your design is an excellent one for the price and I am sure it will be very helpful to those wishing to duplicate this design.

Cheers,
Mspark400

http://www.instructables.com/id/Easy-build-self-balancing-skateboardrobotsegway-/
XenonJohn says: Mar 22, 2010. 3:18 PM REPLY
Well spotted error of mine!

I have changed page 26 describing the Sabertooth. I said 2x25Watts when of course I should have said it can handle 2x25 AMPS (40 peak) per channel
(forward or reverse).
This is a Sabertooth 2 x 25Amp (40Amp peak) robot motor controller for medium sized robots with 2 motors.
The motors I have are 250 Watt 13.7 Amp peak (that is what it says on them). Watts = Amps x Volts and I have 24 Volts so that makes 10.4 Amps using
that calculation. Anyhow, well within limits of the Sabertooth. Could actually go up another motor size.
My one wheeler has an OSMC and a golf cart motor rated at 500W but it is a real beast of a motor. It will easily get up a modest slope. Have not tried it
on steep uphill as don't want to risk burning out the OSMC (although you probably wouldn't).
On the Emanual 2 website he had 2 hub motors from ebikes and measured just a couple of Amps being drawn when going along a level pavement.
Re batteries: My really nice twin wheeler has LiFePO4 batteries from an ebike (good for 20 miles plus) dismantled and laid out flat within the deck.
Entire deck is actually a battery. This was a seriously expensive battery, even from Hong Kong supplier, and it ran all day long at maker faire and charge
status LED bar was still saying full charge. Lead acids however do have an advantage that they can throw out a very high current for a short time - useful
in this sort of project if you are about to fall off as motor wants to boot up very fast to prevent this happening.
With this project I have really seriously honed in on bringing down the cost. If someone is unsure of they will get it to balance - a reasonable concern,
they don't want to spend a fortune straight away. Once you can get it to balance, you then have the confidence to blow a load of money on a clever
battery, I agree. Could have bigger wheels, bigger motors, sure.
Combat robot builders point out that best way to burn out a motor controller is go go for full power while motor i.e. wheel is jammed stationary for some
reason. However, the Sabertooth has an overload cutout that should save it from burning up in this way.

Thanks for spotting my mistake and nice words.


John

PS I am really amazed, I am getting about 200hits an hour right now. It must level off soon. Can only be so many people out there into this niche subject.

lgcalex says: Mar 23, 2010. 9:13 AM REPLY


hackaday.com/2010/03/21/balancing-skateboardsegway/ You were posted on hackaday.com

XenonJohn says: Mar 25, 2010. 10:26 AM REPLY


Instructables viewers seem to be a much nicer and more constructive bunch of people!

EmmettO says: Mar 25, 2010. 10:15 AM REPLY


This is a brilliant point.

everywhere says: Mar 25, 2010. 6:51 AM REPLY


for the one wheel verioin how wide must the wheel be like could i use the wheel form a e200?

XenonJohn says: Mar 25, 2010. 8:12 AM REPLY


Here is another related monowheel idea:

Lock two wheels with pneumatic tyres to one single axle, driven by one sprocket (so both wheels driven together).

So long as tyres not inflated rock hard, then leaning to one side will compress one tyre more (reducing effective diameter of that wheel) and skateboard
will gently turn.

Adjust wheel spacing according to your balancing skill!

John

XenonJohn says: Mar 25, 2010. 7:57 AM REPLY


Wheel has to be wide enough to stop you falling off sideways. The Ben Smithers monowheel (the first one I think of the skateboard monowheels) had a
go kart wheel one size smaller than the one I used.

If you have a great sense of balance, you might get away with a smaller wheel in terms of width. I played it safe with widest wheel I could find!

Also, the higher the deck off the ground, the easier it will tip you off sideways if one side of wheel goes over a pebble for example.

In terms of fore-aft self balancing (controlled by the motor), you could make machine as tall as you like - use a ladder if you want and sit on top! It
might even work better.

Just remember with a monowheel, a lower centre of gravity makes it much easier to ride and steer (by tilting left or right) in terms of falling off sideways.

This is why I rebuilt my monowheel with deck lower to the ground. I found out this the hard way.

Hope this helps,

John

http://www.instructables.com/id/Easy-build-self-balancing-skateboardrobotsegway-/
everywhere says: Mar 25, 2010. 2:57 PM REPLY
thanks i just have an old e200 in my garage and wanted to convert it

BHStibal says: Mar 24, 2010. 5:49 PM REPLY


how very very cool. I love this idea, and it gives me a ton of ideas. What did this whole project cost you, material wise?

XenonJohn says: Mar 25, 2010. 7:47 AM REPLY


£273 plus batteries and a few odds and ends.

Would be cheaper in US I suspect though.

John

joren says: Mar 24, 2010. 2:57 PM REPLY


Really nice 'ible. Thanks for posting. I've ordered parts and hope to build one soon. 350w motors and 8" mountainboard wheels. Q: What is the chain ring
tooth count on the razor wheels you use?

To further reduce cost, have you considered using a wii motion plus and nunchuck for the IMU? Would you need a second serial port on the arduino?

Alternately, although I'm not sure if it'll work as well, cheaper IMUs can be found that are 1/3 less the price than sparkfun:

www.gadgetgangster.com/find-a-project/56.html

XenonJohn says: Mar 25, 2010. 7:46 AM REPLY


About 50 teeth on the razor E100 wheel chain ring.

The motors I used have 11 teeth.

The more powerful motors of the otherwise same design on ebay seem to have 16 teeth.

If there are cheaper IMU's I would go for it. Take some photos as you go along for the rest of us!

If you go on Arduino forums there is an ongoing discussion concerning the Wii Motion Plus module. Basically there IS now an arduino hack that will read
data from the Wii Motion Plus unit. NOTE: This has gyros in it only as it is designed to augment the accelerometers already in the Wii-Mote handset.

Nobody has yet managed to read both the 3 axis accel data from WiiMote as well as the 3 axis gyro data from the wiiMotionPlus (only a matter of time
though)

However there IS an arduino hack for the WiiNunchuck and that WILL read the 3 axis accel data from those within the chuck.

If you can combine the code to read a WiiMotioPlus with code to read the Wii Nunchuck accelerometers this would give you all the data you need to
control a self balancer - in all 3 axes.

This would be a great programming challenge for someone much better at it than I am.

Best wishes

John

PopEye42 says: Mar 25, 2010. 7:16 AM REPLY


Wow. this is great man.

Senseless says: Mar 23, 2010. 8:44 PM REPLY


Excellent Instructable!

Faved it for future use super nice job on everything.

merijnvw says: Mar 23, 2010. 2:09 PM REPLY


cool, happened to make a mini segway on school just today from legos together with lego dacta! But yours is much more stable haha

http://www.instructables.com/id/Easy-build-self-balancing-skateboardrobotsegway-/
grunff says: Mar 23, 2010. 1:51 PM REPLY
Wow, what a fantastic write-up! Thank you very much John for putting all that effort into documenting it so well. I've long admired your original board (with
the gokart wheel). You've made this an easy weekend project, so I'm off to buy some parts :-)

xesive says: Mar 23, 2010. 9:50 AM REPLY


I am excited to get started on recreating this project but have a few questions before i start getting my hands dirty:

Do you have a copy of the arduino code available?

What is the max speed? (estimate)


What is the max incline?

I live in a city that is more or less a big hill, I want to ensure that this is powerful enough to travel up hills.

Thanks for such a grerat and comprehensive instructable :D

XenonJohn says: Mar 23, 2010. 1:08 PM REPLY


Electric motors are quite efficient things. PWM from motor controller very fast so not much loss as heat.

Someone may help you here. Should be able to calculate how many watts power needed to get say a total of 100kg up a 1 in 10 slope for example. Then
work out motor requirements, take account of gearing between the small and large chain sprockets, and motor controller requirements from that.
My one wheeler went up hills, in early videos (on YouTube) you can see a huge sprocket on wheel and tiny one on motor (500Watt with hefty OSMC
combat robot power controller).
Not sure if this smaller one will go up hills. Have not tried. However, the motors I have used can be found on ebay up to 500 Watts each (but they usually
have a larger 16 tooth sprocket on them - which would also make it faster on the level of course).
Also this is why you can adjust the balance point: otherwise to go up a hill you would tip nose down and it would hit the hill. So now you adjust until nose
up position with balance point adjust switch, then tip nose down (i.e. back to level position) to get up a slope.
Also link to the sketch is now on first page of the instructable.

Best wishes
John

johndeligdisch says: Mar 23, 2010. 11:59 AM REPLY


Awesome job, well done. I have been working on my software but has a few bugs. Can I get a copy of yours and see where I am going wrong please.

Thanks, this is a great project that I am going to get a bunch of kids in our neighbourhood to build.

jeff-o says: Mar 23, 2010. 6:56 AM REPLY


Another excellent project. Well done, and thanks!

lgcalex says: Mar 21, 2010. 9:55 PM REPLY


I wish there were more profound words for 'you rock'.

I've always wanted one of these. I think i'd be tempted to go for a one wheeled option and save on the motor but rely on more skateboard lean style turns.

I think the cool factor is pretty important on these boards, its something the segway missed.

XenonJohn says: Mar 22, 2010. 2:06 AM REPLY


Thanks for the feedback. One way to steer a 2 wheeler by leaning is to make the deck tilt and use a tilt sensor to provide the steering input to the
microcontroller. This has been tried before with "Emanual" - see bottom of this page:
http://www.ebikes.ca/projects/Emanual/index.shtml
My problem with this was: it looks tricky to control / I knew in the end I wanted to but the batteries in the deck / I wanted everything under the board not
on top, if it could be done. I could have cheated with a battery backpack and power cable down the trouser leg (which after you have stopped laughing
would actually give you a really cool thin-decked small twin wheel board - as well as instant power shut off if you fell off), but I didn't want to do that.

I may use a carbon sheet for top of my deck just for cool factor. Also plan to improve turning software so the gyro that stops sudden spins is actually
used to control the rate of turn proportionally to thumb joystick deviation. Should make turns more intuitive so you can lean into them.
John

me says: Mar 21, 2010. 2:02 PM REPLY


that looks really awesome

view all 53 comments

http://www.instructables.com/id/Easy-build-self-balancing-skateboardrobotsegway-/

You might also like