Pages: [1]   Go Down
Author Topic: How does SERVO work?  (Read 350 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Interestingly, arduino documentation to servo library http://arduino.cc/en/Reference/Servo tells us that servo data wire can be connected to any pin.
Somewhere back in my skull information is stored that servo is driven by PWM,using pulse width as a mean how to tell angle to servo.Is that right?

If servo can be driven by no-PWM pin,mean that arduino tells to the servo new position,wait upon servo movement is completed and subsequently executes following code?
If so,after servo movement completion,can servo keep position (against spring for instance) even if void loop() does not pass thru servo.write command very soon?

It simply does not take much sense...

My project is very timing dependent and waiting to end of servo movement would completely disrupt it.

Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 331
Posts: 16514
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
If servo can be driven by no-PWM pin,mean that arduino tells to the servo new position,wait upon servo movement is completed and subsequently executes following code?
If so,after servo movement completion,can servo keep position (against spring for instance) even if void loop() does not pass thru servo.write command very soon?

It simply does not take much sense...

No need to be concerned. The servo.write command causes the last position code you wrote to the servo to be forever repeated automatically every 20 millisec at the output pin wired to the servo as the servo expects to see, all interrupt driven so you do not need to do anything about it other then issue servo.write commands to the position(s) you want the servo to go to. It's all interrupt driven so as long as you don't turn interrupts off you have no concerns.

 Keep in mind that in your code you can have no direct knowledge of then the servo actually reaches the position command you send it, as there is no feedback signal from the servo to the arduino that it has reached that last position commanded, or if it's still moving to get there.

Lefty
Logged

Pages: [1]   Go Up
Jump to: