Latching Relay not latching

I bought one of these latching relay modules to control a water pump

Which might have been a mistake since there's so little documentation or examples with it online.
I'm unable to get it to successfully run the pump. This is how I currently have it connected. There's what I'm hoping is a correctly wired flyback diode across the pump.

I try toggling the arduino output pins (alternating which is high and which is low), once per 2 seconds.

void setup() {
  pinMode(7, OUTPUT);
  pinMode(8, OUTPUT);
}

void loop() {
  digitalWrite(7, HIGH);
  digitalWrite(8, LOW);
  delay(2000);
  digitalWrite(7, LOW);
  digitalWrite(8, HIGH);
  delay(2000);
}

The "Pwr-LED" stays lit, which seems correct.
But then for 2 seconds the SW-LED will flash rapidly and the relay will click repeatedly. For the next 2 seconds it will do nothing and the SW-LED remains off. The pump never runs.

Since it's a latching diode, I thought maybe I should pulse the high and leave it low otherwise

void setup() {
  pinMode(7, OUTPUT);
  pinMode(8, OUTPUT);
}

void loop() {
  digitalWrite(7, HIGH);
  digitalWrite(8, LOW);
  delay(100);
  digitalWrite(7, LOW);
  digitalWrite(8, LOW);
  delay(2000);
  digitalWrite(7, LOW);
  digitalWrite(8, HIGH);
  delay(100);
  digitalWrite(7, LOW);
  digitalWrite(8, LOW);
  delay(2000);
}

But that causes the relay to continuously click instead of latching on.

Any ideas what is wrong with my setup?

How will You unlatch the relay?
There is a strap, trigger high, low, 5,6 in the description. How did You set it?

It's a 12 volt relay, but you are switching it with 5 volts. How could anything go wrong?

Paul

That realy is meant to trigger with a switch (not an Arduino), connected to the two pins of the white socket.
You might be able to trigger it with a pulse from ONE arduino pin, not two pins as you are doing now.
Have to find out which pin and what voltage yourself, because I can't find any documentation there.

You could have used a normal relay module.
Or better, a logic level mosfet.
Leo..

Isn't that the point of a relay? To be able to control higher voltage power with a lower power logic system?

I'm supply 12V to the relay board per the DC+/- connections (numbered 3 & 4 in the velleman pdf) and 12V to my pump through the relay switch (numbered 1 &2 on the velleman pdf).

The 5V arduino is controlling the "low-level triggering" (5 and 6 on the velleman pdf) through the digital output pins. I have arduino pins 7 & 8 connected to 5 & 6 from the pdf.

I'm not sure how to use the triggering mechanism correctly since the documentation doesn't specify.

Since it says "latching" I originally I assumed I didn't have to always hold one pin high; that I could pulse one output pin high for a short (100ms) duration and then bring it to low and leave the other pin connected to ground. (Similar to my first code snippet, but only toggling pin 7, and pin 8 always LOW).

After that didn't work, I did some more research and found that some relays are reverse polarity where you have to flip the trigger in order to unlatch. That's when I tried reversing pins 7 & 8 per my two code snippets.

A switch just briefly allows through a HIGH while the switch is pressed. I don't see how that's different from sending 1 pin high and 1 pin low for a brief period of time. Unless the duration of my pulse is wrong and it should be longer/shorter than 100ms.

What happens when the test button is pushed?

notice pin 6? Called low level triggering.

  digitalWrite{ pinFfromlArduinoToLatchingrelayPin6, LOW);
//might need a few microsecondsof delay here
digitalWrite{ pinFfromlArduinoToLatchingrelayPin6, HIGH);
  delay(2000);
  digitalWrite{ pinFfromlArduinoToLatchingrelayPin6, LOW);
//might need a few microsecondsof delay here
digitalWrite{ pinFfromlArduinoToLatchingrelayPin6, HIGH);

The pinFfromlArduinoToLatchingrelayPin6 pin should default to high

This is NOT a latching relay.

It’s simply a relay module with on/off button.

Leo…

Why not use a logic n_channel MOSFET to control the pump? 12 Volt is no problem, only choose a fet that manage the current.

I didn't get a MOSFET because I don't really know what I'm doing. If that's the better answer, I could go back to the store and get one, but I'd still like to know why this module doesn't work.

If I press the test button, I get the rapid click-click-click-click for as long as the button is pressed (assuming the trigger leads are not connected).

"Pin 6" per the velleman pdf is actually 2 pins.. It comes with a little wire lead with a 2 pin connector with 2 wires.

If I connect one trigger lead to 5V, and write the other one LOW then immediately HIGH, I get the constant clicks.
If I connect one trigger lead to GND, and write the other one LOW then immediately HIGH, I get the constant clicks.
Pump does not turn on.

Wawa:
This is NOT a latching relay.

1 CHANNEL LATCHING RELAY MODULE WITH TOUCH BISTABLE SWITCH 12 V
It had latching in the name. How are you to know when latching != latching?

Using a logic MOSFET, connect the + of the pump to power supply +12. Connect the pump - to the MOSFET. Other end of MOSFET connects to the common ground and the MOSFET gate to the Arduino.

But okey, if the question is how to exercise this relay, good luck. Normaly a project has a goal, a function to perform, pumping something.

It's your standard watering plants project. Have an irrigation line, a reservoir, and a pump. Periodically the pump needs to run to water the plants. 12V pump, arduino logic/brains.

Originally we were using an NTE2018 to drive the lights, but we smoked 2 of them when we tried to add in the pump. I was at the store looking for more, but they were out. I saw this thing, thought that I had seen relays being used as switches to turn high voltage on/off with a lower voltage signal line and grabbed it so that I could smoke this instead of ruining our remaining LED set up.

The documentation says "1-CHANNEL LATCHING RELAY MODULE WITH
TOUCH BISTABLE SWITCH 12 V".

So, the electronic part holds the relay closed until pulsed a second time, which resets the electronics and opens the switch. Exactly what the push button switch on the module does.

Does the relay switch correctly when you use the push button on the module?

Paul

What is the marking on the IC?

From the sparse data provided by Velleman (odd for them from what I have seen in the past), my suggestion is hold "pin 6" LOW (connect to Arduino GND and DC power supply Gnd), then pulse "pin 5" LOW to change relay state.

Connect the relay C, and NO in series with one leg of a lamp power cord, see if it is really latching or not.