Controlling 230 VAC pump with SSR relay

Hi,

Let me start by saying that I have very little experience with the Arduino, electronics and programming, but am starting to learn.
I bought an Arduino (well, actually an Atmega168 Freeduino) quite some time ago, to make a controller for a LED strawberry growing test setup. I never got further than blinking a single LED on a digital pin, because I didn't have the time to learn all those new things back then.

I have time now, and new ideas, and I'm very eager to learn more and finally start using my Arduino! I plan to do this by gradually learning and adding new things to my Arduino, to monitor and control my backyard pond system.

I want to start by controlling the pump in my pond, which is a 230VAC 220W bilge pump. It is currently on a mechanical timer, 15 minutes on and 45 minutes off, but I want to be able to put it on a 5/55 minutes on/off cycle.
I am planning to do this by attaching a solid state relay to a digital pin of my Arduino. I read a bit about SSR's, and decided I wanted to keep it as simple as possible by using an SSR that can be controlled directly with 5 VDC and low current. I came across a Crydom D2425 which I can get qutie cheap ($10). It is however a bit oversized (rated 25A, I only need 1A).

Crydom D2425 Solid State Relay
Control voltage: 3-32 VDC
Typical input current: 3.4-20 mA
Output voltage: 24-280 VAC
Output current: max 25 A

I read on this forum that I can just put such an SSR directly on any digital pin, and that I should use a 220 Ohm resistor to be safe. Is the resistor to prevent thermal runaway, like with LEDs? I believe I should connect the resistor in series on the 5V side, but wouldn't that leave only 5-(220*0,020)= 0,4 V on the relay - can anyone help me out here?

I also plan to add two switches to be able to manually turn the pump on (even if the Arduino is off) or off, see picture.

Will this setup work, and do I need any additional components? Do I need a snubber circuit (because of the inductive load)? Thanks in advance for any help!

Things I'd like to add later on:

  • A couple of DS18B20 1-wire thermometers
  • 16*2 LCD-display using a PCF8574A?
  • Fish feeding machine
  • Some sort of water level sensor
  • Water sensor in siphon overflow
  • Constantly looping PHP script to run on a hacked NAS webserver, to monitor and control stuff :o
  • ....

Hi,

the input voltage can be up to 32V and the input resistance is 1500 Ohm. Therefore a input resistor is not necessary!

Mike

The disadvantage with a SSR over a relay is that there is a little current leakage, approximately 1ma to per Ampere which will be flowing when switched off.
So I would make your manual off switch a main rated switch, and use a ELCB when dealing with water and the outside.

The SSR I'm using are 3 to 32volts and I never use a resistor .

Thanks for the replies!

I'm not entirely sure how an SSR works, but I thought the 230V part in the SSR is galvanically isolated from the lower voltage part (octocouple). Does the leakage come from a built-in snubber circuit? From where to where does it flow? I tried to look it up, but so far I'm afraid I don't really understand :frowning:

The Arduino and the switch itself will be inside the house, away from any moisture. I will not cut the pump cable; I'll just make a box with the Arduino and switch in it and an input and output socket (and I'll make sure to connect the earth). Our wall socket has an earth connected to an ELCB, is that what you mean?

By the way, I ordered the SSR and should receive it the day after tomorrow. :slight_smile:

How an SSR works...

An optocoupler works with the input firing off an LED that switches a phototransistor on the output side.

An SSR is just a larger version that modifies the output, using a photo-switched trigger circuit to operate a TRIAC.

No, it's not leakage between the low and high voltage sides.

When the relay(SSR) is off, it's not fully off , the output from the SSR is still 230 volts even when switched off, but only a few ma , in your case around 25ma

the output from the SSR is still 230 volts even when switched off,

This means that it will still byte you when it is off.

Thanks for explaining!

So if I were to use an off switch on the 5V side, it would not have to be mains rated. That's what peter247 said a couple of posts ago, and that's what got me confused. :-?

I ripped an old computer PSU apart and I'll use the C14 IEC connector as input in the box, and the switch connected to it as off-switch, and another one as on-switch (so no buttons on the Arduino side). I'm still looking for something to use as mains socket (output). :slight_smile:

I wouldn't put any switches in the wiring between the SSR and the pump or between the SSR and the Arduino. I would connect the on and off switches to two digital input pins and use software based on those switches to override the software that is normally controlling the SSR.

Don

Thanks Don, that may be a better idea.

I wanted those switches directly on the 230V part, to easily turn the pump on when the Arduino is off. But since the Arduino will allways be on, it is no problem to do it the way you describe, and if for some reason it's off, I can always unplug the pump or plug it directly in the mains socket. :slight_smile:

The SSR arrived today, and I got it working. :slight_smile:

Thanks for all the help!

Hmm,
I have a similar problem controlling 240V HPS electronic ballasts @ 5.5A and called Opto22.
Given the presence of 2 x 120V hot conductors for a 240V circuit I was advised to switch the hotside only(not ground) to turn off the ballast somewhat safely and then only have leakage current to worry about
ie the engineer approved solution is to use 2 x 240 SSR ie 1 per hot conductor and switch from the same output pin. (and what the ballast manufacturer recommended also)

I was just in the process of ordering the SSR(s) when I came across this forum post

Any body have any input to the HPS electronic ballast issue @ 240V?

gwen

Are you sure you are replying to the right post? I am not currently having any problems with my SSR, it's working just fine!

I am not sure what kind of problem you are having, but I did read that SSR's are not recommended for switching HPS. Am I understanding correctly that you have a circuit to provide 240V from two 120V sources, and that is why you need two SSR's also?

And why is it better to switch the 'hot' side, instead of the ground?

Hi Thomas,
I should have specified I am hijacking your thread slightly to bring up some concerns of mine and hopefully get some more input to my design issues .(and maybe illustrate some potential hazards for US users).

Given you are in amsterdam how is your 240AC supplied as 3 conductors + ground or as 2 conductors +ground?

I am in the US where 220-240 is wired as 2 hot leads @ 110v and a common, +ground while your relay in your case is switching a pump just fine, my concern is when attempting to switch from other than the hot leads you leave a very hazardous circuit in place(especially for pumping conductive liquids).

So the real query here is and yes I am replying to the right post, is how exactly is the 240VAC oresented at the socket to you.

as a single 240AC conductor or 2 conductors? if as a single 240AC conductor then yes you will be ok with switching one hot lead.

And are you switching the the hot conductor(s) or ground lead with the SSR?

BUT if it is presented as 2 hot leads you may want to put a call into Crydom for a support inquiry like I did to the ballast manufacturer and to Opto22.

and on another side note, SSR(s) are being incorporated into HPS electronic(digital) ballasts already(too expensive ). Even Magnetic(transformer) ballasts can be accommodated with proper circuit design according to the data sheeet from Opto22.

and I was advised by ALL concerned to always switch the hot side NOT the ground, to do otherwise leaves a fully energized circuit just waiting for someone to make the connection to ground(with a part of their body).
Switching the hotside conductor(s) leaves only leakage current to deal with in the circuit, in addition I am also installing a 240ACGFI breaker.

Why all the caution? the design is ultimately meant for green house enthusiasts to add supplemental HPS lighting in fall and winter as well as part of a complete Hydroponic control system I am designing and implementing.

As I am older and suffering from CRS(cant remember S**T!), I am trying to design my circuit NOT to cause me an early end :slight_smile: (or any person who might attempt to duplicate my design(I am preparing a wiki pages on same eventually).

And finally the SSR will switch quite happily either the ground circuit or the hot side the safety depends on which path is switched.

Very happy your SSR is working for you though,I just wish the US system didnt make things quite so complicated(the SSR manufacturer loves selling 2X as many relays for these kind of apps I suspect.)

any comment on all my drivel above??

kind regards
gwen(who is greatly upset by having his SSR budget doubled because of the above)

hmm you arent the same thomas S from rcgoups.com are you?

hmm in the above post I should have stated switching common or hotside.. not ground or hotside.. sorry.. been up all night working on code for this..

regards
gwen

gwen,

In the US, you've got the line/hot, netrual, and equipment ground. Those are proper trade names. The NEC calls them the ungrounded conductor, grounded conductor, and equipment ground/grounding conductor. Proper nomenclature is important here.

The reason that you need two SSRs for your application is not because the US system is more complicated than other places (it isn't, really), it's because the US standardized on 120V rather than the 240V or so that's more common in Europe et al. So we need twice as much current for our toasters and microwaves and such than others do because we have half the voltage. It also means that when we need 240V, we usually need to use two separate line conductors in tandem.

And yes, when you switch a circuit you always switch all of the line conductors simultaneously, whether there's one or fifty--you should never leave a line conductor running to a user-accessible device when the device is "off".

Thanks, I think I understand what you mean now.

Gwen, I live in the Netherlands (not Amsterdam, which is our capital; I live in another city) where we've had 220/230V mains power for at least 50 years now.

We used to have 127V from the wall, later on 127V with 220V between phases, and eventually just 220V (with 380V between phases for industrial equipment). Recently, it was standardised to 230V 50Hz for all of Europe (a compromise between mainland 220V and British 240V).

European plugs usually have 2 pins (only one of which is 230V AC) and sometimes a protective earth connection.

(I'm not on rcgroups.com by the way.)

Thanks for explaining why you should always switch the live wire instead of the ground, it seems logical. It might not matter for my application, but I suppose it's a good habit! :slight_smile:

I've used an SSR with the Arudino. It's trivial, does not need any resistor and works fine. If you are doing motor control of any kind with an SSR make sure the SSR has a snubber built in or get an external snubber meant for use with motors. You would need the snubber for a contactor (relay) also.

I do not recommend you use any sort of rapid switching with a CCFL. I blew one up switching it 1 sec on 1 sec off. :wink: LEDs and incandescents work fine. :slight_smile:

Hi Ajb,
of course you are right about the names of the conductors,,(CRS remember :slight_smile:

and there is a LOT of variability in SSRs

Opto-22 - built like a truck but no protective cover, does have heatsink plate built in dont know if screws are captive led model extra
liquid epoxy encapsulation. rated current without external heat sink
27.00 + cover cost
$$$

Omron included captive screws safety cover, led indicated.. NO heat sink maximum rating for any with out HS is 4 amps(snubber)

15.75 for 10 amp
18.xx for 25 amp

have one hooked to the arduino turning a small room fan on and off as a 96 hr burnin.

MUST have MORE SSR(s) for total environment domination!

Will setup the HPS digital ballast experiment tomorrow.

gwen