adafruit / Adafruit_CircuitPython_MotorKit

CircuitPython helper library for the DC & Stepper Motor FeatherWing, Shield and Pi Hat kits.
MIT License
86 stars 31 forks source link

Add PWM frequency getter/setter and init keyword argument #37

Closed CedarGroveStudios closed 3 years ago

CedarGroveStudios commented 3 years ago

Allow adjustment of the PCA9685 PWM frequency to be lowered to increase low-speed DC motor torque. Retain the default of 1600Hz for other purposes.

Setting a PWM frequency of < 125Hz will significantly lower DC motor spin threshold and increase low-speed torque. Tests were performed with RF-500TB12x/18x and TT-gearbox motors.

ladyada commented 3 years ago

im into it - would you be interested in doing a learn guide writeup of your analysis? i find it fascinating you really did the research :D

ladyada commented 3 years ago

@dherrada oi this failed in the precommit changes between the PR and merge ... can you do this repo next ?

CedarGroveStudios commented 3 years ago

@ladyada Let me think about an approach to a learning guide. Perhaps a short addendum to the existing Adafruit Motor Selection Guide?

I used the first prototype of a DC motor testing apparatus design to conduct the PWM frequency analysis and plotted the results using mu. The tester can measure torque, RPM, and operating current/voltage. I'm in the process of replacing the optical RPM sensor and trying to figure out a dynamic torque loading scheme for the brake motor.

image

ladyada commented 3 years ago

yeah! its heckin cool!