suming1189 发表于 2014-6-4 08:53:43

28035的ADC精度好像不太好?使用内部基准。请大家指教原因

请教为什么精度不好???
小弟使用电池和电阻分压后的0~75mV电压,经过运放放大37倍左右到AD端,现在测量AD端电压与ADC的数字转换的结果,数据如下。
进入ADC前级的RC参数是1K,10nF。ADC使用的是内部的ADC基准。
下面的AD采样值是经过10次求平均得到的。单次转换使用TIME0,20us中断进行SOC触发采样。
就是说实际上ADC的采样周期是200us。使用串口观察,ADC的采样值波动4以内吧,还算稳定。
就是在低电压采样时,精度很差,超出2%了。
备注:我测量3.3V电源,发现电压是3.32V。不过应该和ADC没有关系吧?使用DSP的内部晶振源。
               
AD采样电压V        AD采样值        误差百分比
0.166                223        -7.60%
0.423                543        -3.31%
1.043                1313        -1.40%
1.477                1854        -1.12%
1.773                2221        -0.92%
2.129                2662        -0.73%
2.544                3176        -0.58%
2.836                3537        -0.48%
3.085                3849        -0.52%

ADC的代码
void AD_Config()
{
        // Interrupts that are used in this example are re-mapped to
    // ISR functions found within this file.
           EALLOW;// This is needed to write to EALLOW protected register
           PieVectTable.ADCINT1 = &adc_isr;
        EDIS;    // This is needed to disable write to EALLOW protected registers       
        InitAdc();// init the ADC
        // Enable ADCINT1 in PIE
        PieCtrlRegs.PIEIER1.bit.INTx1 = 1;        // Enable INT 1.1 in the PIE
        IER |= M_INT1;                                                 // Enable CPU Interrupt 1
        EINT;                                                          // Enable Global interrupt INTM
        ERTM;                                                          // Enable Global realtime interrupt DBGM

    // Configure ADC
        EALLOW;
        AdcRegs.ADCCTL1.bit.INTPULSEPOS        = 1;        //ADCINT1 trips after AdcResults latch
        AdcRegs.INTSEL1N2.bit.INT1E   = 1;        //Enabled ADCINT1
        AdcRegs.INTSEL1N2.bit.INT1CONT= 0;        //Disable ADCINT1 Continuous mode
        AdcRegs.INTSEL1N2.bit.INT1SEL        = 1;        //setup EOC1 to trigger ADCINT1 to fire
        AdcRegs.ADCSOC0CTL.bit.CHSEL         = 0;        //set SOC0 channel select to ADCINA0
        AdcRegs.ADCSOC1CTL.bit.CHSEL         = 2;        //set SOC1 channel select to ADCINA2
        AdcRegs.ADCSOC2CTL.bit.CHSEL         = 4;        //set SOC2 channel select to ADCINA4
        AdcRegs.ADCSOC3CTL.bit.CHSEL         = 6;        //set SOC3 channel select to ADCINA6
        AdcRegs.ADCSOC0CTL.bit.TRIGSEL         = 1;        //set SOC0 start trigger on TIME0, due to round-robin SOC0 converts first then SOC1
        AdcRegs.ADCSOC1CTL.bit.TRIGSEL         = 1;        //set SOC1 start trigger on TIME0, due to round-robin SOC0 converts first then SOC1
        AdcRegs.ADCSOC2CTL.bit.TRIGSEL         = 1;        //set SOC2 start trigger on TIME0, due to round-robin SOC0 converts first then SOC1
        AdcRegs.ADCSOC3CTL.bit.TRIGSEL         = 1;        //set SOC3 start trigger on TIME0, due to round-robin SOC0 converts first then SOC1
        AdcRegs.ADCSOC0CTL.bit.ACQPS         = 6;        //set SOC0 S/H Window to 7 ADC Clock Cycles, (6 ACQPS plus 1)
        AdcRegs.ADCSOC1CTL.bit.ACQPS         = 6;        //set SOC1 S/H Window to 7 ADC Clock Cycles, (6 ACQPS plus 1)
        AdcRegs.ADCSOC2CTL.bit.ACQPS         = 6;        //set SOC1 S/H Window to 7 ADC Clock Cycles, (6 ACQPS plus 1)
        AdcRegs.ADCSOC3CTL.bit.ACQPS         = 6;        //set SOC1 S/H Window to 7 ADC Clock Cycles, (6 ACQPS plus 1)
        EDIS;
}
//-------------------------------------------------
//20us sample period;
interrupt voidadc_isr(void)
{

Voltage1 = AdcResult.ADCRESULT0;
Voltage2 = AdcResult.ADCRESULT1;
Voltage3 = AdcResult.ADCRESULT2;
Voltage4 = AdcResult.ADCRESULT3;

// If 10 conversions have been logged, start over
if(ConversionCount == 9)
{
   ConversionCount = 0;
}
else ConversionCount++;

AdcRegs.ADCINTFLGCLR.bit.ADCINT1 = 1;                //Clear ADCINT1 flag reinitialize for next SOC
PieCtrlRegs.PIEACK.all = PIEACK_GROUP1;   // Acknowledge interrupt to PIE

return;
}

suming1189 发表于 2014-6-4 09:02:33

补充下:
ADC的电路引脚如下。
数字电源和模拟电源是隔离的。通过AGND与DGND通过磁珠链接。

蓝胖子 发表于 2014-6-4 09:34:16

使用外部基准试试?

shhludb 发表于 2014-6-4 09:34:53

本帖最后由 shhludb 于 2014-6-4 09:40 编辑

都贴的一些无关紧要的图吧,要想误差小,电压基准芯片是必须的,运放电路也有很大关系,PCB布线也有关系,建议使用TI推荐的外部电压基准和运放。

蓝胖子 发表于 2014-6-4 09:37:36

电池和电阻分压后的0~75mV电压,这句话如何理解?

是为了测量0-75mV电压,还是经电阻分压后是75mV,源生电压应该是多少?分压电阻是精密的吗

suming1189 发表于 2014-6-4 09:52:03

蓝胖子 发表于 2014-6-4 09:37
电池和电阻分压后的0~75mV电压,这句话如何理解?

是为了测量0-75mV电压,还是经电阻分压后是75mV,源生电 ...

就是电池加上电位器得到一个0~75mV的电压,模拟外部75mV分流器的电压;然后通过运放放大到0~3.3V进行采样。

suming1189 发表于 2014-6-4 09:53:30

蓝胖子 发表于 2014-6-4 09:34
使用外部基准试试?

板子都画好了。。。{:cry:}

suming1189 发表于 2014-6-4 09:54:26

shhludb 发表于 2014-6-4 09:34
都贴的一些无关紧要的图吧,要想误差小,电压基准芯片是必须的,运放电路也有很大关系,PCB布线也有关系, ...

内部基准的精度也忒差了吧。。。。。。
页: [1]
查看完整版本: 28035的ADC精度好像不太好?使用内部基准。请大家指教原因