Author Options:

How do you hook up a linear actuator to be controlled with PWM / R/C? Answered

Hi Everybody,

I'm working on a robotics project requiring strong linear actuators(LAs). For the most part I see that using LAs is the same as using DC motors. The red and black cables of the LA would connect to the motor +/- terminals of a motor controller. The main power source would connect to the battery +/- terminals of the motor controllers, and the motor controllers input could then come from a microcontroller or single board computer (SBC) using PWM / R/C control. This should allow me to control the direction and the speed of extension.

However, for my application I and going to need multiple LAs the need to extend exactly in sync. The best way I can think to do that is to sense their individual extensions and program the LAs so that they stay in sync with each other. From what I've seen what I'm looking for are LAs with built-in limit switches and potentiometers. 

What I don't know is how to hook these up to their motor controllers and microcontroller/SBC. An example I'm looking at is this one from Firgelli Automations: http://www.firgelliauto.com/product_info.php?cPath=94&products_id=159. Unlike hobby servos this LA has 5 wires. Two are the positive and negative power wires and the other three relate to the potentiometer. I know you can control the extension this way but so far I've only found youtube videos and couldn't see how they hooked everything up.

This datasheet for different LA (http://www.firgelli.com/Uploads/L12_datasheet.pdf) helped me understand what the potentiometer wires do, but not how to use them with a PWM microcontroller. Does anybody have experience with this?

Thanks for reading


Connect the power leads to your motor controller. The reference leads of the pot need to be attached to ground and the Vin of your micro controller. Which lead goes where doesn't matter as long as all the LA's you use have the same wires going to the same place. The wiper wire needs to attach to an analog input on your micro controller. Your program will read the analog input of each LA. It can then compare the results with a certain margin of error and signal each motor controller to slow down or speed up as needed to keep the LAs in sync. You'll also want the wiper to be compared with the terminal end that the actuator is heading to so it can signal the motors to stop.

Thanks for the response mpilchfamily. Your explanation made complete sense.

So it sounds like I'll have one PWM port controlling the motor controller, like with any DC motor. It doesn't look like the SBC I'm considering (http://www.roboard.com/RB-100.htm) has a common ground pin or a common Vin pin so I guess I would have to use a PWM port just for its Vin and ground pins.

All controllers will have a common ground to tie into somewhere.

Why are you going to use PWM to run the LA? All you need is a voltage source and ground with a means to reverse the polarity. PWM is needed for stepper motors and servos. The LA doesn't need PWM to run the motor inside.

The intention is to use a motor controller that can accept PWM input so that the DC motors can be controlled as if they were servos.

The final selection has not been made for the microcontroller/SBC yet. If the one that is chosen does not have ports that can output a constant voltage wouldn't: microcontroller (PWM) > motor controller (constant voltage) > LA, be a viable way to control the LAs?

Even if the microcontroller does have a way of supplying & controlling a constant voltage to an accessory, it probably wouldn't be able to supply that accessory with 12VDC at several Amps, as big LAs tend to require, right?

I'm still relatively new to this robotics/mechatronics stuff so please let me know if I'm wrong here.

I don't think it work that way. Using a PWM controller isn't going to get a standard motor to act like a servo or stepper.

What you need is a micro-controller and a motor controller. The micro-controller will read the position of the LA and signal the motor controller to turn the motor on, off, speed up, slow down, or do it all in reverse. The motor controller will be the one handling the voltage and amperage going into the LA's motor.

You'll want a controller like this which can handle 2 motors. Couple that with whatever micro-controller you go with and your set. How to go about connecting everything an programing it all will vary based on the MC you pick.

If the motor controller is capable of accepting R/C signals as an input mode shouldn't I be able to control motors on that controller as if they were servos? Without an encoder, I know I wouldn't have the position feedback/control like with a servo, but that really isn't all that necessary for the drive motors.

The motor controller I'm probably going to use for the drive motors are Sabertooth 2x12's (http://www.dimensionengineering.com/Sabertooth2X12.htm). These controllers have four different input modes, including R/C.

For a previous project I plugged both channels of a Sabertooth 2x12 R/C into a Propeller Servo Controller (http://www.parallax.com/tabid/768/ProductID/595/Default.aspx) and everything worked. I was able to control the 2 windshield wiper motors connected to the Sabertooth just fine by having my RoboRealm program control the specific channels on the servo controller that the motor controller cables were plugged into. In Roborealm, the only component I defined was that it would be using the Propeller Servo controller. There was never any distinction made between DC motors and servos nor was there any selection in the program of the Sabertooth motor controller.

As long as I select a similar motor controller for the linear actuators, shouldn't a similar approach work for them as well?

On that note, I went through the documentation and the DIP switch wizard for that motor controller and there is a set of switch setting that would give me what I'm going for: http://dimensionengineering.com/datasheets/Sabertoothdipwizard/lithium/RC/micro/mixed/linear.htm

What do you think?