50HZ AC peak detector to measure Vpeak ?!!

Discussion in 'Embedded Systems and Microcontrollers' started by bobx, Dec 4, 2011.

  1. bobx

    Thread Starter New Member

    Feb 2, 2010
    6
    0
    Hello,everybody.I want to use PIC18F8722 that has 16 channels of
    10-bit ADC making a project that measure sixteen[16] AC 50HZ input signals;
    I want to give Vpeak of each 50HZ AC inputs into the AN0 ....AN15 and
    calculate their Vrms,those 16 signals may vary in their peak values fastly.
    So,the ADC channels of PIC18F8722 should capable of reading all those
    inputs;

    1.Would you please give me a hardware and code example in mikroC for that?

    2.Is it possible to use oversampling for that and how[hardware & code]?

    3.Is it possible to use oversampling for the DC inputs that may vary their DC value fastly and how[hardware & code]?

    Thanks,
     
  2. bertus

    Administrator

    Apr 5, 2008
    15,648
    2,347
    Hello,

    Keep in mind that the ADC in the pic can not handle negative voltages.
    You must give an offset of half the range of the ADC to have the complete AC signal inside the range of the ADC.

    Bertus
     
  3. T.Jackson

    New Member

    Nov 22, 2011
    328
    14
    There are a lot of people using mikroC are there?
     
Loading...