loading

As an avid maker of "things that Seg" this one is inspired by the 1970's Raleigh Chopper bicycle.

I was recently involved in the Hackaday competition with the MediCycle: MediCycle This was a big one wheeled electric motorbike styled machine. Impressive looking maybe but quite difficult to ride and if you fell off it really hurt:

I have also built all sorts of other self-balancers after starting in 2008 with a skateboard design: self-balancers site

Having learned the lessons, for this machine the objectives became clear:

- Lightweight, fun, more like a bicycle in construction.

- It is strictly not a unicycle but is a di-wheel or di-cycle.

NOTE: I have other instructables describing self-balancers that would be easier to build than this one. This one does require some tools, fabrication skill and a welded frame. The self-balancing electronics described here could be used in other projects with slight modification, such as a Segway, and are up to date using an easily obtained digital IMU.

Extra features 01/01/2015:

- Twist grip speed control on left handlebar.

- Uses a gyro to resist sudden spins when going straight, for example if one wheel hits stone.

- Brake levers each side are actually to steer left or right.

- Overspeed "lean back" automatically stops you going too fast and falling off the front if motor power >70%.

- If you pull both steering levers simultaneously, they act as a handbrake and machine will lean back and slow down.

NOTE: 27/05/2015An error in the wiring diagram has been corrected. "Deadman" switch is wired to digital pin 4.

NOTE 23/6/2015:One person building this found that the IMU "locked up" and stopped talking to the Arduino. He solved it by making sure he used the SAME GND PIN on the Arduino for both the IMU GND wire and also the 0V wire from the Sabertooth. There are several GND pins on an Arduino Mega and they are connected to each other on the board, however he found it was more reliable if you use the same one for all your GND connections to the Arduino.

Main parts list, not everything, but the main key parts:

- Sparkfun 6dof digital inertial measurement unit (IMU). (Part No. SEN10121). Most of my previous projects used analog output IMU's which were useful as you read the voltages from the gyro and accelerometer sensors using the analog ports of an Arduino. For this project I am reading the tilt angles using the FreeSix IMU code of Varaseno. $39.95

- Arduino Mega 1280 (same price online as an Uno, but has hard wired serial ports which are useful). As low as $16

- Dimension engineering Sabertooth 2 x 25 Amp motor power controller. Not the cheapest but has self-protection features which reduce risk of it burning out, so can be used in all your other similar projects. $124.99

- LED battery voltage indicator. Incredibly cheap on ebay. Example: $1.65 inc. shipping! LED voltage indicator

- Serial LCD display module. Example: 4 x 20 Serial LCD display NOTE: Some cheaper ones on ebay don't always work. Get one from a supplier that also sells Arduino's. Not essential to have this but useful for status updates as you ride the machine. Approx $29.95

- MY1016Z3-24V brushed gearmotor x 2. Has 6:1 reduction gear built in and sprocket for a chain already fitted. Designed for electric bikes. Comes with sprocket that fits 410 standard bike chain. $76.49 x 2

- 410 standard bike chain. NOTE: In the photos I am using belt drive but to be honest if doing it again I would stick with chains.

- Two big sprockets to fit to wheels. Needs to have between 4 to 6 times as many teeth as on the motor sprocket. Make sure they are for 410 bike chain. Get cheaper solid steel ones possibly, as easier to drill the 6 holes that will allow it to be fitted to the disc brake mounts of the wheel hubs.

- Mountain bike front wheel hub (with 6 threaded holes for mounting a brake disc) x 2.

- BMX bike rim x 2, fitted to the above hubs for me by a bike shop. The reason I did not use a BMX wheel and hub off the shelf with disc brake mounts is because apparently very uncool to have a BMX bike with disc brakes so disc-brake BMX wheels are not made. Need tubes and tires too.

- Same bike shop fitted a spacer tube between inner and outer bearings of each hub. This means they can be compressed sideways by a bolt later on without huge side-loads being placed on the bearing internal rollers.

- Rally car emergency power-off switch. For safety (stops small children turning it on when you are not with it), can handle 100 Amps, and looks a bit like the Raleigh Chopper gear-shift from a distance.

- Battery holder for 6 AA batteries. To power the Arduino separately from the motors. I prefer to do it this way so Arduino gets stable ripple free voltage no matter what punishment you are giving to the main battery.

- 24V battery. I used a "Headway" kit of 8 LiFePO4 cells. You could also use 2 x 12V 7Ah (or above) lead-acid batteries to save money which would be fine but would not run for as long. I mounted mine in a box in a holder which allows the pack to be easily removed and inserted in another project so may save money in the long run. $273 from China.

- "Ape hanger" handlebars for a chopper style bicycle. Real Raleigh Chopper ones are stupidly expensive so I used generic copy. $30

- Long saddle. Again a real Raleigh Chopper one would be very expensive even in poor condition. However in the US there are loads of companies making low priced "banana seats" which look nice, are long, and I think are made for retro styled Schwinn bikes. Mine came with a rear chromed "sissy bar." $30 with chrome bar.

- I mounted my motors and wheels on two thick alloy plates. You could weld up a frame to do the same job but make sure you measure everything lots of times.

- 40mm spacers (also sold as "stand-offs"). 8mm thread one end and 8mm socket the other end. These were important to get the geometry of everything correct. Correct name is: "M8 Stainless Threaded Stand off Pillar Bolt Extender Extension Fitting" About $9 each but worth it. Example from UK ebay

- Box section steel. 1 inch for seat mount etc and some 40mm wide so it exactly fits between the two plates that have been bolted together using the 40mm stand-offs.

- Big fuse say 75 Amp and holder for it.

- Twist-grip 5K Ohm potentiometer. In reality there is only one make of these, used as throttles for electric scooters, made by Magura. Example US link: Magura US example Link to a UK seller: UK example seller$60

They also sell a matching regular handlebar grip for the other side that matches.

- Children's electric scooter brake lever x 2. Search and you can find them very cheaply. Approx $5. They have an electric switch in them which means we can use two of them to steer left and right. Example link: E scooter brake lever

Step 1: Why inspired by a Raleigh Chopper?

Raleigh built a copy of chopper-like Schwinn Sting-Ray, launched it in 1966 in the US, but it was not a success. They sent their chief designer, Alan Oakley, to the US to look into the youth market. On the flight home he drew the basic design on the back of an envelope. At around this time drag racing was becoming popular in the UK after some US cars had come over for exhibitions. The 1972 Raleigh Chopper was a hit and is now a cult classic bike. It had the wide large rear tire with the small front and these had red lines on the sidewalls. The "ape-hanger" handlebars, long saddle and plenty of chrome completed the look. The final touch was the chunky gear-shifter dangerously placed in front of the seat, connected to a 3 speed gearbox. It had some stability problems, two people could fit onto the Mk1 saddle at the same time, it was heavy and hard to ride long distances. However to a 12 year old it was just the height of 70's cool.

I am basing the latest self-balancer loosely on the Chopper for several reasons.

- The previous machine (MediCycle) for the Hackaday competition was big, heavy and like a one-wheeled motorbike, designed for maximum visual impact. It needed to be treated with respect and if you fell off you would be likely to get hurt, as I know from personal experience.

- This new machine is to be built with lightness in mind, more like an electric pedal bike in design.

- It needs a long saddle so you can position yourself back and forth along it so that you have your weight at the correct balance point to make it work. Clearly a Chopper-style saddle would be very convenient for this compared to a regular bike or unicycle saddle.

- The "ape hanger" handlebars also conveniently can be mounted so they stick forwards in front of the wheel to get the weight distribution of the rider correct, while using the least metal tubing to do it.

- It gives me an excuse to put some chrome at the back of the seat and on the handlebars for a bit of "bling."

Other experimental features being tested out:

- Toothed belt drive to avoid any slackness in chain when moving from forwards to backwards. It works fine but to be honest I might just use chain drive if doing it again, they would probably have been fine.

- Aircraft grade alloy mounting plates for the entire drive mechanism each side.

- DiWheel design (2 wheels one next to the other) BUT not like a Segway, the legs of the rider will go OUTSIDE the wheels. This should make it relatively easy to learn to ride, stable even when stationary, capable of turning on the spot.

- Could even be seen as a radically different "take" on the concept of a disability scooter.

- Lowish seat height so feet can easily be put onto the ground if any malfunction.

<p>Brilliant work! I have absolutely got to give this build a try. Thank you so much for sharing the information.</p>
<p>Hello Sir,<br>I tried making a similar thing using an MPU6050 and a cheaper motor driver (rated 40V 20A)for each wheel. I am using 2*600W MY1020Z. While testing (wheels not in contact with the ground) One wheel went like crazy while other didn't move as I gave slight tilts to the MPU box and the corresponding driver caught fire. <br>Could this be a fault in my codes? Or should I buy better motor drivers?<br><br>Please help me out! Can't drop this project.</p>
<p>By the way, I forgot to mention I am using an Arduino Mega 2560 (probably a clone)</p>
<p>Я в ужасе! Кто уже попробовал повторить?</p>
<p>Hi,</p><p>According to Google Translate this reads as &quot;I'm terrified! Who has tried to repeat?&quot; which I suspect is not quite correct!</p><p>John</p>
<p>That's right translated! Excuse my French.<br> That was the phrase of admiration!</p><p>And the question is: who repeated your work? Let talk about the difficulties!</p>
<p>I have added a &quot;clones&quot; section to my main website which covers why it is not worth even bothering to make these things outside of China as you will always lose.</p><p>Here</p><p>https://sites.google.com/site/onewheeledselfbalancing/</p>
Why don't you put some of these amazing projects on Kickstarter and make some money
<p>Actually I was wondering after doing the Chopper how long it would take the Chinese to make a twin wheeler with the wheels closer together and your legs + feet + footrests on outside of the wheels. Well here you go, it is called the A3, from AirWheel, who also copied the SoloWheel of Shane Chen.</p>
<p>The OneWheel one wheeled skateboard raised &gt;$600000 on Kickstarter late 2014, shipping 2015. At least two Chinese one wheeled skateboard designs are now available, some just starting to be supplied through EU and probably US distributors at about half the price. Patriotic to make OneWheels in the US, but may ultimately be doomed. </p><p>SoloWheel (Shane Chen) was first stand-on unicycle with no seat, electronics incidentally done by Focus Designs in US, who also make the SBU unicycles. Within 2 years market flooded with Chinese clones. Shane Chen spent much time fighting for his patents in China including actually winning a case against Airwheel. The reality is nobody cares, not enforced anyway. Same thing happened with Wright brothers patents on early airplanes. Orville Wright died young with stress of it all.</p><p>My conclusion is that you may have one year, maximum of two to make a bit of money before the market floods with clones at a low price you could never match.</p><p>If you want to make money you have to make your machine somewhere where labour costs are minimal, be somewhat ruthless, be very quick about it, and just accept that everyone else will join the fray. You may get away with it if your machine is easily the best on the market (Chinese Segways may be cheap but I blew one up testing it - actually caught fire), people may pay more for quality.</p><p>There are lessons to be learned here on how to stay happy and sane.</p>
<p>Ooops forgot to ask my second question on your code.</p><p>The speed calculation you use for variable cur_speed. What is the range of values you are getting for the cur_speed calculation?</p><p>Thanks again for your time answering questions!</p>
<p>cur_speed is not an actual speed measurement. It is a value that increases in proportion to how long the device has been tipped forwards for. Machine will in fact balance without this line of code.</p><p>It would be a good improvement for me to fit motor speed encoders in which case the machine would know its actual speed. When you let go of the controls it could aim for a mean speed of zero, i.e. it would just stay balanced in one place. At present it just tries to stay level, so if you let go of the controls on a slope, it would roll happily down the slope, while staying upright, until motors could go no faster, at which point it would fall over.</p>
<p>Sorry to keep asking questions.</p><p>I noticed in these two versions of the code for the chopper you removed the PWM frequency modifications for the motor control as compared to your Medicycle code.</p><p>Did you have issues with the frequency modifications affecting the performance of the machine?</p><p>Any insight you can provide would be great.</p><p>Thanks again for your time answering questions! Your time spent sharing your expertise is greatly appreciate!</p>
<p>The Chopper motor controller is the Sabertooth from Dimension Engineering. You just sent it values via a serial link and these tell it how much PWM to send to each motor. The Medicycle on Hackaday used an OSM robot single channel motor controller. The OSMC requires the Arduino to send it the PWM pulses (at a higher frequency than default settings for an Arduino), whereas the Sabertooth generates its own PWM pulses internally based on serial values being sent in from Arduino.</p>
<p>hello</p><p>i have modified your code for works on arduino nano with i2c lcd and software serial for the sabertooth</p><p>its work fine but i dont like your deadman switch</p><p>i have modified my circuit for cut power of the arduino</p><p>thanks a lot for your code</p><p>i post pictures when its finished</p>
<p>David Klapan has built one that is working and he had a similar problem initially.</p><p>A key feature with respect to the Arduino &quot;locking up&quot; or rather, not getting data from the IMU is to make sure the IMU ground(GND) is connected to the SAME GROUND PIN on the Arduino as the 0V on the serial communication with the Sabertooth.</p><p>There are more than one GND pins on the Arduino Mega and they are all theoretically connected to each other on the Arduino board. However he found by trial and error that you should use the same GND pin for everything ideally.</p>
hello<br>thanks a lot for you response<br><br>yes i have the same ground for all<br><br>best regard
<p>Does not cut power when it is released, it cuts power 0.5 seconds after it has been released. This means if you momentarily let go but then press it again, the machine will &quot;forgive&quot; your wobble and machine will keep running.</p><p>This is also very important feature if your switch is cheap and even when you are pressing it, you get momentary dropouts in the connection.</p><p>If you do not have this tiny time delay, you get sudden unexplained cutouts while you are riding along, I have learned all these little points the hard way, trust me!</p><p>John</p>
hello<br>yes after my test i dont cut power because the motor will turn when i cut power<br>the problem with the deadman switch is the obligation of reboot the arduino<br>it's not the perfect way for this system<br>if you have a better idead don't hesitate<br>thanks a lot<br>Antholory
Hello again, John. I'm starting to tear my hair out trying to figure out what's wrong... the system seems to work perfectly when there's no power to the motors, but when the motors do have power, the system will boot up properly to the tip/balance point, after which it will start turning the motors (properly most of the time) for several seconds. At some time in the first 5 seconds or so after &quot;balancing&quot; appears, it becomes unresponsive to any and all inputs with the wheels typically turning very slowly . <br>I've done diagnostics on the Sabertooth, the Mega2560, and the wiring. <br>It's almost as though the board is freezing up because of a stack overflow or something like that. Perhaps one of the user preset parameters might be the key?? Any help or guidance would be much appreciated.<br>Geoff
<p>See my comment above.</p><p>Use the very same GND pin on the Arduino for both the IMU GND and also the OV lead to sabertooth on the Serial connection.</p><p>There are several GND pins on the Arduino Mega, and they connect to each other on the board, so should not cause any problem, however use the same one for both these connections as it has been reported as helping the IMU comms &quot;lock up&quot; problem some people seem to be getting.</p>
<p>One other thing, power your arduino from a separate battery at least until everything works OK. I use 6 AA 1.3V cells, nice and simple.</p>
<p>john i need help my segway motor keep run nonstop after i released the deadman switch..can i know what the problem? im run out of idea T_T</p>
<p>NOTE 27/05/2015: An error in the wiring diagram has just been pointed out to me by someone building one of these. There was an error in the wiring diagram regarding which switches are to be attached to which pins on the Arduino. </p><p>It should be as follows (the diagram has now also been corrected): </p><p>Deadman switch to digital pin 4, </p><p>Turn left button to digital pin 2, </p><p>Turn right button to digital pin 5</p>
<p>video 1 shows controller working perfectly</p><p>I have never seen my arduino freeze like your vid 3 which is odd.</p><p>I solder my imu wires tomunderside of arduino, do not use thenpush in pins. Keep IMU wirs short. Keep high current motor wiring away from controller wiring. My serial comms wire to Sabertooth is short and screened. Are GND connections correctly and well connected? I also solder the serial out and gnd to arduino, not just push in header pins. Check sabertooth dip switches set corrctly for serial communications. I did write a motor tester sketch that ran motors at diferent speeds, attached to one of my skateboard instructables, for an uno board so you might have to update pin assignments for your mega. It proves your arduino can control the sabertooth so is useful thing to try. Finally, rarely, you can get faulty Sabertooths, one or two skateboard bullders had them. </p><p>John</p>
I am running the Arduino off a separate battery pack, so I don't think that's the issue. I have found a problem, and it does seem to be with the Sabertooth. When I disconnected both motors from the Sabretooth I still get the same problem, so it seems I'm getting some kind of electrical feedback from the Sabertooth to the Arduino, either through the signal line or the ground line. I may have a bad Sabertooth, although it seems to work fine on some of the other sketches, particularly when I use the Sabertooth simplified serial code. I'm going to try to electrically isolate the two components from each other using an opto-isolator. Will let you know how it goes.
<p>Might be that all the GND's are not in continuity with each other.</p><p>My serial lead from arduino is also very short and I used shielded cable just to be on safe side, no idea if this is essential or not.</p><p>Have also been told brushes on older second hand motors tend to produce a lot more &quot;noise&quot; than newer ones.</p>
<p>XJ- I think you might be right that the problem has something to do with the GND wiring... here's what (I think) I know to date:</p><p>1 While there might be something wrong with the Sabertooth, I am able to get it to work with the Arduino when I run a sketch I got from the Dimension Engineering site, which uses a Sabertooth library (SabertoothSimplified.h). Maybe this protocol is somewhat more tolerant of whatever is wrong with my system. Anyway, this seems to indicate that the Sabertooth is functional. </p><p>2 Simply applying power to the Sabertooth from the 24V battery causes the problem. While my old brushed motors may very well be noisy, the problem appears even before the motors are connected, and again, the Arduino and Sabertooth do work when the motors are running using the SabertoothSimplified protocol. </p><p>3 I have electrically isolated the Sabertooth from the Arduino Mega 2560 so I don't think the problem is feedback up the signal line. Right next to the Signal 1 input on the Sabertooth I inserted a cool little opto isolator chip from Sparkfun ( <a href="https://www.sparkfun.com/products/9118" rel="nofollow">https://www.sparkfun.com/products/9118 </a> ). The &quot;out&quot; signal, ground and power connections on this chip are connected to the GND, Signal 1 and 5V on the Sabertooth, and the &quot;in&quot; are the TX1 and GND from the Arduino. (I was POSITIVE that this would solve the problem, but nope. Arduino still freezes just after &quot;Balancing&quot;.)</p><p>4 I haven't soldered the TX and GND leads to the Sabertooth yet- I'm still using the pushpin connections, but the connections are secure because I used some connectors salvaged from some old desktop computers, so multiple pins are connected together, and then I put a piece of tape on the inside and the outside surfaces spanning both flat plastic surfaces to hold these connectors securely to the Arduino. I may solder them when I figure this out, but until then I want to be able to change things easily. </p><p>5 When I get home today I'll go through all the GND connections to make sure I haven't done something stupid there. A question: Since I have electrically isolated the Arduino from the Sabertooth, do you think I should treat it as two separately grounded systems? I'm thinking this might be a good idea, particularly if the big old motors do turn out to be very noisy.</p><p>Specifically, I am thinking that: </p><p>All the GND lines connected to the Arduino need to be securely connected to the GND of the Arduino without any loops, which will be grounded through the power supply to the AA battery pack.</p><p>The Pos and Neg of the Sabertooth are connected to the 24V battery, so the GND of the Sabertooth is connected to the Neg of the big battery. The boxes that contain the Sabertooth and the Arduino are both closed, conductive boxes to minimize magnetic noise around the electronics, and I wonder if I also ought to ground these and the metal pipe frame to this same 24V negative lead. Do you have any thoughts on this?</p><p>Will keep you posted...</p>
<p>Hello John,</p><p>Thanks for a really great project. I'm pretty close after a whole bunch of mis-steps (the worst being that I got an LCD screen that required different formatting, and also a bunch of wiring snafus.) </p><p>I have attached three videos that show the state of my machine, but in essence I think I have the sensors and controls wired properly as it behaves the way I think it should WITHOUT the power applied to the motors (video 1). When I apply the power to the motors and go through the startup process, the system freezes and becomes unresponsive either to the sensor or inputs, and the motors turn (usually, but not always, slowly). If you have any ideas about what might be going on, I'd be very appreciative. Thanks in advance,</p><p>HackerboySF</p><p><iframe allowfullscreen="" frameborder="0" height="281" src="//www.youtube.com/embed/WO2ib00iU4Q" width="500"></iframe></p><p>Video 2: <iframe allowfullscreen="" frameborder="0" height="281" src="//www.youtube.com/embed/0LPgfUU5MBk" width="500"></iframe></p><p>Video 3: <iframe allowfullscreen="" frameborder="0" height="281" src="//www.youtube.com/embed/-ZEdEWUVyD0" width="500"></iframe></p>
<p>Hi, the serial monitor tells me YOU NEED TO RESET FROM SCRATCH and the LED flashes. why ?! thanks</p>
<p>This is the message displayed when you have let go of the deadman switch.</p><p>After you have turned the arduino on, press the deadman switch and do not let go of it unless you want it to stop.</p>
<p>Hi, It works well but when increasing the angle of 6 DOF engines running at maximum and do not stop. HELP ME thanks!</p>
<p>I solved. It works well but when increasing the angle of 6 DOF engines running at maximum and do not stop. HELP ME thanks!</p>
<p>Hi XenonJohn and others<br>Here is small video of my diy segway chair testing. Made with Arduino mega 2*6050mpu and sabertooth.<br>http://youtu.be/QS3EpMaRu8I<br>thanks<br>Raju</p>
<p>That is balancing well now.</p>
<p>like this </p><p>http://www.gaetanomarano.it/i-pages/easyridersegway.html</p>
<p>One problem with having a high seat-backrest in full &quot;Easy Rider&quot; style, is that if it fails and you fall over forwards, the backrest smacks you in the back or even the back of your head! I did think of fitting a for-decoration-only high chopper backrest on flexible mounts for that reason.</p><p>I learned this the hard way when building a segway type machine with a seat on it.</p><p>Also, this machine is moved forwards using a twist-grip handle on the left handlebar, not just by leaning on a T shaped frame. That took a little while to get working correctly and is much more stable than a joystick where, every time you go over a bump, you tend to nudge the joystick, making the machine oscillate, unless your elbow is securely &quot;fixed&quot; to an armrest - which is another story. For similar reasons NASA spent a fortune developing the joystick for the Apollo moon rover so it still worked smoothly despite bouncing wildly around in 1/6 gravity.</p>
<p>What the heck, I have just put a tall sissy bar on the back anyway !</p><p>If it hits me in the back when I fall off, at least I have put a pad on it.</p>
<p>Nice project. I am seeing the posibillity here for a Seg-wheelchair instead of a company charging a ridiculous &euro;16.000.</p>
<p>Hi i am also trying to build seg-wheelchair small video</p><p>https://www.youtube.com/watch?v=N2hpbVygRmY</p>
First though on your video is big motors with small battery. Can your battery supply enough current?<br>
<p>Hi XenonJohn<br>The battery is only for testing. i will be using SLA battery. now working on footrest and stand.</p>
<p>PID tuning (rough back of envelope method): </p><p>Set all 3 to zero. Increase P until chair oscillates (like yours does a bit), then reduce it to 2/3 of that value. Then, increase D value and deliberately sharply tilt the chair over and see how well it corrects itself, if it over-corrects itself, then reduce D value a little bit. You want it to just correct for the sudden tilt but not over-correct the other way.</p><p>Then, finally, increase the I value. It will balance with I set to zero, but the I value allows it to increase power in proportion to how long, in time, it has been tilted over.</p>
<p>yup, I am involved in a wheelchair project.</p>
<p>Very cool.</p><p>Can't wait to see what your gonna come up with. I road one at a congres a couple of moths ago and it does give a whole lot of freedom. </p><p>It just needs to be more affordable and a bit sleeker ;-)</p>
<p>...and easy to transition in and out of, and fit under a restaurant table, and ideally have a joystick not just steered by leaning (not all disabled people have good upper body control of leaning), and not have a T handle in the way even if it does collapse or move, and go up ramps, and be stable when powered off, and fit through regular doorways easily.......the list goes on!</p>
<p>Very impressed. Just a thought; could you apply your self balancing electronics to the Copenhagen wheel? <a href="http://senseable.mit.edu/copenhagenwheel/" rel="nofollow">http://senseable.mit.edu/copenhagenwheel/</a></p><p>You'd have a self balancing uni-cycle :-)</p>
<p>Not sure Copenhagen wheel would generate enough torque to self balance as is really a pedalling-assist device. Also need to have computer control of the motor speed many times per second. Chinese hub motors can be used, but you have to have a brushless motor power controller (as hub motors are almost all brushless these days) that is capable of being controlled by your balance computer, so that is the main problem with the hub motor approach as a hobbyist.</p>
<p>Hi, beautifully constructed 'ible! I am seriously considering building this myself. The mechanical assembly and electronics don't worry me as much as the arduino programming. I saw that you included links for this but I am wondering if the programming would need to be tweaked if my final project ended up having slightly different geometry or if i used different motors of wheel sizes. I also noticed somewhere in this thread you mentioned some other programming changes, what did you have in mind? Would you be willing to help out if i get stuck at this phase? Once again great job! You have my vote!</p>
<p>Best way to learn about Arduinos in a short time is to get a &quot;starter kit&quot; for about $50 which will contain extra components such as temperature sensors, LED's etc and a set of about 12 tutorials which start off very easy. After that you will get the general idea. A couple of days work probably to go through them all.</p><p>In the code you can see that many of the key variables are listed at the top of the program and can be altered to suit your machine. Main thing is to have enough maximum torque at the wheels, if you have that then it should eventually self-balance even if code needs tweaking a bit. If you send me messages I am happy to help with advice. I have helped quite a few college and school students with skateboard projects already (shhh don't tell teacher). One bit of advice, if you are doing this to a deadline, don't leave the code until the last 4 days as it just will not happen! There is a period of tweaking the code by trial and error to optimize it, even after you have it self-balancing.</p><p>The aspect I am working on now simply makes it resist sudden unintentional turns (when one wheel hits a small stone for example) that might spin you off when you actually just want to go in a straight line. I use a gyro to detect the rate of turning left or right (note, not change in direction, just a rapid sudden increase in left or right turn rate). If too fast above a set threshold, it will adjust power to motors to resist the sudden turn, assuming you are trying to go straight and are not pressing the turn levers. It is not the same as having a compass keeping you on a certain heading, but it did work very well as a quick and dirty fix in the skateboard where the wheels were also quite close together.</p>

About This Instructable

89,147views

945favorites

License:

More by XenonJohn:Ardu McDuino: Bagpipe playing robot (chanter) Star Wars Maz Kanata Inspired Glasses Music & lights in childproof case 
Add instructable to: