|
| ( 01 Nov 2009 ) |
| By Peter T. Miller, Applied Inspirations LLC, Bethlehem, CT |
|
The supply rail normally powers a microcontroller’s voltage-reference source. In power-critical battery-operated applications, the constant drain, even of a few 10s of microamps, can be prohibitive. This situation requires adding a pin to turn the reference voltage on and off. By adding a 0.1µF capacitor in parallel with the voltage reference and a simple bit of software that you can download from the online version of this Design Idea, you’ll need just one pin to both power and read the reference voltage.
When you connect the voltage reference as in Figure 1, the software configures the Microchip PIC chip’s VREF (reference-voltage) pin as a switched-on output. After approximately 300µsec, the voltage across the capacitor stabilizes at 1.225V.
There is an initial overshoot when the ZXRE4041 powers up. The pin is then reconfigured as an analog input for the ADC’s reference-voltage source. The reference voltage quickly drops by 20mV in the next 50µs as the ZXRE4041 shuts down. With a 0.1µF capacitor, the voltage then slowly drops 60mV over 2ms because of leakage. Although this delay is exponential, the rate is so slow that, for practical purposes, you can consider it linear for this short time window.
You must also consider that the ADC also draws current through the 10kΩ resistor during conversion, causing voltage drop. Although Microchip doesn’t characterize this voltage drop in its documentation, tests consistently measured a drop of 80mV for several devices, giving a calculated current of 6.67µA. Using a conservative internal 4MHz clock and allowing an ADC clock of frequency oscillation divided by 16 for operation at the minimum operating voltage, one conversion takes 45µs. This action slightly drains the capacitor, but this drainage appears to be only 2mV or 3mV. Calculations of initial watt-seconds minus watt-seconds used yield even lower values. Subtracting these fixed, repeatable losses from the initial steady-state 1.225V yields a new reference voltage of 1.225VREF–0.02V shutdown drop–0.080 IR drop=1.145V.
Allowing 75µs to do the analog-to-digital conversion, store the value, and set up for the next conversion on another channel, 11 conversions will result in the last one’s reference voltage being lower by 22.5mV—that is, 10 conversions×75µs×(60mV/2000µsec). This error is only 1.9 percent compared with the first conversion’s results.
If you just need an approximate voltage for a consumer product, for example, to warn of low battery voltage, you can use an LED instead of the ZXRE4041. Just change the value of R1 to 300Ω to provide sufficient current to turn on the LED. Although LEDs lack the temperature stability of dedicated voltage-reference chips, the variation may be acceptable for the application because most consumer products find use within the comfort range of humans. If an LED is already part of the system, then the voltage-reference cost is only that of the software. Using this technique, an LED can now provide status-indicator, photodetector, and voltage-reference functions and enter a zero-power state using only software to reconfigure the changes.
Click here for the illustrations:
Caption Figure 1: A voltage reference and a capacitor provide a reference voltage for a microcontroller.
|
| |
|
|
|
|
| |
|
|
Average Rate:
No rating yet |
| |
| |
|
|
|
|
| |
|
|
| |
|
|
| 9/2/2012 |
|
| 8/2/2012 |
|
| 8/2/2012 |
|
| |
|
|
|
|
|
|
|
| |
|
| |
|
| 1/2/2012 |
|
| 31/1/2012 |
|
| 18/1/2012 |
|
| |
|
|
|
|
|