Relay voltage discharge - flyback advice - Page 1
Forum section: electronics / projects

author: tony359
author_rank: Frequent Contributor
timestamp: October 12, 2022, 10:11:40 am
content: Hi all,I have a project I am trying to put together, basically to sense when my AC unit turns on so I can turn on an extractor fan.I decided to go with a current sensor on the AC line: when the compressor starts the sensor triggers a relay. The relay triggers a 24V relay which turns on the 220V extractor.Both the sensor board and the relay are 24DC powered, from the same PSU.The circuit worked a few times and then the LM358 op-amp blew up when I powered the board.Checking with my scope I found that when the relay (the one triggering the 220V fan) is de-energised, the magnetic field collapsing causes a voltage spike up to 170V (326V p/p) which clearly the op-amp didn't like.I added a diode at the relay coil and that lowered that spike to something more manageable of 60V (120V p/p) but I was wondering if I can do more to protect the op-amp?One way would be to use a separate supply for the current sensor board but that would mean two power supplies which I'd like to avoid.Any advice?A basic sketch of the circuit is attached. Thank you!

author: mikerj
author_rank: Super Contributor
timestamp: October 12, 2022, 11:50:41 am
content: The relay within your circuit controlled by the LM324 is much more likely to be a problem, does that one have a diode across the coil?

author: pcprogrammer
author_rank: Super Contributor
timestamp: October 12, 2022, 12:06:44 pm
content: You might consider a solid state relay. It switches on the zero crossing and takes care of the problem you are having now with the relay. Another advantage is no sticking contacts due to sparks switching an inductive load like an extractor fan.As an example, but it is 5V on the control side.https://nl.aliexpress.com/item/32788946442.htmlTry and search on google for 24V based ones.

author: tony359
author_rank: Frequent Contributor
timestamp: October 12, 2022, 12:28:57 pm
content: Thanks all!I purchased the circuit ready made. It's this one:https://www.ebay.co.uk/itm/124221741149?var=425074740439Yes, I can see a diode across its coil.solid state relay seems to be a good option indeed - a bit pricey though. Any alternatives you could think using what I have already?

author: pcprogrammer
author_rank: Super Contributor
timestamp: October 12, 2022, 12:39:11 pm
content: It might be possible to modify what you have, but that depends on the signals. It looks like a transistor is switching the relay. Q1 near the relay. Solid state relays are not that expensive if you are willing to wait for them.https://nl.aliexpress.com/item/1005003149575518.html. But if these are suited depends on how much current the fan draws.I'm using the 5V types to switch central heating pumps (about 75W) without problems.

author: Terry Bites
author_rank: Super Contributor
timestamp: October 13, 2022, 05:24:53 pm
content: Are you using a transistor or a mosfet to switch the relay coil?The opamp will die prematurely if it keeps having to deal with a high current load. Like more than a few mA.

author: tony359
author_rank: Frequent Contributor
timestamp: October 14, 2022, 11:09:52 am
content: It's a board I purchased pre-made. The SMD Q1 component which drives the on-board relay says J3Y on it.For now I am assuming that the little board is capable of piloting its own 24V relay... I've just got the replacement op-amp, I'll replace and test!Thank you!

author: pcprogrammer
author_rank: Super Contributor
timestamp: October 14, 2022, 11:59:24 am
content: Most likely a S8050 NPN transistorhttps://datasheet.lcsc.com/lcsc/1810161230_Jiangsu-Changjing-Electronics-Technology-Co---Ltd--S8050-J3Y_C2146.pdfCan you see what type of diode is used across the relay coil?

author: DavidAlfa
author_rank: Super Contributor
timestamp: October 14, 2022, 12:56:16 pm
content: There's a 10K resistor (R11) between the amp (U2) and the transistor base (Q1), so there's a reasonable level of isolation.If the transistor collector-base shorted out, only 2-3mA would flow to the amp, it's very unlikely it would to cause any damage.Unless D6 is broken/open/not properly soldered and the voltage spikes when turning the relay off are flowing everywhere.Proper picture:

author: tony359
author_rank: Frequent Contributor
timestamp: October 14, 2022, 01:01:34 pm
content: Thanks for the proper pictureMine is the 24V, I cannot see anything on the diode.

author: tony359
author_rank: Frequent Contributor
timestamp: October 15, 2022, 10:17:59 am
content: Having replaced the op-amp and run the unit for a day, all seems to be good.The faulty op-amp looked... cheap compared to the ones I got. They didn't even have a mean to identify the orientation. Do you think they might have been fake - as in not capable of dealing with 24V?

author: pcprogrammer
author_rank: Super Contributor
timestamp: October 15, 2022, 10:32:00 am
content: Quote from: tony359 on October 15, 2022, 10:17:59 amYou can see in your picture that on one side the slant of the edge differs. This is on the top row in your picture. It is this that marks the orientation.Edit: you can see this in the datasheet. Attached a screen cap from it

author: nigelwright7557
author_rank: Frequent Contributor
timestamp: October 15, 2022, 10:33:45 am
content: I always use a relay coil driver transistor.I also use a flyback diode and 12v series zenerThe zener makes coil energy collapse quicker and so relay turns off faster.I dont understand why after fitting diode you get such a high flyback spike.The diode should limit it to 0v7.

author: tony359
author_rank: Frequent Contributor
timestamp: October 15, 2022, 10:50:49 am
content: Maybe the relay is not fast enough? But this is not switching operation, I wouldn't think you need a special diode for that.I've been thinking of the Zener, how would I connect that?@PcprogrammerGotcha thanks!