control the speed servomotor

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

cross mob
Anonymous
Not applicable

hello i use the psoc 5LP  but i can't control the speed of my servomotor mg 995, what should i do to control it   thanks 

0 Likes
1 Solution
JobinT_31
Employee
Employee
50 solutions authored 25 solutions authored 10 solutions authored

Hello,

Servo motor works on PWM (Pulse width modulation) principle, means its angle of rotation is controlled by the duration of applied pulse to its Control PIN. So by changing the PWM compare value from low to high[angle 0 to angle 180] in a single step you will get the maximum speed.

To decrease the speed,  when motor rotating from angle zero to 180.

for (i=0;i<=180;i++)

{    

     ServoAngle_Write(i)

     CyDelay(X);

}

By changing the value of X, we can change the servo motors arm rotation speed.

Thanks

Jobin GT

View solution in original post

0 Likes
1 Reply
JobinT_31
Employee
Employee
50 solutions authored 25 solutions authored 10 solutions authored

Hello,

Servo motor works on PWM (Pulse width modulation) principle, means its angle of rotation is controlled by the duration of applied pulse to its Control PIN. So by changing the PWM compare value from low to high[angle 0 to angle 180] in a single step you will get the maximum speed.

To decrease the speed,  when motor rotating from angle zero to 180.

for (i=0;i<=180;i++)

{    

     ServoAngle_Write(i)

     CyDelay(X);

}

By changing the value of X, we can change the servo motors arm rotation speed.

Thanks

Jobin GT

0 Likes