DC Motor HAT frequency

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
alager
 
Posts: 2
Joined: Fri Jan 06, 2023 4:34 pm

DC Motor HAT frequency

Post by alager »

I'm not finding much info on how to correctly set the PWM frequency. Using the Arduino interface, the AFMS.begin() function it looks like the math should support going up to 4kHz, but the max I can get is the default of 1.6kHz.
My target is to get 40-50kHz square wave for an ultrasonic driver. I read through the PCA9685 datasheet and it looks like that should be achievable. Maybe there is a different API I should be using?
Thanks for your help!

User avatar
adafruit_support_bill
 
Posts: 88088
Joined: Sat Feb 07, 2009 10:11 am

Re: DC Motor HAT frequency

Post by adafruit_support_bill »

The max that the pca9685 chip can achieve with its internal clock is about 1.6KHz.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino Shields from Adafruit”