What is it?
Twin wheeled skateboard that works like a Segway. Electric skateboards exist already - motors on rear wheels. The plan here was to build something like a Segway but in the form of a skateboard. It knows which way is "up" via a combination of gyroscope and an accelerometer sensors, using a complementary (not complimentary) filter which reads and combines data from both 100 times per second. Steering by a simple rocker switch in hand controller (or a rewired Wii-Nunchuck as in photo if you are more ambitious).
What's new on this Instructable?
- Working on code to use the new Sparkfun 6dof DIGITAL IMU. FIRST VERSION ATTACHED 8th March 2012 TO PAGE 53. Only tested as sensor/arduino but prints out believable angles etc, have posted it for those who want to experiment with it.
VERY IMPORTANT NEWS 27/4/13:
Thomas Feminella has almost managed to get a Unicycle working with Sparkfun DIGITAL 6DOF IMU, Arduino and SyRen motor controller. YouTube vid here: http://www.youtube.com/watch?v=mEee1iI6emE&sns=em
Examples of his code are here on an Arduino forum: http://arduino.cc/forum/index.php?topic=153496.0
NOTE: Since this instructable was made, analog IMU's which just output a voltage from each accelerometer and gyro axis have stopped being made as hobby boards by Sparkfun. This is a pity as all you had to do was read the voltages on the analog input pins of your arduino.
IMPORTANT NOTE May 15th 2013: You CAN, AGAIN, buy an analog IMU here on ebay:
Polulu also still sell accelerometers and gyros with analog outputs. They may work if set to their most sensitive ranges if anyone wants to try them:
May 2013: I am building a new skateboard. Photos here:
How does it stay level?
It controls the wheel motors so the wheels always stay under your centre of balance, like balancing a broomstick on your fingertip. This in engineering terms is called a "PID" control system and is used for all sorts of things. For example think of the 300+ feet high Apollo rockets used in the moon landings..........
Q: How come they didn't just fall over when they took off? They took off incredibly slowly for the first few seconds, tailfins would have no effect, far slower than Shuttle launches. Watch this video
It takes a full 10 seconds just to get to 100m and clear the launch tower:
A: They had engines mounted on gimbals (swivelling joints) hydraulically controlled by a PID control system (lots of analog electronics I think involved too).
In 2008 I saw a YouTube video by Ben Smithers of his one-wheeled self balancing skateboard whizzing around a car park in Norwich UK. http://www.robosys.co.uk/ Video: http://www.youtube.com/watch?v=HGbbag9dklU
It turns out he was a Lotus cars controls system engineer - which makes sense.
Also see Trevor Blackwell's site: http://www.tlb.org/eunicycle.html
Meanwhile I wanted to teach myself microcontroller programming and, totally underestimating the task, thought this would be a great fun way to do this. I built several machines some with one wheel and some with two. Advantage of two wheelers is that they turn more easily and can turn and balance even when stationary - which is fun.
Why an Instructable?
Having learned lessons the hard way I thought it would be worth redesigning the project around an Arduino microcontroller, then seeing how low-cost and easy-build I could possibly make it. Clearly something like this is not for the complete Arduino beginner, nor is it that "easy" however this is about as easy as a self-balancing machine is realistically ever going to get.
Projects like this lend themselves to being built as a team. Some examples below were built as college projects. There are
i) some electronics (not making circuit boards, just wiring and soldering) to master,
ii) some mechanical fabrication; this version is designed to require no welding, just nuts bolts and some woodwork. Wheel/sprockets/axles/bearings come as a unit (electric scooter rear wheel assemblies).
iii) some programming; the programs (Arduino sketches) you need, including those to help debugging, are attached (P43 - 47).
There are; IMU tester, motor tester, balances-nothing-else, rocker switch steered and potentiometer steered code examples.
How much does it cost?
I realised when costing them up that the cost of a self balancing robot would only be a little lower than that of a ride on machine, therefore I went for a ride-on machine! Robot motor/gearbox combinations are pretty expensive.
For me the cost was about $300 equivalent PLUS whatever batteries you choose to use. I recommend starting with lead-acid batteries then make improvements later once you have a working machine. Lithium batteries etc are expensive!
Why do it?
i) For the challenge of doing something original. Most things have been invented, indeed self-balancing machines have been invented. Segway skateboards have been invented in principle BUT there is huge room for improvement.
ii) Making something that is practical and intuitive to ride is quite a challenge in terms of both electronics/software and fabrication/packaging. Cannot all be done on a computer. Eventually you have to actually build something then incrementally improve it. Despite the myth of "Eureka" moments, the truth is that this is how most innovations come about, by slow incremental development and hard work. Edison did not invent the lightbulb. He developed the first practical lightbulb.
iii) To educate yourself. You will learn a huge amount.
iv) These things are really good fun to ride! I have taken this to 2 UK Maker Faires now and both times people are wanting to have a go. Last time the BBC cameramen who also had an exhibit politely waited until the end of show, then they too asked to try it out.
There are a large number of pages in this. This is deliberate, if you are serious about building one then you need every single step documented with no gaps.
I have documented all my machines both good and bad on another website here:
I have a page of links to dozens of other self-balancing projects from around the world here:
Can I do this as a beginnner?
The fabrication has been deliberately kept really simple.
The soldering between sensors and arduino board needs to be good quality!
If you are new to Arduino I would recommend buying an Arduino starter kit. These come with some ancillary sensors etc and a set of about 12 tutorials. Work through them all (about 2 days work) and read a beginners book to Arduino. You will then be ready.
Can I build a SegwayTM clone?
Yes. Australian SciTech group have built a very low cost machine using a version of the Arduino code from this Instructable:
Here also is the Thatch No-Way Segway using my code almost unaltered: http://www.youtube.com/watch?v=R4ax3N0UW38
Has anyone else built one of these?
Ages currently range from 12yrs to 81yrs.
This Instructable is over a year old now, so yes indeed, people have. Here are a few I know of:
1) Skateboard: http://www.youtube.com/watch?v=kSW7YXLCjqk
2) Skateboard: http://www.youtube.com/watch?v=u-uUidBZEnM
3) The Velociryder: http://www.youtube.com/watch?v=xvfUIxusPZw&feature=player_embedded
4) Great board video - Buffalo State College senior project: http://www.youtube.com/watch?v=FEaTxahyQxc
5) Another board based on this Instructable: http://www.youtube.com/watch?v=vhbH_AmIKZA&feature=related
6) A board based on old FIRST robotics parts + code from this instructable (FIRST robotics was started by Dean Kamen who also invented the Segway, to encourage youth to get interested in engineering): http://www.youtube.com/watch?v=Vh9LpNQ_S0k&feature=related
7) Carbon fiber racing car seat with 2 - the SciChair: http://www.youtube.com/watch?feature=player_embedded&v=HtivH7INpZ4
8) Carey's self-balancing platform, good video: http://www.youtube.com/watch?v=ngMJcxeB7og
9) Really cool video (on clifftop path by the sea): Skate auto-balancé http://www.youtube.com/watch?
10) The KSLURP board from Malaysia: http://www.youtube.com/watch?v=x3O2NkjJOlg
11) The MIT Seboard, video clip: http://www.youtube.com/watch?v=zZQb-w_wyhM
12) The SITWAY sit-on machine by the 81year old gentleman above, with video: http://www.instructables.com/id/SITWAY/
13) This one has nothing to do with me but is such a really cool inspirational project I include it here, the TILTER skateboard, with hub motors and a suspension system: http://www.youtube.com/watch?v=WsYukdSO64A&feature=player_embedded
14) New one wheeler from team cosmos with some technical information and video here: http://teamcosmos.com/skateone/index.shtml
You build these at your own risk. If tilted they WILL accelerate to correct the tilt. If you are not on the board, this means it can fly across a room or into your head. This is why you have to have an emergency hand switch that cuts the power if you let go of it. If it develops a fault it does not have multiple redundant systems like a real segway, most likely you will fall off! The code is not guaranteed against any bugs. If you don't believe me here is a video of Clint Rutkas developing a similar machine, also featuring some holes it punched in the walls of his apartment! http://vimeo.com/2013773
Have fun. Treat it as an adventure. Once you get it to balance there are many ways to improve it.
What is it?