AC Measurement


Closed Thread
Results 1 to 19 of 19

Thread: AC Measurement

Hybrid View

  1. #1
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=1185&stc=1&d=116343790 0">

    On a PIC with ADC and comparator on the same pin it could be possible.

    Comparator interrupt to detect the zero crossing, you wait 'till 0.707 Vpeak - x offset delay, then take an ADC reading.

    OR use 2 I/o, one INT (let's say INT0) + ADC.

    But i think the poor psu may suffer if you need many mA.... Could be handy to use high efficiency LED display.

    EDIT: another maths approach using samplings... process the long RootMeanSquare stuff... or by 0.707*Vpeak.
    Attached Images Attached Images  
    Last edited by mister_e; - 13th November 2006 at 18:09.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  2. #2
    Join Date
    Sep 2006
    Location
    Florida, USA
    Posts
    94


    Did you find this post helpful? Yes | No

    Default

    Steve - Thanks for the diagram. It looks to me to be a modification of the transformerless power supply with the addition of a resistor divider network to provide the input to my PIC. Is that correct?

    I don't intend to power my PIC or anything with this - so the current capability of the circuit is not important. I just need to know how to condition the AC so that I can read the voltage.

    I like your idea of triggering an interrupt (like for the AC Lamp Dimmer circuit you helped me out with), waiting a few uS and then start measuring the voltage on an ADC input. I would then find the highest value and from that I can calculate the voltage. However, I believe that I need to get the incoming voltage to the ADC pin to 5V or below. Isn't that correct? That seems to be the $64 question... how do I get the 120V AC input to some level that is acceptable for an ADC input? Is this accomplished with the resistor divider circuit that you presented?

    I appreciate your help!

    Thanks!

  3. #3
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Atom058
    I believe that I need to get the incoming voltage to the ADC pin to 5V or below. Isn't that correct?
    In fact the Vpeak must be lower than 5 volt. So a Vac(rms) of 5*.707=3.535 Vac(rms)

    how do I get the 120V AC input to some level that is acceptable for an ADC input? Is this accomplished with the resistor divider circuit that you presented?
    Yes. Maybe a dual secondary transformer (like the one you used for the DImmer) could work. This will also provide your insulation. So you use one output for your PIC and plah plah, the other for your reading.

    Maybe it will work good... maybe not... in theory yes... but i feel some potential bugs... interesting to know your results.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. Circuit Diagram for interfacing AC to PIC IC?
    By wellyboot in forum Schematics
    Replies: 3
    Last Post: - 8th March 2008, 19:40
  2. How to read AC mains with an inductance coil
    By KB3BYT in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 20th February 2008, 12:02
  3. AC Measurement problems
    By Charles C in forum Off Topic
    Replies: 0
    Last Post: - 25th October 2005, 17:13
  4. Special Offer AC -AC adapter
    By lester in forum Adverts
    Replies: 0
    Last Post: - 9th September 2005, 07:52
  5. Detecting AC current
    By rhino in forum Off Topic
    Replies: 8
    Last Post: - 8th July 2005, 21:31

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts