Basic servo control problem

23 views
Skip to first unread message

JumperDude

unread,
Mar 8, 2012, 8:18:57 PM3/8/12
to The OOPIC Microcontroller
Hi,
I've been using the oServoSP2 object to control modified servos for a
while without a problem, now I'm having some trouble controlling
simple servos and can't figure out why.
The servos are Futaba S3003, a few years old I got from a friend who
used to use them in his R/C airplane so they are not brand-new and
have set in the closed for a while before finding their way to me,
however as this problem persist in all 3 servos I doubt they are all
messed up in the exact same manner.
The problem is this: When I connect the servo to the OOPic, I can set
it's Center property wherever I want within the physical range and as
long as the Value property is set to 0 it will go there and hold that
position, meaning the OOPic can send and the servo can receive and
react to PWM across it's entire physical range. However, whenever
setting the Value property to anything else, it will swing a few (say
5) degrees to the right\left according to the desired direction, and
then back to the defined center position (or to it's own center
position if non is set) repeatedly.
This problem repeats itself with both oServo and oServoX.
The code is as simple as it gets:

Dim SERV As New oServoX

Sub Main ()
SERV.IOLine = 15
SERV.Center = -10
SERV.Operate = 1
SERV.Value = 0
End Sub

What am I missing here?

There is also something else that is weird and might help explain
this: When defining the object as an oServoSP2 and giving it a value,
the servo will move in steps (or swing depending on the size of the
value) in the desired direction, never reaching it's set location and
staying there. The way I understand the continuous rotation mod (and I
may be mistaking here), we cut off the feedback pot, so the servo
thinks it still have to move to get to the desired position, but
unmodified it should in fact get to that position and hold it, not
keep on rotating until the physical limit the way it would have been
if I were to set the value in a normal oServoX as 5, then 6 then 7
etc. I'd think the pots are cut off, but the whole thing works just
fine with the Center property that I must conclude the feedback loop
is functional.

OOPic S er B2.2, IDE 5.0.1

Thanks :-)

JumperDude

unread,
Mar 14, 2012, 9:13:44 PM3/14/12
to The OOPIC Microcontroller
On the odd chance anyone out there is reading this, it turned out to
be a p/s problem, now resolved.
Reply all
Reply to author
Forward
0 new messages