Servo Controlling using PIC16F877A

Status
Not open for further replies.
oh i see.. and by the way im using a hobby servo for this.. i should be able to get this now. how about the speed? how will i control it? thanks!!!

The speed of the servo depends on the model. the are usually quoted as 0.22 sec/60 degree at 4.8v, this is the rating for a futaba S3152. If you wish to control the speed from 1 position to the next, rather than just entering the end position and allowing the servo to operate at its normal speed, you will need to move the arm by slowly increasing the pulse width until it is in the required position.
 




hi. ive already done this program. but it doesnt move to a 45deg its just about 20degrees then goes back to initial position every 5seconds.. at which part of the program should i alter to change the angle or position of servo? and also to alter the 5 seconds delay?.. i understand why the delay is set to 1.5ms but i dont know why is it 18ms on the other part of the delay.. thank you very much.
 

Hi,

Well the code sends my motor 45 degrees , 1/8 of a full revolution, every 5 seconds.

Are you running it on actual hardware or simulation ?

What is the motor and model number you are using ?

What kind of 5v power supply have you used ?

The 18ms is the fixed interval between the control pulses 1-2 ms.
The servo must reveive the control pulses at regular intervals of approx 20ms.
 

Just to expand on what WP100 says. Try this link it explains the basics of servo operation.

**broken link removed**
 
Last edited:

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…