12VDC Linear Actuator with UNO


First, I am new to this forum, Arduino, and programming in general so take it easy on me. I will say I feel I have looked hard on my own for the answers but unable to really find what I am looking for in terms of controlling a small 12V Linear Actuator so I finally came to this forum to ask for help.

First off the Linear actual is a small 12VDC motor with 3 leads. Vin Gnd Signal. Actuator is really not under a load and it is just changing position of a flapper that freely pivots. I believe motor would never draw more than 2 to 3 amps. The actuator has built in pot and looks for a certain voltage signal and positions itself along its linear path based on that signal.

I would like to know the best way to set this actuator up so I can do the following :

  1. Control up to 6 positions of the linear actuator by having the Arduino program interface with a motor driver board(or other component set up) which in turn would send various signal voltages between the range of 12VDC down to Zero
  2. Cycle actuator through the 6 different positions as directed by the signal voltage which I can vary as needed in the programming (part of the loop)

Please suggest the motor shields type (if needed), Components, etc... I would just like some basic advice of how to set this up (rough schematic would be nice). I don't want to hook something up wrong and burn up my Arduino.

any links or advice is appreciated.


more info for that lin. motor , please..

I am not clear if your motor is; (#1) a simple motor that has a resistor to allow the computer to sense where the motor is positioned. Or (#2) perhaps it is a servo-motor, which has its own internal driver board.

In case #1, your Arduino would be reading the position as a voltage from the voltage being sent from the motor over the signal line.

In case #2, your Arduino is sending a signal to the servomotor over the singnal line. Note that there are two typical types of signals going to servo motors. One is a varying voltage, and the voltage tells the servo where to go. Another, which is what the low-cost radio-control servos typically use, is actually a varying pulse width. This can be confusing, because it is also typical to control how fast a DC motor turns, referred to as PWM. The difference is that the RC Servo signal is a pulse that varyies from 1 to 2 mili-second in durration, and then the signal turns off for 10 ms. The width of that pulse is what the servo driver interprets. But, for DC motor speed control, the pulse width more like turning the motor on and off very vast. So, the "duty cycle" may be 100% to make the motor go its fasted, or 50%, to make it go half speed. In the 50% duty-cycle, the pulse may be on for .01ms and off for .01ms. They typically want the frequency to be above the human hearing range, or you will hear the motors hum.


more info for that lin. motor , please..

Let me know what specs (info ) is most important that you need. I will try to obtain it and get back to you today

In case #2, your Arduino is sending a signal to the servomotor over the singnal line. Note that there are two typical types of signals going to servo motors. One is a varying voltage, and the voltage tells the servo where to go. motors hum.



My motor works by sending a voltage signal to the motor. In other words, I can manually operate this motor by having 1 power supply to supply constant 12VDC to the Vin terminal and then have another power supply to supply signal voltages (ie 9V, 6V, 3.3V , 2V…etc…) to the signal terminal. Every thing is on same ground for both power supplies. Once this is set up I can move the actuator back and forth by simply varying the signal voltage using the power supply feeding the signal terminal of the actuator motor. However, I don’t want to have to turn the knob manually on signal voltage feed to vary the voltage / actuator position nor do I want to use 2 power supplies. I want to feed specific voltages to make the actuator go to specific locations by utilizing 1 power supply for Vin 12VDC and then using same 12VDC main line I want to put circuitry in place to alter signal voltages to the signal terminal. I want to use the Arduino to control the switching of different specific signal voltages and the cycling between those signal voltages to my choosing. I was researching L298n shield to isolate 12VDC motor from Arduino and then use some type of available digital pot fed by the main 12VDC to reduce the main voltage down to the required signal voltage output…Is this possible ?

I hope this helps you understand what I am trying to achieve. I am a newbie :fearful:

Just extra info...This actuator/ servo shows that it may draw around 400mA under max load (Around 50N of Force). It has very short stroke (around 10mm) and is small enough to fit in palm of your hand not that that is overly important but thought I would mention I am not dealing with some huge motor here but it does require higher voltages than the Arduino can provide)

Thanks for the responses so far.

For your servomotor you do not need a motor driver, since it is already inside your servomovotor.

However, your arduino is not able to put out a true analog voltage either. The "Analog out" really is a PWM signal. Below is a link to an article that discusses it. Note that his method will only generate 0-5 v. And since you need 0-12v, it is going to take more components. Someone else will have to help you with that. My electronics schooling is way too rusty for that.


Thanks Joe. That makes sense about the driver already being in the actuator. That helps a lot and seems it would simplify all this a little more.

Now it seems I have 2 choices to :

  1. Make several circuits that step down the main 12VDC voltage supply to output different signal voltages I need. These circuits (let's say 4 different signal voltages) could be turned on and off in different sequences by the UNO program digital pins to take the actuator to the positions per application. However, in this way I am locked in to specific voltage signals that are set on each separate circuit by trim pots that I must manually fine tune until I get desired voltage/ location needed on actuator shaft. Arduino needs to be isolated from the 12VDC and signal voltages too....I understand this; Could NPN transistors at each circuit be used to isolate from the higher voltages? Is that all I would need.

  2. Make one circuit for signal voltage that has a type of logic controlled digital pot that allows UNO to digitally control changes in resistance which in turn changes the signal voltage by program change. I am not even sure this is possible but it is what I prefer. I want to be able to change the parameters by plugging into the UNO to avoid manually adjusting many pots within several circuits like I would need to in choice 1 above. Also, as in choice 1 I have to isolate the motor control voltage from the UNO.

Hope this make sense. Problem I have is I know what I want to do but not sure the proper components / IC's to accomplish this task.

Any advice is welcome. Thanks!

I'd probably get the below analog multiplexer (or a 4051) and set up the desired number of pots to output the desired individual voltages for the actuator. Input the pot wipers to the mux input pins, and out the mux common output to the actuator control wire. Control the mux with the arduino.

Can I control these higher voltages with this multiplexer? I was looking at spec. sheet and amp draw and voltages seem rated low for controlling the actuator I mentioned on original post. Maybe I am just misunderstanding how this multiplexer works but it looks like it only controls very low voltage devices...Am I wrong?

I am starting to wonder if I should consider using MOSFET's as the on/off switches controlled by UNO digital pins. (ie. When MOSFET center pin is given 5V and turned on by UNO the ~ 12VDC is allowed to flow though MOSFET to the Actuator "Signal" circuit where a pot can then tune the resistance to required signal voltage. My Understanding is MOSFET would protect the UNO and would not allow the 12VDC to flow back into the Arduino controller. What do you think?

Transistors/MOSFETs might not be the best choice to use for switching purposes. You might look for an optical isolator as a switch if the switched side is of low resistance for the pot wiper output. If you can find one that is operated by 5v and can pass 12v on the switched side, then they should be fairly simple to set up and control.

It sounds like you know some electronics. So, I will throw out a few additional ideas that I have no experience with, but perhaps they will give you something to investigate.

You might use the "analog out" feature of the Uno by filtering the PWM. Then use this analog 0-5v signal to control a transistor connected to the 12v signal.

Yet another idea is to use an integrated circuit known as a "Digital Pot". Here are a few Arduino links that discuss this.



Thanks for to all for the advice. Still feel like I don't have a "concrete" direction but better than before I posted. I like the optical isolator concept but it looks like voltage rating is too low for 12 V to run through it. Am I reading spec. incorrectly to determine this?

@ Joe - Thanks for your extra help and suggestions. I do know some basic electronics from H.S., Military, and College but it was not what I majored in. Just a hobby / interest for me and may help some with my career.

Here is a rough sketch of what I am thinking. My thought is the MOSFET will isolate the 12VDC from the Arduino and the 4 pots can be set to drop voltage to the correct signal voltage to set the actuator where I need it to go (4 different positions). What else would I need in this circuit for protection of Arduino and where might I be wrong in my wiring? Basically, this is just a set up where the Arduino is used to switch the MOSFET on or off and cycle through the different actuator positions on a continuous loop. I am able to change the order and cycling times when needed by which digital pin I turn on. Eventually, I would like to be able to have digital pots that would allow me to change “signal” voltage in my program rather than by manual adjustment of pot with a screwdriver. The actuator has its own internal driver board and moves to predetermined position within the stroke of the cylinder based on the signal voltage it receives. I also wonder about setting of some sort of feedback loop so I can monitor the position through the Arduino software. Any direction on that would be helpful too.


Controller.pdf (159 KB)

Another approach uses a d/a converter and boosting the voltage to 0-12v with an op amp. This methos is simple with good accuracy.

-Another Joe

Hi Another Joe :slight_smile:

Thanks for the idea of another approach...I am a little confused about the suggestion you made regarding the digital to analog IC with Op Amp. Can you show me an example schematic / Link / tutorial, etc... of a good example ? If not, at least the part numbers for the d/a and op amp components you would spec. so I can read up on them and how they work. I might like your idea better than the concept I attached.

Thanks so much!!

DAC's are readily available:

..and many others from many vendors

The main choice will be the input such as I2C, SPI, Parallel(simplest but 4-5 pins), etc.

For a discussion of amplifying 5v to higher with an opamp look here:
Scroll down to see some circuit diagrams.
You may need "rail-to-rail" performance,. Not all opamps can swing the full votage.

Well I purchased a couple of IRF510 MOSFETS and hooked up as seen on the schematic "sketch" I posted a few days ago. (See pdf) The Mosfets got hot to the touch so I unplugged immediately. I don't believe I hurt them as I unplugged as soon as I felt some heat. I must have something wrong in the way I am wiring this. Could you take a look and let me know where I might be wrong since it seems the Mosfets shouldn't heat up that quickly. Thanks!

Hi, looks like no one took a look at your circuit diagram, the way you have the FETs wired is that when they are turned ON you are shorting the power supply, also you need to use 470 ohm resistor between the output of the arduino and the FET gate.

What is the little grey box?

The solution you are trying will not switch each pot in separately.
You are only trying to switch one terminal of each pot, because you have three terminals you would have to switch two of them on each pot to isolate them from each other.

Tom........ :slight_smile:

Hi Tom

Thanks for looking over my diagram. I appreciate you taking the time to help. I understand what you mean about the
resistor needed for Arduino. Is there any way you could mark up my diagram and show me how it needs to be corrected. I am a little confused as you can probably tell by the diagram. I want to be able to switch each pot separately and not short out the power supply. Also, the grey box just shows where my signal voltages are all tied to same output. Do I need to isolate them from each other with diodes to prevent back flow since I want to use one signal output wire going to motor.