- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi everybody!!
actually i´m working to control a servo motor i read that the frecuency is 20 hz and the duty cycle is 1,1.5 and 2 ms
i´m using pwm16:
parameter pwm16
clock = 1,000,000
period= 49,999
duty cycle = 999-> 1ms->0°
1499-> 1.5ms -> 90°
1999 -> 2ms -> 180°
but the servo doesn´t work correctly don´t go to the correctly position and keeps vibrating and i don´t understand why,so if someone help me i´m really be glateful
i put my code if someone can check it
- Labels:
-
PSoC 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here are some pointers.
Have you observed the output of the PWM on an oscilloscope to find out if the expected frequency and duty cycle is being generated?
How are you deriving the 1MHz input clock to the PWM?
What is ClockSync parameter set to? The right setting would be SyncToSysClk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Is the servo motor getting sufficient current?
If you are using the power from a DVK, make sure the regulator can supply the required current to the servo.
Also, archive (ZIP) your project and post it here, so that others can have a look at the code.
Regards,
Arvind
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Problem solved in other post.