Interesting power findings - General Discussion and Assistance - CHDK Forum

Interesting power findings

  • 21 Replies
  • 10285 Views
*

Offline RaduP

  • *****
  • 926
Interesting power findings
« on: 22 / May / 2017, 06:49:44 »
Advertisements
I modded my SX210 to run on external power (I made a 'fake' battery out of extruded polystyrene, which has wires leading to a bench PSU).
Using the PSU built in meter (it only displays the hundreds mAh) I ran a few rough tests, and I was a bit surprised.
All the tests were done at 4V. I did not notice any difference in power consumption between CHDK and non CHDK. I was looking over some old threads of mine and seen that if I was loading CHDK via the firmware update method, it used more power. This doesn't appear to be the case anymore, at least ot on the SX210.

So, here are some numbers:
1. Power on, Play mode: 110 mAh
2. Switching to Rec mode will obviously use more amps which vary depending on what the camera is doing.
3. Now the interesting (and annoying) thing is that when switching back to Play mode the camera will use 150 mAh if the lens is out.
4. The even more interesting thing is, after the camera retracts the lens, it will use 130 mAh. Compared to 110 mAh when it started.

Now if I run my timelapse script that sleeps in Play mode with the display off but keeps the lens out, the camera will use 120 mAh. If I allow the lens to retract it only uses 100 mAh.
So the conclusions:
1. When first switching to Rec mode, the camera activates something that uses 20 mAh, and it won't turn that thing off until the camera shuts down.
2. When the lens is out, it will use another 20 mAh, which will stop use when the lens is back. So all the time lapse scripts waste energy by keeping the lens out.

After looking at the functions in funcs_by_name.csv I've notice many functions such as EnableFocusLens_FW EnableZoomEncoderCircuit_FW EnableIrisActuator_FW EnableMechaCircuit_FW and so on. My next steps will be to try their disable functions from LUA and see if anything happens with the voltage.
I want to route my power through one of those USB stick power counters that show the voltage/amps as well, I have one that shows mAs also.

Any ideas so far?

Re: Interesting power findings
« Reply #1 on: 22 / May / 2017, 07:50:54 »
I modded my SX210 to run on external power (I made a 'fake' battery out of extruded polystyrene, which has wires leading to a bench PSU).
Using the PSU built in meter (it only displays the hundreds mAh) I ran a few rough tests, and I was a bit surprised.
Nice work.   I assume you mean the PSD display shows mA and not mAh ?  In any case, unless you have a really expensive supply, those displays are adequate but not great.

Quote
All the tests were done at 4V. I did not notice any difference in power consumption between CHDK and non CHDK. I was looking over some old threads of mine and seen that if I was loading CHDK via the firmware update method, it used more power. This doesn't appear to be the case anymore, at least ot on the SX210.
I've argued for years that CHDK makes no difference on power consumption. At least not on the six camera models I own.  But some people claim to have had much different experience - I don't believe we ever resolved why.  (Although I seem to recall one more recent theory about that .. can't place it right now.)

Quote
2. When the lens is out, it will use another 20 mAh, which will stop use when the lens is back. So all the time lapse scripts waste energy by keeping the lens out.
It's a trade off against the energy required to move the lens in & out. Which you won't be able to measure on your PSU meter of course.  For long intervals between shots its worth moving the lens in & out.  For shorter interval, leave the lens out. The question is what defines "short". My guess would be five or more minutes but I have no data to support that.

Quote
After looking at the functions in funcs_by_name.csv I've notice many functions such as EnableFocusLens_FW EnableZoomEncoderCircuit_FW EnableIrisActuator_FW EnableMechaCircuit_FW and so on. My next steps will be to try their disable functions from LUA and see if anything happens with the voltage.
Sorry to be pedantic but I think you mean current? I'll be most interested to see what you learn as well.

Quote
I want to route my power through one of those USB stick power counters that show the voltage/amps as well, I have one that shows mAs also.
Will it let you see / record instantaneous values at 1 kHz sampling rate (or better).  That would be very interesting although you can do that with a digital oscilloscope as well if you have one.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline RaduP

  • *****
  • 926
Re: Interesting power findings
« Reply #2 on: 22 / May / 2017, 08:03:48 »
Yes, sorry I wrote this post after waking up, having slept only 4 hours. It's mA not mAh, I was thinking in terms of my battery.
I have a cheap digital scope, but for the time being I am more interested on the average consumption, and how to fix those issues.

Quote
It's a trade off against the energy required to move the lens in & out. Which you won't be able to measure on your PSU meter of course.  For long intervals between shots its worth moving the lens in & out.  For shorter interval, leave the lens out. The question is what defines "short". My guess would be five or more minutes but I have no data to support that.
The power needed to move the lens in/out is not that bad, it's maybe 400 mA for a few seconds. But there are many problems with doing so, one being the wear on the lens mechanism, and the other would be that it shifts the center of gravity of the camera and causes vibrations, which could move the camera around a bit each shot. For macro timelapse that's bad. Besides, if I were willing to do that I could just shut the camera down between shots.

Interesting power findings
« Reply #3 on: 22 / May / 2017, 08:09:07 »
If agree that for most situations, leaving the lens out is better. But if you are only taking a shot every few hours during daylight hours for months on end, retracting might help keep the lens cleaner, even if you only do so at night.

It all depends on your application.

If we could generalize the "poke a variable to leave the lens out" trick for all cameras it would be a useful feature for some of my more popular scripts.
« Last Edit: 22 / May / 2017, 08:11:44 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline RaduP

  • *****
  • 926
Re: Interesting power findings
« Reply #4 on: 22 / May / 2017, 10:03:33 »
So I tried the following stuff in my script, after taking the photo:

Code: [Select]
--DisableMechaCircuit_FW
call_func_ptr(0xffac19ac)

--DisableFocusLens_FW
call_func_ptr(0xffac1368)

--DisableFocusPiCircuit_FW
call_func_ptr(0xffac19cc)

--DisableIris_FW
call_func_ptr(0xffac1858)

--DisableIrisActuator_FW
call_func_ptr(0xffab02c0)

--DisableISAutoGyroOffset_FW
call_func_ptr(0xffac257c)

--DisableZoomEncoderCircuit_FW
call_func_ptr(0xffac1a14)

--DisableZoomPiCircuit_FW
call_func_ptr(0xffac19f0)

--Terminatedccd_FW
call_func_ptr(0xff86d530)

--QuietImager_FW
call_func_ptr(0xff8f4998)

--CancelImager_FW
call_func_ptr(0xff8f4a44)

Absolutely no change. I didn't investigate if those functions require any parameters though.

*

Offline RaduP

  • *****
  • 926
Re: Interesting power findings
« Reply #5 on: 22 / May / 2017, 10:07:23 »
Quote
If we could generalize the "poke a variable to leave the lens out" trick for all cameras it would be a useful feature for some of my more popular scripts.

Well, that variable is easy to find, I am sure there can be a standard function for most cameras that will poke that variable with the right value. Then cameras where that variable hasn't been found can have the function return an error or something.
Ironically, it was me who discovered that variable in 2009, I even forgot about it :D

*

Offline RaduP

  • *****
  • 926
Re: Interesting power findings
« Reply #6 on: 22 / May / 2017, 15:55:39 »
Well, I tried to cut off the SD power too, and it's still in the 120mA range. I guess one thing that can be done is to extract all the GPIO addresses from the firmware (with something like a signature finder), then have them all read before entering record mode, during record mode, and back in play mode, and then determine what has changed and what has stayed the same.
There doesn't seem to be much interest in the power saving aspect though. I think I might just get an EOS M10 camera, now that it runs CHDK and then just have a MCU start it up at a predetermined interval. Since there are no retractable lenses, there should be no problems with extra power consumption or lens wear.

*

Offline srsa_4c

  • ******
  • 4451
Re: Interesting power findings
« Reply #7 on: 22 / May / 2017, 20:24:32 »
So I tried the following stuff in my script, after taking the photo:
(...)
Absolutely no change. I didn't investigate if those functions require any parameters though.
Just FWIW, many event procedures won't do what their name suggests if the camera is not in factory mode. I remember that, for example, the mecha event procedures are called directly by mecha-related tasks, meaning even if you switch off power somewhere, it will be switched back, possibly immediately.
Well, I tried to cut off the SD power too,
Similarly to above, SD power gets restored as soon as the camera tries to access the card.

*

Offline RaduP

  • *****
  • 926
Re: Interesting power findings
« Reply #8 on: 22 / May / 2017, 20:32:25 »
Well I turned off the SD power a few seconds after the picture is taken, so unless if there is some logging or something done, it shouldn't need the card until the next picture is taken.
I do know that DisableMechaCircuit_FW does something outside the factory mode, because when called from my script while in Play mode, when it goes to shoot the camera will extend the lens then crash :)

I tried to take a cursory look at the code for some of those functions, and one of them does some GPIO stuff. I guess the only reliable way to find out what the GPIO does is to get a broken camera and put a scope or voltmeter on different points of interest then do some GPIO bit banging :)

*

Offline RaduP

  • *****
  • 926
Re: Interesting power findings
« Reply #9 on: 26 / May / 2017, 16:06:13 »
I did more tests today, with my SX510. I made a fake 'battery', which I connected to my PSU.
I found a few interesting things. The Eco Mode does absolutely nothing different than the power saving option where the screen turns off after 10 seconds. They both use 130 mA at 4V (the Eco Mode will shut down the camera after a while, but power saving can be configured to not do it). So it's just a marketing gimmick :/
Another thing, which is not so nice, is that running a script where I just shoot and then sleep, with the power saving option on 10 seconds, uses 230 mA! So a whole 100 mA used by the script alone, even though it's just sleeping. Any ideas?

 

Related Topics


SimplePortal © 2008-2014, SimplePortal