Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Relay with ACS712 overcurrent protection (schematic included)

harvie

Full Member level 1
Joined
Sep 10, 2014
Messages
97
Helped
2
Reputation
4
Reaction score
2
Trophy points
8
Location
Prague
Activity points
1,201
Hello
i've designed following circuit, can you please help me review it and pinpoint possible problems?

It is Mains AC relay that is going to be controller by microcontroller. It allows to switch the load on and off. As well as measuring the load current.
It provides overcurrent protection, which is (unlike circuits i've found online) not reliable on firmware bugs, updates and microcontroller glitches.

There will be DIN rail circuit breaker limiting current through whole thing to 16A. But i plan to have 3 outputs and i don't want individual output to go over 5A, hence there is comparator leveraging the ACS712 (5A) to provide additional per-port protection. Conveniently ACS712 is also used by microcontroller with external precision ADC to measure the current.

I want to know following things:
* Will this even work? (i've verified core concepts to be working in falstad simulator, but that is often far from reality)
* Will this be reasonably reliable and safe? (i plan using it to remotely control and measure power to PCs and electronics, so i don't want random reboots)
* I am bit afraid what will happen when relay closes and there will be current surge to the load. This might trigger the overcurrent instantly. I was thinking about adding some RC delay, but didn't really worked well in simulator.

Here comes the schematic:


out.png

Thank you for your expertise guys!
 

schmitt trigger

Advanced Member level 5
Joined
Apr 17, 2013
Messages
2,721
Helped
858
Reputation
1,720
Reaction score
844
Trophy points
1,393
Activity points
18,342
First of all, thanks for posting a schematic without being prompted.

There are several pitfalls on your circuit, I am going to start with the first one and allow someone else to point the others.

With a zero current input, the output of the AC712 sits at 2.5 volts. As the current increases, the output will swing above and below that value at your powerline frequency.
The end result is that the first comparator will always be triggered. You require a window comparator, with thresholds set at 2.5 +/- X volts, where X is the voltage deviation at the maximum current.
The value of X you have to calculate from the AC712’s transfer function, which you can read on the datasheet.
 

harvie

Full Member level 1
Joined
Sep 10, 2014
Messages
97
Helped
2
Reputation
4
Reaction score
2
Trophy points
8
Location
Prague
Activity points
1,201
I know what signal is to be expected from AC712, but i don't understand how the first comparator would be always triggered.
I took freedom to ignore negative half-wave and only trigger on positive half.

Lets say:

1A = 2.6V
0A = 2.5V
-1A = 2.4V

when i trigger at >=2.6V i don't see how it can be triggered by 2.4V negative halfwave...
 

harvie

Full Member level 1
Joined
Sep 10, 2014
Messages
97
Helped
2
Reputation
4
Reaction score
2
Trophy points
8
Location
Prague
Activity points
1,201
So i've done few modifications...

1.) added capacitors on voltage lines
2.) added RC filter between comparators, so i will be able to filter out inrush surges
3.) diode signaling active relay is now driven by relay transistor, because the comparator output is rather weak and i wanted to provide reliable source of base current to that transistor.

out.png
 

schmitt trigger

Advanced Member level 5
Joined
Apr 17, 2013
Messages
2,721
Helped
858
Reputation
1,720
Reaction score
844
Trophy points
1,393
Activity points
18,342
Ok, if you disregard the negative peak, it would work as you mentioned.
 

Easy peasy

Advanced Member level 5
Joined
Aug 15, 2015
Messages
2,917
Helped
1,051
Reputation
2,102
Reaction score
1,076
Trophy points
113
Location
Melbourne
Activity points
16,197
Pin 7 goes low for overcurrent - check it can go low enough for the xtor, a 10k b-e will help on Q1, as you want the relay to turn off quckly put a 24 or 27V zener across Q1 and ditch the free-wheel diode on the relay as this makes it switch as slowly as possible ...
--- Updated ---

after the 1st over-current event C3 will remain fairly high & only slowly discharge via the 500k R
--- Updated ---

Schottkies are leaky, the leakage thru D3 will charge the 10uF cap slightly
 

KlausST

Super Moderator
Staff member
Joined
Apr 17, 2014
Messages
19,284
Helped
4,272
Reputation
8,547
Reaction score
4,236
Trophy points
1,393
Activity points
127,990
Hi,

* C3 is too big for my taste. It needs some time and some current to charge/discharge it.
Mind about selectivity: This means if you want to avoid to trip the mains fuse on overcurrent (shirt circuit), then your circuit needs to safely switch OFF fast.
* where does the RELAY_ENABLE signal come from? Be sure it can deliver the expected current while delivering the expectabke high currents. You can't expect it to be oerfect 0V/5V levels.
* RV1: I:d add a resistor in the upper leg to get useful pot_output_voltage range. Mind that the comparator V_in voltage should not go abouve Vcc-1.5V which is 3.5V.
* RV1: I'd add a resistor in the lower leg to get useful pot_output_voltage range. Your circuit will work with voltages higher 2.5V only.
(In the current setup only 20% of the pot range makes sense: 2.5V ... 3.5V)
* your reference voltage relies on Vcc. Vcc is no reference voltage it is a supply voltage. It will drift with time, with temperature, with load, it may be noisy.
* R2: 500k is high, making this node prone to pick up ise
* mind to select a suitable relay. In your circuit it is meant to switch off in overcurrent condition. Example: Carrying 10A nominal current is easy, but switching OFF unpredictable high short circuit currents really means stress to the contacts. It's way less stress on short circuit condition to keep the contacts closed until the mains fuse blow.
* D4: all the current for D4 needs to be supplied by RELAY_ENABLE (high level)....and it needs to go through goes through R1 and base of Q1. It may work, but mind the currents and the resulting voltages.
* use a constant voltage at comparator pin5. Spend R-R or R-D.
* add electrolytics bulk capacitors at 12V and 5V.
* mind to keep safety distances and creepage distances between mains and control part. Avoid sharp edges.
* use a GND plane.

Build your circuits and do voltage level measurements on the (switching) signal nodes to validate them. Here I don't trust simple simulation tools / simplified device models.

Klaus
 

harvie

Full Member level 1
Joined
Sep 10, 2014
Messages
97
Helped
2
Reputation
4
Reaction score
2
Trophy points
8
Location
Prague
Activity points
1,201
Thank you for ideas. I will surely go through them one by one.

Just wanted to give you more insight into the project. This is not really meant as circuit breaker for short circuit protection. I am not sure if one can even build safe circuit breaker with proposed components. Proper circuit breakers have simpler and more bulletproof design. They include arc extinguishing features and stuff like that. I don't think common relay is enough to safely break short circuit on mains power.

Actual reason why i am looking into this is different. I am planing for second version of this circuit and i want to use small 6A SSR relays. Something like Finder 34.51.7.005.0010. But i am afraid that some noob would connect electric kettle or vacuum cleaner to the 6A outlet. I beleive electromechanical 6A relay can handle 10A for few hours without causing much trouble. But TRIAC in small SSR (=suboptimal heat management) will most likely overheat and burn through the plastic cover of SSR in few minutes. For this application i think it would be enough to shutdown in 5 seconds. So it does not get triggered by inrush during power-on.

But i will think about this. Might be interresting to get stuff fast enough to disconnect actual short circuits.

What is the reccomended way of protecting SSR in such case? The finder datasheet contains only product photos and dimensions. They are quite lacking in this regard... No aplication note. They don't even specify if you should use series resistor on control side of SSR.
 

LaTeX Commands Quick-Menu:

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top