Thursday, 19 November 2015

PIC - How to skirt around low maximum ADC input impedance?



Reading a 9V battery on a PIC is nothing new. The most simple and straightforward way is with a voltage divider. I'd like to keep the divider resistances cranked up into the hundreds of kohms so I'm not killing my battery unnecessarily, however I looked at the datasheet for the PIC18F4550 and the max "recommended" analog input impedance is 2.5kohms. This means I can stick 2 5Ks for my divider, but 900uA is a lot to waste on just checking the battery. What can I do to my design (passively) to minimize battery drain? I've considered active solutions such as a software controlled pfet or a buffer, but board space and budget are a bit of a luxury, so I'll only do it if I have to. I'm also wondering if I'm I being concerned over nothing.



Answer



The reason the ADC needs a low source impedance is because it has a switched capacitor input. Basically, whenever the ADC 'samples' the voltage on the pin, a small capacitor is connected, charged up, and then disconnected. If the impedance is too large, charging the capacitor up will draw enough current to create a voltage drop large enough to affect the reading.


If you need to read a high speed signal, the best option is to add an amplifier of some sort to provide a low source impedance to the ADC. However, if you are looking at a relatively slow signal there are a couple of other options.


One solution to this is to increase the sample time - the length of time the capacitor is connected to the pin. The chip usually has a limit on how long this time can be, though.


Alternatively, you can add a decent sized capacitor in parallel with the ADC input pin. This will decrease the amount of droop that occurs when the ADC sampling capacitor charges up as most of its charge will be drawn from the capacitor instead of through the resistor.


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...