ProtoBox - Junk balancing bot
ProtoBox - B
After experimenting with my Doubtful balancing platform for a while (http://letsmakerobots.com/node/34811), I realized that the motors/gearboxes are simply too weak, too loose and too slow. They were not purchased for that solution anyhow, just happened to have them around to I gave them a try. Obviously a better solution will be needed and search is on.
Sooo while researching for better gearmotors or a solution, I took the Doubtful code, pulled out my old reliable "ProtoBot" platform from years ago and started experimenting.
Simply turning it up on end, putting the battery up top and adding an IR sensor for tilt angle measurements I get this. This old platform has been around forever as my experimental, or "ProtoBox" platform and has been used with an 68HC11 CPU, a Basic Stamp2, tested with dead reckoning, had different sensor holes drilled and moved around and much more. The old servo based drive motors - and I mean OLD - liked 15-20 years old are just gear boxes. I actually had to replace one due to just being just plain worn out and will replace the other soon.
The servos STILL do not have enough speed to catch anything besides a minor angle correction but they are at least powerful and tight enough to keep the platform upright for extended periods of time and provides a good base for me to continue to play with and tweak the balancing code for this approach.
The platform is very simple; an old Basic Stamp 2 dev board, H-Bridge motor driver, battery and a couple switches and LED indicators and a single Sharp IR sensor. I've run both my normal H-Bridge driver board and the locked Anti-phase one and really do not see much difference. I had thought the locked anti-phase may hold the position better but in reality it seems to have more jitter than the other board.
The green LED lights up when no motor drive is being used, i.e. generally balanced, and the small red lights up when full drive is needed and applied. Just debugging stuff more than anything but has been handy. The bot has a tendancy to slowly lose it's balance backwards over time which I am attributing to the non-linear readings from the IR sensor as the distance changes. I.e. there is more difference leaning forward / shorter distance than backwards. I may play with applying a gain factor to backwards leaning only in the PID to see if that helps.
Overall it can generally balance on carpet for 10 minutes or more in most cases. I can add differential gain to left/right motors to get rotation but will have to work with adding error to the tilt values to try to move forwards/backwards... if that ever works. It really isn't that stable.
Having looked at the output from the sensor it doesn't output much range which forces the P value of the PID to be set pretty high and forces more oscillation during operation. Fun to watch it do it's thing though.
I haven't given up on Doubtful, just going to replace the base with some different motors/gearboxes to play with later.