control a servo motor with a PSoC card

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
gbrochard
Level 1
Level 1
First question asked Welcome!

Hello

currently high school student in Terminal STI2D in france, i need in the frame of my classes, control a servo motor with a PSoC Card. Despite a many research in web, I can't find any information.

could you help me. Please.

 

Cordially

 

Gabin BROCHARD

0 Likes
1 Solution

gbrochard,

To summarize Wiki, to control a servo you need to generate a train of short pulses (between 1ms to 2ms long), repeating each 20ms (50Hz). When pulses length is 1ms, the servo is in 0deg position, and for 2ms pulses it rotates to 90deg position.

     The pulse train can be generated by various techniques, the simplest one would be using  PWM block in a Single Shot mode, triggered by a 50Hz clock. When PWM Compare register varies between 100 to 200 (using 100kHz PWM clock), the output pulse will change from 1ms to 2ms. 

     For more meaningful help, please provide the servo's part number. 

View solution in original post

0 Likes
3 Replies