Sampling a Sinusoid 240VAC with ADC of a dsPIC33F Microntroller

Status
Not open for further replies.
Ok now what do you think is simpler in terms of implementation constructing a programmable amplifier (for extremely variable gains) or interfacing an external ADC with the dsPIC?
You have to consider all application parameters, there's no simple answer.

As long as the standard built-in ADCs of recent processors with 10 or 12-bit resolutions serve your purposes, I would try with these.

Programmable gain might be just an analog switch attached to the resistor network around a signal conditioning OP which is used anyway.

- - - Updated - - -

I'm not sure if you really thought things over.

You get a digital code from an ADC, which represents a digital number. But it also corresponds to an anlog input voltage. You don't see from digital value if it means 50 mV, 5V or 500 V. There's a scaling of the digital values that must be known.
 
You might find the attached reference material of interest, particularly the section, "Measuring High Voltages" on page 64 of Engineering - Digital Data Measurement and sboa097a - "High-Voltage Signal Conditioning for Low Voltage ADCs "

BigDog
 

Attachments

  • (ebook - pdf) - Engineering - Digital Data Measurement.pdf
    497.9 KB · Views: 89
  • sloa098.pdf
    336.4 KB · Views: 58
  • Signal-Conditioning.pdf
    585.6 KB · Views: 82
  • sboa097a.pdf
    131.8 KB · Views: 50
Hi SaraEnG,
You can level shift the AC signal to be positive(say 0V to 12V AC) and then divide the voltage to match dsPIC's requirements. So now you can sample an ac signal whose peaks are at 0V and 5V directly with the dsPIC's inbuilt ADC module itself. Just make sure you sample it atleast twice the worst case highest frequency of the signal(yes, Nyquist).


Raj Gunaseelan
 

hai all...
anybody can help adc problem on dspic30f2010?
iam making a sinewave using mpwm and with a timer1 isr of 200us. in this proj, i want to take voltage of mains in and ups out.
both signals are offset based sine.say 2.5 v.+....2.5v--, when iam averaging the adc results within 10 cycles, iam getting non lenear results say..220v...then jumps to236...then 178..like so...is there any source code/ code idea to solve this?..i think each isr is making the problem while reading adc..what to do?
 

hello,


i did some test to measure AC 230V
i use a trafo 230V/9V (10VA or less) for galvanic insulation
and add a DC constant value of +2,5V to the AC signal ,scaled to 1,6V efficace
with a potentiometer
so the resulting signal for ADC input is 2,5VDC +1.16V eff AC
signa is allways in the range 0 to 5V ..no problemo

I read this ADC input 290 times per 20mS
so i am sure to get minima value and maxima value of one sinusoide (50Hz)
and calculate the peak to peak voltage value.. ex: 928 points for 235VAC (meaured with a accurate AC multimeter)
So scaling is done by :
volts= (Peak to peak value in points) * 235 /928
scale factor is constant = 0,25323275

and to use this value for control, it is better to average it 8 or 16 times .

explanations **broken link removed**
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…