User's Manual
MPR/MIB User’s Manual
Page 20 Doc. # 7430-0021-07 Rev. B
calibrate the battery voltage a precision external voltage reference is required. The MICA2 uses
an LM4041 (Mfg: National Semiconductor) 1.223 V reference (V
ref
) attached to ADC channel 7.
; NOTE: ADC channel 7 is also used for JTAG debugging on the Atmega128 processor. MICA2s and
MICA2DOTs ship with the JTAG fuse enabled. When this fuse is enabled the input impedance of channel
7 is lowered which affects the voltage reference measurement. The fuse must be disabled if ADC channel
7 is used. See below for information on setting ATMega128L fuses.
To compute the battery voltage:
1.
Set the BAT_MON processor pin (PA5/AD5) to HI.
2.
Program the application code to measure ADC Channel 7.
3.
Compute battery voltage, V
batt
, from Channel 7’s data by:
CountADCFSADCVV
refbatt
__×=
where:
V
batt
= Battery voltage
ADC_FS = 1024
V
ref
= External voltage reference = 1.223 V
ADC_Count = Data from the ADC measurement of Channel 7
6.5 MICA2DOT Battery Voltage Monitor
Unlike the MICAz and the MICA2, the MICA2DOT uses a Schottky reference diode (S103AW)
as a voltage reference that can be used to measure battery voltage (V
batt
). Since the eight-channel,
ATMega128L ADC uses the battery voltage as a full-scale reference, the ADC full scale
(ADC_FS) voltage value changes as the battery voltage changes. In order to calibrate the battery
voltage an external voltage reference (V
ref
) is required.
To compute the battery voltage:
1.
Set processor pins PW7 (PC7/A15) to LO and PW6 (PC6/A14) to HI.
2.
Program the application code to measure ADC Channel 1 (ADC1).
3.
Compute battery voltage, V
batt
, from channel 1’s data by:
CountADCFSADCVV
refbatt
__×=
where:
V
batt
= Battery voltage
ADC_FS = 1024
V
ref
= External voltage reference = 0.6 volts
ADC_Count = Data from the ADC measurement of Channel 1