Can I control a transformer with an SSR - Page 1
Forum section: electronics / beginners

author: mahmood.saj
author_rank: Contributor
timestamp: December 10, 2022, 08:12:37 am
content: Hi everyone.Goal:Creating a required pulse to change the pool light colorBackground:I am new to electronics and this forum.I have a multi color pool light which has 2 wires only, based on the documentation with a single pulse I should be able to send a color command.for example disconnecting the power for 180ms means blue, or disconnecting for 240ms means green.The pool light luminaire firmware requires accurately defined durations of power absences in the range 80ms ~ 1440ms.another example for dimming:- Break power for 120ms (+/-20ms).- One second (+/-0.3s) after power has been restored at the end of this break, break the power again for 510ms (+/-40ms).The pool light is using 12V and it has a dedicated transformer.and this is the regulation and rule that I need to follow:QuoteSo the final diagram should be something like:AC power outlet --->--- The control circuit what I need to build ------->--------Transformer ----->---- pool lightRequirements:- The control circuit needs to disconnect the power for specific amount of time- It should not destroy Transformer- The pulse should be received by pool lightWhat did I do so far:I decide to use SSR and ESP32 devkit v4. Also there is a logic level converter to convert 3.3V of ESP32 to 5V which required by my SSRSSR: KSI240 Series Single Phase AC Output Please find the spec PDF attachedPlease find the circuit digram attached.The 2 set of 6 pins at the middle of diagram are reserved for Logic-Level-ConverterA 240V to 5V 2Amp adaptor used as power source of the entire system.Output switches are connected to SSRInput switches are connected to wall switch via “1-Bit AC 220V Optocoupler Isolation Module Voltage Detect Board Adaptive for PLC” (From ebay)IssueI received a massage from the pool light company as follow:QuoteI am not able to find a normal relay which is capable of creating a 80ms pulse.So my questions areHow to create a required pulse without SSR? or to solve the issueHow SSR will destroy transformerPS: My circuit is creating a pulse but it is not accurate enoughThank you all for your reply in advance.

author: bidrohini
author_rank: Regular Contributor
timestamp: December 10, 2022, 10:13:56 am
content: You can check this too:http://www.mycncuk.com/threads/272-Solid-State-Relay-to-Switch-Transformer

author: coromonadalix
author_rank: Super Contributor
timestamp: December 10, 2022, 12:23:20 pm
content: Why dont you control the leds directly intead of controlling the x-formeryou have many solutions for led control an dimming them or rgb led strips etc ..... by remote, computer controlledFor a saferty point of view, you dont play with "mains" supply, and mostly being a "newbie" as you describe your selfYou would need scrs or triac based control to play with the main ac signal .... you need to play with the phase to get amplitude level etc ....and some basic x-formers hate that, they are not meant to be controlled like that

author: wasedadoc
author_rank: Super Contributor
timestamp: December 10, 2022, 01:38:06 pm
content: Quote from: coromonadalix on December 10, 2022, 12:23:20 pmThat is bad advice. The reason for"Do not attempt to control the secondary (SELV) outputs of the pool lighting transformers. This would be viewed as a breach of safe wiring practices for pool lighting."in the opening post is that the existing transformer is a supposedly safe barrier between AC mains and people in the pool water. By introducing any control system that is not completely battery powered between the transformer and the LEDs there is the risk of a fault or shortcoming in such a mains powered control system introducing dangerous voltage into the pool. That risk is particularly high in this case of a homebrew system constructed by a beginner.

author: ledtester
author_rank: Super Contributor
timestamp: December 10, 2022, 01:41:24 pm
content: What is the make and model of your pool light? And can you upload the documentation you have about it.

author: Manul
author_rank: Super Contributor
timestamp: December 10, 2022, 01:51:41 pm
content: If you want to avoid the possibility of SSR failing in a way that it half-wave rectifies and cooks the transformer by supplying it with DC, then you can add bridge rectifier and control it's output with SSR instead of directly controling AC power to the primary.For SSR timming you should probably sense the zero crossing of AC wave, and try to make your switch transitions at exactly those moments (when AC is 0V). Keep in mind SSR turn on and turn off times from datasheet.

author: themadhippy
author_rank: Super Contributor
timestamp: December 10, 2022, 02:35:19 pm
content: Quoteor use the same low voltage output of the transformer to power the control circuit,thats assuming its a proper tranny and not one of those electronic jobbies

author: mahmood.saj
author_rank: Contributor
timestamp: December 10, 2022, 02:51:15 pm
content: Please find the light protocol attached.

author: capt bullshot
author_rank: Super Contributor
timestamp: December 10, 2022, 02:52:31 pm
content: QuoteNot recommended to do so ... as the common transformer doesn't like to be turned on at the zero crossing. Doing so can create large turn-on current surges which may trip the upstream fuse or breaker or kill the SSR. It's better to turn on the SSR at some random phase angle - google "large transformer soft start" - properly soft starting a large transformer turns out to rather a complex procedure:https://neurochrome.com/pages/the-ultimate-guide-to-soft-start-designhttps://groups.google.com/g/sci.electronics.design/c/A0FWNqxAms8?pli=1

author: bdunham7
author_rank: Super Contributor
timestamp: December 10, 2022, 03:01:22 pm
content: Quote from: mahmood.saj on December 10, 2022, 08:12:37 amWhat do you mean by that? Are you looking for it in the specs or have you tried some and can't get them to work? I would expect an ordinary small control relay to do this just fine. Coil snubbers may add a few ms to the timing, but even then you can just offset that in your control software.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: December 10, 2022, 03:04:07 pm
content: Switching the transformer is also unlikely to work at all.the circuit very likely has a rectifier and smoothing caps after the transformer to create DC, and this will have a huge influence on any of your attempt to create such short switch times.The combination of DIY electronics combined with mains voltages and swimming pools is also one of the most dangerous conbinations you can do. In itself it's quite easy, but it's also easy to get it wrong with simple mistakes.It's just a very bad first project for someone in-experienced with electronics.My suggestion is to just buy the original controller for this pool lighting and go DIY on some other piece of equipment.

author: mahmood.saj
author_rank: Contributor
timestamp: December 10, 2022, 03:10:12 pm
content: Quote from: Manul on December 10, 2022, 01:51:41 pmThank you for your quick replay.Do you mean, if I do something wrong, it will damage SSR but not transformer? I can understand this, but the massage that I received claim, the transformer will get damaged and it was very confusing.I assume the biggest issue is surge current. If this is correct, The SSR which I am using is designed for 240V AC and at 10AMP has max surge current of 150AMP. How can I calculate if I am safe or not? Also I am using 2 x 10AMP fuses , one before SSR and one before transformer, I assume if the circuit use the high current for more than few millisecond, the fuses should protect the SSR and transformer.If I use the bridge rectifier, does it mean that I send just half of the AC waves to transformer? Is it safe for transformer to just receive falf of the waves?Is there any name for the zero crossing sensing circuit? I am asking to search and find a prebuild version of it (if exists, as i am a beginner)

author: mahmood.saj
author_rank: Contributor
timestamp: December 10, 2022, 03:16:29 pm
content: Quote from: coromonadalix on December 10, 2022, 12:23:20 pmThanks mate.As others suggest, due to regulation I forced to use transformer and I can control primary side of transformer only.Based on internet:QuoteDoes it mean the SSR relay which I am using is include a teriac and few extra parts to support 10AMP based on my requirements?And would you please guide me why based X-formers has issue with SSR?

author: bdunham7
author_rank: Super Contributor
timestamp: December 10, 2022, 03:26:53 pm
content: Quote from: Doctorandus_P on December 10, 2022, 03:04:07 pmThey actually don't. The LED pool lights are sealed modules that operate on 12VAC and have minimal internal capacitance.

author: mahmood.saj
author_rank: Contributor
timestamp: December 10, 2022, 03:27:09 pm
content: Quote from: bdunham7 on December 10, 2022, 03:01:22 pmIt could be my limitted knowledge about electronic parts and how can I find them, but normal relay which I found has very low hertz, and not able to turn on and off for 80ms.80ms command wget ignored by the relay, before it turn off, it turned on again.

author: mahmood.saj
author_rank: Contributor
timestamp: December 10, 2022, 03:37:25 pm
content: Quote from: Doctorandus_P on December 10, 2022, 03:04:07 pmI was assuming, as there is a transformer and fuses, they will make it safe، and worst case scenario, I will damage the SSR.But if it has a life hazard, I will skip this DIY project 😭So far I was successful to control lights, garage door and few othe stuff in my home automation but all of them were easy with a simple relay.This is the first project which needs an accurate timing and pulses and very interesting challenge. But it seems it is out of my limits.(based on your suggestion)

author: BillyO
author_rank: Super Contributor
timestamp: December 10, 2022, 03:45:18 pm
content: Quote from: mahmood.saj on December 10, 2022, 03:16:29 pmWhy would this be? It seems it would be far better to control the low voltage side of things.

author: mahmood.saj
author_rank: Contributor
timestamp: December 10, 2022, 04:03:47 pm
content: Quote from: BillyO on December 10, 2022, 03:45:18 pmMy circuit is working with 5v DC, and the pool light working with 12v AC.Putting another circuit after transformer which is not connected to main, sounds good to me,But due to Australia regulation I think, I am not allow to do that.Also I am not sure about energy consumption. As my circuit will be controlled via wifi, it needs to be turned on all the time, putting it after the transformer means, the transformer needs to be On, all the time, but if I can put it before transformer, I can shut-down the transformer power all together.

author: rstofer
author_rank: Super Contributor
timestamp: December 10, 2022, 04:28:48 pm
content: Ask the manufacturer or seller for a recommendation of a relay known to work.What is the rating of the transformer in VA or primary current?DigiKey has hundreds of relays that switch in 4 ms (symmetric) but I don't know what current is required.Even a relay rated 30A will make in 7 ms and break in 2 ms. You can tweak the timing in the uC to account for make and break times. You would need a scope to see this. Or, take the manufacturer's word for the latency.

author: rstofer
author_rank: Super Contributor
timestamp: December 10, 2022, 04:33:06 pm
content: Assuming that the lighting transformer plugs into a wall outlet, I would build the project such that the controller plugs into the wall outlet and the transformer plugs into a receptacle provided by the controller. Either as a receptacle mounted in the project box or a short piece of cord with a dangling receptacle.I wouldn't make any modifications at all to the lighting system and I would be darn sure the earth ground was continuous and connected to the project box if it is made of metal.ETA: or any metal is exposed - like metal screws. Ground any exposed hardware. If there is going to be a lot of exposed hardware, you might as well use a metal box and ground it. Use star washers to connect between hardware and the metal box. Things like this around pools are inherently unsafe.Rule: Any exposed non-current carrying metal surfaces are to be grounded.Is there a commercial controller? It would be much safer to buy something that has been tested and approved.Then there is the RCD for extra safety. Assuming such a device exists...

author: themadhippy
author_rank: Super Contributor
timestamp: December 10, 2022, 05:22:58 pm
content: ye lets go adding earths to a selv supply, the S dont stand for separate .o hang on

author: pcprogrammer
author_rank: Super Contributor
timestamp: December 10, 2022, 05:48:26 pm
content: From the manual:QuoteIt states using of mains-switching relays rather then solid-state relays. Like rstofer wrote, there are plenty relays to be found that are fast enough. But you have to take care of two things. The relay coil needs a diode in parallel to suppress voltage spikes when turned off. And you need a snubber circuit parallel to the transformer to avoid sparking relay contacts.But it would be better to just look for a commercial solution. Surely Aqua-Quip must have something for this.

author: Zero999
author_rank: Super Contributor
timestamp: December 10, 2022, 06:53:38 pm
content: It isn't a transformer, but a switched mode power supply, with some electronics to control the LEDs.A small mechanical relay should be fast enough. Here's one with an operate time of 4.5ms and release time of 1.5ms. A back-EMF protection diode will increase the release time. One way round this is to add a resistor in series with the back-EMF diode and use a high voltage transistor. Driving the coil with a brief high voltage spike can be used to speed operate time.https://www.citrelay.com/Catalog%20Pages/RelayCatalog/J104A.pdf

author: rstofer
author_rank: Super Contributor
timestamp: December 10, 2022, 07:21:19 pm
content: There simply must be a commercial controller. If one didn't exist, neither would the lights. Not everybody is going to want or even be capable of designing an interface box. A controller must exist!So, it probably comes with buttons or something similar to operate the various lighting modes. But I want to use the control unchanged and leave all the liability with the manufacturer. So, I would change my project to a robotic mechanical button pusher with a soft plunger.Not only would this leave the entire electrical installation unchanged, it would earn mega-bonus points for 'cool'. A cell phone app using WiFi would be the crowning achievement. I would start with a laptop app just because the GUI might be easier to create although there are SDKs for Android and iPhone.Leave all the liability with the manufacturers!Google for 'cell phone wifi app sdk diy' or something similar.

author: coromonadalix
author_rank: Super Contributor
timestamp: December 10, 2022, 08:29:11 pm
content: Quote from: wasedadoc on December 10, 2022, 01:38:06 pmlolll funny, i did install lots of pool leds or lightning inside pools and or outside, even put in concrete, AND i never played with the transformers main lines ..... Use the right controller thats all and if a company says otherwise they are #$#^#$^Whatever if its led based or any other technology there's other means to control it safely, if not any gadjets you add or build who are not certified could be viewed has hazardous, and if an accident happens because of that you could be held responsible .......Here in Canada it's another story, insurances companies could even sue you ..... have fun

author: BillyO
author_rank: Super Contributor
timestamp: December 10, 2022, 09:05:13 pm
content: The manufacturers of the OP's lights do make a controller. Two of them, in fact.https://aquaquip.com.au/dual-zone-remote-controller/https://aquaquip.com.au/lighting/instatouch/

author: Manul
author_rank: Super Contributor
timestamp: December 10, 2022, 09:51:15 pm
content: Quote from: capt bullshot on December 10, 2022, 02:52:31 pmYou are right, but I will explain my though process:1. Transformer for this kind of thing might be 10-20VA, lots of primary resistance, not a big deal.2. The controller on the secondary side is likely counting cycles and the timmings are based on cycles, otherwise it is harder to make it accurate. So switching whole cycles might be best bet if exact protocol is not known.

author: mahmood.saj
author_rank: Contributor
timestamp: December 10, 2022, 10:04:19 pm
content: Quote from: rstofer on December 10, 2022, 07:21:19 pmIt seems everyone suggest me to not doing this and go with off the shelves products.Yes there are few options and all of them using rf remote controll and not exposing any wifi or other connectivity.Sending rf signal via my circuit or robotic arm, has a disadvantage of not getting feedback from the system.I am not sure if the signal received or even pool light is on or not. That is the main issue that originally I decide to do DIY.Imagine you are outdoor(or you can't see the pool from your room) and you want to turn on the light. You can send a command but you don't know if it is working or not. For example sending the powercommand may turn on or off the light, but as you dont know the state, you will not know the future state after sending the command.(Sure it is a fun project after all and does not have a real important use case).So based on everyone's suggestion. I will not going to build it.I will change the project to detect the light status via image analysis to give feedback to my rf signal transformer module.Thanks everyone. You are all amazing 👏 💛

author: ledtester
author_rank: Super Contributor
timestamp: December 11, 2022, 11:33:05 pm
content: I think you should be able to find fast enough relays. Once I get my lab set up again I want to run some speed tests on the various relay modules I have collected.But if you only have slow relays at your disposal, consider this crazy idea...Instead of using one relay use two.You'll energize one relay, wait a little while and then energize the second. The first one will interrupt power and the second one will restore it. Then the minimal on-time of each relay won't be a factor.A rough schematic:

author: mahmood.saj
author_rank: Contributor
timestamp: December 12, 2022, 04:40:24 am
content: Quote from: ledtester on December 11, 2022, 11:33:05 pmIt is an amazing ideaquestion, is it safe to be used before transformers, is ti going to create any issue (like surge or anything else for simple transformers?)

author: bdunham7
author_rank: Super Contributor
timestamp: December 12, 2022, 04:52:31 am
content: If your transformer is a typical pool light transformer, it is probably on the order of 100VA and doesn't have any terribly difficult loads to drive. A regular relay will work fine and you can see from their instructions that snubbers and filters will actually cause problems. A regular, small control relay with 5A contacts is probably more than adequate.I took a minute to grab a random, small relay from something or other that I parted out, with a 12VDC coil and a 5A/250VAC contact rating. I set it up so that it was on most of the time but turned off for 80ms every 1s. I then set up a 5V power supply and a ~300R resistor so that I could hook up a scope to show the coil drive and the contact current (by measuring voltage across the resistor). This is how it looks.

author: Zero999
author_rank: Super Contributor
timestamp: December 12, 2022, 08:54:21 am
content: Quote from: mahmood.saj on December 12, 2022, 04:40:24 amWhy do you think it's a transformer? I very much doubt it is. In fact I'd go far as to say, it's not a transformer, but a specialised controller.

author: mahmood.saj
author_rank: Contributor
timestamp: December 12, 2022, 09:32:05 am
content: Quote from: Zero999 on December 12, 2022, 08:54:21 amPlease find the picture attached, based on the label it is 150VA

author: mahmood.saj
author_rank: Contributor
timestamp: December 12, 2022, 09:35:46 am
content: Quote from: bdunham7 on December 12, 2022, 04:52:31 amSorry I am going to ask an stupid question (as you know I am a beginner)Based on the picture that I shared in my previous massage (above this one) it is 150VA, 50Hz 32V, 4.7Ait is using 10A fuse inside.is it the same as what you mentioned? if yes would you please explain the image which you shared from oscilloscope? I cant see the AC waves at all, just two set of pulses, I assume it is the pulses which created by relay, but is it started at the zero or pick? or it is not matter?this is what I found but I dont have enough knowledge to understand it completelyhttps://www.te.com/commerce/DocumentDelivery/DDEController?Action=srchrtrv&DocNm=13C3206_AppNote&DocType=CShttps://electronics.stackexchange.com/questions/539039/transformer-makes-an-audible-noise-with-ssr-but-does-not-make-it-without-ssrAlsohttps://www.phidgets.com/docs/Solid_State_Relay_Primer#:~:text=SSRs%20are%20designed%20to%20either,turn%20off%20some%20inductive%20loads.They are best used with resistive loads - Zero Crossing SSRs are not able to turn off some inductive loads. It's very difficult to determine which inductive loads will create problems - well beyond the scope of this document. If your load is inductive, we recommend buying the Random Turn On SSRs.The SSR which I am using (based on the data sheet) can handle 440A surge as it is 40A model (KSI240D40-L, please see the data sheet attached)Based on the data sheet, it is `Zero switching`, does it mean it can not turn the transformer off, or even if ti can, it will create aproblem?If yes, then how can. I choose a normal relay (what I should I check in data sheet other than Hz) to make sure it will work? should I have any concern about voltage spikes? do I need to somehow make sure it is not going to turn on/off at zero accidentally ?PS: there is redial capacitor capacitor (black color in the picture) inside of the box as well. I assume this capacitor will create problem for my pulses , and needs to be removed. am I right?

author: wasedadoc
author_rank: Super Contributor
timestamp: December 12, 2022, 11:06:57 am
content: That black circular disc "capacitor" is probably not. More likely a protection device - transient clamper or thermistor. Cannot see if it is in parallel or series with the transformer primary.

author: EPAIII
author_rank: Super Contributor
timestamp: December 12, 2022, 12:47:00 pm
content: Yes,YES,YES!This is not a beginner's project. The financial liability you expose yourself to is enormous. It could even come back to bite you years after you have sold the house. Don't do it. I have a lifetime of experience in electronics and I don't think I would do it without a BIG liability insurance policy.If you can't replace the OEM equipment then get a NEW system and have it installed by professionals. Let them be responsible, not you.Quote from: mahmood.saj on December 10, 2022, 03:10:12 pm

author: pcprogrammer
author_rank: Super Contributor
timestamp: December 12, 2022, 01:20:40 pm
content: Quote from: mahmood.saj on December 12, 2022, 09:35:46 amIs it the original fuse that is 10A?The label with all the info states "USE 5A FUSES ONLY". (The 5 might be a 6, it is a bit hard to tell)Why are there two cables on the primary side? Is the box used to loop through to another device?Quote from: Zero999 on December 12, 2022, 08:54:21 amThe picture the OP posted clearly shows a transformer, so that is confirmed now.My advice is, if you insist on continuing, buy a proper relay and setup a test environment where you can experiment without controlling the pool light at first. Use low AC voltage from another source, like a small old style wall supply and use the relay to switch that. Measure on the low voltage side with a scope and check if you can make the needed pulses with the relay and your micro controller. Forget about the SSR.Only when you are certain all pulses are correct connect the pool light high voltage input to the relay contacts, but don't do it inside the blue box. Keep it fully separate, so that is easy to remove in case of some trouble or when you sell the house.

author: bdunham7
author_rank: Super Contributor
timestamp: December 12, 2022, 03:06:57 pm
content: Quote from: EPAIII on December 12, 2022, 12:47:00 pmI might agree that this is not a beginner project, depending on your definition of 'beginner'. But I don't see how there is any more liability than say installing a wheel on your car. Just don't mess with the secondary or grounds--just interrupting the primary doesn't really introduce any hazards. I have pool lights quite similar to the OPs, converted over from 120V incandescents. I installed everything myself and I really don't worry about it a lot. The transformer is SELV (12VAC in my case) and shielded for a very good reason--to make sure that there are no significant hazards no matter what happens to the wiring or the lights.

author: bdunham7
author_rank: Super Contributor
timestamp: December 12, 2022, 03:46:47 pm
content: Quote from: mahmood.saj on December 12, 2022, 09:35:46 amThere is no AC wave, I'm just using a small test current to show the operation timing of the relay contacts. The pink trace is the 80ms pulse driving the relay coil, the yellow trace is my test current through the relay contacts, you can see that it is delayed by about 6ms (actuation time) and is ~88ms long, which means the release time is longer with my circuit. The exact setup of the coil drive will cause the release time to vary.QuoteSomething small, like this:https://www.mouser.com/datasheet/2/315/Panasonic_Relay__LD_P_Series__100120-1947890.pdfYou'll see that it gives you actuation and release times of <10ms, so probably good enough for your purpose without any corrections. You do not have to make any attempt to time the relay with respect to zero crossings or anything else, nor do you need to worry about spikes or snubbing on the high voltage contact side. You do need to snub the coil. You really should abandon the idea of an SSR here because of all the other potential issues already discussed.QuoteThat doesn't appear to be a capacitor. It is likely an NTC inrush limiter and you definitely should not remove it.

author: Zero999
author_rank: Super Contributor
timestamp: December 12, 2022, 07:11:42 pm
content: Quote from: mahmood.saj on December 12, 2022, 09:35:46 amWow. It appears I was wrong.I still wouldn't recommend a solid state relay. There are plenty of good old mechanical relays which will do. Here's an example, which has a 4.5ms operate time and 1.5ms release time.https://www.citrelay.com/Catalog%20Pages/RelayCatalog/J104A.pdf