Instead of figuring out my DIO issue, I have been analyzing the effect of PWM_frequency on the no load minimum drive to start turning for each of my bot's motors.
- Code: Select all
# Empirical settings for minimum drive to turn each wheel
# PWM_frequency dependent, PiDALib default is 490
# PWM_f RMotorMinF LMotorMinF
# 10000 215 185
# 490 83 73 <--
# 100 34 33
# 33 22 20
The RugWarriorPro designers, (Joseph Jones, Anita Flynn, Bruce Seiger - not necessarily in that order), chose a PWM frequency of 30 (32.77ms period). That choice may have been a convenient clock divider register available in the 6811 processor rather than motor optimization.
It is interesting to note that at lower PWM_frequency the motors start to respond at closer values of drive level. Since I don't have the DIO working, I haven't connected to the encoders to see how the speed derived bias acts.
It may be that I can drive slower with the higher PWM frequencies. It seems like at the minimum start drive level, the wheels are turning slower with higher PWM freq. If this proves out, that is a clear advantage for the default PWM frequency of 490 over the "original robot" PWM frequency of 30.
As long as I keep the drive above the minimum start level, I don't really hear the PWM frequency at 490. At 33 the startups can sound a little chunky.
For the time being at least I plan to:
a) leave the PDALib PWM_frequency at the default 490
b) use the start bias (RMotorMinF-LMotorMinF) to make both start at the same time
c) use the larger MotorMinF as the MotorsMinF for reliable start of both wheels.
Eventually I'll get fancy with closed loop speed control, but I need something simpler to get started with.