Logic diagram for hot tub "Salt Water Chlorine Generator" control unit

Thread Starter

presse55

Joined Nov 24, 2017
5
Hello forum members!

I'm attempting to build a simple control unit for a salt water chlorine generator (SWCG).

In a nutshell, a SWCG consists of an electrolytic cell, bathing in a salt water solution. A voltage applied to the plates in the cell causes an electro-chemical reaction which generates hypochlorous ions - to sanitize the water and oxidize bather waste. SWCGs are becoming gaining in popularity (as an alternative to bleach or pucks) to keep pool and hot tub water clean.

The control unit in its simplest terms (see block diagram below):
  • is a programmable (Arduino) timer which applies DC voltage to the plates for short periods (eg 15 minutes) at regular intervals (eg 6 to 8 times) throughout the day; so an RTC & battery are part of the project (not included in diagram);
  • a fixed 24 VDC is required for the cell to generate the ions; the current varies between 20A and 25A depending on salt concentration and water temperature;
  • on alternate cycles that the plates are energized, the current must change direction;
    so, if at noon plate A is positive, and B is grounded, then at the next cycle, say 4PM, plate B will be positive and A grounded;
  • I contemplate using SSRs (solid state relays) to control current direction on alternating cycles (see block diagram);
  • in the diagram below, when pin 1 is high, current flows one way (B to A); when pin 2 is high, current flows the other way (A to B);
    Note: pins 1 and 2 are NEVER high at the same time! but both can simultaneously be low (ie. no current flow in either direction;

I am in the very initial stage of drawing this circuit out.

The purpose of this post is to validate my approach in the use of SSRs .

I've developed several Arduino projects in the past, and am OK with that. I'm just wondering whether my use of SSRs is okay in this context.

Thanks in advance!!

Ron
MontrealSWCG control .jpg
 

DickCappels

Joined Aug 21, 2008
10,153
The solid state relays should be fine as long as they are intended for DC use.

Since it is 24 volts you might be able to save some cost by using MOSFETS connected in a full bridge configuration.

upload_2017-11-24_23-5-4.png
 

DickCappels

Joined Aug 21, 2008
10,153
Yes, good catch. Good time to note that the schematic I posted is not a detailed circuit recommended for this application, it is merely to illustrate the function of MOSFETs in a full bridge configuration.
 

philba

Joined Aug 17, 2017
959
I assume the initial diagram is more of an intent than a schematic. I don't get why you have 4 SSRs in it. Also, what is your cycle frequency?

For what it's worth, an H-Bridge is the better way to go.
 

crutschow

Joined Mar 14, 2008
34,280
You might use an H-bridge motor controller such as this to drive the cell.
It has PWM control but you don't have to use that feature.

Edit: Actually the PWM input could likely be used to turn the cell on and off by a third signal from the Arduino.
 
Last edited:

Thread Starter

presse55

Joined Nov 24, 2017
5
Thank you kindly for the expert replies!

I'm admittedly a noob in electronics, and have learned something new today: the use of an H-bridge to reverse polarity on a load. Definitely sounds like a better idea than the 4 SSRs!

Philba, the cell only goes one once every 4 hours, for 15 minutes; and so the current also only needs to change direction once every 4 hours.

More question may come up as the design idea progresses.

Thanks again!

Ron
Montreal
 

philba

Joined Aug 17, 2017
959
Since the cycle time is low, your simplest approach would be to use a DPDT relay. An additional relay could be used to control the actual power. The relay drivers are very simple.
 

crutschow

Joined Mar 14, 2008
34,280
Since the cycle time is low, your simplest approach would be to use a DPDT relay. An additional relay could be used to control the actual power. The relay drivers are very simple.
To save the switching load on the relay contacts, add a small delay so that the relay is switched to the desired state before the power is applied to the cell.
Below is how to connect the DPDT relay.
You cell is in place of the motor, of course.

 

Thread Starter

presse55

Joined Nov 24, 2017
5
Awesome Philba, Crutschow.
This is getting simpler by the minute!
Since power to the cell is off (by action of 1 relay) when the DPDT relay (2nd one) is switched, I guess I don't need the flyback diodes, right?
 

crutschow

Joined Mar 14, 2008
34,280
This is getting simpler by the minute!
Note though that the cost of the two 25A relays may be more than the cost of the H-Bridge driver I referenced in post #6 (which should be able to do the work of both relays).

Edit: Below is a table from the manual for the H-Bridge module showing how a microprocessor can control the on/off (PWM input) and direction (DIR input) of the bridge output current.

upload_2017-11-24_19-59-44.png
 
Last edited:

Alec_t

Joined Sep 17, 2013
14,280
I'm no electrolysis expert, but couldn't you reverse the polarity at mains frequency; i.e. simply use 24VAC rather than 24VDC and all that switching stuff?
 

Thread Starter

presse55

Joined Nov 24, 2017
5
Alec_t

Interesting suggestion. I might have considered that, but all SWCG cells I've seen operate on DC.

Some systems don't even bother switching polarity at all - but that causes scale buildup over time. Switching polarity between cycles reduces scale buildup. I'm unaware if running AC at 60Hz would impact the operation of the cell itself.

Thanx just the same.
 

yarnzi

Joined Dec 1, 2017
4
Mate dont use four relays that wont definitely switch all together simultaneously, do exactly what presse55 said, use a 24v 30a dpdt relay to switch, because if one of your relays decides to fail your are going to have serious issues. if you use only one relay, at least if it fails it is sure to fail in a way that will not destroy the cell.

Adding to this, how are you stepping down the power? you should use a toroid or normal coil transformer with dual secondary. Then get two s4065j SCR's, These will rectify the ac to dc.

put positive wires from transformer to SCR Kathode
then the negative wire from the cell, split it so to connect to both of the SCR anodes
on a salt cell there is a thinner third wire, that is the important one, that wire has to be split, put a diode on each of the ends and connect each one to the SCR gate. Then get a low resistance (under 700ohm) resistor and bridge it across the kathode and the gate of the SCR. The third wire is a slave to the charge created within the cell, so if there is no salt, the charge coming from the third wire will be very low, this in turn means the power going to the scr gate is low and will lower the charge that goes to the plates. without this your plates can overheat and seeya by! It regulates the current that gets to the plates based on the conductivity of the water, so it protects the cell when pool is low in salt.

When you use the arduino you cant just use elapsedmillis or an rtc on / off timer function to switch the relay. The plates are well charged up and take time to discharge, simply flicking a relay for polarity reversal will hurt the cell hard and cause it to have a short life, shredding the coating on the plates. You need 3 relays working on three different jobs.

first relay turns the chlorinator runtime on using a standard rtc timer code. The second relay is running an on off timer schedule for polarity swapping, the third relay actually disengages the second relay from the cell for 1 or 2 minutes while cell discharges, while disengaged the second relay swaps polarity. then after the 2 min is up the third relay reconnects the power to the cell. the third relay cuts power before the transformer, that way you dont need a massive relay and you can use 5v / 240v 10a relay that arduino can run directly from a pin.

You should be aware that salt conversion to chlorine reacts best between 8 to 14 volts.
also the cell splits the water not the salt in the reaction, it creates NaOCl sodium hypochlorite and hydrogen gas. The chlorine now loosely connected can be separated and used up either by fighting algae or evaporation. This leaves the pool with no choice but to run out of chlorine in time, the NaOCl now is NaO which connects to the stray hydrogen to produce NaOH, caustic soda, yes drano, the alkalinity so high from the caustic soda you get the rise in ph. To lower the ph you have to reintroduce chlorine into the pool so the sodium once again reverts to NaCl and the caustic soda goes away. So to reintroduce chlorine in the pool you use Hydrochloric acid. So you really never lose pool salt apart from overflow or back washes.

So the fuel so to speak for a pool is actually the hydrochloric acid, the salt is just a transportation vehicle to get to the cell.

So anyway i just wanted you to know that charging salt cell plates directly at a constant charge is a bit of a no no, the charge has to be regulated in relation to the conductivity of the water, so that thin third wire really counts. give me a days time and i will upload a schematic of what i am talking about with the scr rectifiers. Try to have circuits steer way clear from a transformer and cell, its bad news. and use emf and rf chokes between your circuit and the pump connection, spikes and interference from the pump when the capacitor is faulty will make light work of any protection circuit on a cheap dc converter and easily make its way to the arduino board.

to regulate the output of the cell use a mosfet on that thin third wire coming from the cell, get a 10k pot and send it to an analog pin for analog read code, then pwm it to the mosfet, AND USE A DIODE, no one wants an accidental 30 amps coming to meet their arduino board from a pwm pin. Note that by adjusting the output of the third wire - which by the way does not swap its polarity - when you have the output turned up to full you guarantee that it can only reach the potential output that the system can deliver to the cell in relation to the conductivity of the water passing through the cell. will be back with a drawing for ya. I make arduino chlorinators all the time. :)
 

yarnzi

Joined Dec 1, 2017
4
i forgot to mention that the positive wire from the cell goes to the ammeter, then out of the ammeter to the negative on the transformer secondary. i know, it seems as though the cell and the SCR's are hooked up in reverse to what you would expect it to be, but pool chlorinator designers do it this way so it is clear that the brown return wire from the cell is going into the ammeter and leaving the ammeter to ground.
 

Thread Starter

presse55

Joined Nov 24, 2017
5
Yarnzi,

Thank-you so much for all that information. I now realize my approach was way too simplistic.
Your post gives a lot to digest. A schematic would be awesome to get me moving along, and not make mistakes, or fry components!
Specially also, knowing that I'm not alone out there trying to put together an Arduino based chlorinator is really comforting.
Thanks again, and I'll be keeping an eye out for your diagram(s)!

Ron
 

John Hill 1

Joined Dec 13, 2018
1
i forgot to mention that the positive wire from the cell goes to the ammeter, then out of the ammeter to the negative on the transformer secondary. i know, it seems as though the cell and the SCR's are hooked up in reverse to what you would expect it to be, but pool chlorinator designers do it this way so it is clear that the brown return wire from the cell is going into the ammeter and leaving the ammeter to ground.
Hi Yarnzi,

Excellent post btw regarding the Chlorinator, it would appear to be one of the nets most closely guarded secrets, i have spent weeks trying to find information on the operation of essentially a very simple process (without damaging my cell).
Did you ever mange to put together a rough schematic? i have found some info but its very incomplete, I to would like to control operation of my photocell from a micro controller, i get your explanation regarding adding the Mosfet to the flow/charge detection, but i would like to know a little more about it, you said its polarity never changes, with reference to what? 0v (centre tap on transformer). What voltage can can i expect with respect to water charge/salt content

If you do find the time even a basic schematic would be awesome.

Cheers m8

Jono
 
Top