September 20, 2012

Power consumption

Apparently Punix consumes almost as much power when it's powered off as TI-AMS does when it's powered on and idle. :(

Punix draws about 6 milliamps when it's powered off, compared to the 90 microamps that TI-AMS draws (this means that Punix lasts about a week on a set of fresh batteries, while TI-AMS lasts for months). Punix also draws about twice as much current while powered on and idle: 16 milliamps versus 8 milliamps. The "busy" current draw is the same for both: about 32 milliamps.

Clearly something is drawing about 6 milliamps more in Punix than in TI-AMS (I suspect the LCD screen draws about 2 milliamps when it is on: 6+8+2=16). Tracing through both systems in TiEmu showed that both execute almost the same code while powered down. Both systems wake up once per second (to update the system clock) and execute about 500-600 CPU clock cycles before putting the processor back to sleep. As the CPU is active for only 0.005% of the time, I doubt it is responsible for the (relatively) high power consumption.

I need to see how much current PedroM draws in each case, and if it's low like TI-AMS, I'll have to see what it does during idle periods that Punix doesn't (or vice versa).

Update: PedroM draws almost the same amount of current as TI-AMS in all cases. I modified the cpupoweroff() function in Punix to look more like PedroM's Trap #5 handler (which is used for turning off the calculator), and now Punix draws nearly 120 microamps while powered off. This is still about 33% higher than either PedroM or TI-AMS, but it's much better than before. The current draw while Punix is powered on and idle is still about 16 milliamps. I need to change more stuff to reduce that figure; perhaps my Int 1 handler is too heavyweight.

No comments: