Relay woe

Good morning,

I have been using my DigUno with a relay on GPIO 19 (Q3) for the past few seasons. I updated WLED to the latest (14) and now the relay does not receive a signal to go high. Both the relay, and the power supply work independently, and the PS is powered if I connect the NC side of the relay, but not if connected NO. Before I rip the setup apart, has anyone any ideas?

Have you tried to go back to the previous version to see if the relay works?

You should be to see the GPIO pin change voltage from Low to High with a voltmeter.
You could try a different GPIO.

All good suggestions. I tested the voltage change on the Q3 & Q4 - no change. Q1 & Q2 are pulled low, and there is no change there either. I am going to roll back to 13.0 “Toki” and see what happens.

Not sure if you tried or not, but may want to install from here: https://install.quinled.info/

Thanks for the suggestion. For the life of me, I cannot figure out what happened.

I came back to this relay problem, after about a year with some new understanding. I found, by experimentation, that the GPIO pin (19) on the ESP32 I was using still produces a logic signal, by oscilloscope, and that the relay’s I had been using to isolate the power supply’s (coil 5VDC@8A 120VAC) were failing due to the contacts burning out. After the second attempt, I cut the failed relay apart and verified that the contacts had failed - burnt black. Now, why a 10 amp relay would fail, is beyond me; the power supply was barely loaded when the relays failed. These are the inexpensive ubiquitous ‘blue sealed box’ dry contact relays. Has anyone been able to source a better quality relay to idle the power suppl?

So far I have only had 1 lil blue box fail and it got stuck latched where it would not cut the power. I was switching the AC side of psu. I think you are switching the DC side? You could try a DC/DC SSR. I am using a couple DC/AC SSR’s for a couple control boxes that sit right out in the snow/ice in winter.

I have not used a DC/DC one but I saw this on Amazon: https://www.amazon.com/SSR-60DD-3-32VDC-Output-5-240VDC-Plastic/dp/B09T92L2YJ

Edit: I just saw these, they may be a bit more beefy than the regular blue box: https://www.amazon.com/HiLetgo-Channel-Optocoupler-Isolation-Trigger/dp/B0CHFJSNP6

1 Like

Thank you. I’m trying to latch the AC so the PS does not idle when the Xmas displays are off.
Like this:

Line → 5VDC 0.5A PS (from wall wart) → 5VDC relay. The 5VDC relay switches the 120VAC line to the main power supply.

The little guys just burn out. I will try the 5VDC coil 30A relay you suggested and post the results here.

1 Like

What you may have to watch out for is the surge current when you power up the supply from “dead” (and down). The initial (very short) surge to charge the supply capacitors can often be 10x (or more) than the normal run current.

The disconnect current can cause a spark across the relay contacts when you shut things down if you’re under load. It doesn’t take many of those to wipe out relay contacts.

SSR’s can be a reasonable solution, but be forewarned that you need to rate them at well byeond what your “normal” current reqt’s will be due to surge.

Thanks for the tip. Will a 3.3VDC logic pulse be enough to trigger a SSR?

Really depends on the SSR you pick and what the mfg specs say.
For power supply/lines control, it much less of an issue than when you’re trying to do PWM dimming.

In the worst case, you could always use a levelshifter to get the signal up to 5V (yes I know, that’s more complexity).
BTW, that’s one application where I2C type shifters may be appropriate - relay/SSR drive.
Little to no speed requirement.

I have used these and they work with 3.3v

Thank you. I will investigate.

I received a couple of 20A relays today. I will test the cap. surge theory, but I suspect you are correct. The SSR’s might be a good fit if I can trigger them with logic level voltage. I have some cheapo level-shifters laying around.

For relay/SSR Power Supply drives from a GPIO, a simple 2N3904 and 2 resistors + blocking diode will work as a simple levelshifter (that also Logic inverts).

Note if using these type of relay shields, do not level shift them. They do not like that. https://www.amazon.com/gp/product/B01NACU547

No, I went straight to the relay from the GPIO, but those are the kinds of relays that are burning out.

I received and installed the 20A relay this afternoon. So far so good. I am also going to experiment with the SSR. I have never used one before and I am curious.

I received the SSR yesterday. Having never used one before, I am impressed. It triggered easily with the logic level signal from the ESP32, but I think I will add a simple level shifter as divsys suggested. This UNO is remote from the router, and I am hedging all of my bets.

The beefier relay also worked well, but, oddly, was the same price.

I have 2 controllers using the SSR’s and have not had any problems with them switching @ 3.3v from the gpio. But I guess it can’t hurt to add a shifter.
Check the specs of the UNO to be sure the relay pin on it is not already shifted. I don’t use any Dig controllers and I know @Quindor has some of the pins on it shifted but am unsure of what ones.