1. 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.
    Dismiss Notice

Measure Mains AC current

Discussion in 'Electronic Projects Design/Ideas/Reviews' started by abicash, Jan 22, 2009.

  1. abicash

    abicash Member

    Joined:
    Feb 12, 2007
    Messages:
    432
    Likes:
    3
    Hello

    I am designing a system where one of a smaller part requires measuring the current of the Mains connected electrical appliance and switching it off upon current crossing a predetermined value.

    Now this device is controlled by a relay which is switched by a microcontroller.
    The power (5VDC) to this micro is derived from an unisolated Mains.
    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.

    All ideas welcome
    Thanks in advance and thanks for reading!!!!:)
     
  2. dknguyen

    dknguyen Well-Known Member

    Joined:
    May 6, 2006
    Messages:
    6,771
    Likes:
    72
    A diode rectifier wouldn't work because the diode voltage drop would be too large relative to the voltage drop across the shunt. But what if you used a super diode to overcome this voltage drop limitation? You could put a full-bridge rectifier made of super diodes to rectify the votlage across the shunt resistor.

    Precision rectifier - Wikipedia, the free encyclopedia
     
    Last edited: Jan 22, 2009
  3. abicash

    abicash Member

    Joined:
    Feb 12, 2007
    Messages:
    432
    Likes:
    3
    Hello
    Thanks for replying.Much appreciated!!! :)

    That thought had occurred to me.But
    1)If a diode rectifier is used,wont it just rectify just the mains voltage and NOT the drop across the shunt?
    2) If I were not to rectify the voltage and command my MCU to measure the peaks,how do I take care of negative peaks?Basically it will have destroyed my MCU by that time.

    Please suggest
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. dknguyen

    dknguyen Well-Known Member

    Joined:
    May 6, 2006
    Messages:
    6,771
    Likes:
    72

    I mean stick the rectifier (or single diode) so it only rectifies the voltage across the shunt going to the MCU, not the AC mains voltage itself.

    Like the attached diagram (except use super diodes instead of regular diodes to get rid of the voltage drop).

    [​IMG]
     

    Attached Files:

    Last edited: Jan 22, 2009
  6. abicash

    abicash Member

    Joined:
    Feb 12, 2007
    Messages:
    432
    Likes:
    3
    Hello dknguyen

    Thanks again for being helpful :)

    I dont want to use another IC for this.
    The response is also not that important.It should just measure it and put it off!

    Is there a way that i measure the voltage drop across this shunt only?

    I had planned a Current Transformer in the series of the main current carrying path and drop a dc voltage across a Resistor across its secondary ,but I am trying to replace this with measuring current directly...since isolation is also not very important in this case!!!!

    Thanks again :)
     
  7. abicash

    abicash Member

    Joined:
    Feb 12, 2007
    Messages:
    432
    Likes:
    3
    Can you draw a small schematic for this concept for me:eek:

    Thanks in advance!!!
    :)
     
  8. dknguyen

    dknguyen Well-Known Member

    Joined:
    May 6, 2006
    Messages:
    6,771
    Likes:
    72
    See schematic in my previous post. I just realized that things get complicated because the op-amps need dual voltage supplies to withstand the positive and negative voltage across the shunt resistor. But I don't see another way of doing it without a CT, or hall-effect current sensor (which can also come as an IC).

    I just realized the scheme I proposed would work only if your MCU power supply was isolated, Because it is impossible to wire it so the shunt resistor (with or without a rectifier) and DC power supply voltage to always have the same ground voltage if neither is isolated from the AC mains. At best, the ground voltage would only be the same 50% of the time. THe other 50% of the time would damage your MCU.

    I don't see a simple way to do what you are asking. You need isolation in one point, either current measurement or DC power supply (hall effect sensor IC provides isolation without CT).
     
    Last edited: Jan 23, 2009
  9. abicash

    abicash Member

    Joined:
    Feb 12, 2007
    Messages:
    432
    Likes:
    3
    Hello dknguyen

    Thanks for being patient and helpful :)

    I agree that the schem. wont work due to these glaring issues you pointed out.

    So it seems that CT would be the only option now since hall effect sensors are a bit expensive.
    I was just hoping that someone might come with a really fantastic idea...since people here are really intelligent :)

    Anyways thanks for the support!!!
     
  10. Boncuk

    Boncuk New Member

    Joined:
    Nov 10, 2007
    Messages:
    5,382
    Likes:
    88
    Location:
    Phetchabun,Thailand
    Why not use a current sensor made to measure the exact RMS-current? They usually have an output isolated from mains and their signal can be used directly on an MCU.

    Google for AC-current measurement.

    Boncuk
     
  11. abicash

    abicash Member

    Joined:
    Feb 12, 2007
    Messages:
    432
    Likes:
    3
    Exactly what I would be using!
     
  12. dknguyen

    dknguyen Well-Known Member

    Joined:
    May 6, 2006
    Messages:
    6,771
    Likes:
    72
    Last edited: Jan 23, 2009
  13. abicash

    abicash Member

    Joined:
    Feb 12, 2007
    Messages:
    432
    Likes:
    3
    what would be budgetary cost? have you used it before?
    [EDIT]I see USD 1.62 on digikey


    Thanks as usual
     
    Last edited: Jan 23, 2009
  14. dknguyen

    dknguyen Well-Known Member

    Joined:
    May 6, 2006
    Messages:
    6,771
    Likes:
    72
    For single quantity, it is $3-$6USD depending on whether it it is the large IC or the small IC. I've only had plans to use these, I haven't actually used them yet.
     
  15. abicash

    abicash Member

    Joined:
    Feb 12, 2007
    Messages:
    432
    Likes:
    3
    Thats a lot of cost.
    This system will be manufactured in good quantity and current protection was just another feature thrown in at the last moment.

    Also Allegro doesnt seem to have good support in my part of world.

    I would really wind a Current Transformer myself in a really small form factor and that would be it!!!
    I dont understand why you wont approve of a CT?
    Since I dont require response and accuracy as much.


    Thanks again
     
  16. dknguyen

    dknguyen Well-Known Member

    Joined:
    May 6, 2006
    Messages:
    6,771
    Likes:
    72
    I don't not approve of a CT. It's just for me I'd probably use that IC rather than CT.
     
  17. abicash

    abicash Member

    Joined:
    Feb 12, 2007
    Messages:
    432
    Likes:
    3
    Point taken;)


    Thanks
     
  18. indiansite

    indiansite New Member

    Joined:
    Jan 31, 2009
    Messages:
    1
    Likes:
    0
    hallo
    I want a current measuring ic. if any one can suggest any appropreate IC for this purposs.
    I need a AC 230v Current measuring IC.
     
  19. ccurtis

    ccurtis Active Member

    Joined:
    Dec 22, 2008
    Messages:
    951
    Likes:
    52
    Location:
    NJ, USA
    Abi, since simple and cheap is the keyword, it might help to see a schematic of what you have already. Your circuit is unisolated mains powered, which could possibly be used to advantage for a simple and cheap solution. Mostly detail required on how you are powering the circuit from the mains and how the return is accomplished. As is often the case, a good solution depends on how well the problem is defined.
     
  20. abicash

    abicash Member

    Joined:
    Feb 12, 2007
    Messages:
    432
    Likes:
    3
    Hello ccurtis

    Thanks for replying and apology for acknowledging it so late :eek:
    (My mailbox plays wonders with mails sometimes)

    Anyways please find the ckt diag attached.

    (there are two schem. one for the MCU and the other for the PSU)

    Please get back if you have something interesting
     

    Attached Files:

  21. ccurtis

    ccurtis Active Member

    Joined:
    Dec 22, 2008
    Messages:
    951
    Likes:
    52
    Location:
    NJ, USA
    What do you think of this idea?
     

    Attached Files:

Share This Page