PDA

View Full Version : servo control question



kroki
02-07-2005, 07:50 PM
Hi all!

I have a servo for a nitro model, that's not modified, and has the following specs:

Signal pulse: Positive Pulse Control 1520us Neutral
.14sec 0-60 deg.

Can anyone help me to control it with a BS2sx or p24?

And I need some info how to monitor a controller reciever for it?

Thanks for the anwser!

allanlane5
02-07-2005, 10:46 PM
' Numbers: Note the BS2 uses 2 uSec per 'count'.
' The BS2sx uses something else -- 800 uSec?
' This example uses BS2 numbers -- adjust the 'count' values
' for the BS2sx.

'1. Holding at neutral...

LOW ServoPin ' Set servo pin as Output, and LOW. Servo control uses positive pulse.
MAIN:
PULSOUT ServoPin, 760 ' 2 uS per 'count' in BS2, so 760 == 1520 uSec
PAUSE 20 ' Pause 20 mSec -- Servo's work on a pulse, then get refreshed every 20 to 50 mSec
GOTO MAIN

' 2. Typically, 1 mSec is full left, 2 mSec is full right.
' So, full left:
MAIN:
PULSOUT ServoPin, 500 ' 500 * 2uS == 1,000 uS, or 1 mSec
PAUSE 20
GOTO MAIN

AND -- the Servo power ground and the BS2 ground MUST be connected.

Matthew
02-07-2005, 10:49 PM
Kroki, where did you get those values from??

kroki
02-07-2005, 11:00 PM
What values?
The servo specs? From it's desc.