Power Consumption - some Measurements - page 4 - General Discussion and Assistance - CHDK Forum

Power Consumption - some Measurements

  • 33 Replies
  • 18529 Views
*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: Power Consumption - some Measurements
« Reply #30 on: 09 / November / 2009, 14:11:19 »
Advertisements
Okay, I did some measurements on my a570 100e with external power supply at 3.0 V (measured from camera input) using a 1 ohm current measurement resistor (which would be too large for REC mode, but is suitable for this).

The green power LED remained enabled when I booted using firmware upgdade from PLAY mode menu, so I added code to turn it off and measured again. Results below are with the power LED disabled (it drew 41 mW, btw).

I took readings using two multimeters and verified that the current is DC with an oscilloscope. Camera input power results were as follows:

NOP blinker AUTOBOOT: 210 mW
NOP blinker FW UPGRADE: 242 mW

Wait for int AUTOBOOT: 186 mW
Wait for int FW UPGRADE: 218 mW

For validation comparison to old results, I measured the easiest one i.e. AV plug in, play mode lens in, no CHDK and got Pin=366 mW.

Anyway, there's clearly some difference between the NOP loop and the one that sits waiting for an interrupt, and there's also something normal boot powers on that doesn't get shut down at fw upgrade reboot. This 186 mW is a not that good, it should drain a set of 2500 mAh AA cells in 31 hours or so assuming 2.3 V average battery voltage.

Random note: If during any of these experiments power button is pressed down, input power increases by about 1.8 mW. No other button has this effect. From a hardware point of view this makes sense and I suppose it doesn't really matter even for the "power button glued down" hacks since they run from external power that's switched on/off when required.

*

Offline RaduP

  • *****
  • 926
Re: Power Consumption - some Measurements
« Reply #31 on: 09 / November / 2009, 15:48:34 »
Great, thanks.
So my 220 mW estimate was very close to your 210 mW test.
I expected the wait for interrupt to consume less power, since the CPU is almost shut down, but I was hoping for more saved power.

Maybe the firmware update turns on the power for the flash writer?
Either way, 186 mW is not THAT bad if you use external power with some solar panels, as I wanted. With a 200 mA panel the camera would survive indefinitely so long as you have sunny days.

The only problem left would be making the camera not retract then extend the lenses when switching from playback to record mode. I managed to make the camera not retract the lens when it starts up, but couldn't figure out a way to stop it when switching from PB to Rec for the first time..

*

Offline RaduP

  • *****
  • 926
Re: Power Consumption - some Measurements
« Reply #32 on: 09 / November / 2009, 18:00:46 »
I made a function a while ago to check the MMIO and write the interesting stuff in a file.
It only works after the OS started, but if anyone wants to play with it, here it is:

Oh, and 0xc0220130 is the LED for my camera, so you might want to replace it with the correct value or just comment out those lines.

Code: [Select]
void log_text(char *buffer)
{
int fd;
fd = Fopen_Fut("A/debug.txt", "a");
Fwrite_Fut(buffer, strlen(buffer),1,fd);
Fclose_Fut(fd);
}

void get_mmio_on_stuff()
{
int i;
char str[200];

for(i=0xc0220000;i<0xc0230000;i+=4)
{
if(*(int *)(i)>0x44)
{
*((volatile int *) 0xc0220130) = 0x46;
sprintf(str,"0x%x: 0x%x\n",i,*(int *)(i));
log_text(str);
*((volatile int *) 0xc0220130) = 0x44;
}
}
blink_led(3);
for(i=0xc0400000;i<0xc0500000;i+=4)
{
if(*(int *)(i)>0x44)
{
*((volatile int *) 0xc0220130) = 0x46;
sprintf(str,"0x%x: 0x%x\n",i,*(int *)(i));
log_text(str);
*((volatile int *) 0xc0220130) = 0x44;
}
}

}

*

Offline RaduP

  • *****
  • 926
Re: Power Consumption - some Measurements
« Reply #33 on: 10 / November / 2009, 20:57:54 »
I discovered something interesting.
My camera is turned off by writing 0x44 to 0xC022001C
I am not sure exactly what happens internally, probably this just disconnects the power from the memory and CPU.
The interesting thing is that sometimes you can write 0x44 and then immediately write a 0x46, and the camera will NOT shut down. This is at 1Mhz clock.
At higher clock speeds, it is even possible to put a few nops between the time you write 0x44 and 0x46 and the camera will still not shut down. I am not sure why this happens, maybe there is some capacitor that will provide enough extra power for brief period or something.
Another interesting thing: if you hold the power button pressed, the camera will NOT shut down or restart if you write 0x44 to 0xC022001C. However, if you depress the power button it will shut down, unless if you wrote 0x46 back there..

There is some other MMIO location that acts in a similar matter, but I don't know where exactly it is. I can trigger it by writing 0 somewhere between 0xc0220100 and 0xc022b000
It would be interesting if we can somehow shut down the memory briefly, it should survive quite a bit without any power, and the CPU should, in theory, be able to keep running so long as it in a small loop (using the cache).

 

Related Topics


SimplePortal © 2008-2014, SimplePortal