Picaxe PWM and servos
October 18, 2009
I have tried using picaxes PWM outputs on 2 robots now with limitted success. The biggest problem I have is that the PWM frequency although adjustable is very high (typically 16KHz with a 16MHz resonator). This causes the windings of the motor to have a much higher impedance resulting in poor torque. When I use the setfreq command to drop the clock speed very low (500KHz) then I get good torque even with a low dutycyle but the processor is so slow it is almost asleep.
I have considered using the PWM output to generate an analog output and then convert that into a low frequency variable dutycyle output but this still leaves me with problem #2. The servo command and PWM command use the same timer. I had hoped that this limitation would be eliminated with the X2 chips but unfortunately not. You need to alternate between using servos and controlling the speed of DC motors with one turned off while using the other.
I am now looking at the X2's timer 3 as a possible solution to PWM driving my DC motors.
It seems that the PWM command is more trouble than it is worth. Has anyone else used the PWM outputs much? What has been your experience?