Looking for power-switching relay with sufficient precision

Hi everyone,

I have a multicolour pool light which is receiving command to change to specific colour. the light is using two cables only and there is no third cable.
based on the documents, the light is changing colour based on the duration that power is disconnected
for example Break power for 120ms (+/-20ms) means DIMMING
or Break Time of 160ms means Blue colour.
There are 15 different command (different break power time in ms)
I tried Shelly one but it is not accurate enough for these commands.
Do you have any suggestion (existing device) or a DIY project ?
Input is 220V and 10Amp

Technically I want to create something similar to InstaTouch but capable of connecting to Home assistant and my home automation system.

Your guidance, help or idea would be appreciated.

You need mosfet power supply controller by digital input. Like switch mode power supply that will allow fast ON/OFF I believe.

This should allow high speed switching of power ON/OFF you require.

Thanks @tmjpugh.

I am new to electronics so please correct me if I am wrong, I did a quick research and it seems MOSFET can’t be used for AC.
I think If I can find a relay or optocoupler with less than 10ms delay, and somehow connect it to ardrino I think it should work.

PS: The light in the pool using 32V-AC 5Amp, I have a transformer before the light, so I can put my module before (220V-AC 10Amp) or after transformer (32V-AC 5Amp).

Any suggestion or guidance would be appreciated as always.

yes. optocoupler with ardrino would work probably.

I used a solid state relay for one of my projects - there are models that support switching of AC

I’ve seen them a lot cheaper (Aliexpress) but this is an example

Switching times for that above relay from the data sheet:

Turn-On Time: 20 ms, AC; 05 cycle, DC Turn-Off Time: 30 ms, AC; 05 cycle, DC

Not the 10 ms you want, but a few calculations will tell you if it can switch in the time frame you require as this time would be consistent.

Thanks @zoogara

Just to confirm, for example if the relay should be off for 80ms
I need to turn off the relay in 70ms, 30 -20 = 10ms less than what it should be (20ms will take to turning on, 30ms will take to turning off, so if I send the command in time 0, in time 20ms it will turn on, after 70ms, the relay was off for 50ms only, but the command will be applied after 30ms which is equivalent to 50 + 30 = 80ms)

If I understand you correctly, I need 20Hz (as I need to set the time for 70ms) and the one which you suggest has Line Frequency Range: 47 to 63 Hz which is more than that I want.
So your link should work for me

It has all the checkboxes
✓ Can support 240V AC 10Amp load
✓ Can get command from Ardrino (low DC voltage)
✓ It has an acceptable speed to turn on and off and good HZ (can accurately turn on and off with less than 20ms threshold for durations equal or higher than 70ms)

Thanks mate. I will keep posting my progress here so everyone will be able to use it.

Thanks @tmjpugh I will try SSR for now.

Yep just be sure to read the data sheet for whatever you buy so that your on-delay - off delay is no more than 10ms and you should be able to do the switching for any time frame greater than 10ms + your CPU delay.

Good luck and let us know if you succeed.

Important update:
For who ever reading this post in the future. Don’t do it.
This project is very complicated and playing with transformator is another complexity in its own.
You can read the entire conversation here:
At the end, I decide to not installing the module behind my pool light

Original massage:
Hi everyone, I finally managed to create my first circuit board which passed the test.
My findings:

  • NodeMCU with esp8266 is not good enough, the timer is not accurate and even it has 160MHZ capability, due to timer error will create issue.
  • Esp32 DevKit V4 will work just fine, still the timer is not perfect and has some error but good enough.
  • Relay: SSR KSI240 (need 5v)
  • to supply 5v I used logic level converter “4 Channel 5V 3.3V IIC UART SPI TTL Logic Level Converter”
  • Also I add heatsink for SSR and 5v fan with 10 seconds delay circuit with 1000microF capacitor.

to get input from wall switch I am using “1-Bit AC 220V Optocoupler Isolation Module Voltage Detect Board Adaptive for PLC” from ebay
a 240v to 5v power adaptor with support of 2Amp (from ebay)

this diagram support two wall switch input and two outputs but it is tested with one SSR and one input only
two set of 6 pins at the center of digram are reserved for logic level converter (3.3v to 5v)

Thanks everyone and happy to get feedback about the circuit.
In few days (after I received few feedbacks here, I will start to create a PBC by etching and createa box for it, I will post the result here later when it is done

1 Like