Servo not moving the correct angle
-
No. There is no notion of moving for 220us, there are only absolute possitions in degrees, which are encoded as pulse
lengthswidths.Edit: But i will agree that using the same S parameter for both angle and encoded pulse length can be confusing. Would be better to have different parameters for angles and pulse
lengthswidths.S220 and S90 should to the same thing if I read it correctly. Both will generate a 20us high which the motor will take as being to told to set its set point to 90 degrees.S1500 and S90 should to the same thing, and to go back you should use S1000 or S0.
-
@bearer it's also confusing when it's pulse length, but the docs say pulse width.
-
my bad, long night - national day celebrations here..
It is refering to the high part of the pulse. the period is generally the same, normally 20ms/50hz, but most motors accept a little under, and a lot over.
1000us high followed by 19ms low is 0 degrees. 2000us high followed by 18ms low is 180 degrees
-
@bearer said in Servo not moving the correct angle:
Edit: But i will agree that using the same S parameter for both angle and encoded pulse length can be confusing. Would be better to have different parameters for angles and pulse lengths widths.
I copied the specification from Marlin, so don't blame me!
-
@dc42 said in Servo not moving the correct angle:
@bearer said in Servo not moving the correct angle:
Edit: But i will agree that using the same S parameter for both angle and encoded pulse length can be confusing. Would be better to have different parameters for angles and pulse lengths widths.
I copied the specification from Marlin, so don't blame me!
lol, I usually leave assigning blame to git;)
But I get the rationale behind angles not being defined past 180 degrees for servos, and 200us being well below the 0 deg point of 1000us. Its also convenient to keep compatibility.
In any case seems both hardware and firmware is doing exactly what it should here, so I would look into motor or wiring. OR maybe start a thread to have the output doubled to suit my wonky hardware..
-
@dc42 I was only following orders?!? Just kidding. I've seen it elsewhere, there seem to be quite a few config params like that.
-
@bearer how would it be doing what it should if it's moving half the distance? How can you rule anything out at this point?
-
Because you said it generated the correct pulse? Then again your understanding of what is correct should maybe taken into consideration, that is a valid point.
-
and what about the crazy heat. Can a wiring problem cause this behavior?
-
@bearer i don't remember saying it generated the right pulse. I don't know how to measure that. I might have misstated something. The servo spec says 110us for 60degrees. I sent S220 and it moved about 90. Which should have been 120, right?
https://servodatabase.com/servo/traxxas/2080 -
I didn't see the (pulse width) specs in the link but if it says 110us for 60 degrees, then its not compatible with Reprap, or marlin or any of the other firmwares definitions of degrees.
What i did see was the spec saying it needs 0.11 seconds to move 60 degrees at no load.
-
@gnydick said in Servo not moving the correct angle:
It looks like using the pulse width is working correctly, but not angle.
I presumed you had some sort of qualified means of determining that. My bad.
-
@bearer ah, yes, I was wrong when I said that.
-
If the servo has a standard interface you should get the same behavior with these two blocks. go to 0 degrees if not already there. wait 0-1s, go to 180 degress, wait about 0.5s, back to 0 degrees. Should sweep across the whole range, taking about 4-500ms from 0 to 180 at 5v.
If it has different movement for the two blocks then there is something fishy, if it moves less than 180 degrees there is something fishy, if it goes back to 0 without stopping then you may want to increase the dwell but 1s should be plenty if it moves 60 degrees pr 0.11s at 6v.
You'll need some means of measuring the pwm signal if it still doesn't behave as it should. If you have an arduino like board laying around
pulseIn(PIN, HIGH, 20000);
might give you some idea as to what the duet is doing. Or a scope.M280 P3 S0 ;0 degrees G4 P1000 M280 P3 S180 ;180 degrees G4 P1000 M280 P3 S0 ;back to 0
and
M280 P3 S1000 ;0 degrees G4 P1000 M280 P3 S2000 ;180 degrees G4 P1000 M280 P3 S1000 ;back to 0
-
@bearer how is M280 P3 S90 == 180 degrees?
-
wow.....
-
@bearer the docs say for values <200 S is the angle, and I'm getting half the throw, not double. So, I'm not following.
-
I also checked, my board is a 1.04a, so it should have the needed capacitor.