240V Mains current threshold switch - Page 1
Forum section: electronics / beginners

author: frontispiece
author_rank: Newbie
timestamp: December 05, 2012, 12:31:54 am
content: Hi all,I'm trying to figure out a circuit that will detect when a mains voltage (240V AC) line is drawing over a certain amount of current (in my case, 4A), and when it is, flip a transistor that allows outputs a DC voltage to flow for a micro to read. In this way, turn a 240V AC @ 4A line into a 5V DC @ ~mA signal. (I want to use this to read when an appliance is drawing over X amps from the wall).I don't want it to seem like I'm just asking for help without looking around first - so my idea is this, but hoping you guys have a better idea...I know a triac is usually recommended for <500 mA, so that's out. An NPN or PNP transistor operates on current (as opposed to a MOSFET on voltage, right?), so maybe I can use a high-voltage PNP and NPN transistor combined to make a high-current, high-voltage TRIAC?I'm trying to expand my toolkit .. to a man with a hammer every problem looks like a nail. My original idea was to run a single core of the power cable through a transformer and work with the resulting produced current in the coil, but I'm wondering if I can savvy out a way to do it all PCB-style.Thanks very much!

author: Psi
author_rank: Super Contributor
timestamp: December 05, 2012, 12:54:06 am
content: $7 Hall effect current sensor and a few bits-n-pieces to get a RMS DC voltage out of the current waveform.Or if you have a micro you could do the rectification/RMS calc in software. Since the hall sensors are 2.5V reference and go +/- 2.5V from there. So perfect for a 5V ADC

author: IanB
author_rank: Super Contributor
timestamp: December 05, 2012, 01:35:02 am
content: A current transformer would normally be a good way to approach this, as you originally thought.

author: Psi
author_rank: Super Contributor
timestamp: December 05, 2012, 03:24:31 am
content: CT's can be a bit annoying.

author: SeanB
author_rank: Super Contributor
timestamp: December 05, 2012, 04:53:37 am
content: rewind a relay to have a current coil........

author: frontispiece
author_rank: Newbie
timestamp: December 05, 2012, 10:33:11 am
content: Thanks all for the responses, however - these solutions (hall effect or transformer) is the approach that I DON'T want -- namely, I don't want to use the electromagnetic field or a physical wire.I'm trying to figure out a circuit that I could just as easily drop onto a (properly insulated & trace width accommodated) PCB and have mains voltage running through it, so I don't want to have to rely on the physical cable, just an in-circuit sampling circuit. Almost as if it were a multimeter.Might anyone have ideas closer to this?Thanks again!

author: alanb
author_rank: Frequent Contributor
timestamp: December 05, 2012, 11:00:03 am
content: If you are ruling out electromagnetic solutions you are left with approaches that entail measuring the voltage drop across a resistor that is in series with the load. You will then have a trade off between having a very low resistance and hence low losses and a very small voltage swing against larger losses with a higher resistance but larger voltage swing and easier to get the resolution you need.You will also probably need to build in some isolation between the measuring and the output e.g. opto-isolator.Why are you adamant that you don't want to use electromagnetic to do so doesn’t prevent you from using a PCB.

author: frontispiece
author_rank: Newbie
timestamp: December 05, 2012, 11:47:38 am
content: Quote from: alanb on December 05, 2012, 11:00:03 amThanks very much alanb, I guess I was adamant out of ignorance!How could I run the power through a PCB and still use electromagnetic induction without needing a wire?

author: alanb
author_rank: Frequent Contributor
timestamp: December 05, 2012, 12:16:19 pm
content: This transformer from RS components is PCB mounted.http://docs-europe.electrocomponents.com/webdocs/008f/0900766b8008f203.pdfIt does need to have a wire through the middle however when you mount it on your PCB you would be able to have a break in your current carrying track and make a single loop of wire through the centre of this component. Would that piece of wire be a wire too much for your requirement?

author: alanb
author_rank: Frequent Contributor
timestamp: December 05, 2012, 12:31:06 pm
content: The example in my previous post was only to give you an idea of what is available, its not neccasarily the correct one for your application. The following is from Farnell and is listed as a current transducer rather than transformerhttp://uk.farnell.com/jsp/search/productdetail.jsp?SKU=1617401&MER=baynote-1617401-pr

author: frontispiece
author_rank: Newbie
timestamp: December 05, 2012, 12:45:24 pm
content: Hm, thanks very much -- is this how a multimeter measures current though? With a hall effect sensor or inductance? Even that transducer uses a hall effect sensor ... surely there's another way?Just trying to expand my understanding ... thanks for everyone's help in advance!

author: alanb
author_rank: Frequent Contributor
timestamp: December 05, 2012, 12:56:07 pm
content: Normal multimeters measure the voltage drop across a series resistor. This generates heat inside the meter which is why there is often a time limit for which you can measure high currents after which you need to stop and allow the meter to cool down.Clamp on ammeters use inductance or hall effect.

author: Psi
author_rank: Super Contributor
timestamp: December 06, 2012, 01:29:55 am
content: Using a hall sensor you can do the same thing on a PCB.There are two IC types that can do it right on the PCB,-One where a pcb track just passes under the IC like so-And one where the track goes through the IC itself.As far as CT vs Hall goes..-Hall are easy to use and simple to get the signal out, where as you need to process the low level output signal with a CT.-Hall can be less accurate/linear than a CT through. But if you only need to measure say 4A +/- 50mA then a Hall works well.

author: IanB
author_rank: Super Contributor
timestamp: December 08, 2012, 12:44:31 am
content: The key thing you need to achieve is isolation between your mains circuit and the micro.Psi has been showing you proper, packaged devices for doing this, but possibly you may be open to home brew solutions as well, especially if this is a one off application.Since you need to measure AC current in a line circuit, a second part of your solution must involve rectifying and smoothing out the AC to get an average DC value for measurement.Being creative, you could conceivably construct your own optically isolating sensor for this using a small flashlight bulb, a CdS light sensor, and a black cardboard tube. If you place, say, a 1 ohm 10 W resistor in series with the neutral line of your mains circuit it will develop about 1 V across it with each amp flowing. Now you could place a small 6 V flashlight bulb in parallel with this resistor and it will light up with an intensity correlating with the current.You put the bulb in one end of your black tube, the CdS sensor at the other end, and a decent air gap in between. Now you just need a low voltage circuit with an adjustable threshold that triggers at 4 amps. Your low voltage circuit should be powered from the micro and completely separate from the mains side. Since your bulb/resistor combo only needs a few volts across it to light up you can set it up and adjust the sensitivity off line using an adjustable low voltage power supply and ammeter.Yes indeed, this seems very crude and Heath Robinson (or Rube Goldberg), but as a one-off thing put together with easily available parts I imagine it would work quite effectively.(You could also perhaps use back to back LEDs instead of a flashlight bulb and get a sharper transition between on/off, but that would be something to experiment with.)

author: notsob
author_rank: Frequent Contributor
timestamp: December 08, 2012, 01:21:06 am
content: The Allegro ACS712 chip may be of interest to youhttp://www.allegromicro.com/Products/Current-Sensor-ICs/Zero-To-Fifty-Amp-Integrated-Conductor-Sensor-ICs/ACS712.aspx