Pages

Wednesday, March 27, 2013

Guzunty Pi PWM frequency for servo control


Now I need to find the best PWM frequency for a servo, under the following constraints.

It appears that Guzunty Pi divided down its clock input 7 stages.  So if the input is 14.4KHz, after 7 stages it is 450Hz, with a period of 2.22 mS.  Then duty cycle 31/32 == 2.15mS, and 13/32 duty cycle = 0.9 mS


*** Rough work. ***

1. Minimum repetition rate = 1/20mS = 1000/20 Hz = 50 Hz

2. Minimum pulse width = 1 mS CCW limit

3. Maximum pulse width = 2 mS CW limit

4. Middle position = 1.5 mS enutral position

5. Maximum duty cycle = 31/32 == 97%

6. Minimum duty cycle = 1/32 == 3%

For minimum repetition rate of 50Hz, 100% duty cycle = 20mS

For 500Hz repetition rate, 100% duty cycle = 2mS

For 475Hz, repetition rate = 2.1mS this appears to be the best rate.

I used Excel to find that a 2 Mhz clock divided 12 times = 488Hz.  This seems to be the best clock and


1843200
921600
460800
230400
115200
57600
28800
14400 input to Guzunty Pi clock in
7200
3600
1800
900
450 Hz PWM output  period = 1000 mS / 450 =

No comments:

Post a Comment