Servo direction question?
Electron Jeff
Posts: 3
Does a servo automatically switch directions (clockwise / counter clockwise) as output pin is set to high?
Any help would be appreciated.
Thank You,
Parkview
Any help would be appreciated.
Thank You,
Parkview
Comments
Allan,
It should be noted that 1.5ms is center (regular servo) or stop (continuous rotation servo). That way you do not confuse people with that statement.
The farther from 1.5ms, with respect to frequency, you get, the further a regular servo will "travel". For example, 1.0ms pulse width will be totally one direction while 2.0 will be an equal "travel" in the opposite direction from center. These pulse widths will depend on the servo in question. Some servos will take a higher or lower bandwidth of pulse. But usually the center is around 1.5ms. Also, most servos turn left with a smaller frequency, but that is not an absolute.
James L
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
James L
Partner/Designer
Lil Brother SMT Assembly Services
Are you addicted to technology or Micro-controllers..... then checkout the forums at Savage Circuits. Learn to build your own Gizmos!
It is really pretty easy......
A regular servo uses a wave form which can vary from 1.0ms to 2.0 ms. When the wave has a frequency of 1.5ms the servo will go to it's center position. If the frequency goes up or down the servo will travel one direction or another depending on the frequency being higher or lower than the center freq. When a regular servo travels, it is not a continuous rotation, it travels to a determined angle from center. This depends on the difference of the provided frequency compared to the center frequency. The greater the difference, the further from center it will travel. For example......you provide a servo with 1.0ms frequency. The servo will turn 45 degree to the left (from center). If you provide 2.0ms it will turn 45 degree to the right (from center). These are just for example, and not necessarily the exact amount of travel.
Now........a continuous rotation servo is just a regular servo which has been modified. It has no center, so if it sees a frequency lower than center will will turn one way, and turn the opposite if seeing a frequency higher than center.
Because a continuous rotation servo has no reference to center, it doesn't know where it is at. Therefore you can not tell it where to stop. It will stop when you provide it center frequency, and will continue to turn while it's provided a frequency above or below center.
Now....here is where it can get confusing. The frequency that you feed to it doesn't have to be continuous (on at all times). It does however need to be fed to the servo every 20ms or so.
I hope this helps........
James L
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
James L
Partner/Designer
Lil Brother SMT Assembly Services
Are you addicted to technology or Micro-controllers..... then checkout the forums at Savage Circuits. Learn to build your own Gizmos!
Post Edited (James Long) : 1/4/2010 10:12:16 PM GMT
PULSOUT 12, 750
"750" represents 1.5mS and "12" represents pin 12 for the servo. Anything above 750 will make the servo turn counter-clockwise. Anything below 750 will make the servo turn clockwise. Also, if you keep 750, that means your motor shouldn't be moving in any direction. That's used to center your servo.
Ok.......
The three leads are the following (not necessarily in this order):
input signal (control signal)
Power (usually 5-6 volts)
Ground (common,earth,etc)
The input is only for the signal to tell the servo where to go.
The power is to power the servo circuitry and the drive motor.
Ground ......self explanatory.
The reason the servo doesn't use the input line for power........a servo is usually connected to a RC receiver. That receiver outputs the signal to tell the servo where to move. If all the servos were powered through the signal, the output circuitry of the receiver would have to deal with a huge amount of current in it's signal circuitry. The separate power line allows the current to bypass the signal circuitry in the typical RC receiver. The power line also goes through the receiver, just not though it's signal circuitry.
James L
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
James L
Partner/Designer
Lil Brother SMT Assembly Services
Are you addicted to technology or Micro-controllers..... then checkout the forums at Savage Circuits. Learn to build your own Gizmos!
Post Edited (James Long) : 1/4/2010 11:37:09 PM GMT
Austin,
I like the example, but you should note why 750 represents 1.5ms. This would help the readers understand better what relationship 750 has to 1.5ms.
James L
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
James L
Partner/Designer
Lil Brother SMT Assembly Services
Are you addicted to technology or Micro-controllers..... then checkout the forums at Savage Circuits. Learn to build your own Gizmos!
To find the actual duration that the servo is running, you do (2uS x 750) which is 0.000002 x 750·= 0.0015 or 1.5mS.
Parkview
@BallNmIKE,
Vin usually refers to the voltage supplying a board. Typically you will have two to three voltages on a board.
You may have:
Vin (Voltage in.......the raw power coming directly from the supply......a battery or a power adapter)
VDD (Voltage for a digital device.....this can be 5 volts or 3.3 volts, but is usually low and regulated)
GND (the common return for both of the above.
The stamp uses VDD 5 volt power. I'm not sure what the Vin rating is for your board. There are different ratings for different boards.
Hope this helps,
James L
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
James L
Partner/Designer
Lil Brother SMT Assembly Services
Are you addicted to technology or Micro-controllers..... then checkout the forums at Savage Circuits. Learn to build your own Gizmos!