Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

How Servo Work

Status
Not open for further replies.

koolguy

Active Member
Hello Guys,
I remember i had used Servo last 2 year back with PIC ADC to Servo with some forum member code.
I have this Servo with me
hxxp://robokits.co.in/motors/standard-dual-ball-bearing-servo
data sheet
I want to know how it work, there are 3 pulses of different width , it it will rotate at small angle the data sheet show 90 and 60 degree of movement if i want to move 20/30 degree
How to move it?
 
Last edited by a moderator:
Servo's need a certain pulse width... 1.5mS will put the servo at 90° 1.0mS will put the servo at 0° and 2mS will put it at 180°

So 45° will be 1.25mS

Code:
while
   turn on servo pin
   delay uS 1250
   turn off servo pin
   delay rest of cycle
 
I forgot how to calculate i dnt remember school calculation.
something like : 1500/90 =16.7 ........
 
Then I really think you should consider gardening or some other simpler hobby, because electronics is clearly not for you. This is not some advanced mathemathics, this is third grade stuff.
 
How many micro seconds in one milli second.... 1000... You need to specify micro seconds for accuracy!!

If there are 180 degrees spread over 1 milli second you need to divide it by 180 to get the size ( in microseconds ) of each degree!!!!

Therefore 1000 uS / 180 degree = 5.5micro seconds..... 45 degrees will be 45 * 5.5 micro seconds... That equals 250 micro seconds... Then you have to add in the 1000 micro seconds that represent 0 degrees.. Voila 1250 micro seconds...
 
Is this true Electronics is to high.
i do it because i can earn more money with this subject.

You won't earn any money if you can't do it!
 
How many micro seconds in one milli second.... 1000... You need to specify micro seconds for accuracy!!

If there are 180 degrees spread over 1 milli second you need to divide it by 180 to get the size ( in microseconds ) of each degree!!!!

Therefore 1000 uS / 180 degree = 5.5micro seconds..... 45 degrees will be 45 * 5.5 micro seconds... That equals 250 micro seconds... Then you have to add in the 1000 micro seconds that represent 0 degrees.. Voila 1250 micro seconds...
Can't we have less than 1* degree movement in servo
 
How many micro seconds in one milli second.... 1000... You need to specify micro seconds for accuracy!!

If there are 180 degrees spread over 1 milli second you need to divide it by 180 to get the size ( in microseconds ) of each degree!!!!

Therefore 1000 uS / 180 degree = 5.5micro seconds..... 45 degrees will be 45 * 5.5 micro seconds... That equals 250 micro seconds... Then you have to add in the 1000 micro seconds that represent 0 degrees.. Voila 1250 micro seconds..

yes you are right​




Let see the Servo is at random position ........etc etc
i am thinking the internal circuit how it work i am not getting!
 
In a cheap servo.... You'll be lucky to get ± 2°..

The other concern is there will be some noise.... Realistically you would need to use a hardware CCP to generate the PWM.... BUT!! there has to be an off time... most people use a 20hz pwm

EDIT*** Sorry I meant 200hz ( 5ms period )
 
Last edited:
Status
Not open for further replies.
Back
Top