Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

dsPIC for RMS I/V measurement

Status
Not open for further replies.

eTech

Well-Known Member
Hi

I'm new to PIC applications and have a question regarding use of dsPIC ADC for
measuring Audio output voltage and current.

I'm working on a project to measure the output of an audio amplifier using a PIC
The amplifier can output up to 1000w. I want to do basic measurement of RMS
volts/amps (I know I can do this with existing products, but I want to try doing
this with a PIC)....

I understand use of a PIC ADC for DC voltage measurement. But how does the ADC
interface to an AC source?

Does the signal need to be converted to DC, externally, before the PIC can process it?
Perhaps with an external RMS-to-DC chip?

Or can the audio signal be directly connected, with the appropriate attenuation/dividers, to the ADC input?

thanks
eT
 
I would use a cap to AC couple.
Divide down so the max output of the amp results in a 5 volt signal P-P. Assuming the micro is running from a 5V supply.
The bottom resistor in the divider; needs to be changes. Double the value and connect to ground AND add the same resistor to +supply. This way the DC (average) signal will be at 1/2 supply. So when the amp outputs 0V it will appear to the micro as 1/2 supply. When the amp out puts -max the micro will see near 0V. When the amp put puts +max the micro will see near VCC.
 
Hi

If I understand....then I can directly connect the Amp output to the PIC.

OK...I need an input CAP...

The recommended impedance of the analog input voltage source is 200 ohms(from the dsPIC data sheet).
Should I use an OPAMP on the ADC input to help balance to impedances?

The available supply voltages are 3.3 vdc, and 5.0 vdc.
ADC operates from 3.3 vdc supply

eT
 
Last edited:
200 ohms seems low.
470 ohm from ADC pin to ground
470 ohm from ADC pin to 3.3 volts.
4700 ohms from ADC pin through cap to amp out. approx 20:1 divide
cap and 4700 makes a high pass filter. Less than 20hz.
 
200 ohms seems low.
470 ohm from ADC pin to ground
470 ohm from ADC pin to 3.3 volts.
4700 ohms from ADC pin through cap to amp out. approx 20:1 divide
cap and 4700 makes a high pass filter. Less than 20hz.

Hi

I put together a quick diagram per your description.
Can you check?

thanks
eT
 

Attachments

  • PICVoltMeas.png
    PICVoltMeas.png
    5.1 KB · Views: 163
Connect all the Vcc(s) together with out resistor.
Move resistor , ADC in --Resistor---Vcc.

The way you have it the ADC will only see the positive half of the signal.
 
You can change your divide ratio by changing the 4700 resistor.
Because you said dsPIC I think you know to sample fast.
 
200 ohms seems low.
470 ohm from ADC pin to ground
470 ohm from ADC pin to 3.3 volts.
4700 ohms from ADC pin through cap to amp out. approx 20:1 divide
cap and 4700 makes a high pass filter. Less than 20hz.

ron...

Can you share with me how you came up with those values?

thanks.

eT
 
You said you wanted the impedance on the ADC input to be 200 ohms. (I think 1k or maybe 10k is ok)
So; 470 parallel with 470 parallel with 4700 is about the 200 ohms you asked for.
The output of a power amplifier is much larger than 3.3 volts so it must be divided down.
4700 ohms to the signal and 235 ohms makes a divider. The two 470 resistors look like a 235 ohm resistor to 1.65 volts or (3.3/2).
 
I doubled checked the data sheet for a dsPIC33FJ128GP802, and it says 200 ohms....does seem kinda low though.

I just wanted to see how you came up with those values for my own benefit.. :)

Regarding the 4700 ohm resistor, I need to adjust that based on the anticipated AC input, for different scaling levels.. right?
To keep the AC input voltage at 3.3v p-p max....correct?

eT
 
I cant find 200 ohms in the data sheet. Probably in a application note.

Yes you can change the 4700 resistor to get 3.3V p-p max.
You could measure the power supply in the power amp and divide down for a first start in resistor value. (+/-30V) or (60v)--->3.3V
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top