Wednesday, March 16, 2005

Tamiya gearmotors to go!

The higher frequency didn't help at all. It seems to turn suddenly sometimes and I really thing that is related to the increase in resistance to hand-turning the wheels sometimes. You can rotate the wheels easy for a bit, but then it will suddenly get hard. It doesn't do it as much if you rotate the wheels fast, but it sure is noticeable rotating them slow.

I can't be sure that is the problem though. I guess maybe I should wait to get Mike's encoder kits so I can confirm that the speed of the bot is not changing in phase with the speed of the of the PWM. In the mean time I'll investigate mounting wheels to other motors. Maybe the nice ones Tom gave me.

PWM Speed?

I was looking over a page full of links that Terry posted on Chibots and saw one called something like: choosing the correct frequency for a PWM motor. I popped over and basically it said about 9kHz to 25kHz for motors under 2Amps. I looked up my code and determined that I was using Fast PWM mode with a prescale of 8. At ~8Mhz (internal osc) that comes out to 3.9kHz. The next lower prescale option was 1, however, and that would have put me at 31kHz.. too high. It turned out that I could get a factor of about 2 in there simply by using Phase Correct PWM instead of Fast PWM. So now I can do a prescale of 1 and get a 16kHz base freqency at 8Mhz on the MCU. That's right in the suggested range. The real questions is, will it make much difference to the motors' reaction times? (Assuming reaction speed is really whats wrong.)

It could be that my bot is just too damn heavy. It's like 30oz.

Another thing I can try it to change the gearing on the Tamiya. I'm not sure I have the gears or the manual that tells me how to do that any more so I might have to buy another just for that. I can't remember if I put the gearbox in high-torque or high-speed mode. It was a LONG time ago. Tonight I will look for the box and if I can't find it I will pop over to HobbyTown to get another one before the Sat. BDO.

Friday, March 11, 2005


Nothing I do seems to have much effect on the behavior of the bot. There is always this long delay before a change in PWM output shows up in the line postion detection. By then it is way too late and the bot is wildly out of control. I am increaseingly convinced that my motors are way under powered for this application. I wish I had some encoder rigged so that I could verify a difference between PWM output and motor responce. Posted by Hello

Thursday, March 10, 2005


So Tom gave me these really cool gear motors that I suspect are much better than my plastic Tamyias. With the longer stand-offs for the IR sensor they will now fit on my bot. The issue of course is affixing the motors to the chassis and a wheel to the motor. I'll need a specific radius and width wheel for my IR sensors. How shall I find such a wheel? How wil I also make it match the shaft? Posted by Hello

Saturday, March 05, 2005


Well. Niether basic downshifting nor P-only control seems to be able to keep my bot on the line. You can see the big delay in the reaction to the right PWM's downshift. I'm guessing I need to reduce my my P-factor and add in an integral term with maybe some reset rules. Posted by Hello

Maze Bot Under Own Power

Today is a good day. The maze bot is running under its own power!! Right now it is running a debug program designed to get it to follow a line. The Tamiya gearmotors seem to have a lot of variability and even seem to jam occasionally. That really sucks. I may have to ditch them. I hope I can find replacements that will not screw up my geometry too bad.

Tuesday, March 01, 2005


Minor update. I've screwed a nice big chipset heatsink onto my 7805. It just gets warm now instead of scalding hot. :) Also got my reversed sensor cables to the MPU fixed. I have calibrated the senstivity for my apartment and am getting good individual detection from each sensor with no light shield. I'm sure perfromance will degrade under flouresents but I can deal with that later. Finally I fab'ed a cable between my MPU and H-Bridge. Just have to connect the motors to the H-Bridge and the wiring on this bot is DONE! I will sure be cool to see it try to follow a line for the very first time. I wish it didn't take me the million years it did to get the bot this far along though. Hopefully some experiance and the BDO facilities will help overcome my various barriers. Anyway, tommorrow its off to Atlanta for two days so no bot stuff. However my gf and I decided to take this weekend easy since last weekend was so crazy. Hopefully I'll get to fire up the bot under its own power this weekend!! Posted by Hello