The twin wheeled skateboard works like a Segway. Electric skateboards exist already with powered rear wheels, but 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 and accelerometer sensors. (Videos)
Why did I make it?
I previously made an Instructable in 2010 on how to build a self-balancing skateboard.
There are >500 comments on this and many express confusion setting up the balance sensors, software and electronics. On top of that, the analog output inertial measurement units that were commonly available stopped being made.
Here, I have taken a low price obscure analog IMU that IS currently still made in China, that IS available on ebay, and used an Arduino prototyping “shield” to mount ALL the parts, including a cable to a basic hand-controller (for steering and fine-tuning the balance point) and a cable with just 2 wires that you connect to a 2 x 25Amp “Sabertooth” motor power controller.
I have tried to make it as easy and in particular, non-confusing as possible to build.
In essence a complete re-vamp of the control system, making it simpler to build at the same time.
It works with my self-balancing skateboards but by experimenting with the P, I, and D values listed at the start of the program (Arduino sketch) you should be able to use it to build a SegwayTM clone or similar project.
I have included the basics of how to connect this to the Sabertooth motor power controller, which is an off the shelf commercial robot power controller, how to power the Sabertooth and how to connect the motors to it. For a really detailed explanation of the mechanical side of the build, take a look at my original Instructable of 2010, linked at the top of this introduction page.
One gyro is used for balancing (complementary filter with an accelerometer). Another gyro measures rate of rotation laterally (e.g. when steering).
This is used to provide another useful feature for free; when running in a straight line, if it detects rotation faster than 10 degrees per second laterally, it will change power to the motors to resist this effect. For example the motors often have different friction so when you slow to a stop, one stops before the other and you spin off. This feature stops that happening, and means the wheels can be mounted quite close together.