arduino 12v relay linear actuator

Hi Guys,

My objective is to use a relay to control a 12v Linear Actuator.

So I bought a 2 channels 12V relay and I wired up the connection as in the attached photo/diagram. To avoid any damage to the linear actuator, I connected the orange wires to the multimeter to test whether it has the expected voltage output or not (12v).

However, with the existing wire connection, I got no voltage output, the multimeter always showing 0.

Please see my code below as well

Note: I can hear the sound of "click" when the program is running which it switches one relay to another.

Can anyone advice what did I miss out?



//Use constants for the relay pins in case you need to change these later
const int relay1 = 2; //Arduino pin that triggers relay #1
const int relay2 = 3; //Arduino pin that triggers relay #2

void setup() {
//Set pinMode to OUTPUT for the two relay pins
pinMode(relay1, OUTPUT);
pinMode(relay2, OUTPUT);


void extendActuator() {
digitalWrite(relay1, HIGH);
digitalWrite(relay2, LOW);

void retractActuator() {
digitalWrite(relay1, LOW);
digitalWrite(relay2, HIGH);

void stopActuator() {
digitalWrite(relay1, LOW);
digitalWrite(relay2, LOW);

void loop() {




Should I try to add on the connection as of the diagram below?



No, those three pins are the Contact side of the relay.
NC, Normally Common, and C, Common are connected when the relay is not energized.
When the relay is energized C and NO, Normally Open, get connected instead.

The male header pins are used to control the relay Coil current to energize the relay.

If you are SURE you have a 12V relay board ( look at the top of the relays and see what the COIL voltage is), 12V or 5V.
You MUST remove the VCC-JDVCC jumper on the relay board, also you don't need the ground wire to the Arduino.
Connect 12V + to JD-VCC and the NO relay terminals, 12V - to the GND terminal beside JD-VCC and the NC relay terminals, and the actuator wires to the COM terminals.

You said you bought a 12 Volt relay but you posted a picture of a 5V relay, what is the COIL voltage on your relays?

Yes, I am using a 12V relay, sorry about the photo that making confusion.

I drafted the diagram based on the steps given, please correct me if I am wrong.

OK, if you're SURE they are relays with 12V coils that should work and you don't need the GND wire from relay board to Arduino, only VCC and the 2 IN wires. I guess you know, most relay boards like that work backwards, the relay is ON when the output pin is LOW.

Thanks, I will remove the GND wire from relay board to Arduino and give it a try later.

Guys, somehow I managed to get a 2 channel 5v relay, with the similar connection above except power up the jumpers, it is working as expected. I can move on the fix the other parts. Thank you very much.