Power Monitoring on the Intel Sitsang

(CS 6210 Spring 2005 -- Project #2)

Overview

With a few simple modifications, the Intel Sitsang boards can monitor their own power consumption from the OS. This creates intersting possibilities, such as:


Hardware Modifications

The touchscreen controller on the Intel Sitsang boards is an ADS7846. This chip contains a 12-bit, 6-channel A/D converter--4 of these channels are connected to the touchscreen; the other two, VBAT (pin 7) and AUX (pin 8), may be used to monitor power consumption. On an unmodified Sitsang, VBAT is connected to the battery voltage, however AUX is connected to VCC_CORE--we must modify AUX to measure battery current, in order to do power monitoring.

The Sitsang boards contain a jumper, J20, located on the positive supply of the battery, which makes an excellent place to monitor current. The circuit above easily fits on a small circuit board that snaps onto J20 (see Figure 1).

Figure 1: Circuit board attached to Sitsang using a female header plugged into J20. Figure 2: Connecting the AUX pin (pin 8) of the ADS7846 to the output of the MAX471.

Warning: when connecting to pin 8 of the ADS7846, be sure not to let the pin touch the pad below. (See electrical tape in Figure 2.) The pad below is directly connected to VCC_CORE on the XScale CPU. Any voltage above 1.6 V can cause permanent damage to the processor.

Schematic

The current-monitoring circuit is built around a MAX471, a 3 amp precision current amplifier. The MAX471 has a built-in 35 milliohm sense resistor, and is calibrated to output 500 microamps per amp.

The 1.8 kohm resistor on the MAX471 output takes the current source output, and gives us 0.9 volts per battery amp. The AUX input of the ADS7846 has a built-in 2.5V reference voltage, giving us the ability to measure up to 2.8 amps.

Since the A/D converter will only be polled in the kernel timer interrupt (a frequency of 100 Hz), a capacitor was added to act as a crude averaging circuit. The resistor-capacitor combination has a cutoff frequency (1/2*pi*R*C) of roughly 20 Hz.


Kernel Code

The touch screen driver, ads7846.c, was modified to support voltage and current monitoring. It does, however, break the original touch screen code--this probably could be fixed, but seems unnecessary.

The new driver adds a /proc file, /proc/pm, which gives the last readings, and average readings for the previous second, 30 seconds, and 5 minutes. For example:

$ cat /proc/pm
            Voltage  Current    Power                                           
Last 10 ms  3791 mV   665 mA  2521 mW                                           
Last 1 s    3806 mV   547 mA  2081 mW                                           
Last 30 s   3807 mV   545 mA  2074 mW                                           
Last 5 min  3880 mV   540 mA  2095 mW

Evaluation

The readings from the modified touchscreen driver were compared against simulataneous power consumption readings from an oscilloscope. Throughout the tests, the touchscreen driver had a worst-case error of +/- 200 mW--worst when heavily-fluctuating loads, such as the LCD backlight were turned on.

Some simple experiments using dynamic voltage and frequency scaling:

FrequencyCPU Core VoltagePower Consumption
CPUBusIdleMemory-Bound
Application
CPU-Bound
Application
398 MHz199 MHz1.30 V2.06 W2.55 W2.71 W
398 MHz99 MHz1.30 V2.06 W2.49 W2.57 W
298 MHz99 MHz1.10 V2.01 W2.35 W2.39 W
199 MHz99 MHz1.00 V1.97 W2.25 W2.35 W
99 MHz50 MHz1.00 V1.95 W2.10 W2.11 W

The tests above were done with the LCD backlight turned off, no network connection, but no other power-saving features.


Last Modified: 2/25/05 by lcs@cc
Return to Intel Sitsang Resources | Leo Singleton