How to Use Relays to Control Linear Actuators?

How to Control Linear Actuators with Relays and Arduino

Nathan Bong
Nathan Bong
PA Engineer

Electric actuators typically operate at a higher voltage compared to Arduino and will generally draw more current than what the outputs of an Arduino can handle. Even with this challenge, Arduino boards are still popular for various projects that require programming logic because of their availability, ease of use and open-source nature. The solution here is to use an Arduino wired with relays that can handle the electric actuator’s higher power requirements. In this article, we will cover how to use a relay with Arduino for controlling linear actuators. There will also be a video showing off how to control a linear actuator with relays and Arduino.

 

Choosing the Right Relay Module

Photo of a Arduino Uno Rev3 by Progressive Automations

Relay Module Examples

 

Check out our 2-channel, 4-channel, and 8-channel relay boards!

Buy now

 

Relays function by using current from the input source to activate an electromagnet, which pulls a switch that allows higher currents on the opposite side of the relay to flow. Being a fool proof way to control linear actuators even without a microcontroller, relays are widely used as they are cheap and effective. If a microcontroller is employed, however, relays become indispensable. The reason for this is because a Raspberry Pi or Arduino microcontroller can work only with a meagre electrical output. To handle a heavy electrical charge a relay is imperative.

We offer 2-channel4-channel and 8-channel relay boards which are used for the same tasks, however, the difference lies in the power supply each model requires based on how many channels are used. Our relay modules operate at 5V but draws different amounts of current depending on how many relays were being activated. Each of our individual relay will draw 70 milliamps. Using 8x relays powered at the same time has a current draw of 0.56A which is too high for our Arduino, however, activation of 1 actuator at a time will be fine.

(70mA) x (8 relays) = 560mA

It is important to make sure the Arduino or control device used for activating the relays can handle the current draw requirements of the relay coils.

Connecting relay to Arduino

 

Actuator with 2-Channel Relay and Arduino Wiring Diagram

Actuator with 2-Channel Relay and Arduino Wiring Diagram

 

 

For reference on how to do the wiring, you may also refer to our video below:

 

In our example, we will use the LC-066 Arduino Uno. The first step to wire an actuator relay is connecting the power supply to the VCC and GND pins located on the control side of the relay. On the same side, you will find IN pins. This is where you connect the corresponding microcontroller pins.

 

In a 2-channel board, the top relay is the IN1 and the bottom one is IN2. The 4-channel relay board is labelled, and the 8-channel relay is furnished with diodes (D1 to D8) prompting you the corresponding pin to be connected to it. Relays are activated as soon as the IN pins are connected to the respective GND pins.

 

Linear Actuator Relay Wiring

 

Photo of a relay board to control the motion of linear actuators

 

The second step to complete the actuator relay control circuit focuses on the three terminals on the relay side. The top one is the Normally Closed connection (NC) and the bottom one is the Normally Open connection (NO) with the Common connection (COM) between them.

In case the battery is connected to the IN pin (or the IN pin is free from any connection) one should use screws to connect the NC and COM relay terminals. If the IN pin is joined with the GND pin the relay connection between the NO and COM terminals is mandatory.

 

 

The board is now wired and thus ready to program for further usage. Once it is done your device is ready for operation. Below is an example showing how the programming works.

const int forwards = 7;
const int backwards = 6;//assign relay INx pin to arduino pin
void setup() {
pinMode(forwards, OUTPUT);//set relay as an output
pinMode(backwards, OUTPUT);//set relay as an output
}
void loop() {
digitalWrite(forwards, LOW);
digitalWrite(backwards, HIGH);//Activate the relay one direction, they must be different to move the motor
delay(2000); // wait 2 seconds
digitalWrite(forwards, HIGH);
digitalWrite(backwards, HIGH);//Deactivate both relays to brake the motor
delay(2000);// wait 2 seconds
digitalWrite(forwards, HIGH);
digitalWrite(backwards, LOW);//Activate the relay the other direction, they must be different to move the motor
delay(2000);// wait 2 seconds
digitalWrite(forwards, HIGH);
digitalWrite(backwards, HIGH);//Deactivate both relays to brake the motor
delay(2000);// wait 2 seconds
}

 

 

In Summary

Linear actuators are used to provide linear motion in many industrial and domestic applications. Using an Arduino controlled relay will provide you with wider automation options and greater flexibility for controls that required programming. We have also included a video showing off how to control a linear actuator with relays and Arduino. If you wish to learn more about our linear actuators and motion control devices, check out our other blogs for a variety of different articles! If you have any further questions regarding how to wire a 12 V linear actuator, please do not hesitate in reaching out to us! We are experts in what we do and will be happy to help with any technical questions you have!

  sales@progressiveautomations.com

 1-800-676-6123