Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Measure Mains AC current

Status
Not open for further replies.
abicash, someone posted a schematic almost identical to that a few week ago, they were having problems with the inrush current when the relay turned on caused the micro controller to reset. I'm not so sure they had that initial 1n4007 diode though
 
Now if I put a resistor shunt in the appliance path it will drop an AC voltage.
How do I convert this voltage to a DC voltage with maximum current corresponding to 5VDC which can be fed to the ADC on this microcontroller for comparison?
I was planning to use a CT but it costs some amount and that price is not viable for this project.
Put a xformer primary that can handle the current in series with the AC line, using it as a step-up 'former. Take whatever voltage you get off the secondary.
 
a simple way of doing this, without all the other components is to put a ptc in series with the load. once you cross the threshold current the ptc goes high resistance, limiting the current to a couple of mA, so most of the volts are dropped across the ptc, and very few on the load.

only suitable in low power applications, obviously. but cheap and easy
 
And the sense resistor in the previously attached schematic is 4.6" of #14 AWG! Copper has a high tempco but it may be OK for this app.
 
Last edited:
abicash, someone posted a schematic almost identical to that a few week ago, they were having problems with the inrush current when the relay turned on caused the micro controller to reset. I'm not so sure they had that initial 1n4007 diode though

Can you please direct me to that post ?
 
a simple way of doing this, without all the other components is to put a ptc in series with the load. once you cross the threshold current the ptc goes high resistance, limiting the current to a couple of mA, so most of the volts are dropped across the ptc, and very few on the load.

only suitable in low power applications, obviously. but cheap and easy

Hello grim,this unfortunately I cannot use since I will be requiring a finite ADC value since this has to be a window comparator.

Thanks anyway
 
check out the attached pdf. it has the full project for measuring mains "power troughput" ... so, it's not current but power, but as I guess you know the voltage of your mains ...

Hello arhi...thats a heap of help:D

But the bridge rectifier kind-of ckt(EDIT: WOODWARD'S CKT) requires lot of components (like opto's) and a 25W Resistor as well.Further thers a signal amplification by an op-amp....All these much beyond my league...since I feel they dont seem to satisfy the 'low-cost' tag..
Moreover what about the fwd drop of LEDs in the opto's?
Do u think I can replace the opto's by only some diodes?
I don't see a way though...please correct me if there's some mistake in the above

Thanks and regards
 
Last edited:
Sorry abicash I can't post a link it was too long ago I'm not sure what keywords would find the post again. I can tell you the gist of it though. Basically because you're using a half wave rectifier to feed the switch mode supply when the relay trips and a load is suddenly dumped on the AC line that there's enough of a voltage sag the regulator loses regulation briefly causing a reset in the micro controller. Never did determine if that was what exactly was causing the reset though.
 
Basically because you're using a half wave rectifier to feed the switch mode supply when the relay trips and a load is suddenly dumped on the AC line that there's enough of a voltage sag the regulator loses regulation briefly causing a reset in the micro controller.
You can probably increase the supply bulk capacitor to fix this. Or put a parallel RC in-line with the relay coil (you will still get a current spike, but you can control it more easily)

As for measuring the current, can you just have a shunt on the load return line to mains return line (also uC gnd). The shunt voltage is then amplified (e.g. use inverting amp) and fed into the uC ADC. Just make sure the opamp can handle 5V single rail and input voltage to ground (or just below). You may have to shift the opamp reference voltage a little above ground for better performance.
 
25W Resistor as well

I do not see how are you going to measure current without a shunt. And if you read the next post from wilbe "4.6" of copper #14 AWG wire" will do the trick .. and will cost next to nothing.

.Further thers a signal amplification by an op-amp

wait, you want to measure current on AC system and you expect to get a "ready" signal ?! that you do not have to amplify??

Moreover what about the fwd drop of LEDs in the opto's?

What about it !? You just need to adjust R7 to get proper current trough leds, that's all, and donno why on schematic R7 is marked 25W when the simple 1/4W should do ..

Do u think I can replace the opto's by only some diodes?

Not sure what are you trying to say here. What would be the point to replace the opto's with diodes ?!?!?


You can also go with contact less measurement ... make a coil, pull one wire of the AC supply trough the coil and measure inducted voltage... can't get simpler than that ? (but you will still have to use opamp to amplify the signal :D )
 
Yeah dougy that's what I suggested, the funny thing is, most people that use this kind of circuit are intentionally trying to avoid transformers because of size and weight, and so won't use a bigger cap due to size.
 
I do not see how are you going to measure current without a shunt. And if you read the next post from wilbe "4.6" of copper #14 AWG wire" will do the trick .. and will cost next to nothing.
I get it


wait, you want to measure current on AC system and you expect to get a "ready" signal ?! that you do not have to amplify??
Normally a CT will give a good voltage strength as I have seen and can be used w/o amplification


What about it !? You just need to adjust R7 to get proper current trough leds, that's all, and donno why on schematic R7 is marked 25W when the simple 1/4W should do ..
ok


Not sure what are you trying to say here. What would be the point to replace the opto's with diodes ?!?!?

I was reffering that use diodes instead of the LEDs so that using optos is eliminated.My ckt doesnt have isolation from mains..so it would not be wise to use an opto unless it was really necessary.


You can also go with contact less measurement ... make a coil, pull one wire of the AC supply trough the coil and measure inducted voltage... can't get simpler than that ? (but you will still have to use opamp to amplify the signal :D )

Yes that is what I am doing right now but its pretty big in size.Out of curiosity I have also asked Allegro for the ACS712-5A part.Will receive pricing in a day...But again thats very expensive
 
the opto's are not used here for isolation, the one pair (left) is used to catch the upper and lower halfperiod of the ac signal, so as the signal ho "up" the led inside the opto light higher / transistor is opened more ... the two opto's on the right return the rectified ac signal reduced in amplitude, the right pair of opto's is after the shunt and connected in revers so they fetch the both sides of the amplitude but put it on "other side" ...

what happens is that on R5/R6 you have difference that you integrate using U5A and scale using U5B that outputs a 0-5V signal related to the power pulled trough the wire.

All resistors here can be 1/4W, and they all together cost under 1$, the opto used is 1.9$ ( Digi-Key - PS2501-4A-ND (NEC - PS2501-4-A) ) and the op is 0.4$ ( Digi-Key - LM358ANFS-ND (Fairchild Semiconductor - LM358AN) ) .. so whole instrument that return 0-5V is uder 5$ .. what part you want to get cheaper ?!
 
This can't work.Please see the start of this thread(2nd post by dknguyen)

I read it, and don't see why it can't work. The post you referenced doesn't apply? No op amps is used. Maybe you can explain to me why it can't work, and I will learn something.
 
I read it, and don't see why it can't work. The post you referenced doesn't apply? No op amps is used. Maybe you can explain to me why it can't work, and I will learn something.

SInce the diode drop of 0.6 or 0.7 V must be overcome by the drop across the sense resistor..or else some precision rectifier w/ opamps must be used..

Thats what i understand..
Please corect me if i am wrong

Thanks and regards
 
All resistors here can be 1/4W, and they all together cost under 1$, the opto used is 1.9$ ( Digi-Key - PS2501-4A-ND (NEC - PS2501-4-A) ) and the op is 0.4$ ( Digi-Key - LM358ANFS-ND (Fairchild Semiconductor - LM358AN) ) .. so whole instrument that return 0-5V is uder 5$ .. what part you want to get cheaper ?!

Hello and thanks a lot for the explanation arhi...much appreciated..

Now this seems wonderful once I understand this..And i can replace the opamp with the one in the MCU i have got..I just need to get the opto now..
Lets hope i can make this work..

Thanks and regards
 
SInce the diode drop of 0.6 or 0.7 V must be overcome by the drop across the sense resistor..or else some precision rectifier w/ opamps must be used..

Thats what i understand..
Please corect me if i am wrong

Thanks and regards

That is correct, but a suitable sense resistor will raise the voltage above the .7 V. I thought you were not interested in measuring the current, so much as detecting if a certain level is reached.
 
Hello curtis thanks for replying

I need to measure two threshold levels.

A level above a set value(A) and a level below another set value (B)

So basically a window comparator and for this i require finite value measurement..but not very accurate..

But if a larger sense resistor is used then it has be to higher wattage and that in effect means large size..and thats not permissible too :(

So i m in a pickle here..

Arhi's input seems useful at the moment..I am in process of convincing the client to use an ACS712 hall effect sensor from ALLEGRO but again the high cost which they have quoted may be a turn off for him..But if he agrees considering the small SOIC footprint then I will be the happiest man :p

Thanks and regards
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top