Programming L-16R Linear Actuator Help

My team switched to the L-16R Linear Actuator for our gear grabber. It’s plugged directly into PWM. Using


if (something) {
gearGrabber.set(0);
} else {
gearGrabber.set(1);
}

does not work. Neither does using setSpeed.

Is there something I’m missing?

The Actuonix linear servos have a slightly different range than normal PWM servos. I don’t remember the precise range but I believe it’s on their site under tech specs. If you’re using default values for your PWM, 0 and 1 are probably both out of the range the servo needs.

The desired actuator position is input to
the actuator on lead 1 as a positive 5 Volt pulse width
signal. A 1.0 ms pulse commands the controller to fully
retract the actuator, and a 2.0 ms pulse signals it to fully
extend.

This is the information they provide I read somewhere that this could be achieved with setBounds(), but I believe it doesnt give enough info.

setBounds needs a max pulse width, a max deadband, a center pulse width, a min deadband, and a min pulse width, but the data sheet only provides a fully extended and retracted. Also how would you determine the correct deadband settings?

I apparently misunderstood what we did to fix this issue. Our programmer informed me that instead of changing the PWM settings, we simply used 0.3 as the “retracted” position and 0.7 as the “extended” position. I am not sure why this works or how well it would transfer.

As for PWM questions, the center is just going to be halfway between your two values most likely. Looking at the WPI documentation, it is unclear to me how all of those values are being used as well.

I’m starting to question if we burned out our actuator. We hot wired it to one of the 20a ports on the PDP. It fully extended, and in attempt to retract it one of our mentors reversed polarity of the wires. It says in the documentation that doing that could result in permanent damage to the servo.

The main reason I assume this is, if setting it to 0.3 makes it retract fully, shouldn’t 0 too? Or does it just not accept a value that is out of bounds.

Thanks for your input :slight_smile:

It may not, as the values, at some point, have to be converted to pulse lengths. If 0 corresponds to a pulse length of 0.8ms and the the servo needs 1.0ms for it’s minimum extension, then the servo won’t necessarily respond to a signal shorter than the minimum expected signal. I’m a little bit fuzzy at this point-- my guess is that this might depend on the servo, and we’re already in a little bit of an odd territory with linear servos as it is.

I would be somewhat concerned that you reversed polarity. We have fried one in this manner. If you need replacements, I would definitely recommend ordering direct from Actuonix (though AndyMark sells them too) as they offer a very generous educational discount.

I’m going to try this. If the code does not work, I’ll assume it’s just a burnt out servo. It’s a shame considering our first competition is on Thursday and we wouldn’t be able to practice gears until a new one arrived.

Thanks again for all of your help!

Update: Tested the code, it did not work. Should I assume that it’s burned out?

if you know for a fact it’s had reverse polarity applied, then it is 99% burnt out. Time to see how fast you can get things shipped from AM.

It turns out that my code was never the issue. We purchased a new one, plugged it in, and it works like a charm! :slight_smile: