SSR Relais with arduino

Hi guys

I have the following issue. I am running an Arduino project which includes a relais that turns on and off a 5V pump. The pump is turned on/off 20.000+ times every 24hr.

I used a regular mechanical relais in the beginning but found out, that the lifetime is very short and every relais brakes after 5-10 days.
I used a relais similar to this one:

After some research I found SSR relais and learned that they have a much longer lifetime. Therefore I orderd this relais:

The circuit plan is in the attachement.

My ard code is as follows:

#define PIN_RELAY 2

void setup()

void loop()
digitalWrite(PIN_RELAY, LOW);
digitalWrite(PIN_RELAY, HIGH);

Now my issue:
The pump turns properly on but won´t turn off. I can see the LEDs on the relais that switch properly to turn on and off but somehow even with the turned off relais the pump keeps on running.

I tried almost everything (imo) to have the issue fixed. I triple checked all wires. I also changed GND and VCC in the relais meaning that not VCC is interrupted by the relais but GND.

Does anyone have an idea why the pump wont turn off even the relais is turned off properly?

Thanks in advance for any help!!
Have a nice day and I look forward to your ideas :slight_smile: Please let me know, should I forgot to give any information.

This is a common problem for people using a SSR for the first time. The one you linked to is for AC only!!!! That is why it won't turn off.
The simple solution is to us a MOSFET to turn on and off the pump. There are lots of threads on the Arduino forum showing a schematic for such a circuit.
There are available SSR for DC, but they are really a MOSFET driven by a single transistor.

That SSR relay is for AC usage! Is your power source for the 5V pump AC?

Thanks Paul and missdrew!!

Any experience on the lifetime of a MOSFET? I could not really find proper information about it.

As with all semiconductor device it depends on how hot its run and how often it warms up and cools down substantially - thermal stress is one of the mechanisms that can causing failure (and this is due to the package, not the die itself, usually). Electrical stress (voltage spikes/transients) are another mechanism that can cause progressive (or sudden) failure.

Otherwise they are pretty immortal at room temperature and in storage or running cool and well within their ratings.

Well, a few years ago, the convection oven we used to solder circuit boards quit working. One of the 12 stages quit. Bought a replacement and scrapped the old one. There were a bunch of SSR controlling parts of the oven. A few of the SSR were used at DC and consisted of a MOSFET and a transistor. The oven ran 5 days a week for 8 to 12 hours a day and until one of the spot welded tabs on an inaccessible hearing element broke, we never had a problem.
I still have all the SSR and they are good. One AC SSR is controlling part of my irrigation system.
So, a normal MOSFET can outlast both our lifetimes.

1 What is the stall current of the pump.
2 Did you use a kickback diode across the pump.

A logic level mosfet is commonly used for a 5volt pump, not a relay.
First diagram here.

Hi, @roccckkky
What is the application that needs a pump to be turned ON/OFF in a 4 second cycle?

Your "attachment" is not seen.
Please read the post at the start of any forum , entitled "How to use this Forum".

Thanks.. Tom.... :smiley: :+1: :coffee: :australia:

Because you didn't have the mandatory free-wheel diode across the pump motor winding? When switching an inductive load you have to prevent the inductive kick-back voltage pulse, which for DC is typically done with a free-wheel diode (for AC an RC snubber is used). Failure to do this has burnt out the relay contacts much more rapidly than expected as they will have heavily arced everytime you switched it off.

Inuductive kick-back can generate 100's or 1000's of volts which is why it damages semiconductors switches and relays.

BTW relays do have limited lives in terms of switching cycles, using a MOSFET to switch the pump is probably a better solution.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.