Selective Intervalometer (days, days of week, hours/min, intervals min/sec) - page 5 - Completed and Working Scripts - CHDK Forum  

Selective Intervalometer (days, days of week, hours/min, intervals min/sec)

  • 88 Replies
  • 52393 Views
*

Offline SkyWalker9

  • ****
  • 301
  • SX20 IS (fw 1.02b)
Advertisements
There might be a way to keep power to the camera during an AC power loss -- you could probably use an UPS commonly used for computer systems. The camera power wouldn't be much of a load, so the UPS might be able to supply power to the camera until the AC power can be restored. During a power outage there probably wouldn't be any construction activity any way. If the AC power returned in time, then the camera would never get interrupted. Testing how long the UPS could keep the camera operational should be easy enough to test.

Thought about using a UPS but then that's just one more thing I have to try to keep weatherized  :'(.  This is going to be out in the middle of the campus quad up on a light pole (all the poles have AC outlets, thankfully) so right out in the thick of the weather. 

Thought about using a UPS but then that's just one more thing I have to try to keep weatherized  :'(.  This is going to be out in the middle of the campus quad up on a light pole (all the poles have AC outlets, thankfully) so right out in the thick of the weather. 
Something like this might fit in the back half our your CCTV enclosure though : http://accessories.us.dell.com/sna/productdetail.aspx?c=us&l=en&s=soho&cs=ussoho1&sku=A1716823&SMCID=702&CAWELAID=286007877&dgc=SS&cid=27722&lid=628335
Ported :   A1200    SD940   G10    Powershot N    G16

To avoid hijacking this thread further, I decided to take the reply back over to my first thread Here.  I feel like i'm taking it too far off topic.   :o


*

Offline SkyWalker9

  • ****
  • 301
  • SX20 IS (fw 1.02b)
Author SkyWalker9
Selective Intervalometer

Update: This version of the script has added a Day of the Week (DOW) parameter that allows the user to easily choose:
everyday of the week, just Monday through Friday, or allows the user to manually choose the days of the week at run time.

This script was designed for high accuracy and flexibility in mind. The script provides the ability to select shooting sequences by 1) number of days to run 2) specific days of the week 3) hours/minutes of the day, and 4) specific interval/cycles in minutes/seconds.

Having the ability to individually select only the days of the week can save substantial amounts of SD card space and the need for deleting unwanted photos later. For example, lets say you only wanted to shoot photos on Monday, Wednesday & Friday. Using this script versus a "range" script  you would  not have a series of photos from Tuesday & Thursday that wasted space on your SD card  and you would realize a 40% savings in space requirements. You are still be able to select a "range of days" similar to a "range" intervalometer script simply by selecting all of the days of the week in the "range".

This script also provides the user with the capability to set the number of days the script is to run. If you do not want to set a specific range of days, you can set the "Number of Shots" to 0 and the camera will shoot as many shots as can fit on the SD card. For example, if the "Number of Shots" is set to 0, the script will shoot the maximum number of shots using the interval, days of week, and the hours/minutes selected during the dates indicated. This avoids having to calculate the number of shots in the days time periods using the selected interval. It is left to the user to insure there will be enough free space available on the SD card (note: after entering the number of days the amount of disk free space is displayed in MB and percent available).

Requirements/Recommendations.
- No camera specific statements are used so this script should work on most CHDK equiped cameras
- Requires ability to use Left, Right, and Set buttons on camera
- Ensure Date & Times are set properly on your camera; script uses 24 hour times
- Due to the normally long time sequences, an AC adapter and tripod are recommended

Script termination.
There are bacically four ways to exit this script:
- Set the number of days to run
- Set the number of shots to greater than 1
- Too many shots for the remining free space on SD card; error message, camera remains on
- Pressing the shutter button; usually used when user needs to change something, camera remains on

Script Parameters:
Number of Shots, Interval (mins), Interval (secs), Start Hour (24 Hr), Start Minute, End Hour (24 Hr), End Minute, and DOW all=1 M-F=2 sel=3

Accuracy of interval times.
Basically there are two different methods that intervalometer scripts usually employ for interval times, 1) reading/using the camera's built-in time clock and 2) using the CHDK "tick_count" statements. Using the camera's built-in time clock isn't as accurate as using the CHDK "tick_count" statements, therefore this script uses "tick_count" statements in order to keep the interval times very accurate.

Error checking.
As with most scripts, it is wise to do error checking on critical inputs provided by the user since intervalometer scripts usually run over longer time periods and involve shooting large numbers of photos. Therefore, this script tests critical inputs and where possible, corrects obvious errors so that the script can attempt to run. There is one error check that will terminate the script early - if the Start Time is set to occur after the End Time.

Caution message.
Since this script normally requires a tripod or hard surface, a Caution message will be displayed if the Image Stabilization (IS) is enabled. The IS mechanism operates by correcting shake. When there is no shake, or when the level of shake is below the threshold of the system's detection capability, use of the IS feature may actually add unwanted blur to the photograph, therefore you should shut it off in this situation.

Entering "real-time" user input.
One limitation of UBasic is that the size of the script appears to determine the maximum number of input parameters the script can display - small scripts can have more than larger scripts. Due to the size of this script, only 8 parameters could be used. However, this limitation was overcome by inputing data in "real time" during the running of the script. This method is used to enter the Number of days to shoot and Day Of the Week (DOW) user inputs.

<Part 1>
« Last Edit: 12 / May / 2012, 15:06:02 by SkyWalker9 »

*

Offline SkyWalker9

  • ****
  • 301
  • SX20 IS (fw 1.02b)
The Day of the Week (DOW) parameter allows the user to select the following options: all=1, M-F=2, or sel=3. Obviously the 'all' would indicate the script is to shoot everyday of the week, the 'M-F' option directs the script to shoot only on the week days, and the 'sel' option allows the user to select the days of the week manually at run time.

Once the DOWs have been input (and number of days if using this method), the script runs unattended until completion or if terminated early by the user by pressing the shutter button. After the last DOW or number of days entry, the script waits 2 seconds to display a reminder of the amount of free disk space remaining on the SD Card AND allow camera vibrations to subside.

The initial display (after the remaining free space message) will look like this:

      180 shots at 1m 15s      2/14/11 +11 1m 15s
      S M T W T F S            S M T W T F S
      1 2 3 4 5 6 7:  145      1 2 3 4 5 6 7:  145
      Hours (11:30-11:40)      Hours (11:30-11:40)
      Waiting...               Waiting...
 
      Using #Shots            Using Number of days (#Shots set to 0)


For each shot afterwards, the screen will redisplay the setup info with the last shot number and the DOW & time the camera shoots the photo. The time indicated in the JPG EXIF data will indicate a time that is one or more seconds later. This is due to the length of the exposure + processing + the time required to save to the SD Card.

      180 shots at 1m 15s      2/14/11 +11 1m 15s
      S M T W T F S            S M T W T F S
      1 2 3 4 5 6 7:  145      1 2 3 4 5 6 7:  145
      Hours (11:30-11:40)      Hours (11:30-11:40)
      Last: 8 Sun at 11:40:0   Last: 8 Sun at 11:40:0
 
      Using #Shots            Using Number of days (#Shots set to 0)

The DOWs are indicated to the right of the numbers below the days of the week (In the example above, the days of the week to shoot photos is indicated as "145" which means that on Sunday, Wednesday & Thursday the script will shoot photos during the hours chosen using the Start and End time parameters.

The Number of days display above "2/14/11 +11 1m 15s" indicates that 12 days were chosen for the script to run starting on that days date of "2/14/11" and running "+11" more days and at midnight the script will shutdown (if there are no photos scheduled for that DOW).
If there are shots scheduled on the last day of the run, then the camera will shut down after the last shot. Therefore, if you have additional days after the last scheduled DOW, the camera will stay on during those days until midnight of the last day.

Since UBasic doesn't have a capability to format the numbers when printing, numbers cannot be displayed with using a specific format, so we have to accept what is available. In the example above the time in "Last: 8 Sun at 11:40:0" looks "nice", however it will look odd 3 minutes after midnight (Last: 8 Sun at 0:0:3). Similar formatting will be apparent in the "Hours (11:30-11:45)" such as "Hours (0:3-23:58)".

Miscellaneous Comments.
The "shoot" command waits for the camera to perform some normally automatic actions, such as auto-focusing, charging the flash, etc. The "shoot" command in an intervalometer script allows it to compensate for all the things that can change over the course of many minutes/hours/days. In dim light it can sometimes take 2 or more seconds for a camera to hunt for focus. If you are planning on using this script to set auto-focus in low-light conditions, it would be good to change the 600 of the "sleep 600" command to a value from 1500 to 2500.

The shortest interval of time between shots is dependent upon many factors: shutter speed, size/resolution of photos, model of camera, if RAW is chosen, using bracketing for exposures (HDR), the camera processing time for each JPG, class of SD card, etc.

The mimimal interval time using my SX20 with a class 10 SD card in low light conditions were about 9 seconds. I expect this to vary by camera model, class of SD card, etc.

Save the script as a *.BAS file and place in the CHDK/SCRIPTS folder to use.

<Part 2>
« Last Edit: 12 / May / 2012, 14:04:22 by SkyWalker9 »

The last two posts and the script would make a nice wiki page ....
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline SkyWalker9

  • ****
  • 301
  • SX20 IS (fw 1.02b)
The last two posts and the script would make a nice wiki page ....
I haven't quite figured out how to do that yet - I might be having problems with the security settings on my computer (I have them set pretty 'tight'). I've been helping Microfunguy with porting the SX20 to SDM before I go on vacation this Thursday, so I probably won't be able investigate until after I get back. However, you certainly have my blessings if you want to post a wiki page.


The last two posts and the script would make a nice wiki page ....
I haven't quite figured out how to do that yet - I might be having problems with the security settings on my computer (I have them set pretty 'tight'). I've been helping Microfunguy with porting the SX20 to SDM before I go on vacation this Thursday, so I probably won't be able investigate until after I get back. However, you certainly have my blessings if you want to post a wiki page.
http://chdk.wikia.com/wiki/Selective_Intervalometer
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline SkyWalker9

  • ****
  • 301
  • SX20 IS (fw 1.02b)
@waterwingz
Thanks!

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal