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

Power Consumption - some Measurements

  • 33 Replies
  • 12546 Views
*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: Power Consumption - some Measurements
« Reply #10 on: 04 / November / 2009, 16:29:07 »
Advertisements
I am not impressed at all with the power saving, I was hoping it would last at least 12 hours. The camera was eating something like 130 mA/h, @ 3.7v. That's almost half a watt in standby!

Interesting stuff...

Looking at my old measurements, a570 in play mode with LCD backlight disabled and lens in (=sensor disabled), AV output inactive, input power from 3.15 VDC external power supply was 0.33 W.

Curiously, at U=3.7 V that 0.33 W equals to I=90 mA, significantly less than what you're approximating...maybe Rec2PB doesn't shut down the sensor, after all you're tricking the camera to think lens is retracted already. Or were you able to verify that from temperature measurements?

*

Offline RaduP

  • *****
  • 908
Re: Power Consumption - some Measurements
« Reply #11 on: 04 / November / 2009, 16:39:58 »
Yes, the sensor should be off, from the temperature measurement..
I will try some other tricks, like trying to change the clock in my hibernate function, but I doubt it will help much.

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: Power Consumption - some Measurements
« Reply #12 on: 04 / November / 2009, 16:55:49 »
Maybe you're just playing with power consumption of an already low power user interface processor, with some hungry DSP elephant running full steam right next door inside the same chip. Woudn't it be great to have some documentation for the hardware... :-X

One thing that would be quite interesting to measure is whether the way you enter PLAY from REC affects power consumption. I mean differences between using the real button/switch or events or Rec2PB(). Experiments with those overrides have resulted in my camera ending up in some funky states in the past and I wouldn't be very surprised if there's some part of the camera that doesn't notice mode overrides even if they seem to work well.

*

Offline RaduP

  • *****
  • 908
Re: Power Consumption - some Measurements
« Reply #13 on: 04 / November / 2009, 17:11:48 »
Well, one thing to be certain is that Canon doesn't care too much about power consumption, or else they would have turned off the SD power when the SD card is not in use. This is the most obvious thing, but I am sure that there are some other things that could have been done better.
For example, my PDA can survive for 5 days with WiFi on (!), on a 1500mAh battery.

I tried to change the clocks, but the camera crashes, which is not exactly unexpected :/

One last thing to try is to scan the memory between 0xC0400000 and 0xC0500000 for values higher than 0x44, then write them in a file. After I will take a look at them, I'll try to turn them off (0x44) a few at a time, and see which ones can be safely turned off while the camera is in the hibernation mode.


*

Offline RaduP

  • *****
  • 908
Re: Power Consumption - some Measurements
« Reply #14 on: 06 / November / 2009, 04:36:10 »
Ok, I did another test today.

In boot.c, at the very beginning, I am doing this:

Code: [Select]
void delay(int n)
{
int i;

for(i=0;i<n;i++)
asm volatile (
    "nop\n"
    "nop\n"
    "nop\n"
    "nop\n"
    "nop\n"
    "nop\n"
    "nop\n"
    "nop\n"
    "nop\n"
    "nop\n"
    "nop\n"
    "nop\n"
    "nop\n"
    "nop\n"
    "nop\n"
    "nop\n"
    "nop\n"
    "nop\n"
    "nop\n"
    "nop\n"
    "nop\n"
    "nop\n"
    "nop\n"
    "nop\n"
    "nop\n"
    "nop\n"
    "nop\n"
    "nop\n"
    "nop\n"
    "nop\n"
    "nop\n"
    "nop\n"
    "nop\n"
    "nop\n"
    "nop\n"
    "nop\n"
    );
}

void __attribute__((naked,noinline)) boot() {
int i=0;
*(int *)(0xC0400044)=5;
*(int *)(0xC0400048)=0;
*(int *)(0xC040004c)=2;

while(1)
{
*((volatile int *) 0xc0220130) = 0x46;
delay(100);

*((volatile int *) 0xc0220130) = 0x44; // Turn off LED
delay(100000);
}


The reason why I did it here is because:
1. Most of the electronics should be off at this point.
2. I can actually change the clocks to a speed that is MUCH lower (30 times or so) than when the camera is running, based on the LED blinking.

I left the camera running this code for over 8 hours, then started it normally and the battery was at 3.77v
Now I put that code back and I am trying to see how long it will take until the battery dies. Hopefully it will still be blinking when I wake up :)

So based on this experiment, there are two possibilities:
1. After the initialization code, the camera turns on some hardware then 'forgets' to turn it off in standby mode.
2. The clock really makes a difference (normally, it shouldn't, given that my CPU was in a state where it was supposed to just wait for interrupts). Of course, it could be that higher CPU clock means higher memory clock, but I don't know..

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: Power Consumption - some Measurements
« Reply #15 on: 06 / November / 2009, 11:48:34 »
I left the camera running this code for over 8 hours, then started it normally and the battery was at 3.77v

Hmm... this makes me think if it would be possible to implement a low current standby for long but sparse timelapses (e.g. 1 pic per hour) already using this method (i.e. no need to find out how to shut down and then restart stuff that consumes current) -- either by switching CHDK boot files on the SD card after each shot to a binary that runs your low power code for a set period and then replaces the boot files with CHDK and reboots or by just adding this delay to the CHDK boot code and letting it continue booting after a hard coded timelapse delay.

Rebooting from switched binaries for DryOS from CHDK has been demonstrated by mweerden in his PTP/USB work (I have no idea how to duplicate that for VxWorks). I suppose the hard part in that method would be to add file handling to the low power timer code since the OS wouldn't be there to help with that.

*

Offline RaduP

  • *****
  • 908
Re: Power Consumption - some Measurements
« Reply #16 on: 06 / November / 2009, 13:54:34 »
I had this very same idea, however, there is a small problem. The camera will take the lenses in/out whenever it needs to start again to take the photo. This might not be an issue if you want to take a shot every few hours, but if you want something like every 10 minutes it's not very effective.

Anyway, when I woke up, the camera was dead, so I would guess it ran for maybe 12+ hours. I guess I'll try again..

*

Offline RaduP

  • *****
  • 908
Re: Power Consumption - some Measurements
« Reply #17 on: 06 / November / 2009, 14:03:11 »
BTW, the delay in the boot code doesn't have to be hardcoded, the camera can put it near the end of the RAW buffer before shutting down, and it will survive there (tested).


*

Offline RaduP

  • *****
  • 908
Re: Power Consumption - some Measurements
« Reply #18 on: 06 / November / 2009, 23:12:56 »
I managed to set the CPU to 1 MHZ (in boot.c)
I will try the test again, and if the camera doesn't survive for at least 20 hours it means that something is very wrong with it. Besides for the memory and CPU, there should be very little power consumption, and the CPU shouldn't eat much power at all at 1 Mhz, executing nops.

*

Offline RaduP

  • *****
  • 908
Re: Power Consumption - some Measurements
« Reply #19 on: 07 / November / 2009, 19:44:36 »
Ok, test over it survived for 18 hours and 30 minutes, so about 60 mA, so 220 mW..
Now I wonder if the CPU saves some power when executing nops.

 

Related Topics