Go Down

Topic: Newbie: How to close a circuit to cause photo flash to fire (Read 502 times) previous topic - next topic

carlorobazza

Hi there,

I am a complete newbie so please bear with me. I did search for a solution but wasn't able to find anything.

I purchased a Smraza Super Starter Kit for Arduino Uno with the goal of creating a sound activated photo flash trigger. So far in my project I can use the IR remote to select a delay in either millisecond or microsecond delays. I then activate the sound sensor and wait for a loud enough sound. When it is sensed, I start the delay before I fire the flash. After the flash is triggered, I will deactivate/ignore the sound sensor to prevent any more sounds firing the flash again. Most of my work was based on the tutorials provided with the kit.

What I'm not sure about is how to actually fire the flash. If I just take the two leads from the flash and touch them together, it closes the circuit and the flash fires. I have another sound activated trigger kit (HiViz) that basically does the same thing but I simply followed the assembly steps. I have no idea how to convert what was done there to the Arduino Uno.

How would I go about connecting the flash to the Uno/breadboard so that through the software, I can close the circuit and fire the flash?


Thank you in advance for any help you may be able to provide me.

Carlo.

Grumpy_Mike

The voltage on a flash contact pair is very high, so normally a component called an SCR is used to drive it. This can be done with this sort of circuit:-


That uses a photo transistor to act as a slave flash. Just remove that and feed an Arduino output signal into the 1K resistor. Don't forget to connect the 0V to the GND of the Arduino.
Use a meter on your flash contacts to see which is the ground and which the hot end.

Quote
I did search for a solution but wasn't able to find anything.
I searched for :-
photo flash trigger schematic
and came up with lots of stuff.

MorganS

Older and cheaper flashes can have up to 200V on those "two leads." That requires the SCR circuit or a mechanical relay.

Newer flashes can be directly connected to the Arduino but they will also work with the high voltage-tolerant circuit.
"The problem is in the code you didn't post."

MorganS

Note that the power on the flash contacts is extremely low, so you can't electrocute yourself. In fact it is so low that a multimeter cannot properly measure the voltage.
"The problem is in the code you didn't post."

carlorobazza

Hi Grumpy Mike,

Thank you for your reply. As I mentioned, I'm a complete newbie. I'm a software developer and haven't dealt with resistors, transistors, etc. for over 30 years since college :)

In your circuit diagram, you show an SCR TIC106M. I have 3 400-V SCRs (EC103D) from my HiViz package. Can I swap one of them for the SCR in your diagram or will I have to change other components too?


I searched for :-
photo flash trigger schematic
and came up with lots of stuff.
I guess I should have said that I didn't find many Arduino results. I did find one but it uses a photocoupler which I don't have.



(in case the image doesn't come through it can be found at https://petapixel.com/2017/05/10/build-simple-sound-trigger-high-speed-photos-arduino/)

I guess I was hoping there was simpler solution. I may just have to try to track down the photocoupler used in this image.

Thanks,

Carlo.

Paul__B

I guess I was hoping there was simpler solution. I may just have to try to track down the photocoupler used in this image.
I suspect a MOC3021 - which is very readily available - might be a good start.  :smiley-lol:

carlorobazza

(Please tell me if this discussion does not belong here)

I think I may be starting to understand this stuff (a little bit).

Going with the photo I posted of the Arduino flash setup, there is a 220 ohm resistor between the Arduino pin and the optoisolator. If I understand it correctly, it's there because the pin voltage is about 5v and that would be too much for the isolator. The resistor brings the voltage down to about 1v (give or take) which then closes the circuit and causes the flash to fire.


So, if that's the case, I just need to get an optoisolator, find out what the input voltage needs to be, put an appropriately sized resistor in between the pins... and Bob's yer uncle.


How close am I? :)

Thank you,

Carlo.

Grumpy_Mike

Quote
How close am I?
Close.
Inside the opto isolator is an LED. You drive it like any other LED. An LED is a none linear device which means you can not just put a voltage on it and expect it to work at the proper current. Yes the resistor drops some voltage but only because of the current the LED is drawing. The LED has a specific voltage dropped across it when the rated current is drawn. That resistor should be picked so that it drops the difference between the power supply and the forward voltage of the LED at the required current.

Look at LED resistor calculators and get the LED's forward voltage from the data sheet of the opto.

Quote
find out what the input voltage needs to be
No that is fixed by the Arduino, nothing you can do about that it is just the resistor you need to calculate.

carlorobazza

Close.
Inside the opto isolator is an LED. You drive it like any other LED. An LED is a none linear device which means you can not just put a voltage on it and expect it to work at the proper current. Yes the resistor drops some voltage but only because of the current the LED is drawing. The LED has a specific voltage dropped across it when the rated current is drawn. That resistor should be picked so that it drops the difference between the power supply and the forward voltage of the LED at the required current.

Look at LED resistor calculators and get the LED's forward voltage from the data sheet of the opto.
No that is fixed by the Arduino, nothing you can do about that it is just the resistor you need to calculate.
Ok. I think I get it now. The key element for the isolator is the current and the resistor is there to adjust it, and not the voltage. I just need to get an optoisolator and figure out the resistor, THEN Bob's yer uncle :)

Thank you everyone for your help.

Carlo.

carlorobazza

Hi again,

So I picked up a package of optocouplers (4N25) and configured my project as in the attached photo.



I'm using the following code:

Quote
int flash = 6; //flash is on pin 6

void setup()
{
    pinMode(flash, OUTPUT); //sets the flash as an output
    digitalWrite(flash, LOW); //start with the flash off
    delay (500); //wait 1/2 second
}

void loop()
{
    digitalWrite(flash, HIGH); //turns flash on
    delay (2000); //keep the flash on for 2 seconds
    digitalWrite (flash, LOW); // turns flash off
    delay (500); //wait 1/2 second
}
I know I'm getting a cycling 5v because I put a meter from before the resistor to the ground and I'm getting 5v. If I test across the two leads leaving the optocoupler (black and red), I get nothing. I've tried every combination of those 3 pins and ground but nothing.

Any ideas?


Thanks,

Carlo.

MorganS

The optoisolator is like a switch. It does not output power.
"The problem is in the code you didn't post."

carlorobazza

The optoisolator is like a switch. It does not output power.
Ok. That's what I'm trying to accomplish, however when I plug my photo flash onto those two leads, the flash doesn't fire. If I touch the two flash leads together the flash fires, so I know that cable works.

Thoughts anyone?


Thanks,

Carlo.

Paul__B

Then you had better describe exactly what you did, step by step, with a photograph,  Sadly, "when I plug my photo flash onto those two leads" really does not mean anything.  :smiley-roll:

carlorobazza

#13
Apr 21, 2019, 02:35 am Last Edit: Apr 21, 2019, 02:40 am by carlorobazza Reason: inserting the image inline
Hi everyone,

First off, I managed to fix my problem. As it turns out, the sketch I was basing my work off had the input pins 1 and 2 of the optocoupler backwards. I found a couple of other examples that mentioned the pins the opposite way I had them. I changed it and it worked.

The breadboard is a real mess with everything else I have on it so a photo would just be confusing. Here is my updated sketch:

(UPDATE: I just realized that in my sketch I have the black lead on pin 6 but it should be on pin 5 of the optocoupler)



I'll try to do a better job of describing my flash connection for Paul:

I took a cable that connects to my flash and connected alligator clips to the jack connector on the other end. One of the wires went to pin 4 of the coupler and the other went to pin 5 of the coupler (red and black wires leading away from the coupler in the diagram.

I'd like to thank everyone for their questions and suggestions. It really helped this newbie!


Carlo.

MorganS

Remember the optocoupler is polarized. The "switch" will only let current flow in one direction.
"The problem is in the code you didn't post."

Go Up