The self balancing scooter project Meta - USA


This page is to keep track of the development of a self balancing two wheel scooter. Here is the link to the RFL forum where this project originated.

The lastest updates are at the top of this page.




06/07/09 - I was over at Peter's today and we worked hard on making 3 recumbent bike frames from EMT tubing. I brought them home to notch the ends on the mill. Then we can weld them together. Here is the site with all of the plans that we followed.

06/03/09 - Finally some pics of our camping chair variation of the scooter! The scooter hit 15.6mph today!

lounger1.jpg, lounger2.jpg, barstool3.jpg, lounger4.jpg lounger5.jpg, barstool5.jpg, lounger6.jpg, barstool7.jpg, loungervideo1.jpg, lounger8.jpg lounger9.jpg barstool10.jpg barstool11.jpg

06/02/09 - The Maker Faire was great!! Saturday the scooter had the lounge chair on it and was a joy to drive around. So much more comfy. My lower back got sore, but with a rolled up jacket for lumbar support is was solved. The crowds reaction to a lay down self balancing scooter was incredible! I was asked questions all day and evening long. Toward the end of the day the joystick control was getting very twitchy left and right. As I recall, the increase from 22v to 30-32v accounted for most of the twitchyness. Sure feels like EMI. When I arrived Saturday morning one of the tires on the scooter had actually split it's inner tube. Not sure why. Glad I had a thornproof spare. So Sunday morning I felt it was a better idea to put the barstool and tiller steering back on. That way I could also give many rides.

You can't believe how many people suggested that I bring the scooter to Burning Man. A few friends and I are thinking about doing just that. The scooter would need a shade awning to make it tolerable in the desert. Also the chassis would have to be sealed off due to the incredible amount of dust out there. I met a fellow that goes with a group of electric scooter folks to Burning Man.

The A123 Lithium cells were manually checked for balance on Sunday morning and were just fine. They also performed flawlessly. The battery alarm with the barstool on top was set so low that just as the alarm went off the scooter died and tossed me off. Oddly enough, with the lounger on there, the battery alarm could go off for a minute before I had to get off. Not sure of the difference. I bumped the battery alarm from 27 volts to 28 volts. Further testing will see if theis helps. I was getting about 2.5 hours of drive time per charge. The pack was only being charged to 35.0v compared to a max of 36v or 37v possible. In bench testing this was worth about 90% of capacity.

I added 0.10uf caps across each joystick pot to see if that would help the noise issue. But it just stopped the joystick from working at all. So I cut loose one leg of each cap and the joystick operated again. I then cut the shroud from around the joystick connector pins to allow a deeper engagement with the mating connector. The wires soldered to the pots were done poorly. The first test drive was twitchless. A fully charged pack seems to be the noisiest. But even with a fresh pack the scooter now does not twitch or oscillate at all. So it must have been a bad connection. I'm not sure which change made the difference, but the scooter is now driving very well. I even took it around the block twice. That's 1.25 miles total.

I added the gyro out of Max Wedge. It works ok. It dampens the steering overshoot, but it also reduces the max turning rate. So far I like it.

My team mate Bill, had brought a folding chair from Costco that was lower and more sturdy looking than the one I was using on the scooter. Being lower it might make getting into the scooter much easier. It didn't have a footrest however, but that won't be hard to add. That would suit a single driver. But my goal is to make the scooter able to carry two people side by side so driving could be shared.

I'm also working diligently to find a simple BMS for the A123 cells. I don't want to use a lithium charger. The constant current/constant voltage power supply I have is just perfect for charging.

I'll post pics and video if I get any. I could not take any as I was driving.

05/28/09 - Today much more software adjusting was attempted. The joytick settings were improved significantly so that the joystick is no longer twitchy in either axis. Top speed was the highest I've ever gone due to greatly reduced oscillations and twitches. I'm sure it's even faster now than when Daniel was test piloting it. Stationary balancing is pretty good, with just a tiny bit of drift fore and aft. The battery alarm went off and still gave me time to safely get off of the scooter. The battery packs added a nice consistancy and firmness to the operation of the scooter. They also lasted a long time. I'm really hoping to give people rides, but I have serious doubts.

05/27/09 - The 3 10-cell A123 packs went into the scooter today. They required significant cell to cell balancing to make each pack equalized. They made the system very responsive due to their low impedance or 'stiffness'. The higher voltage, 30v instead of about 23v, makes the fan spin faster, but mostly it made the system overly responsive. So while trying to do stationary balancing, the scooter would twitch significantly. I was really worried that the twitching was EMI. So I experimented with the wiring and that changed nothing. Adjusting 3 of the parameters (P-I-D gain) helped this alot. It appears that the P-I-D gain settings are directly related to pack voltage. Now there is one quirk remaining. Whenever the joystick is given a forward command, the scooter briefly tilts backwards, then moves forward. I'm experimenting with some of these settings that seem to affect this issue. The high speed has now become very stable since the highspeed oscillating tiltback is greatly reduced. In fact, it feels as though there may not be enough tiltback at high speed for the scooter to keep it's balance. I will experiment with these settings as well. I may even have to turn the top speed down. The stationary balancing is so clean that I can only feel the cogging of the motors as the pwm is applied to them. These are massive driving improvements! The battery alarm was initially set to 25v, but the pack died right as the alarm went off. The alarm threshold was then moved to 27v. The 3 packs in parallel hold the voltage to around 30v for most of the time. At 27v the packs are pretty much empty, but still safe enough to allow dismounting the scooter before it looses all power.

05/26/09 - I tested one A123 lithium pack in 8 and 10 cell configurations. One 8 cell pack is far stiffer than 4 of the old nimh packs that are now 6 years old. So I prepared a second lithium pack today. Tomorrow I'll finish the third and final pack. I decided it was just easier to use the packs as they are right from the Dewalt battery case. 10 cells works fine although I did have to raise the battery alarm threshold a bit. The scooter is a bit smoother overall since the pack does not sag under load. I've been able to reduce the oscillatory tiltback issues. The scooter is definitely going faster than I've ever ridden it. Maybe even faster than Daniel ever rode it was well. I do get a jerk in the drive train every now and then. There might be more EMI since the pack voltage is now around 30v compared to 23v or so with the nimh packs. I already added a couple of ferrite beads to the output of the pwm board. I might put some more on the motor leads too, since they are emitting quite alot of EMI.

I load tested the lithium packs and found that the max charging voltage of 3.7v per cell is not needed. I can charge them to 3.5v and they still deliver 95% of their 2.3 ah. Plus it won't overcharge any of the cells since there is no BMS. I did equalize all of the cells manually before I started testing them. I also check them each charge cycle. So far they are fine. They should make it through the Maker Faire with ease. I will take my constant current power supply to the faire and it is already set to 35v for charging all 3 lithium packs in parallel. Total capacity is about 6.9ah. I did fall over backwards one more time today. I thought I had hit the enable button but I was wrong and over I went. I'm getting good at not hurting myself!

05/25/09 - Today I worked feverishly on getting the software on the scooter working better with the lounge chair mounted. It's fun to drive but has been quite scarey a few times. I have to keep a spreadsheet of all of the software changes. After a few dozen mod's to the software, the scooter runs far better now. The trick is how to get in and out of the scooter since it sits up too high ot just hop into it. I am currently using a step stool for assistance. The scooters driving characteristics are getting more refined. I can do a basic figure 8 in the drive way. Deceleration is directly related to how far back the scooter tilts. So I have to get it to tilt back some more. Tilting back gives me the feeling that I'm about to fall over backwards. Which I've done once already. The next few days will include calibrating the odometer, making four 8-cell A123 Lithium packs, and of course more dialing in of the software. The Lithium packs may require some more software tuning.

05/24/09 - In preparation for this year's Maker Faire, The scooter is getting a few additions. So far it has recieved a speedometer/odometer, joystick control, and a reclining lounge chair. I put the speedometer on a week ago. It still needs to be calibrated exactly, for the the 20 inch tire diameter that the scooter has. The Joystick circuit has taken all of the past 4 days to build, debug and calibrate to the old style, analog joystick pots. I found this great schematic for using a 556 timer to very accurately make a substitute for the R/C receiver in the scooter. This circuit was meant to be used with a 10k pot. The analog joysticks use 80k-120k pots. So I used the math from the 556 website to come up with a value of .022uf for the cap C3. This gave a pwm output of about 0.6ms-2.5ms. Standard R/C pwm is from 1.0ms-2.0ms. So the software in the scooter was tweaked to accept a wider range of pwm. The biggest problem was getting the center position of the circuit to be near 1.5ms, which is the standard center position for R/C pwm. I worked on the 1.5ms issue for a couple of days. When I could make the pwm standard at 1.0ms-2.0ms wide, the center would always be way off. No matter how I tweaked the 556 circuit, I could not get a 1.5ms center unless I went with the wider .6ms-2.5ms pwm. So now I have a good 1.5ms center which allows for centered trim tabs on the joystick.

Yesterday during the first two test drives, I only hit the trash dumpster once! The software has to be tweaked quite a bit since forward/reverse is not driven by the rider leaning either direction. Now it's completely steered by the joystick, and not as quick to respond, due to the scooter having to shift the riders weight instead of the rider doing it.

Having a lounge chair only allows one rider at a time. This makes it a bit scary to allow untrained riders to use the scooter. We'll see how this works out at the faire. The tilting tiller steering is not functional when the joystick is running. This is part of the software. I will leave the tiller hardware in place until I decide how well the joytick works.

Last year a logic safety switch was added. It clips to the belt loop of the rider. In case the rider falls off, the scooter will disable itself when the harness pulls out of the safety switch. I also added a button to activate the same function for being able to set the scooter down without having to shut it off. This button works great for getting into and out of the lounger.

Last but not least, I will try to get 4 packs of A123 cells into the scooter. These are such low impedance cells that it could require software changes. We'll see if there is time.


2008 - At the 2008 Maker Faire, the scooter was a great hit with the crowds since it was totally home made compared to the fancy versions. Little kids and parents drove it quite a lot.

barstool1.jpg, barstool2.jpg, barstool3.jpg, barstool4.jpg, barstool5.jpg, barstool6.jpg, barstool7.jpg, barstool8.jpg

08/05/07 - Yesterday was quite the day. Daniel came over to test pilot this rig. I had made some adjustments to the software that took some of the quirks out of driving the scooter. I felt that the body slamming portion of the code had been dealt with, but needed Daniel's high speed expertise to make sure. It's odd not being the test pilot. So when Daniel arrives the scooter is charged and ready. He puts on the safety gear and starts making cautious passes. The scooter is dialed in for quick response. He's liking that. I even drove him around by radio control for a bit. After several evaluation runs he starts to push the speed envelope. At first cautiously then as he builds confidence that the scooter won't throw him, he is constantly making full speed passes. The scooter is much smoother and stable now. Even the code writer didn't know how to fix some of the things we managed to fix.

The one thing that was annoying was that while sitting still, was that the scooter would oscillate back and forth. So we spent time putting older revision of the code back in to no avail. No matter what we did the scooter kept oscillating. So after several hours of debug attempts, we gave up and needed more data on high speed driving. So Daniel went out and made more passes. It was late enough that it was mostly dark outside. I stood by the garage door as he accelerated to full speed away from me. About 100 feet away the scooter made a sudden right turn, without Daniel on it. He went left. I could see him rolling on the pavement a couple of times. I went running down there before he even stopped rolling. I'm glad I made him wear knee pads, helmet and gloves. He told me he landed right on his knees. The scooter assaulted the neighbors garage door and shrubbery before we would get it under control. Daniel was his normal, cheerful, unhurt self right afterwards.

So we really need to get a dead mans switch installed if anyone has any ideas on how to do that and where to get one.

Here's the story behind the scenes. Earlier in the day when I was making code changes and then test driving the scooter, I had forgotten to unplug the 20 pin ribbon cable to the MOB board during the re-programming of the processor. Since I power up the MOB board externally for programming, it has to be disconnected from the OSMC's or the OSMC's come on and try to drive around. Plus the 12v switcher circuits on the OSMC's try to regulate the external power source. Herein lies the issue. Since I had forgotten to remove the 20 pin ribbon cable from the MOB, when I fired up the 12v, 32 amp power supply, it gave all the juice to the little 12v switcher that it could ever want, and let it try and regulate it. This switcher is a little 8 pin dip chip. So it cracked in half and let out a fair share of magic smoke. Crud. These are sacred Max Wedge, never been damaged before electronics! Oh well. So I put in a spare OSMC board and moved on. The scooter from that time on, still had the oscillation that we worked so hard to try and remove. Even after I repaired the first board and we put it back in, the oscillation was still there. By oscillation I mean the scooter rocks back and forth hard and fast enough to crack your shin bones.

So why did Daniel crash? The MOB board had been effected by the smoking of that OSMC switcher chip. It had damaged one output buffer chip and the microprocessor on the MOB board. With Daniel making several high speed runs in a row, he threshed out the issue by making the weak parts finally give up the ghost. When I did the post mortem on the MOB I found that it was drawing 150ma instead of it's normal 30ma. Plus the processor and one buffer were getting warm. Hint hint. After I swapped them out for new parts and reprogrammed the MOB, then the board was it's shiny new self again.

Late last night Daniel needed to get home, nearly an hour run via rail. So I reassembled the MOB and the scooter electronics by myself and started some cautious slow speed driving. The scooter did not oscillate any longer. It's now set up again and ready for more high speed testing. It's not like we're going after a speed record or anything....

-Mike


08/01/07 - This weekend I was tossed head over heals from the scooter. Missed a half day of work Monday. Last night we found out that some settings in the software were not correct. But to make sure, I had Daniel wear my gloves and motorcycle helmet during his high speed run. The scooter launched him from the standing position. He kept his balance and I got to see the event occur safely this time. Sure enough the scooter just stopped balancing and digs the front end into the ground. Learning from my event, I added fixed caster wheels to the front and rear of the scooter for Daniel's test run. That keeps the scooter from flipping over and landing on you after the steering arm smacks you in the family jewels....

So now the software will get tweaked and should work correctly at full throttle. The titanium spring for the steering is working great. It could use a bit of damping. Once we get the system dialed in better than it may be time to bump it from 24v to 36v. That will require re-tweaking everything. But right now we are still roughing in the settings, so on 36v it won't be a complete repeat of labor.

Right now all of the hardware and batteries from Max Wedge are working just fine. Nice to see the parts get recycled into a cool project. Lithium packs are a possibility. 10 parallel, 10 series (10p10s).

Also got the Redhat Linux Live CD (Moonshine) to run. So the Perl software turns out to be very useful for dialing in the scooter on most items prior to driving it.

The last thing we got working was the radio control part of driving this scooter. The software had to be dialed into my JR receiver. We had the dual rates and ATV at maximum but still only got the bot to creep. So last night I worked on getting the software to react more actively to the pwm pulses. So now the scooter should drive like a bot on a mission! A two wheeled balancing combat ready bot....

-Mike


07/24/07 - Pic's!! Daniel came over tonight and snapped these with his Iphone. We've figured out a nice steering mechanism using Titanium as a spring. This was inspired by the Battlebot named Red Square. scooter1.jpg, scooter2.jpg, scooter3.jpg, scooter4.jpg

-Mike


07/23/07 - Got the turning dialed in tonight. The scooter drives nice. Now if I could just get the platform done and a joystick added. I need an old potentiometer style joystick. The smaller the better.

-Mike


07/22/07 - Man, I should never do machining or Gcode when I'm this tired. I made all kinds of stupid mistakes. But at least the parts are usable and working. I took a ride on the beast late last night. The software is tuned for 6" tires, so with 20" tires it would start to over react and try and kick me in the shins multiple times. I stood on the platform and rode it around the garage. The barstool is good for a handhold but not great for a sit and ride yet. I'll dial in the software some more and see how it goes.

-Mike


07/21/07 - The machining of the hubs has started. I was given the print for the hubs but they are a bit distorted from the pressed in bearing holder. So I now have to slowly tweak the Gcode to get the cuts to come out right.

.9 parts done, 3.1 to go.

-Mike


07/19/07 - The 20" BMX wheels and tires came in today. Very nice. 110psi. Now it's time to clear up the area and get some machining done.

-Mike


07/17/07 - Right now the scooter is set up to require a laptop to change the PID values if the wheel diameter changes. There will hopefully be an LCD display at one point. On the original MOB board there are buttons for scrolling thru a menu to make changes. That is how I was thinking of adjusting some parameters. That code would have to be far different to work in the scooter's software. So fancy options require code skills I don't have.

I think the balance becomes a bit softer as the pack wears down. I'll be tracking pack voltage at some point so I can find out for sure. Right now I am waiting for wheels to come in. Then I have to make the adapters for them. So maybe this weekend it could be Banzai time.

-Mike


07/16/07 - I hoping this gearhead group can offer some suggestions for steering. Right now the initial steering will be done by a potentiometer. You twist it CCW to go left and CW to go right. It would be much nicer to have a way to make a 'handlebar', or joystick or operating lever for the steering. I think it would be much more intuitive that way.

I thought of somehow using a flat .100 Ti piece as a spring to allow a vertical pole to tilt right or left, turning a pot somehow, for steering.

Any other ideas?

Today two neighbor kids and myself tested things out. I had them stand on the base plate as well as sit on the bar stool to keep their balance. It even got to the point that I could push on them and mess up their hair and they would keep their balance. I have the gain settings up very high. With a person on board the oscillation is very dampened.

When the 20" wheels and 110psi tires get here in a few days, I can start to make the hub adapters and maybe have a rideable plywood prototype scooter by the weekend.

Since the base is the same width as my ti wedge, I can add it on and enter the SHW class with the first manned combat robot.

-Mike


07/15/07 - One thing that struck me this morning is that the gear reduction in my T64's could be far different than in the fellow who started this project. So I doubled the value all of the PID variables and now the scooter is balancing better. I bolted a bar stool to it so it has more work to do when it gets off balance. It's a little jerky, but it's basically functional.

-Mike


07/14/07 - I have 3 sets of ribbon cables and at least one of them fried the output driver for the MOB's. After replacing the damaged chip the bot now works on the bench as it should!! So tomorrow will be balance testing day!!!

So all of the hardware is now mounted on the plywood test base. I even cnc machined (that was fun!) some new colsons to fit the npc's. I've powered it up, the wheels start to spin automatically. The R/C receiver does not seem to influence it very much. Even the directional potentiometer is not doing anything. But tilting the base up and down does cause it to go from fast to nearly stopped. But both wheels only spin in one direction. Now it's debug time.

-Mike


07/12/07 - Tonight Daniel and I had a design review meeting. We looked over the mounting of the motors and electronics.

The first gyro board had a channel go bad. The second one that I ordered is working great. Below is a pic of how the gyro board is mounted between the MOB board and the upper OSMC via a 90 degree SIP header. You can see the symbols X--> and Y--> on the gyro board. This beast could get it's first 'wheels down' test this weekend. gyroboard3.jpg

-Mike


07/10/07 - So don't laugh, even Max Wedge started out this way. The wiring harness is in fact the harness out of Max Wedge. Looks like a good fit. clonepic1.jpg

This tiny circuit board is the gyro/accelerometer board that balances the scooter. It had a channel suddenly go out. The factory is allowing me to return it. You can see that someone worked on it before I got it. I have another one on the way. gyroboard2.jpg

-Mike


07/07/07 - Tonight I should have been out goofy off like Daniel is, but I was just dying to get this hardware running for our attempt at a Segway clone. So I have worked on it today for going on 18 hours now. Hmmm, feels like the old combat days....

The gyro board arrived today. I wired it up to the MOB. Still the pwm output was rock solid, which is good, but nothing seems to make it change width. So after reading the emails from our software guy, there were some things that needed to be changed. So I changed them, recompiled the software (like I know what that means!), and now the pwm output changes with movement of the gyro and with input from the R/C receiver. Sweet!

So it's time to look at building a wooden prototype platform for testing. I suppose I better get the wheels and tires on order too.

-Mike


07/06/07 - For now anyway, we are going with the MOB/OSMC based version of this scooter. Having 3 MOB boards and 6 OSMC's at home make it a fairly easy choice. The MOB gets some new code. So far I've been able to get the code to work. The serial port is spewing correctly and there are nice steady square waves being generated. I've got it in my head that it would be very cool to have the MOB's LCD display on the handle bars for monitoring and changing stuff. That takes some code hacking, or in reality, cutting and pasting to make it work. Yeah, like I know what I'm talking about ;)

I think I can take the OSMC's out of Max Wedge, along with the lexan housing and use it in the scooter. Due to low current demand I'm not sure if a cooling fan will be needed. Only testing will tell. At least some parts of Max Wedge will get recycled. *sniff*. At some point the nimh packs will get used too.

I've got a couple parts orders in. If they come in on Saturday then more hardware assembly and testing can take place.

I've decided to use 20" BMX wheels made from glass filled engineering resin as they are easy to machine adapters for mating them to the NPC output shafts.

Daniel and I have discussed being able to sit or lay prone on this scooter for commuting. That would take a joystick to steer it. Also the scooter will have R/C inputs so it can be driven by radio control. That could be handy for hard core drive testing without endangering the Red Bull laden teenage test pilot ;)

-Mike


06/21/07 - Well Mike and I got back from Anybots today (http://anybots.com/). That had some really awesome stuff! We really got to talk to Trevor and figure out all the details about his segway clone. We were also able to get some boards from him so we can start building the up the electronics.

Sorry for not being able to take any photos as i had promised =/ my camera's battery died. I was able to take a shot of their robot being demoed, with my cell phone.

Right now I'm going through a bunch of different designs, and trying to get something i like.

I'll post some CAD screenshots when i have some time! =P

--Dan


06/20/07 - Alright,

Mike Phillips is now helping me out with this projects, and building a scooter for himself. We are both heading over to Trevor's shop tomorrow to talk to him about his Segway clone, and get some tips and advice from the pro. After seeing Sir loin with Li-polies in his heavyweight at RG, i was wondering what kind of specs i would need if i wanted to run li-polies on my clone with two NPCs on 24" wheels. I will most likely use battle packs, but i just wanted to wrap my mind around what it would take to run with lithium. would 25C discharge cut it? or would i need more?

I'll post pictures from our trip when i have a chance!

--Dan


05/29/07 - Well i thought because this project will be rolling along, i would make a thread for it.

After attending Maker Fair this year, i got to talk to Jordon Ross. He's a kid my age(17)who built his own copy cat of Trevor Blackwell's Homebuilt Segway (http://www.tlb.org/scooter.html). It was so much fun! It's so natural to ride it around, I had no idea.

I was originally going to make an electric scooter, but now i have changed my focus to build a Segway. I also think it is a much better investment, because i will be the only one at my high school who has something like this =P

I really want to make something that is noticeably different from Trevor's Segway if possible. Here is what i'm looking for:
-Unique
-Compact (can take on the train, get through doors...etc.)
-Hits 15Mph no problem
-~15 Mile range (more the better)
-Sleek look
-doesn't fall over when you lean forward =)
-20" pneumatic wheels (or something similar)

I have a job at a tech start up in mountain veiw, CA. so i can afford setting my budget at 3-4k on this guy. (would take me a few months of savings and working over time =) But i will probably go to this forum to see if i can get second hand parts and make the entire thing for as low as i can.

I was originally thinking about using NPCs (probably T-64) for the drive, but i thought it would be nicer if i could go with something that is a bit smaller. I still want it to be an easy ride for the motors, and Steve explained to me why the Magmotors may not be the best fit. I also will probably end up using battlepacks, unless i can get my hands on some A123 Cells.

Anyone have any ideas?

If i can't think of anything else, i will go with NPCs and make the whole frame as small as possible.

I am very open to any comments and input for this project, i really want this thing to turn out nice. I can't think of a better place to go to for help! =P

Thanks!

--Dan

I saw this guy and was impressed. I think i will use nice anodized bike parts on my Segway =)