# How Do You Control a Linear Actuator with a Relay?

## What is a Relay?

A relay is an electromagnetic switch that can be operated by a smaller current to turn on and off a much larger current. Relays consist of two isolated circuits, one control circuit, used to control the switch and the other circuit containing the switch. As the control circuit is energized, current flows through a coil that causes a magnetic field which is used to open and close the switch [1]. This magnetic field is produced by the flow of electrons (current) through a wire [2] and is strengthen when the flow of electrons passes through a coil [3].

As relays are switches, they too are defined by how they operate based on the number of poles and throws it has. The number of poles refers to the number of internal circuits and the number of throws refers to the number of on positions. Like switches, you can get relays that are Single Pole Single Throw (SPST), Single Pole Double Throw (SPDT), and Double Pole Double Throw (DPDT). The output connections of the relays will be labeled based on whether they are open or closed when the coil is energized. The connection that is made when the coil is not energized is called normally close (NC) and the connection that is made when the coil is energized is called normally open (NO).

## What Do Relays Allow Me to Do?

Relays allow you to control a larger electrical load with a lower voltage circuit. As relays consist of two isolated circuits, your lower voltage components will be protected from the higher electrical loads as the two circuits are physically isolated. This removes any concerns of exceeding the power ratings of your lower voltage components from the higher voltage components. This can be useful when you want to control a very large linear actuator or a series of actuators with a low voltage switch. But unlike switches, relays do not require physical input from a user and allows you to control systems with an electrical signal. This means you can control your linear actuator with an output of a sensor or with a microcontroller, like an Arduino.

## What Type of Relay Do I Need to Control a Linear Actuator?

You cannot control a linear actuator directly with a relay as you will need another component to energize the coil to control the internal switch. But as the input to energize the coil is pretty straight forward, just drive a current through the coil, this section will focus more on the setup with a linear actuator and let the choices on how you want to energize the coil up to you.

To be able to extend and retract a linear actuator with a relay, you will need to be able to switch the polarity of the input voltage to the actuator. This will leave you with the choice between using a DPDT relay or using two SPDT relays. The DPDT relay will consist of 8 connectors; 2 for the coil, 4 for on the input side of the switch, and 2 on the output side of the switch. Like with a DPDT switch, you will want to either connect the actuator to the 4 input connectors, flipping the positive and negative leads, or connecting to the 2 output connectors and having the power supply connected to the 4 input connectors, flipping the positive and negative leads, like seen above. As you are only using one relay, you will only need one input signal to control the relay. When the coil is energized, it will cause the actuator to extend and when the coil is not energized, the actuator will retract. This means there is no off position and will require you to have a linear actuator with internal limit switches to turn off the actuator when it reaches its limits. With this configuration, you’ll want to ensure that your starting position, whether fully extended or fully retracted, is connected to your NC connections on the relay as this will ensure your system does not move unexpectedly if the control system fails and de-energizes the coil. If you do have a linear actuator with internal limit switches and you only require the actuator to be either fully extended or fully retracted, this setup may be suitable for your application, but if not, you’ll need to use another configuration.

If you need your linear actuator to stop in between the fully extended and fully retracted positions, you’ll need to make use of the two SPDT relay configuration. In this configuration, the two relays are used to flip the polarity of the voltage to the linear actuator as well as disconnect the power to the actuator. You will want to connect the NC connections of both relays to the ground of your power supply as this will ensure your actuator doesn’t move if your control system fails and de-energizes the coils. To control the actuator with this setup, you’ll need to energize one relay to extend the actuator and the other relay to retract, as seen below. You’ll need to ensure that both coils don’t get energized at the same time. You could use a similar setup with four SPST relays, having two relays for the ground connection and two relays for the power connection, but there isn’t really any reason to use that setup over the two SPDT relay configuration, especially if you get a relay module.

Finally, before you purchase the relay of your choice, you’ll need to ensure that its specifications will meet the needs of your design. Relays have similar specifications to switches but will have a power rating for both the coil and the switch side of the relay. Generally, you will see the power rating of the switch given as an amperage and voltage in either AC or DC, as an example: 16A 250V AC, and while for the coil, it may be given as just a voltage, as you typically shouldn’t drive large current through the coil. Like with switches these are given as the max voltage and current the relay can handle and should be higher than your voltages and currents of your application.

## Limitations

Controlling a linear actuator with a relay has similar limitations to controlling a linear actuator with a switch. Firstly, if you want to control two actuators separately, you’ll need to make use of more relays to do so. You will also be unable to adjust the speed of your linear actuator; you will only have control over the direction your actuator travels in. And finally, you are unable to utilize feedback from your actuator, which could be used for more precise positioning of the actuator.

While they share some limitations, relays have two major advantages over mechanical switches. The first is the ability to control them with electrical inputs, which allows you control your actuators with microcontrollers or sensors. And secondly, relays isolate the heavier electrical load from your lower voltage components, which protects them. Although, relays do require having a more complex circuit to control your linear actuator compared to switches; the advantages they provide allow you to implement more automation into your design and allow you to control larger electrical loads.