Intervalometer with time of day constraints - page 4 - Script Writing - CHDK Forum

Intervalometer with time of day constraints

  • 43 Replies
  • 18540 Views
Re: Intervalometer with time of day constraints
« Reply #30 on: 25 / June / 2009, 17:44:56 »
Advertisements
Scattered, no it's not Display off.  I want the LCD to go off while it's waiting many hours to start.  This is camera off - lens retracts and the camera powers down.  Have to press the power button to power it up again, so no script is going to help with that!
Sorry, it's the camera crashing then.  There's a 'watchdog' in the camera turns it off when something goes wrong.

Your script is crashing the camera because it does odd things (for starters, too few 'sleep n'), structuring the script will allow you to isolate and prove correct various sections of the script.  Keep in mind the scripting and CHDK works by stealing time from a cooperative multitasking system -- you're not writing in a timeslicing system like linux or windoze.  You need to yield back to the cam with a sleep so the cam can do its stuff reliably as well.  For example, some sleep after print gives the cam time to write to the LCD without corrupting what's already on the display.

Grant.

Re: Intervalometer with time of day constraints
« Reply #31 on: 25 / June / 2009, 22:42:13 »
Daniel
Gerroa, Australia

Re: Intervalometer with time of day constraints
« Reply #32 on: 26 / June / 2009, 03:50:12 »

*

Offline reyalp

  • ******
  • 14125
Re: Intervalometer with time of day constraints
« Reply #33 on: 26 / June / 2009, 04:11:28 »
If you can figure out where sleeps are definitely required, and post simple test cases for them, we can enforce some of this in CHDK itself. Or at least document them on the wiki.

I wouldn't expect prints to be a problem.
Don't forget what the H stands for.

Re: Intervalometer with time of day constraints
« Reply #34 on: 26 / June / 2009, 04:53:44 »
If you can figure out where sleeps are definitely required, and post simple test cases for them, we can enforce some of this in CHDK itself. Or at least document them on the wiki.

Not an automated test case, delay after click required otherwise the click gets ignored / unreliable.  For daylapse, this was in selecting MF focus mode on first shot, and after cam idle.  At one stage it was ignored first 'down' to go change focus mode and misused the following 'up' to go flash mode select.  Bizarre, until I worked out what was happening :)

Quote
I wouldn't expect prints to be a problem.
Display corruption where the console text would disappear if delay not used, may be associated with changed or changing Focus Mode -- I had trouble in that area, and, after adding 300ms after each print, no more problems.  Mostly cosmetic, I seem to recall, didn't stop script from working but made the screen write look better.  

Like always it seems, my focus was elsewhere, so undocumented, but I didn't need debug text disappearing on me at the time!  Part of not documenting all changes was due to hitting the script size limit[1] and comment stripping to get the thing working again.  Ignoring comments on script load would be good, though it could break some scripts' timing?

[1]Another factor is the SDHC memory seems to go stupid after a while of rewriting the same file, so I'd format and reload SDHC -- discovered this after one comment strip session didn't fix script from load failure.
« Last Edit: 26 / June / 2009, 15:48:51 by scattered »

Re: Intervalometer with time of day constraints
« Reply #35 on: 26 / June / 2009, 15:57:37 »
Scattered, no it's not Display off.  I want the LCD to go off while it's waiting many hours to start.  This is camera off - lens retracts and the camera powers down.  Have to press the power button to power it up again, so no script is going to help with that!
Sorry, it's the camera crashing then.  There's a 'watchdog' in the camera turns it off when something goes wrong.

Daniel: rethinking this one, if cam pulled in the lens and powered down it's maybe not a crash as that would powerdown with lens out.  Are you using Canon power supply (ACK-800, 3.15V) or ??  If you're using something else, a dip in the voltage might look like low battery and the cam shuts down?  Same if you're using an extension lead on the low voltage cable.

Re: Intervalometer with time of day constraints
« Reply #36 on: 03 / July / 2009, 01:11:00 »
Grant,

Sometimes it powers-down with the lens 'parked', sometimes with it still out; it's not consistent.  I've tried 'sleeps' all over the place, but to no avail - still crashes randomly (but not every run!).

I'm using a 3rd-party power supply, regulated 3.1V.  Strange thing is, sometimes the camera flashes its 'low battery' (red) display warning, even though plugged in to mains power and with fully charged NiMH batteries installed!  Not all the time, and there doesn't appear to be a correlation between this and when the camera crashes.

I'm stumped, and can't help thinking its a bug in CHDK (I'm using a470-101b-0.9.8-778).  But I don't really know!

Daniel
Daniel
Gerroa, Australia

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: Intervalometer with time of day constraints
« Reply #37 on: 03 / July / 2009, 02:15:31 »
I'm using a 3rd-party power supply, regulated 3.1V.  Strange thing is, sometimes the camera flashes its 'low battery' (red) display warning, even though plugged in to mains power and with fully charged NiMH batteries installed!  Not all the time, and there doesn't appear to be a correlation between this and when the camera crashes.

The camera (well, at least my dual AA cell A570is) does not use batteries as backup or anything else when you use external power. You can verify this by unplugging the power supply while the camera's still powered on -- it will shut down with lens out because it doesn't have power to retract it.

So, your low bat warning with external power means your externally supplied voltage is too low. But it doesn't mean 3.1 V is too low, it most likely means that you either have a too weak power supply (can't give enough current while charging the flash or operating zoom motors etc, but appears to work well enough most of the time, especially in play mode) or too high resistance in your power supply cable and connector(s).

The camera probably interprets rapid changes in voltage as a weakness of the battery, so even a properly rated power supply with proper connectors and cables could fail if it cannot react to transient current drain quickly enough (poor filtering in a linear or switching power supply or slow feedback in a switching power supply).

You should enable CHDK battery voltage display (in volts, not percentage) and check the voltage seen by the camera in different situations. It may not update fast enough to catch shorter dips in voltage, but it should give you indication if there's a difference between play mode and in rec mode and rec mode while half shooting and with flash recharging and rec mode while zooming.

Re: Intervalometer with time of day constraints
« Reply #38 on: 03 / July / 2009, 22:58:01 »
The camera (well, at least my dual AA cell A570is) does not use batteries as backup or anything else when you use external power. You can verify this by unplugging the power supply while the camera's still powered on -- it will shut down with lens out because it doesn't have power to retract it.

And corrupt the filesystem if you choose the 'wrong' time to pull power.  I did this first time after long script run, pulled 3V lead without thinking which cut off the power (on my Nikon D70s the internal 7.4V battery backs up the external 9V power, handy).

Quote
So, your low bat warning with external power means your externally supplied voltage is too low. But it doesn't mean 3.1 V is too low, it most likely means that you either have a too weak power supply (can't give enough current while charging the flash or operating zoom motors etc, but appears to work well enough most of the time, especially in play mode) or too high resistance in your power supply cable and connector(s).
I'd go with this answer too, the ACK800 is rated 3.15 @ 2A, the A590 draws peak ~650mA (AF LED on during shoot, measured with CRO), but older cams draw more.  The A590 gets 200 shots for a pair of alkalines (datasheet value) where A470 gets 150, so A470 wants more power.  

« Last Edit: 03 / July / 2009, 23:08:48 by scattered »

Re: Intervalometer with time of day constraints
« Reply #39 on: 03 / July / 2009, 23:06:11 »
I'm stumped, and can't help thinking its a bug in CHDK (I'm using a470-101b-0.9.8-778).  But I don't really know!
As fudgey said, you need to monitor battery voltage, if you're handy with a soldering iron perhaps shorten the 3V lead to cam.  My a590 varies between 100mA and 650mA from play mode to take a picture mode, that's a wide range for a power supply to regulate over.  I'll be taking more detailed measurements soon as I've setting up a 10-15V variable supply to measure 12V - 3V regulator performance and cam performance soon.

Another way to power cam is a dual D cell battery holder and shorter (~20cm) power lead and connector?

Maybe write a log file from script including battery voltage before / after shoot?

Only time cam crashed for me in over 90,000 shots with daylapse script is when I forgot to plug in the 3V power supply :)
« Last Edit: 03 / July / 2009, 23:11:59 by scattered »

 

Related Topics


SimplePortal © 2008-2014, SimplePortal