Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Need help for PIC16f887 Based Voltmeter ADC Calibration technique?

Status
Not open for further replies.

kavin_eees

Member level 3
Member level 3
Joined
May 11, 2012
Messages
57
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Activity points
1,842
dear all,
am trying to design a pic based digital volt meter using pic16f887
herewith i had attached my adc circuit and adc reference circuit for your reference
and also i had attached the data which i got fom transformer and adc input

i want to calculate the ac voltage at the primary of transformer using the digital value from adc

kindly let me know any formula or calculations for calculating the voltage

thanks in advance
Kavin
 

Attachments

  • pic16f887 adc volt data.pdf
    172.8 KB · Views: 116
  • adc circuit.jpg
    adc circuit.jpg
    499.7 KB · Views: 103

As long as you understand the voltage is the DC equivalent of the AC voltage it should work but why are you dropping Vref to the ADC to 1V? Dropping the reference just makes each measurement step smaller but as you have plenty of available voltage to measure it serves no purpose. Instead, tie Vref to VDD (PICs can do this internally) and scale the input voltage so the 6VAC (~8.5V peak) is about 10% lower than full scale. That gives you highest resolution while allowing a 10% safety margin in case the AC is higher than expected.

With Vref set to 5V VDD, each ADC step is 4.88mV so you can mathematically find the voltage at the input of the ADC then apply the scaling factor of the potential divider to that voltage to find the peak voltage from the bridge rectifier. The RMS voltage is 0.707 (1/sqrt(2)) of that.

Brian.
 

hi betwixt
thanks for your quick reply...

actually i thought if we reduce the reference voltage we can improve the accuracy tats y i reduced reference volt to 1V..
i will check with your suggestions by increasing the reference volt to VDD.
 

Hi,

I´ve seen many voltage measuremets like this:
There are some drawbacks:

* it measures only the top of the input sinewave, thus it is not very precise and may suffer bad accuracy with spikes/ noise at the sinewave and waveform-deviation.
(It does not take the complete waveform into account)
* The ADC value will fluctuate at least 12 LSB at constant 230V input, because of remaining voltage ripple.
* the time lag is about 120ms. This may be good or not, depending on your desired regulation speed and regulation precision.

****
I agree with Brian: Reducing VRef results in bad performance. In either case VRef needs a suitable decoupling capacitor.

Using 5V as VRef means: If 5V fluctuates by 5% (time, temperature, 5V load...) this will also cause 5% fluctuation in ADC value.
Using a dedicated voltage reference will improve accuracy as well as precision.

****
Best is a true-RMS maesurement. Maybe you don´t need this...
But I recommend to use at least a "rectified average method" that takes (almost) full waveform into account.

And using a second order LPF will reduce ripple, while increasing speed (when using the correct values).
You are free to implement the LP filter into your software (instead of analog hardware), but this needs precise timing of ADConversions.


Klaus
 

hi betwixt
i would like to calculate the voltage present at the primary of transformer
is there any calculations for that...
i had changed the reference voltage to VDD.
 

Hi,

In post#1 you gave the values of ACVoltage and ADC_Value.
If you both insert in a Excel table and draw the graph X=ADC_Value, Y=ACVoltage.
Then Excel can draw a optimized linear graph (trend) and it can show you the mathematical relationship.

In this case:

ACVoltage = 0.2466 * ADCValue + 34.667

Klaus
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top