SX150 IS time lapse day and night - Script Writing - CHDK Forum  

SX150 IS time lapse day and night

  • 13 Replies
  • 3729 Views
SX150 IS time lapse day and night
« on: 23 / October / 2012, 12:48:21 »
Advertisements
Hello,

I am all new with all this.
Here where I got so far
-managed to install CHDK on a 128GB SDXC and boot the SX150 IS on it
-managed to load a script from
http://chdk.wikia.com/wiki/UBASIC/Scripts:_Time_lapse_script_variable_shutter_speed

I want to lock AF to infinity so I added a new param along the other ones

 @param z Focus locked to infinity (0=off 1=on)
 @default z 1

and these lines

rem set focus to infinity and lock it
 if z=1 then set_focus 65535
 set_aflock z

I am not sure of several things:
-Shall I put these lines just before the loop?
-Shall I put them inside the loop at its beginning?
-Shall I set manual Focus first (via the script or the camera)?

Also, I am trying to save battery life as much as possible so I used the version I can switch display off.
Does switching the display off disable manual focus or focus lock?

About battery life, I presume the pre-shoot used in the script to evaluate exposure before actual shot is draining the batteries.
So somehow I feel this script might not be the best to use for battery saving.
Can anyone suggest an alternative for a time lapse that would adjust exposure for a smoothish ramping between day and night and night and day?
The idea is to leave Aperture and ISO alone and adjust shutter speed up to 20-30sec to get something at night.
If I just shoot Aperture Priority simple time-lapse then the maximum shutter speed is 1s it seems, can this be changed with CHDK? I haven't found how.

Thank you very much to all who contribute to CHDK!

*

Offline lapser

  • *****
  • 1093
Re: SX150 IS time lapse day and night
« Reply #1 on: 23 / October / 2012, 13:51:13 »
In my experiments with the SX260 and G1X, aflock always re-focuses before locking. With manual focus, aflock crashes the SX260.

So the best way is to set the focus with manual focus before starting the script, and don't change the script.

Also, it usually works better to set the focus a little less than infinity, so that infinity is still in focus, but foreground objects are also in focus. Check the "DOF Calculator" under CHDK/OSD in the main menu. You can display the far limit while adjusting manual focus, and make sure it stays at infinity while focusing on foreground objects too.

If you're going to start using scripts, I'd highly recommend learning Lua instead of Basic. I'm working on a Lua day/night script that I'll post soon. Smoothing out brightness changes is the biggest challenge.
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos

Re: SX150 IS time lapse day and night
« Reply #2 on: 23 / October / 2012, 14:14:21 »
Hi lapser, thanks for reply
Apparently there is no crash with SX150 when using aflock and camera in manual focus.
I did use manual focus on camera, setting focus and then no use of aflock in the script.
But it seems the camera somehow still refocuses, as I can see values changing (yes I found out the OSD settings to show depth of field values). Strange.
As I start, I should go for Lua you're right but the first script I downloaded was UBasic so I just used and modified that...

about this question:
If I just shoot Aperture Priority and fixed ISO simple time-lapse then the maximum shutter speed is 1s it seems, can this be changed with CHDK to set a new upper limit in Aperture priority? I haven't found how.
Do you by chance have an answer?

Re: SX150 IS time lapse day and night
« Reply #3 on: 23 / October / 2012, 15:05:08 »
really confused now about manual focus.
Even camera started without CHDK, I set up manual focus, put it to infinity, and as soon as i half-press it refocuses and the focus distance bar shows something else than infinity. What the heck? Manual focus is auto?

Found it, Safety MF is just disabling the MF somehow. I disabled Safety MF and now my MF stays at the value I did set. Pfff.
« Last Edit: 23 / October / 2012, 15:15:53 by perspixe »


*

Offline lapser

  • *****
  • 1093
Re: SX150 IS time lapse day and night
« Reply #4 on: 23 / October / 2012, 15:24:35 »
about this question:
If I just shoot Aperture Priority and fixed ISO simple time-lapse then the maximum shutter speed is 1s it seems, can this be changed with CHDK to set a new upper limit in Aperture priority? I haven't found how.
Do you by chance have an answer?
CHDK can't change the maximum shutter time in the camera firmware for Av mode.

Using the camera auto exposure feature for time lapse from day to night gives abrupt flashes every time the exposure changes since the camera only changes by 1/3 EV. A script can change exposure by 1/96 EV, which doesn't flash. Scripts usually have options for maximum shutter time. My script increases shutter time, then ISO, then shutter time again as it gets darker.

You calculate the correct times or ISO from the brightness measurement. But when it's really dark, the brightness jumps by up to 1/2 EV, so you get flashes again. That's the main problem I'm trying to fix at the moment.

As for disabling safety manual focus, for time lapse you need to go through all the camera's auto features and make sure they're not messing you up. Image stabilization should be off, for example (don't touch the tripod).
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos

Re: SX150 IS time lapse day and night
« Reply #5 on: 23 / October / 2012, 15:37:02 »
I did disable all, IS, etc etc but missed the safety manual focus at first!

I understand well your clear explanation about brightness jumps by 1/3 - 1/2 EV. Thanks.
This could be somewhat deflickered in post but at the cost of clipping for sure. Better sort it out at time of shoot.

Some devices that have a light sensor and time lapse features can do ramping on DSLRs in Bulb mode, so I understand this about about what you'd like to achieve using measured exposure before shooting actual frame, playing with shutter speed and iso. But why not doing bulb in CHDK, is that possible? putting the camera in manual mode, bulb for T and putting a sleep of calculated exposure value in ms between the press and release? Would you have even more steps smaller than 1/96 EV, and maybe more flexibility? Maybe not even necessary to play with ISO either? Just putting my thoughts down here: I am just starting and have no experience in CHDK.

*

Offline lapser

  • *****
  • 1093
Re: SX150 IS time lapse day and night
« Reply #6 on: 23 / October / 2012, 15:57:53 »
There's no bulb setting on any of the CHDK cameras as far as I know. You can set the shutter time pretty much as long as you want, but there are two problems you run into with long exposures. Some of the pixels max out and get stuck (hot pixels). Most cameras do "dark frames" at over 1 second shutter time and subtract them from the picture to zap out the hot pixels. But this takes twice as long for each picture. CHDK has a way to disable dark frames in the RAW menu.

The other problem is that long exposures in a time lapse means that the resulting video has to speed up, or lower its frame rate. If your day pictures are 10 seconds apart, the exposure has to be under 8 seconds or your timing starts getting thrown off.

In this video, I reduced the frame rate after it got dark:
http://www.youtube.com/watch?v=x2Ajd1GHrIg#ws

In this one, I just let it speed up at night. You can also notice the "flashes" from the brightness jumps at the end of the first sunset when it gets real dark:
Indigo Lake - September 21-23, 2012
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos

Re: SX150 IS time lapse day and night
« Reply #7 on: 23 / October / 2012, 17:30:55 »
Very peaceful stuff. Often time lapses can be very hectic but you know how to take your time!
No Bulb setting no you're right.
About speed the interval I need and for which I specifically got a P&S is 60s as I will let it go for a long time, or until it dies. So it will actually go from day to night and night and day for weeks. Well, at this rate it would take 6 weeks to fill a 128GB card with M1 size Jpegs, approximately. So with a 60s interval I can afford 25sec max exposure I guess.


*

Offline lapser

  • *****
  • 1093
Re: SX150 IS time lapse day and night
« Reply #8 on: 24 / October / 2012, 15:51:41 »
That sounds interesting. I guess you'll need an A/C power adapter, and have to protect the camera by putting it inside a waterproof box, or in the house? What are you photographing? I bet it will make watching grass grow more exciting.
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos

Re: SX150 IS time lapse day and night
« Reply #9 on: 24 / October / 2012, 16:30:20 »
this is a buidling site of a garden and house. I am using permanent time lapses because I can be on site only every few weeks. When I am there I will shoot more, faster time lapses with motion control when needed to document the building process and transformation of the site. Plus other things. 18 month project. i am testing now with CHDK and ultimately I could have 2/3 permanent time lapse cameras on site.
As for power supply, I am trying to set up an A/C power adapter that drives the camera but it needs to switch to batteries when power goes off, without disturbing the camera, a bit like an UPS for computer, but 3V DC as output. Because I expect power to be off at night when workers leave, and week-ends also. With some holiday week-ends etc I probably need a week supply as battery so 3V 40Ah. That battery would recharge as soon as mains power comes back... All of that in a waterproof box with humidity absorber packs for condensation...

 

Related Topics