triggering flash with an Arduino?

  • 15 Replies
  • 969 Views
triggering flash with an Arduino?
« on: 14 / June / 2017, 06:41:36 »
Advertisements
Hello,

 I have some ixus and powershots, and none of them have a hotshoe for external flash. I have seen on this forum posts about workarounds, I have had an idea about another workaround and want to ask if it is feasible.

 This is for working with Chdkptp and (not exclusively) the multicam.lua script.

 Would it be possible to program an Arduino to be seen by Chdkptp as another canon camera. The arduino would not have to implement every function, but it would respond properly to the shoot command, and it could create a trigger pulse to fire a flash unit.

 So, it would have to be able to impersonate a canon  to the operating system (respond to the connect command and so on), understand the shoot command and the extra features to do with syncing, and for every other function it would just have to gracefully ignore it.

 I understand that I could buy a powershot g7 or newer, which has Chdk and a flash hotshoe, but the price would be about £50 or more compared to about £5 for an Arduino. And if you then have an idea involving 2 or 3 of these units, then the cost saving is even higher.

 I imagine the idea would be extendable, you could program the arduino so when your script tells all your cameras to acquire focus, the arduino also gets sent the same 'acquire focus' command and turns on extra lighting for 3 seconds, things like this,

thanks,
andrew

Re: triggering flash with an Arduino?
« Reply #1 on: 14 / June / 2017, 08:48:38 »
I trigger external flash with the internal flash of my IXUS and Powershots. The internal flash triggers the external with minimum power. Maybe this is a solution for you.


Re: triggering flash with an Arduino?
« Reply #2 on: 14 / June / 2017, 10:13:11 »
The internal flash triggers the external with minimum power.
FYI - I think c_joerg is referring to using the CHDK Manual Flash Power Setting and something like this : SYK-3 Sensor
« Last Edit: 14 / June / 2017, 10:17:33 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

Re: triggering flash with an Arduino?
« Reply #3 on: 14 / June / 2017, 12:26:15 »
FYI - I think c_joerg is referring to using the CHDK Manual Flash Power Setting and something like this : SYK-3 Sensor
Yes, that's exactly what I meant  ;)
« Last Edit: 15 / June / 2017, 03:38:32 by c_joerg »


*

Offline reyalp

  • ******
  • 11084
Re: triggering flash with an Arduino?
« Reply #4 on: 14 / June / 2017, 17:14:50 »
Hello,
This is for working with Chdkptp and (not exclusively) the multicam.lua script.

 Would it be possible to program an Arduino to be seen by Chdkptp as another canon camera. The arduino would not have to implement every function, but it would respond properly to the shoot command, and it could create a trigger pulse to fire a flash unit.
c_joerg's and waterwingz suggestion is probably better, but for completeness:
It would be a huge amount of work to make an Arduino emulate a chdkptp camera. If you want to do something with an Arduino from chdkptp multicam, it would be much easier to just modify the multicam code to send some other signal kind of signal to the Arduino. You can use os.execute to execute an external program, or io.popen / io.write to write to a running process.

Finally, multicam.lua sync only has a precision of a few tens of milliseconds, much longer than a flash, so you'd need quite long exposures to ensure that all cameras catch it. If you are syncing with the hardware remote, then that same hardware signal could probably be used for the flash, with some fixed delay.
Don't forget what the H stands for.

Re: triggering flash with an Arduino?
« Reply #5 on: 15 / June / 2017, 05:02:18 »
Thank-you everyone for your replies, I will look into both optical triggering and using os.execute.

 With my initial attempt with flash triggering, using 2 cameras, the flash-enabled camera fried first of all, and the entire flash was over before the second one fired, so I suppose I would need to arrange the timing of the flash-enabled camera quite differently from the others.

Quote
Finally, multicam.lua sync only has a precision of a few tens of milliseconds

I was reading through all the all threads about syncing multiple cameras, I was under the impression that using init_sync() and shoot() are now very accurate. I read that the camera itself operates in 10millisecond ticks, and I tried to follow the multicam.lua script - since the script uses min_sync_delay, doesn't that mean that all the cameras would shoot at the same tick, and the same tick could cover a 10 ms span over all the cameras?

is !mc:shoot{opts} the way to get the best sync? I initially started with shoot_hook_sync, but couldn't find a way to set exposure time and iso, and then came to the conclusion that it's special features had been folded into the regular mc:shoot - is this correct or not?

thank-you,
andrew

*

Offline reyalp

  • ******
  • 11084
Re: triggering flash with an Arduino?
« Reply #6 on: 15 / June / 2017, 13:27:49 »
I was reading through all the all threads about syncing multiple cameras, I was under the impression that using init_sync() and shoot() are now very accurate. I read that the camera itself operates in 10millisecond ticks, and I tried to follow the multicam.lua script - since the script uses min_sync_delay, doesn't that mean that all the cameras would shoot at the same tick, and the same tick could cover a 10 ms span over all the cameras?
The clocks on the cameras aren't synchronized, so even if everything else were perfect (which it definitely isn't), two cameras might see the tick change ~10ms apart.

In reality, there's a lot more sources of uncertainty. The camera use a multi-tasking OS, and there is a number of different tasks involved in getting a USB message to script and the script triggering the shot. It's also unlikely the Canon code is totally deterministic after the script triggers the shot.

min_sync_delay is just a rough estimate of the minimum time needed to send the shoot command to all the cameras.
Quote
is !mc:shoot{opts} the way to get the best sync? I initially started with shoot_hook_sync, but couldn't find a way to set exposure time and iso, and then came to the conclusion that it's special features had been folded into the regular mc:shoot - is this correct or not?
mc:shoot() uses shoot_burst, which uses shoot_hook_sync under the hood

That should give you the best sync you can get without resorting to the hardware remote. A few people have combined multicam with hardware remote sync. If you haven't found it already http://chdk.wikia.com/wiki/Multiple_Cameras_using_CHDK may be a useful starting point.
Don't forget what the H stands for.

Re: triggering flash with an Arduino?
« Reply #7 on: 16 / June / 2017, 07:22:15 »
Thank-you for the extra info.

I found a couple of pages where they measure the shutter lag for other cameras, including many DSLRs,

http://www.impulseadventure.com/photo/shutter-lag.html

and

http://www.doc-diy.net/photo/shutter_lag/

it seems like if you wanted precise timing, then hardware remote with chdk is the only way to do it, even spending a lot of money of DSLRs wouldn't help you.

 (I'm aware that flash can also freeze/sync motion. There was a link from this forum to the Agisoft forum, where someone does a body scan using both flash with a set of Nikon dslrs and then moments later using projected noise with a set of Canon dslrs, exploiting the fact that the Nikons triggered and captured the flash consistently before the Canons took the shot. I was interested in achieving this quick double-take if possible, hence my interest in sync times.)

thanks,
Andrew


*

Offline reyalp

  • ******
  • 11084
Re: triggering flash with an Arduino?
« Reply #8 on: 16 / June / 2017, 13:06:18 »
it seems like if you wanted precise timing, then hardware remote with chdk is the only way to do it, even spending a lot of money of DSLRs wouldn't help you.
For synchronized shooting, the length of the lag isn't really an issue, what matters is how much it varies from camera to camera or shot to shot. E.g in your second link, with mirror lock the 400d showed something like 10ms variation. The CHDK hardware remote should do substantially better than that, but whether it matters depends on your application.

Using flash with longer exposures is the traditional way to do this kind of thing, and a good approach it works in your particular situation.
Don't forget what the H stands for.

Re: triggering flash with an Arduino?
« Reply #9 on: 17 / June / 2017, 04:33:17 »
Hi Andrew.

In case you haven't seen it, I think the single most relevant diagram regarding hardware remote timing for multicam applications is still contained in this post:
https://chdk.setepontos.com/index.php?topic=8312.msg107601#msg107601

Insofar as the "outlier" related to precision sync remains, to the best of my knowledge, unresolved it seems the grouping of timings related to "sync" (red) could be preferable to both of the others (blue/green) in a shortest capture 2 camera group scenario.

 

Related Topics