Can someone please guide me a bit as to how to use the 4N35 optocoupler? I just need the very basic use and I can figure out how I'll use it in my other project (trying to stick it in between a camera flash and the circuit with no luck)
For example, using the blinking LED sketch that we are all probably familiar with (diagram attached)... How can I stick the optoisolator between the LED and the rest of the circuit? How would that get wired and would the sketch change at all?
My understanding is that this optoisolator is simply an IR LED on pins 1+2 PLUS an IR detector on pins 4 (emitter),5 (collector),6 (base) with no connection on pin 3. So when the LED part gets lit up, it activated the detector part - right? I can't for the life of me figure out how to "power" the IR LED side (pins 1,2) and have it activate the detector (pins 4, 5, 6) which would in turn close the circuit and get a regular yellow LED to light up on the other side...
Am I missing something fundamentally simple here? I understand that the yellow LED on the "other" side would have to have its own power, right?
I apologize in advance if these are completely ridiculous questions that have been answered somewhere else, but I am trying to figure out how to use optoisolators in another project and understanding this would help me there...
void setup()
{
pinMode(5, OUTPUT);
}
void loop()
{
digitalWrite(5, HIGH); // Turn on the LED
delay(1000); // Wait for one second
digitalWrite(5, LOW); // Turn off the LED
delay(1000); // Wait for one second
}