ADC- Measurement of AC-Voltage, by measuring one half-wave

Author
backbone
New Member
  • Total Posts : 24
  • Reward points : 0
  • Joined: 2006/10/06 07:21:08
  • Location: 0
  • Status: offline
2007/02/13 11:42:07 (permalink)
0

ADC- Measurement of AC-Voltage, by measuring one half-wave

Hello Guys,
 
i need a little help in a special issue. I meassure a AC-Voltage with the PIC 16F88.
This i do by integrating one half wave (only the positive Part of the Periode). I completely add 40 values of the half wave by measuring in fix time-distances. I measure a very exact value by intergrating in this way. The half-wave signal is generated by a diode and a voltage divider.
 
My problem is the measurement depends on the temperature of my circuitry. The measured value rises about 4Volts, while the temperature is increasing by 20 degrees (34°F).
This temperature-problem i cannot understand, the resistors have the same temperature-coefficient.........?
The second thing i want to know is, how to compensate the temperature-dependence.
 
Thanks a lot in advance.
I hope i get many posts.
Yours
backbone (from germany)
#1

12 Replies Related Threads

    Artic
    Super Member
    • Total Posts : 2288
    • Reward points : 0
    • Joined: 2004/06/17 06:21:59
    • Location: Wales now in Sofia,BG
    • Status: offline
    RE: ADC- Measurement of AC-Voltage, by measuring one half-wave 2007/02/13 12:01:41 (permalink)
    0
    Hi,
    My problem is the measurement depends on the temperature of my circuitry. The measured value rises about 4Volts, while the temperature is increasing by 20 degrees (34°F).
    This temperature-problem i cannot understand, the resistors have the same temperature-coefficient.........?
    Without seeing your hardware its hard to give a more detailed help, but...
     
    A couple of points worth mentioning
    1. Use an external voltage reference Vref on the ADC - something like a MCP1541.
    2. Check your supply rails - this maybe dropping when your Vreg is getting warm.
     
    Cheers
    Artic
    #2
    pic30
    Super Member
    • Total Posts : 1221
    • Reward points : 0
    • Joined: 2005/06/24 10:38:21
    • Location: Moscow, Russia
    • Status: offline
    RE: ADC- Measurement of AC-Voltage, by measuring one half-wave 2007/02/13 12:16:09 (permalink)
    0
    Even without seeing a hardware it is quite obvious that this is a diode's temperature depending voltage drop. To get rid of it you may bias up your input signal to Vref/2, digitize both positive and negative halfwaves and integrate an absolute value of your voltage samples (keep the positives as is and invert (negate) the negatives)
    #3
    backbone
    New Member
    • Total Posts : 24
    • Reward points : 0
    • Joined: 2006/10/06 07:21:08
    • Location: 0
    • Status: offline
    RE: ADC- Measurement of AC-Voltage, by measuring one half-wave 2007/02/14 02:54:54 (permalink)
    0
    Here is a my measurement cicuitry. I think you are right. The voltage regulator which i use for power supply of the controller as well as voltage refference depends on tmperature.

    Attached Image(s)

    #4
    ericgibbs
    Junior Member
    • Total Posts : 110
    • Reward points : 0
    • Joined: 2006/12/02 12:20:00
    • Location: Portsmouth U.K.
    • Status: offline
    RE: ADC- Measurement of AC-Voltage, by measuring one half-wave 2007/02/14 03:37:49 (permalink)
    0
    hi backbone,
     
    Looking over your drawing, you appear to be operating the BYD17 diodes well down the 'knee' of the operating curve.
    [low forward current]
     
    On this part of the diode curve, the forward drop is very susceptable to temperature.
     
    As you have not indicated the mains supply supply voltage I cant be 100% sure.
     
    EricG
     
    #5
    pic30
    Super Member
    • Total Posts : 1221
    • Reward points : 0
    • Joined: 2005/06/24 10:38:21
    • Location: Moscow, Russia
    • Status: offline
    RE: ADC- Measurement of AC-Voltage, by measuring one half-wave 2007/02/14 04:40:57 (permalink)
    0
    Your schematics definitely confirms my assumptions that the diodes add their temperature depending forward voltages to your results. I would recommend the following modifications:

    1. Create a low impedance virtual ground (VG) node using a TLE2426 rail splitter http://focus.ti.com/docs/prod/folders/print/tle2426.html or similar device.

    2. Remove your diodes.

    3. Reconnect lower terminals of the R10, R13..R15 resistors to VG instead of GND.

    4. If a high precision is required, measure all channels zero values of your new circuit with Lx input resistors grounded. Use these results for compensating a slight negative zero offset due to the biased VG.

    5. If a high precision is required, measure all channels maximum values applying a near maximum positive DC voltage (e.g. +310 Vdc is a maximum amplitude value of a 220 Vac line voltage  positive halfwave). Use these results for compensating the resistor dividers' tolerance.

    Now you can digitize and process both halfwaves as I have suggested before, without any significant temperature issues. Of course your AREF source (or VDD if you choose it as an ADC reference) must be stable and clean. The TPS76050 LDO regulator you are using is quite stable over temperature and has a low output noise
    post edited by pic30 - 2007/02/14 04:46:26
    #6
    Olin Lathrop
    Super Member
    • Total Posts : 7463
    • Reward points : 0
    • Joined: 2004/02/26 17:59:01
    • Location: Littleton Massachusetts
    • Status: offline
    RE: ADC- Measurement of AC-Voltage, by measuring one half-wave 2007/02/14 05:12:01 (permalink)
    0
    Your schematics definitely confirms my assumptions that the diodes add their temperature depending forward voltages to your results.

    Yes they do, but the error he is seeing is much much larger than anything explained by forward drop of D10-D12 changing.  The whole drop at such low current isn't going to be more than 600mV, and the change due to 20C temperature rise only a small fraction of that.  This answer is a couple orders of magnitude short of explaining the 4V error.
     
    The two sources of error others have already pointed out (power supply and zener soft knee) could explain a discrepancy of 4V referenced to the input.  Note that this means only a 71mV error at the A/D pins, or about 15 counts out of the 10 bit A/D range.
    #7
    pic30
    Super Member
    • Total Posts : 1221
    • Reward points : 0
    • Joined: 2005/06/24 10:38:21
    • Location: Moscow, Russia
    • Status: offline
    RE: ADC- Measurement of AC-Voltage, by measuring one half-wave 2007/02/14 05:58:58 (permalink)
    0
    Yes, the zeners at such low currents definitely add their share to the error because they start opening much earlier than their rated breakdown voltage and even their leakage currents can be very high. I would also omit the zeners and replace them with one common TVS from VSS to GND, and a dual low leakage Shottky diode on each ADC input - an anode to GND, a common anode/cathode to ADC input, a cathode to VSS
    #8
    backbone
    New Member
    • Total Posts : 24
    • Reward points : 0
    • Joined: 2006/10/06 07:21:08
    • Location: 0
    • Status: offline
    RE: ADC- Measurement of AC-Voltage, by measuring one half-wave 2007/02/14 08:33:47 (permalink)
    0
    Hi 2all,
    thanks a lot for your replies. The voltage regulator cause approx. a 0.02V Error for the ADC-Reference.
    The next is, i will check if it´s nesessary to improve accuracy. This circuitry shall measure the 3-phase Net (sinus with 120° time shift). Thats why i measure only one half wave. The usage of this  application demands to be EMC conform. This is my next problem. The neutral is directly connected to the Pic´s ground. In this way disturbances, from big inductors and motors, will adulterate the signal at the ports and cause wrong interrupt requests at RB0. The RB0 Interrupt is used to trigger the measurement routine. This is the next problem i want to solve.
    I hope, you´ll give me some ideas.
    Thank you very much.
    Yours
    backbone
    #9
    pic30
    Super Member
    • Total Posts : 1221
    • Reward points : 0
    • Joined: 2005/06/24 10:38:21
    • Location: Moscow, Russia
    • Status: offline
    RE: ADC- Measurement of AC-Voltage, by measuring one half-wave 2007/02/14 10:23:33 (permalink)
    0
    Triggering a time critical interrupt from a non-shaped divided sinewave fed to a digital port input is not a good idea. You should use the analog comparator which input is left available at a PA3 pin so you should move your front end network from RB0 to RA3 and properly set up the comparator.

    As I told before processing a full wave instead of a half wave allows you to get rid of many hardware related errors. Those errors caused by component tolerances can be easily compensated by calibration and/or usage of precise passive components. Since your GND is kept directly connected to an L0 the EMI level does not change if you switch to a full wave concept. The EMI issues can be resolved with good PCB routing, proper decoupling, passive signal filtering and using an appropriate hysteresis at a comparator input
    post edited by pic30 - 2007/02/14 10:26:09
    #10
    backbone
    New Member
    • Total Posts : 24
    • Reward points : 0
    • Joined: 2006/10/06 07:21:08
    • Location: 0
    • Status: offline
    RE: ADC- Measurement of AC-Voltage, by measuring one half-wave 2007/02/16 05:04:03 (permalink)
    0
    Hello 2all,
    i solved my problem. Now, the circuitry works proper. This circuitry shall only deliver approximate values. So i don´t need a full wave concept.
    My last problem was caused by RB0 Interrupt. I changed this part of the circuitry by using a transistor and two capacitors.
    This helps. The interrupt edge is getting better.
    Thanks a lot for all of your posts.
     
    backbone
     
    #11
    pic30
    Super Member
    • Total Posts : 1221
    • Reward points : 0
    • Joined: 2005/06/24 10:38:21
    • Location: Moscow, Russia
    • Status: offline
    RE: ADC- Measurement of AC-Voltage, by measuring one half-wave 2007/02/16 05:17:29 (permalink)
    0
    I changed this part of the circuitry by using a transistor and two capacitors. This helps. The interrupt edge is getting better

    It will completely get well if you use the on-chip analog comparator instead of the external transistor Smile
    #12
    dhananjaya
    Starting Member
    • Total Posts : 58
    • Reward points : 0
    • Joined: 2012/11/20 07:36:14
    • Location: INDIA KARNATAKA
    • Status: offline
    Re: RE: ADC- Measurement of AC-Voltage, by measuring one half-wave 2013/01/16 22:52:45 (permalink)
    0
    HOw to measure the AC voltage in ADC without converting DC voltages by PIC 16f877a chip. I have to try to  using op-amp ua741 in peak detector circuits please send the circuits for ADC
    #13
    Jump to:
    © 2017 APG vNext Commercial Version 4.5