LPC1778 ADC voltage divider

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC1778 ADC voltage divider

1,644 Views
li_x
Contributor I

We used an external voltage divider to 10k--1k (0.1%) to feed the monitor of the 12V voltage to LPC1778 ADC. We measured the ADC input voltage was 1.147V after the voltage divider while we expected 1.091V. We so decreased the voltage divider resistor values to 1k--100ohm and got the the 1.0974V measured. My questions are

1. From LPC1778 datasheet, Rvsi is 1kohm max. Our original picked resistor values met this Rvsi, but why still got wrong voltage?

2. We used a 68nF capacitor for the filtering in the ADC pin while the datasheet lists Cia is 5pFmax. Any affect for not complying this requirement?

Thanks.

Labels (1)
0 Kudos
8 Replies

1,431 Views
li_x
Contributor I

Hi, Xiangjun

After checked with our firmware engineer, we could use this register for the offset adjustment, so I don't have more question. Thank you for the help.

Xiaoling

0 Kudos

1,431 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,XiaoLing,

AS you know that there is a S/H circuit(Sample/Hold), which is a capacitor actually, the external source has to charge the capacitor at SAMPLE time, that is why you see a leakage current.

Because of the ADC high leakage current, if your analog circuit is not of a low impedance, I suggest you use an analog buffer to convert the impedance from high to low.

Hope it can help you

BR

Xiangjun rong

0 Kudos

1,431 Views
li_x
Contributor I

Hi, Xiangjun

Thank you for the explanation about the leakage current, we'll consider your suggestion once we have the chance to change the board. I have another question maybe related to software. I measured one board the ADC pin is 1.148V, and our software engineer provided a way for me to read the 12-bit resolution ADC result, and I saw 1600-1608 reading which 'translate' to 1.173V~1.179V and offset up about 30mV. Anyway can improve the reading accuracy? Thanks.

Xiaoling

0 Kudos

1,431 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, XiaoLing,

The ADC of LPC1788 has a trim register, you can write the trim offset value to ADCOFFS bits in TRM register, then the ADC result will subtract the trim value after ADC conversion.

Hope it can help you

BR

Xiangjun Rong

pastedImage_11.png

0 Kudos

1,431 Views
li_x
Contributor I

Hi, Xiangjun

Yes, I followed your suggestion to get external power supply to provide 12V around to the voltage divider, and measured 10k-1k network and 1k-100ohm network voltage. After each measurement, I calculated the leakage current from LPC1778 ADC pin. Then I found the leakage currents were almost the same, around 0.05xA, so with this leakage current exists, it's better to select low value resistors  to avoid this current affect, but resistor value low means the high power rating of the resistor to sustain high current. My further question is that what causes the leakage current from ADC pin to voltage divider network, anything else can I do? Thanks.

Xiaoling

0 Kudos

1,431 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, XiaoLing,

I think it is okay to trim the ADC result by software, you can use waveform generator to generate DC voltage, use digital meter to test the waveform generator voltage, use ADC to sample the DC voltage, then compare the difference between the digital meter result, ADC result, then use software to trim the ADC result to get the voltage which  approaches to the real voltage value.

Hope it can help you

BR

Xiangjun Rong

0 Kudos

1,431 Views
li_x
Contributor I

Hi, XiangJun

Thank you for your suggestion. Right now our product is close to the production, and we are not able to have time scheduling for another layout redesign. That's the reason we can only adjust component values to get the close result.

Yesterday when I discussed this issue with my colleagues, one of them let me to ask if there's any change from either hardware or software inside of LPC1778 ADC since we thought the design met voltage source interface resistance Rvsi 1kohm max requirement, but the 1.147V measurement meant the leakage current from the ADC to the external resistor network. 

And another colleague would like to know if it's possible to keep the current 10k-1k network and let software to read 1.147V to represent 12V power supply. Then my concern would be if software can read 1.147V correctly, and since we need a tolerance to control the voltage monitor, we need check if the current design can follow 12V divider linearly. 

Please advise. Thanks.

Xiaoling

0 Kudos

1,431 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, XiaoLing,

Obviously, as you observed, the ADC analog channel impedance takes effect on the ADC result. I suggest you develop an analog buffer based on OP amplifier. For example, connect the divider voltage node to the no-inverter pin of the OP AMP, connect the inverter pin and output pin together, connect the AMP output pin to ADC.

Hope it can help you

BR

XiangJun Rong

0 Kudos