Wednesday, March 16, 2005

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.

No comments: