way to make lens retract? - Script Writing - CHDK Forum

way to make lens retract?

  • 8 Replies
  • 7307 Views
way to make lens retract?
« on: 02 / August / 2008, 05:03:18 »
Advertisements
I want to modify an intervalometer script so that the lens retracts after taking a photo, and then opens again in time for the next one.  The reason is that I plan to set a camera up at a building site and take a photo every hour for several months, and don't want the lens getting dirty.  Are there scripting calls that make this possible?

I've only just discovered CHDK and am blown away by how powerful it is.  Fantastic!

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: way to make lens retract?
« Reply #1 on: 02 / August / 2008, 06:08:15 »
I want to modify an intervalometer script so that the lens retracts after taking a photo, and then opens again in time for the next one.  The reason is that I plan to set a camera up at a building site and take a photo every hour for several months, and don't want the lens getting dirty.  Are there scripting calls that make this possible?

Not really...but in PLAY mode the camera does this quite soon automatically (at least my a570is does). The ability to switch between REC and PLAY modes is something that's been under inactive development for quite some time and is possible for some camera models in some builds.

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: way to make lens retract?
« Reply #2 on: 02 / August / 2008, 06:19:52 »
Oh and below is a list of strings from a570is 1.00e firmware that to me seem related to this.

ffc114e8 AC:TStoreLensT
ffc1155c AC:SStoreLensT
ffc116a0 AC:InitLens
ffc11780 AC:StoreLens
ffc117e8 AC:PrepareLens
ffc1229c _EntryToPrepareLens
ffc134f4 CmrConState_CheckStoreLens
ffe7d1d0 IsLensOutside
ffea3c40 SSAPI::StoreLensForShutDown
ffea3dc4 SSAPI::StopLens
ffea3f9c SSAPI::IsLensExtend
ffeb59c0 PT_CompletePrepareLens
ffeb59d8 PT_CompleteStoreLens
ffedb18c CloseLensCoverHalf
ffedb1a0 OpenLensCoverHalf
ffedb1b4 CloseLensCover
ffedb1c4 OpenLensCover

It would be interesting to try if the camera mechanics allow the lens cover to be activated while the lens is extended... This could be one more way to get dark frames or at least improve their quality?


*

Offline zeno

  • *****
  • 889
Re: way to make lens retract?
« Reply #3 on: 02 / August / 2008, 07:35:15 »
fudgey - while the lens of my a570 also retracts (after 20-30 seconds) if I manually switch to playback mode, it doesn't do this if I switch in a script.

I have a modified Allbest build that lets me switch modes. There's no doubt the script causes the camera to go into playback mode (if the script presses the left button the lcd displays previously shot pictures) but the lens does not retract, even after a minute. 
A570, S100, Ixus 127
Author of ASSIST, STICK, WASP, ACID, SDMInst, LICKS, WICKS, MacBoot, UBDB, CFGEdit


*

Offline zeno

  • *****
  • 889
Re: way to make lens retract?
« Reply #4 on: 02 / August / 2008, 07:41:23 »
WildWoila - is your camera one of the few that will switch on if USB power is applied (see CameraFeatures - CHDK Wiki - the s3 does for example)? If so you could use the "shut_down" script command to turn the camera off after taking a photo and use a simple timer circuit to turn on usb power and wake the camera every hour.
A570, S100, Ixus 127
Author of ASSIST, STICK, WASP, ACID, SDMInst, LICKS, WICKS, MacBoot, UBDB, CFGEdit

Re: way to make lens retract?
« Reply #5 on: 03 / August / 2008, 02:25:46 »
zeno - I've got an A710, and no it does not wake up on USB.

It might not end up being a problem.  We will build a little shelter to put the camera in.  If we make a glass front, then we don't need to retract the lens.  Just need to give it a clean every now and then.  Hopefully shooting through glass won't effect the photo quality.

*

Offline fbonomi

  • ****
  • 469
  • A570IS SD1100/Ixus80
    • Francesco Bonomi
Re: way to make lens retract?
« Reply #6 on: 03 / August / 2008, 04:29:22 »
Quote
Just need to give it a clean every now and then. 

If, for example, you clean the glass every week (and the dirt is significant), you might end up having a "pulsating" effect of dirt accumulating and being swept away. No easy solution, apart cleaning it at short intervals...

btw, anyone knows of the longest a camera has been kept on?




*

Offline jetzt

  • ****
  • 316
  • [A710IS,(SD200)]
Re: way to make lens retract?
« Reply #7 on: 03 / August / 2008, 06:40:45 »
Quote
btw, anyone knows of the longest a camera has been kept on?
I don't know either, but with a power supply or a lead accumulator it shouldn't be a problem to keep it on for days.
Or does the sensor/something else get hot then? Is there any limit on long duration uses from canon?
So I'll have to wait for my lead batt. to be loaded. :(


*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: way to make lens retract?
« Reply #8 on: 04 / August / 2008, 17:05:19 »
fudgey - while the lens of my a570 also retracts (after 20-30 seconds) if I manually switch to playback mode, it doesn't do this if I switch in a script.

I have a modified Allbest build that lets me switch modes. There's no doubt the script causes the camera to go into playback mode (if the script presses the left button the lcd displays previously shot pictures) but the lens does not retract, even after a minute. 

Good to know... and quite unfortunate. But this can probably be fixed, in my opinion this proves that the way you switch from rec to play mode in CHDK is not the "right" way since some features are left behind (of course it's good enough for other uses, but apparently not the highest level "soft switch" there is). One think I'd find interesting would be to compare power consumption of play modes entered via the hack and via the REC/PLAY switch...

 

Related Topics