Step 31: Rebuilt on a skateboard deck

Since first posting this instructable I have taken all the components as in the instructable but mounted them on a skateboard deck insted of the marine ply board.

This has allowed me to test ride it.

As a result of this I have tweaked the code slightly to improve (tighten up) the ride and also have used the second gyro to improve the steering:

When you steer the gyro will adjust power to the motors to create a constant rate of turn. Currently this is set slow at 10 degrees per second but you can alter it in the code. Have done this after feedback from viewers.

You could also use a potentiometer to vary the "target" desired rate of turn if you want to take this on another step (see image on front page and also code attached to page 47).

Code examples attached to pages 43-47 as text files. If you cannot download them message me with a working email address and I will email them to you.

<p>Do u connect the motor driver to Arduino direct?</p>
<p>hi xenon,Could you send the code please, i really need its.my email address is: bro_afiq94@yahoo.com</p><p>Thanks </p>
<p>do you think a couple 100watt e100 scooter motors would be suffucient? ASAP</p>
<p>The Sci-Tech team from Australia who also have an Instructable, made a mini Segway using two 100 Watt electric scooter drive motors, so yes, on level ground at least, it would probably just about be OK.</p>
Can I use the same process to build a airwheel or solowheel <br>I'm doing this as my final year project<br>Plzz let me know....
<p>Yes you could. However, these Chinese machines keep getting cheaper due to the market saturation from all the competing Chinese manufacturers so actually would be good and educational to build you own but it would probably cost you a similar amount as buying one. My Hackaday project called the MediCycle is a self balancing monowheel. New version under construction........</p>
<p>Hey xenon jonh. I liked ur project a lot and i want to make an upgraded version of it that will work like the zboard but without weight sensing. But i know very little about arduino programming. Can u help me. Is there a way to recognize when i shift my weight forward or backward? (Using the accelerometer i think). We can then fix a notched disk on the front portion of the board, beneath which there will be a potentiometer. When we will put our heel on the disk and rotate it, the board will turn accordingly. Can u please help me with this idea. I really wanna learn. Plz reply fast.</p>
<p>I think there is an example of a board that is steered like that in the example links on page 1. The &quot;Velocyrider&quot; I think it was called, google it.</p>
thank you very much .<br>I show my schooter
<p>Do you have a video of it on the web anywhere?</p><p>It as very good to see people building them, if only to prove that the thing in the Instructable can actually be built!</p><p>Best wishes, John</p>
<p>helo,, can i have a flow chart to do this project </p>
<p>i want to make it for my final year project</p>
what was the autonomy with these two batteries?
what was the autonomy with these two batteries?
<p>That's a great project. i like this ..</p>
<p>Hello,</p><p>can I use MPU6050 (6DOF) gyro instead of 5DOF gyro..</p><p>Thank you.</p>
<p>this is a free ride :-)</p>
<p>Hello,Im in search of someone that has the skills to build an electronic device.</p><p>If you can be of service let me know tyffanij5@gmail.com</p>
<p>is there any way to build this without the hand controller </p>
<p>hello</p><p>i have found your code for grove analog gyro and accelerometer with the nunchuck</p><p>but actually i cant found it </p><p>can you publish this ?</p><p>thanks a lot</p>
<p>i found this IMU http://dx.com/p/gy-85-6dof-9dof-imu-sensor-module-for-arduino-148436#.Uv_JhfldVwx it is a reliable website</p>
<p>Hi,</p><p>Just pointing out that the IMU above is a digital output one that does not work with the code in this instructable that was written to work with analog (variable voltage) output IMU's. These are becoming quite hard to find however.</p><p>This is why I have had to recently rewrite the code and add a new related instructable that shows you how to make a balance control system using a digital IMU.</p><p>John</p>
<p>Oh, i already ordered this IMU, i even started the project. I am making more like a onewheel-frame. i got all the aluminum parts and cut them up to shape, i picked the aluminum frame up from the welder today, i am using a small 24 volt DC motor. i got 4 small 7 ah 6 volt batteries and a velleman P8004 motor controller. I dont know if it works with my arduino UNO yet but its what i have (i am using a cigarette lighter 24-5 volt adapter as a power supply for my arduino, they're really cheap and function well) , otherwise i will buy an arduino motor controller like the sabertooth. Also, i am planning to add a light sensor as a dead-man switch, that way when somebody steps off the board it stops, i dont need a steering switch etc so i think i am just gonna remove those lines of code. i added pictures (the pics of the frame have low quality because my camera sucks at low-lighting). maybe i am going to upload videos someday. Thanks for the new code, helps a lot!</p><p>Sorry, i dont know why but my English is sort of broken today, usually it's better. :/ (i am dutch). </p>
<p>Looks good. I have no idea if the digital IMU you have bought will work with my new digital IMU code as I have only tested it with the 6dof digital IMU from Sparkfun. I am sure you will find out soon enough!</p><p>John</p>
<p>If you want, let me know maybe i can send pictures in the future.</p><p>zetowe</p>
<p>Please do. Your metalwork looks really neat and tidy.</p><p>John</p>
<p>Hello XenonJohn,</p><p>I have not done an update in a long time (i think about 2 months). I have been working on it but i ran into a lot of problems and i didn't quite get the time to fix them because school is busy lately. No time for excuses tough. I am gonna do an update once it is finished, nothing in between. I will make a video of me riding it and showing the inside lay out etc. I will post it right here. See you then!</p><p>Zetowe</p>
<p>Ok, no problem, but please note, i am not doing this project bcause i know how to do it, i am doing it to learn how to do it so there might be a bit of a time-gap between every update.</p><p>Zetowe</p>
<p>You are a great genius John!</p><p>Congratulations, you have given new hope to all of us, </p><p>regards, </p><p>Gerry</p>
<p>Hi zetowe,</p><p>can I please ask what is the logic you intend for your light sensor?</p><p>Without your advice I am thinking it is like a solar cell and if you block it with your foot and so your logic is drive the motor when the sensor is not generating or sending any voltage (if solar cell). But problem in my mind is if you put some dirt from your shoe on the sensor then it stay in drive mode when you are off it?</p><p>Such that I am interested to learn what you think about the logic for this process. thanku</p>
<p>Another option is the Sharp infra red rangefinder available from robot sites. It fires an infrared beam at an angle and looks at the reflected light. If you have it facing upwards and you are on the board, it will see light reflected from your foot. If not on the board it will not. You would have to recess it about 3cm into the board (for the shortest range one they make).</p><p>Another option is a cheap pressure sensitive resistor mounted under a rubber disc. Look how its resistance changes, set up a voltage divider with another resistor, feed the changing voltage into an analog input and with some adjustment of the limits in the code it will work.</p><p>You can also use a rugged metal push to make foot switch that you stand on, - recess it into the deck. These exist as foot switches to trigger alarms by shop cashiers for example.</p>
<p>Hello eyrecamp,</p><p>You have a very good point, but i think that my shoes don't get dirty enough to completely block the light sensor, i live in a city with mainly pavements, i dont think dirt will be a problem for this idea. (i included a pic of the light sensor)</p><p>(general update)</p><p>I also just got the IMU in the mail! It has the right voltage and the pins have the same names (i included a pic of the soldering so far), i hope it works, if it doesn't it will be hard to determine what doesnt work, its either the IMU not working with the code or it's the motor controller not working with arduino. i still need to find the 2 100 Ohm resistors. I really hope it just works, that way it stays simple.</p><p>zetowe</p>
<p>Hi zetowe, </p><p>you are fortunate that you can keep your shoes so clean!</p><p>Personally I cannot yet bring myself to trust this as a fail safe.</p><p>Do you have any specific identifier data on that light sensor?</p><p>I would like to learn more about that one.</p><p>My current thought is a two wheel unit with a pressure sensitive system. No pressure applied is signal to cut out the motor, then I'd like to be able to bias left and right side pressure to bias drive to one motor in order to steer. Probably there are some floors with this concept.</p>
<p>Hello eyrecamp,</p><p>Personally i have decided to use a switch because it indeed is more reliable. If you are still interested here is some info.</p><p><a href="http://m.eet.com/media/1049853/C0086-Table1a.gif" rel="nofollow">http://m.eet.com/media/1049853/C0086-Table1a.gif</a></p><p><a href="http://en.wikipedia.org/wiki/Photoresistor" rel="nofollow">http://en.wikipedia.org/wiki/Photoresistor </a> </p><p>I hope this was helpfull to you.</p><p>Zetowe</p>
<p>Great mate, thanks I had no problem finding this option.</p>
<p>Hello to all,</p><p>can anyone tell me if the IMU is oriented correctly? </p><p>Thank you, Regards</p>
<p>Other way up. The edge with the two large holes in it faces upwards. Then run the IMU tester sketch.</p><p>John</p>
Ciao Giovanni, ho ruotato l'Imu di 180 &deg; e allegato inviare le immagini del monitor seriale. Pensi che i valori sono coerento o sto facendo qualcosa di sbagliato? Grazie, cordialit&agrave;, Gerry
<p>Hi, we can correspond by email and I am sure we will sort this out.</p><p>John</p>
<p>We did sort this out and his machine works now.</p><p>John</p>
<p>Hi, I'm needing to get a copy of the code for this project!?</p>
<p>my mail is eyre.c@hotmail.com.au</p><p>further, I am considering using the hub motors (8 or 9 inch), in order to reduce mass. Do you know if sabertooth motor driver will provide the power and control through to these motors....? I will chase up some specs if necessary.</p>
<p>The Sabertooth only works with brushed motors. There are some small brushed hub motors out there, but in general, hub motors tend to be brushless nowadays. I have built a machine like a segway with brushless hub motors and a very expensive Roboteq Brushless motor controller but that is another story. It can be done but it was expensive and it would not go up any kind of slope (lack of torque).</p><p>Also, hub motors do not generate as much torque (twisting force) as a regular wheel with a sprocket chain or toothed belt drive from a motor, i.e. small sprocket on motor and big one on wheel). With self-balancers a generous amount of torque is very useful to have, rather than a high top speed.</p>
<p>so what I can determine is that I can get a hub motor (9inch) to give 12N.m of Torque which would allow drive up a slope incline of 0.054 (on a 0 to 1 scale), I guess if I had two of these it would double the Torque capacity and allow for slope incline of 0.108 (all based on a 100kg loading). This suggests capability to climb a 9 degree slope best case.</p><p>So now I am interested to find what your design rates in terms of Torque generated through the motor and sprockets. Maybe your design can carry a 100kg load on a 20 degree slope!?</p>
<p>Here is links to the 8 inch and the 6 inch hub motors.</p><p><a href="http://www.uumotor.com/air-tyre-8-inch-gearless-hub-motor-36v-350w.html" rel="nofollow">http://www.uumotor.com/air-tyre-8-inch-gearless-hub-motor-36v-350w.html</a></p><p><a href="http://www.uumotor.com/6-inch-36v-250w-small-hub-motor-20kmh.html" rel="nofollow">http://www.uumotor.com/6-inch-36v-250w-small-hub-motor-20kmh.html</a></p><p>Seems that the 6 inch motors are reversible, there is a 9 inch version that has variable speed options, however i have a feeling that a control circuit should be able to provide such convenience with any of these hub motor selections (??)</p>
John,<br><br>thanku for the feedback on the hub motors. It is unfortunate that there is a problem with the torque. I assumed that because they are advertised for scooters and wheelchairs that torque would not be lacking.
<p>Suppose I wanted to build one of these... but I wanted to add a third caster wheel and not worry about the whole self-balancing thing. I just want something I can stand on, be self-propelled, and be able to turn it by some really simple means.. What all electronics could I eliminate? Just the IMU's? Can anybody point me to maybe a SIMPLER Instructable that might show me such a thing?</p>
<p>Hi everyone,</p><p>Big development: I have finally managed to get all this to work with the Sparkfun DIGITAL 6dof IMU Code No: SEN-10121.</p><p>It has taken 2 years but there we are.</p><p>Uses code from all over the web chopped and changed and merged with my existing code. Use the very clever Kalman balance filter algorithm too.</p><p>See the new Instructable here: </p><p><a href="http://www.instructables.com/id/Arduino-Self-Balance-Controller-using-DIGITAL-IMU-/" rel="nofollow">http://www.instructables.com/id/Arduino-Self-Balan...</a></p><p>John</p>
<p>What electrical output does your skateboard produce?</p>
<p>Motors 250 Watt (times 2 as there are 2 motors) and whole things runs at 24V</p>

About This Instructable


529 favorites


More by XenonJohn: Music & lights in childproof case VW Beetle rear view camera Head Mounted Laser Pointer communicator
Add instructable to: