problem with Optocoupler

I have this Optocoupler

and i want to trigger my flash (canon 580EXII). For this i have a jack plug cable connected to my flash. If i connect the negative to the positive of the jack then it flashes.

http://img526.imageshack.us/img526/9845/schermafbeelding2011121u.png

I got my arduino pin 2 on the opto pin 1, the opto pin 2 to gnd, then the + of the jack to opto pin 5 and the negative of the jack to opto pin 4.

I expect it to trigger once every 5 seconds but it keeps flashing. Is the datasheet seen from top or bottom?

#define OPT 2

void setup() {
 pinMode(OPT, OUTPUT);   
}

void loop() {
  digitalWrite(OPT, HIGH);
  delay(1);
  digitalWrite(OPT, LOW);
  delay(5000);
}

Data shee seen from the top. You need a resistor in line with the anode (pin 1) just like any other LED use about 330R

Even if i have my arduino off it still flashes!

:astonished: =(

It looks like the opto's output transistor is not rated at a high enough voltage. That data sheet says it is 78V and you can get a lot more from a flash gun, in the order of hundreds of volts

The flash get's triggered by a 6 volt signal. My local store said this opto is fine. My local store sucks i guess...

The flash get's triggered by a 6 volt signal.

Are you sure? This is not usual. Just because you have 6V batteries doesn't mean the signal is 6V.
If it were 6V then this opto would be fine, have you measured what it actually is?

I putted a female hot shoe under the flash, the voltage for the flash can be high but the trigger voltage doesn't need to be more then 6 volts.
It's a iso norm, iso 518:2006.
I measure -4.3volt (never understanded the negative).

I measure -4.3volt (never understanded the negative).

It probably means that the power is the reverse of what you think it is and therefore you need to swap round what you connect to the collector and emitter.

yes, if i switch the red and black probe then it is positive.
I did a continuity test, nothing beeps...

I did a continuity test, nothing beeps.

Why would you expect it to?

cause there is a connection
like:


instand of:


but hearing you i seem to be wrong about that.
I dit get a value however, it was something like 1.4## if i remember correctly.

So have you tried swapping emitter and collector in your setup?

yes, then the flash doesn't go off.

I also test continuity with the following code

  digitalWrite(OPT, HIGH);
  delay(2500);
  digitalWrite(OPT, LOW);
  delay(2500);

i get a constant 1.019

you said it's seen from top,
http://img526.imageshack.us/img526/9845/schermafbeelding2011121u.png
there is like a half circle taken out, that is between pin 3 and 4 right?

that is between pin 3 and 4 right?

No it is between 1 & 6

I also test continuity with the following code

Noooooooooooooo

Never test the continuity of anything that is powered up. Measuring continuity involves injecting a current into a circuit, there is a voltage between the two leads of the meter. This means that any reading you get is totally meaningless as there are external voltages floating about.

So get the component the right way round and use a resistor when you connect the arduino pin to it.

Yeeeeeeeeeeessssss but i didn't had it powered up, i know that :slight_smile:

And how do you know it's between 1 and 6 (i do believe you), i can't find it on the datasheet.
I think i should be able to get it to work now.

It WORKS!! thank you so much!

i hate datasheets

clankill3r:
And how do you know it's between 1 and 6 (i do believe you), i can't find it on the datasheet.
I think i should be able to get it to work now.

IC pins are numbered anti-clockwise around the IC starting near the notch or dot.

thanks, that's good to know :slight_smile: