Multiple flash shots while taking a long exposure photo - LUA Scripting - CHDK Forum
supplierdeeply

Multiple flash shots while taking a long exposure photo

  • 11 Replies
  • 7289 Views
Multiple flash shots while taking a long exposure photo
« on: 23 / October / 2013, 12:23:49 »
Advertisements
I wonder if it's even possible to make this. I have an idea I'd like to make, but it involves flashing the flash multiple times while shutter is open for ~5secs. I'm no programmer, no idea how to even start, so maybe there are good people who could write this? I'm sure other people would find this interesting too. :)

Re: Multiple flash shots while taking a long exposure photo
« Reply #1 on: 26 / December / 2013, 21:20:44 »
I second that!  It would be very useful.  If you could make a strobe effect, you could catch waterdrops in multiple positions in one frame, and even cut them out to make a slow motion video (faster than 240fps like some cameras do, and higher quality).

Another way to do it is to open the shutter multiple times without saving the file aka double exposure.

Re: Multiple flash shots while taking a long exposure photo
« Reply #2 on: 28 / December / 2013, 14:43:40 »
I second that!  It would be very useful.  If you could make a strobe effect, you could catch waterdrops in multiple positions in one frame, and even cut them out to make a slow motion video (faster than 240fps like some cameras do, and higher quality).
AFIAK,  there is no way to actually control flash firing with CHDK.  There have no doubt been some experiments but nothing has been released.  Exploring the Canon firmware to find ways to do that would be a big job for somebody who really knows what they are doing.

Another way to do it is to open the shutter multiple times without saving the file aka double exposure.
Opening and closing the shutter multiple times over the same exposure is actually pretty easy.  Most of the code necessary to simply script something like that can be found here : http://chdk.wikia.com/wiki/Meteor_Intervalometer_with_Dark_Frame_Management in the functions openshutter() & closeshutter().
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 14079
Re: Multiple flash shots while taking a long exposure photo
« Reply #3 on: 28 / December / 2013, 15:23:06 »
AFIAK,  there is no way to actually control flash firing with CHDK.  There have no doubt been some experiments but nothing has been released.  Exploring the Canon firmware to find ways to do that would be a big job for somebody who really knows what they are doing.
If you are feeling adventurous, there's usually some MMIOs you can write that trigger the flash to fire, usually somewhere close the the LED addresses.

See also http://chdk.setepontos.com/index.php?topic=5366.0

Disclaimer: writing random MMIOs and playing with the flash hardware scores pretty high on the void your warranty scale ;)
Don't forget what the H stands for.


Re: Multiple flash shots while taking a long exposure photo
« Reply #4 on: 28 / December / 2013, 15:39:36 »
If you are feeling adventurous, there's usually some MMIOs you can write that trigger the flash to fire, usually somewhere close the the LED addresses.  See also http://chdk.setepontos.com/index.php?topic=5366.0  Disclaimer: writing random MMIOs and playing with the flash hardware scores pretty high on the void your warranty scale ;)
The tricky bit is probably actually controlling the strobe flash duration.  Somehow you need to let it fire and then cut-off the flash (so that you don't overexpose or don't totally drain the flash capacitor).  I'm not sure the cheap P&S cams actually control flash duration - the low/med/high setting might just be a hardware trick that limits the current to the flash unit rather than limit the flash duration?
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline srsa_4c

  • ******
  • 4451
Re: Multiple flash shots while taking a long exposure photo
« Reply #5 on: 28 / December / 2013, 15:49:59 »
The tricky bit is probably actually controlling the strobe flash duration.  Somehow you need to let it fire and then cut-off the flash (so that you don't overexpose or don't totally drain the flash capacitor).  I'm not sure the cheap P&S cams actually control flash duration - the low/med/high setting might just be a hardware trick that limits the current to the flash unit rather than limit the flash duration?
Nope. The so-called HP timers are involved which poke GPIOs. I think these may have usec accuracy. I don't know more details, but I remember seeing flash-related stuff when searching for HP timer functions.

Re: Multiple flash shots while taking a long exposure photo
« Reply #6 on: 28 / December / 2013, 15:53:36 »
The so-called HP timers are involved which poke GPIOs. I think these may have usec accuracy. I don't know more details, but I remember seeing flash-related stuff when searching for HP timer functions.
So we just have to hope that whatever switches the current on to the flash tube has the necessary power to also cut the current and switch it off.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline srsa_4c

  • ******
  • 4451
Re: Multiple flash shots while taking a long exposure photo
« Reply #7 on: 28 / December / 2013, 16:16:24 »

As you see, the flash circuit is not intelligent (this is an old low-end A430), everything is controlled by the GPIOs (and the ARM core). Poking these with 10msec resolution is hopeless, so one either finds firmware functions or does it with those high resolution timers. In addition, there may even be an interrupt involved (for STRB_DONE).


*

Offline reyalp

  • ******
  • 14079
Re: Multiple flash shots while taking a long exposure photo
« Reply #8 on: 28 / December / 2013, 16:24:29 »
FWIW, "timer" is a dryos object.

The following strings (from elph130) appear to be related to the drysh timer command

ID   STATE     ENTRY(ARGUMENT)

REMAINDER(sec:nsec)
EXPIRE(sec:nsec)
CYCLE(sec:nsec)
Don't forget what the H stands for.

*

Offline srsa_4c

  • ******
  • 4451
Re: Multiple flash shots while taking a long exposure photo
« Reply #9 on: 28 / December / 2013, 16:33:02 »
FWIW, "timer" is a dryos object.
Yes. DryOS on the a470 has 0 of those (as "maximum"), I have no idea how they are related to the successors of the various timer and hp timer functions found in VxWorks cameras. These functions are located by the sigfinders, but are not documented yet.

 

Related Topics