Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Motors (http://www.chiefdelphi.com/forums/forumdisplay.php?f=52)
-   -   How do the servos work? (http://www.chiefdelphi.com/forums/showthread.php?t=24764)

tml240 04-02-2004 16:56

How do the servos work?
 
our team was wondering how the servo works
i searched and cant find the threads...

thing we need is we want to turn the servo backwards after the servo makes full rotation

our program in Turing doesnt seem to work either...

Kris Verdeyen 04-02-2004 18:03

Re: How do the servos work?
 
Quote:

Originally Posted by tml240
our team was wondering how the servo works
i searched and cant find the threads...

thing we need is we want to turn the servo backwards after the servo makes full rotation

our program in Turing doesnt seem to work either...

The main problem you have is that hobby servos won't make a full rotation. They tend to be limited to around 180 degrees, and have no internal feedback to allow you to know when they've reached their holding point, so you'd need an external limit switch to feed that back, and let the code know when to reverse.

zainali 04-02-2004 18:14

Re: How do the servos work?
 
Quote:

Originally Posted by Kris Verdeyen
The main problem you have is that hobby servos won't make a full rotation. They tend to be limited to around 180 degrees, and have no internal feedback to allow you to know when they've reached their holding point, so you'd need an external limit switch to feed that back, and let the code know when to reverse.

We don't want the servo to rotate more then it is doing right now.But we were wondering if servos can be made to rotate backwards. This is because everytime you make it turn you have to manually twist it back to its starting position to make it turn again.

So can the servos actually be made to move backward, if so what type of signal or the code should you use.

As far as what i have researched and what you just said about their limit of 180 degrees matching, and the only way to modify would to be to take it apart and modify it internally ?? right..

your help is appreciated, this is my first year on the competition so do forgive me if these are newbie questions

thanks

Mike Soukup 04-02-2004 18:30

Re: How do the servos work?
 
Quote:

Originally Posted by zainali
We don't want the servo to rotate more then it is doing right now.But we were wondering if servos can be made to rotate backwards. This is because everytime you make it turn you have to manually twist it back to its starting position to make it turn again.

I think you first need to understand how a servo behaves. Unlike a motor, you do not give a servo a speed, you give it a position. If you directly map a motor to the y-axis of a joystick and push the stick half way forward, the motor will run at half speed until you release the stick, then it will stop. If you do the same with a servo, it will rotate half way to one end and stay there, then when you release the stick it will return to the middle. The servo is actually a motor and a potentiometer all in one, it performs the whole feedback loop for you. You give the servo a position (from 0-255) and it goes to that position and stays there until you give it a new position. They're actually pretty cool little devices.

zainali 04-02-2004 18:35

Re: How do the servos work?
 
Quote:

Originally Posted by Mike Soukup
I think you first need to understand how a servo behaves. Unlike a motor, you do not give a servo a speed, you give it a position. If you directly map a motor to the y-axis of a joystick and push the stick half way forward, the motor will run at half speed until you release the stick, then it will stop. If you do the same with a servo, it will rotate half way to one end and stay there, then when you release the stick it will return to the middle. The servo is actually a motor and a potentiometer all in one, it performs the whole feedback loop for you. You give the servo a position (from 0-255) and it goes to that position and stays there until you give it a new position. They're actually pretty cool little devices.

so how would i make it come back, well we were just testing the sevo using Turing We made it output 1 with a small delay and looped it.

So how would i make it come back???? we tried to output 0 but it doesn't come back any ideas???

steven114 04-02-2004 19:07

Re: How do the servos work?
 
127 is the center, not 0. 0-126 is one direction, and 128-254 is the other direction from the center.

deltacoder1020 07-02-2004 01:01

Re: How do the servos work?
 
essentially, when you output 1, you told the servo to rotate almost as far as it can in one direction (almost, because the minimum is 0, but there's little difference). thus, outputting 0 wouldn't make it come back, only turn a fraction more in the direction it already was.

dead center would be outputting 127. try that.

likewise, to make it turn in fully the other direction, output something towards the upper end of the range, such as 254.

tml240 07-02-2004 12:46

Re: How do the servos work?
 
are the servos in digital or analogue?

steven114 07-02-2004 22:28

Re: How do the servos work?
 
Well, considering that they vary from 0-255, they are considered analog. But, a more useful answer might be proposed if you explain more about what you want to know... (e.g. why does it matter?)

Justin Stiltner 09-02-2004 15:57

Re: How do the servos work?
 
You might want to think of it this way, output the data to the servo just like you do with a speed controller, ie if you want to center it send 127, full reverse 0 and full foward is 255. however insted of full foward and reverse you would have fully clockwise and fully counter clockwise. As somebody else suggested, map the data from an joystick to the servo output and print the data to your laptop and you will see what we are talking about.

Al Skierkiewicz 09-02-2004 17:26

Re: How do the servos work?
 
Quote:

Originally Posted by tml240
are the servos in digital or analogue?

The true answer here is both. The PWM data represents a particular angular position. The output shaft of the servo has a pot connected to it that outputs an analog voltage relative to the position. The circuit inside the servo then compares the position it was told to go to and the position it is currently at and sends a signal to the motor to move. When the output shaft/pot are at the position the PWM signal wants it to be the motor is shut off. This type of positioning is very common and can be accomplished fully digital, fully analog (this is the way it was done before the advent of cheap micros and memory modules) or a combination of both. The final design is one in which the tradeoffs between accuracy and expense have resulted in a fairly repeatable little box that costs under $50.

steven114 09-02-2004 19:12

Re: How do the servos work?
 
Ah, whoops. I was talking about the input signal, not how it worked...

Phil_Lutz 11-02-2004 20:51

Re: How do the servos work?
 
I have a tangent problem to this that I need a solution too.
I have the Servo directly connected to the PWM1 jack on the robot.

I map the PWM to a variable and set the variable to 0.
I tell the program to change the servo position (increment) when the trigger is held.

Nothing happens.
We are printf ' ingf the PWM value and the code seems to be working but the servo never moves.

Help!

Thanks,

Phil

Rhs953 11-02-2004 20:54

Re: How do the servos work?
 
Most servos wont make a full rotation. Servos are used to make small turns like on a model airplane. They are use to raise and lower the wing pich.

steven114 11-02-2004 20:55

Re: How do the servos work?
 
A few common debugging procedures:

1) Ensure that the triple cables from the Servo are in the proper direction

2) Test it with a different servo. Then try a different pin.

3) Post the code here.


All times are GMT -5. The time now is 15:11.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi