wiimote or a ps3 controler controling a self balancing skateboard...

i am looking at making a self balancing skateboard... i am having trouable finding step by step instructions for the ones that use the sensors... so i was thinking that if i could use a wiimote or a ps3 controler becuase everyone knows that the wiimote has gyroscopic sensors in it and the ps3 controller has a sixaxis thingie in it...(i know that thingie isnt the correct term for it...) so that gave me a good idea instead of piecing together gyrocopic sensors and many other things than why not just use a controller to control it... and if anyone knows another way to control a self-balancing skateboard... or a way to hook them up to the board... and i am not very good at programing so... if you could just send me a message of the programing to use the controlers as a controller than that would be great... if anyone thinks that this way is just to much harder than it seems than please tell me... thank you, Girrrrrrr2

sort by: active | newest | oldest
XenonJohn7 years ago
The Wii Remote and the Nunchuck both have 3 axis accelerometers in them. To build a self balancing robot or indeed skateboard, you need a gyro as well.
The very latest WiiRemote however will also have a gyro in it, to give faster more real time position information. You might be able to use one of these. Alternatively Sparkfun sell boards with gyro / accel combinations on them for exactly this sort of project.
The gyro is resistant to vibration and gives fast "angle" updates to your processor but it drifts with time. Accelerometer does not drift (i.e. always knows which way is "up") but is sensitive to vibration. The secret is to combine the best bits of the two signals: gyro for the short term updates and smoothed accel readings for longer term correction of the drift in the gyro.....called a "complimentary filter", it works something like this:
Tiltangle = 0.99*(OldTiltAngle + (GyroRateOfChangeInAngle*time interval)) + 0.01*AccelerometerAngle.
So accel slowly corrects errors in the gyro reading, while gyro gives instant angle updates to algorithm.
There is also something called a Kalman filter but much more complicated maths.
I hope this helps.
girrrrrrr2 (author)  XenonJohn7 years ago
trialex9 years ago
A skateboard is already self-balancing! Put it down on the ground and it balances on it's four wheels.

I assume you want to make a TWO-WHEEL platform balance autonomously. I like your idea of using a wiimote, because I agree with you starting from scratch using a distance or gyro based sensor is daunting.

Try approaching the overll problem in stages. First look at how to get data out of the wiimote. Actually I'd suggest going for the nunchuck add-on to the wiimote rather than the wiimote itself; it's smaller, lighter and cheaper but has the required acceleraometers.

Convieniently, how to get the accelerometer data out of a nunchuck was recently posted on MAKE:

HOW TO - Read Wii nunchuck data into an Arduino

The code should be portable to similar microcontrollers, but I think Arduino would make an excellent prototyping choice.

From there do some more research into existing self balancing platforms in general, like the excellent Legway. You'll need to learn about techniques to balance the robot using forward and reverse motion in the wheels to move the centre of gravity to recover from starting to tip over, or to purposely shift the centre of gravity to create forward and backward motion.

If you decide you are still interested in doing the project, let me know. I like your idea of using a commercial package to do the sensing, and I might be interesting in collaborating on a project.

girrrrrrr2 (author)  trialex9 years ago
ok so the nunckuck would be a good/acceptiable source... i was looking at the emanual and the one they had on hackaday not to long ago... and how much would you expect for this to need... in the way of microprocessors... i am kinda new to working on stuff like this...
girrrrrrr2 (author)  girrrrrrr29 years ago
oh and will it be able to read tilting and not read a constant 0... like with the legway version... and should i move this topic to a collaboration?
Yep it will definitely be able to detect tilt. As I mentioned before, I think Arduino would make a good prototyping device, after that you could choose any microcontroller with an SPI/TWI interface, obviously an AtMega8 would work. I have no eperience with Pics. Interested in collaboration, but not sure I'm willing to spend money at this point...
girrrrrrr2 (author)  trialex9 years ago
ok... i have a little bit of money... so i was just trying to figure out how i was going to make this work... not meaning that this topic was for nothing... so we can just probably just use this topic as a makeshift collaboration... i will still do research...
why do you want a controller for a self balancing skateboard? the entire point of the self balancing is that you use your own body to control it unless you are not standing on it, in that case, tell us how many controls you need, is it just forward and backward? or is there more?
girrrrrrr2 (author)  frank260801159 years ago
i want to control where the skateboard moves... so i will mostly just need forward and backward at first and go from there...
girrrrrrr2 (author)  girrrrrrr29 years ago
oh and how do you propose that i make it balance with out a source to keep it level...???...