You don't have to wait at all and there is no need for an opamp. What you are suggesting is just complete overkill.
Mike.
Yes, a 1uF paralleled with a 25pF cap would only drop to 1/40000 of its voltage, which is much less than a code in the ADC (1/1024). However, the cap is also needed to smooth the AC, not just reduce filter output impedance to pulses. And, at that, the filter should have a 2.4Hz cutoff with a 1uF. Which sounds basically OK. The lowpass filter is a first-order type and the cutoff is very gradual. If the ripple was at 120Hz and the filter had a 60Hz cutoff, and the ripple was of high amplitude, that might not be enough. But the ripple amplitude is moderated by the battery to begin with, and 2.4Hz is far from 120Hz, so the ripple amplitude should be way below detectable levels with a 1uF cap and a 200K/100K resistor divider. The leakage current issue remains a factor.Keep in mind that the capacitor we are trying to charge is only 25pF. A 1uF external cap will charge it almost instantly and it's voltage will not be effected (that you can measure).
Mike.
No, because only the leakage on the pin is DC. When you engage the Sample period of the ADC, it connects an internal 25pF capacitor to the pin, thus drawing a current pulse and effectively puts the internal ADC cap in parallel with the filter's output cap. That's a short pulse of current needed, it's a type of AC.But my circuit will provide unsmoothd DC & there is no any AC.So we have to concentrate only the resistors & ignore the capacitor.
Thanks to all. I have gathered a lot from these posts. It is so resourceful to me. I request my senior and expert friends to kindly explain the leakage current and its effect on ADC.
swapan
Keep in mind that the capacitor we are trying to charge is only 25pF. A 1uF external cap will charge it almost instantly and it's voltage will not be effected (that you can measure).
Mike.
Mr Al, you just repeated the misconception AGAIN without answering any of the points that Pommie and I posted in response to Oznog's post. If the source impedance is 10KΩ or less, then the external source tied the AD input pin is low enough to prevent the capacitive coupling backwards from internal switches from perturbing the voltage at the input pin. This is a dynamic process (AC) which happens only during the conversion sequence.
The external shunt capacitor will present a source impedance much less than 10KΩ and will hold the voltage constant during the conversion. Think about how much current it would take to "move" the capacitor voltage.
This is independent and separate from the DC leakage spec, which slightly changes the DC level at the input pin.
Normally, you need to keep the input resistance below 10k if you want to keep the acquisition time low (this is the time required for the internal cap to charge). However, if your resistance is higher than 10k you can still use the ADC but you must allow more time for the internal capacitor to charge. It is shown in the data sheet how to calculate the required acquisition time. On a modern pic the internal cap is 10pF and so for an input resistance of 50k the acquisition time is,
10*10^-12*(1*10^3+7*10^3+50*10^3)*ln(1/2048) = 4.4uS (from 16F886 data sheet)
So, after selecting the channel and turning on the ADC you must wait 4.4uS before starting the ADC. With 10k input impedance this is around 1.5uS.
However, if you leave the channel selected and the ADC on then the internal cap will track the voltage and won't require a charging time.
Another way to achieve the same result is by adding an external cap that will track the voltage and that can rapidly charge the internal cap when the ADC is turned on. This only works with voltages that are changing slowly as in this case.
The leakage current is a different matter. This is the current that leaks to ground through the ADC pin and for a 16F886 it is up to ±500nA. This current will flow through the resistive divider and with a 50k input impedance could result in a reading that is 25mV out.
And therein end ADC101.
HTH.
Mike.
Now correct me if I'm wrong, but isn't the internal sampling capacitor voltage "unknown" after an ADC conversion?However, if you leave the channel selected and the ADC on then the internal cap will track the voltage and won't require a charging time.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?