Triggering more than 1 OUTPUT pin at the same time

The delay is not long enough for the drops to move enough for it to be perceptible.

Shpaget:
The delay is not long enough for the drops to move enough for it to be perceptible.

Normally the delay would not be noticeable if I was triggering the flashes using an ST-E2 or in case of a Canon 7D the on camera flash or even using the 580 as a master ON camera. I use all of those setups on photoshoots all the time, YET somehow in this situation, when the 580EX II is set to master and 430 to slave, and the 580 is fired using the arduino, the delay on the other flash is VERY noticeable. My guess is because there is no pre-flash going off to sync them to fire together... therefore I have to attempt to trigger them both at the same time using the arduino pins...

hope that makes more sense to you.

rockandrollnerd:
Maybe I'm just not understanding something, but are you simply saying that its impossible to have 3 pins on the arduino to trigger simultaneously ? I don't see how things happening at the same time break the laws of physics... For example when it rains, i'm pretty sure that some drops hit the ground at the exact same time as others without breaking the laws of physics and creating a black hole whenever it rains :wink:

What you're missing is that all these things require a finite time to happen and if you look at them in sufficient detail you will find that nothing ever happens at exactly the same time. For example in the case of a raindrop you'd struggle to measure the distance from the ground to better resolution than about 10^-10m and it would be difficult to define exactly when it actually hit the ground when you are trying to measure things smaller than an atom. And of course it would be absurd to try.

If you get silly enough about it and try to define things infinitely precisely then speed of light variations and quantum effects make it fundamentally impossible for the difference in timing to be absolutely zero. By the same token it is inconceivable that in your application you actually need the timing difference to be absolutely zero. Presumably you wouldn't be too bothered if one of them happened a few picoseconds after the other. So the question is not whether they can be absolutely simultaneous (they can't) but how close together do they need to be?

While nothing happens at precisely the same time, for the purposes of this project either method described above, either port manipulation (pins firing at same processor clock edge) or triggering all 3 flashes from the one pin would surely provide far more than the accuracy required though, yes?

If you are experiencing delay between master and slave, I would attribute that to your settings on the flashes. Go as manual as it gets, on all flashes. No fancy metering, no communication, just simple flash. If you have some other flashes, try with them, because if I can do it with significantly cheaper low end equipment, no reason you can't with a good Canon flash.

strykeroz:
While nothing happens at precisely the same time, for the purposes of this project either method described above, either port manipulation (pins firing at same processor clock edge) or triggering all 3 flashes from the one pin would surely provide far more than the accuracy required though, yes?

I think you're right and it sounds like either method will work. I'm very new to all aspects of this, but so far have made a great deal of progress with the help of some people here. Thanks to everyone for your input. Its really cool to see that the Arduino community is very helpful!

I am leaning more towards the port manipulation solution as it sounds to me like the most optimal one...
How would I trigger all 3 flashes off of one pin, though? Connect all to the same one opto or is there some other way? Maybe using a protoshield as an expansion board would be a good idea ?

Shpaget:
If you are experiencing delay between master and slave, I would attribute that to your settings on the flashes. Go as manual as it gets, on all flashes. No fancy metering, no communication, just simple flash. If you have some other flashes, try with them, because if I can do it with significantly cheaper low end equipment, no reason you can't with a good Canon flash.

I really hope you're right, but I really don't have any settings to change. Like I said earlier - when I trigger an off camera flash (or two) wirelessly (either using a 580 as a master on camera, or using the 7D's built in flash) there is no delay. They are simply set to slave on channel 1, but when its using the arduino - delay... I'm going to get a couple hotshoe adapters with a pc sync port and see if that will make any difference...

I'm not familiar with any other flashes than the Canon 430 and 580 that I have access to, but it sounds like they are in some ways more limited than some of the cheaper low end stuff. For example on the 430 and 580, if they are set to slave, I can NOT set it to manual flash. It is only ETTL. Also - no optical slave on either one!

rockandrollnerd:
How would I trigger all 3 flashes off of one pin, though?

I suggest starting with one flash per pin. In your original diagram, the optocouplers are connected to pins 11, 12, and 13.

A quick check of the PortManipulation site reveals that those pins are all on port B (digital pin 8 to 13). That satisfies AWOL's condition.

CrossRoads provided you with code to manipulate pins on port D...

PORTD = PORTD |  0b00111000;  // set bits 5,4,3. others left alone
PORTD = PORTD & 0b11000111;  // clear bits 5,4,3.  others left alone

The code requires a very simple change to work on port B...

PORTB = PORTB |  0b00111000;  // set bits 5,4,3. others left alone
PORTB = PORTB & 0b11000111;  // clear bits 5,4,3.  others left alone

The only thing left for you to do is to change the bitmasks (0b00111000 and 0b11000111) to correspond to digital pins 11, 12, and 13.

In other words, the folks above have given you almost everything you need to get it working the way you originally wanted. This would be a good time for you to either ask the last detailed question or try it.

Thank you very much, sir! Makes a lot more sense now and I think will solve my issue.

1 Like

strykeroz:
While nothing happens at precisely the same time, for the purposes of this project either method described above, either port manipulation (pins firing at same processor clock edge) or triggering all 3 flashes from the one pin would surely provide far more than the accuracy required though, yes?

Seems likely to me, but you'd need to know what the actual timing requirements were to know for sure. That was my point in saying that 'precisely the same moment' did not actually constitute a sensible requirement. But I still don't know what sort of timing accuracy the OP needs to achieve.

PeterH:

strykeroz:
While nothing happens at precisely the same time, for the purposes of this project either method described above, either port manipulation (pins firing at same processor clock edge) or triggering all 3 flashes from the one pin would surely provide far more than the accuracy required though, yes?

Seems likely to me, but you'd need to know what the actual timing requirements were to know for sure. That was my point in saying that 'precisely the same moment' did not actually constitute a sensible requirement. But I still don't know what sort of timing accuracy the OP needs to achieve.

Sorry, I can't provide an exact number. All I know is that the flash duration is, on average, 1/35000 at 1/128th of power. Its very little light, so more than one flash is needed to illuminate the scene. I think the only way I'll know is when I actually shoot and see how its working... I'm def going to try the port manipulation approach as it makes the most sense to me...

PeterH:
But I still don't know what sort of timing accuracy the OP needs to achieve.

A canon 580ex II at 1/128 power has a duration of 1/35000 second. At 1/64 power its 1/30000 second.

Any overlap between the two flashes would be an excellent result. The fastest flash is 1/35000 which is 28.6 microseconds. (The number @AWOL posted earlier.)

I stand corrected. 580 and 430 don't have optical slave capabilities (Canon, what the hell were you thinking??). Guess, it's back to arduino.

Shpaget:
I stand corrected. 580 and 430 don't have optical slave capabilities (Canon, what the hell were you thinking??). Guess, it's back to arduino.

Because both of them have wireless communications, rather than optical.

A shift register would do the trick, for ya. You can trigger multiple pins at the exact same time.

From how I understand they work, is you set your pins to on or off via serial, then tell the register to output. So you say pin 1 on, pin 2 on, pin 3 off, pin 4 off... then say go, and it switches everything at the exact same time, for up to 8 outputs with this chip.