I have a Arduino uno.
Using a 4N33 opto isolator, when I connect pin 1 to +5V and connect pin 2 to GND, the Arduino indicator light go dim.
please advise.
I have a Arduino uno.
Using a 4N33 opto isolator, when I connect pin 1 to +5V and connect pin 2 to GND, the Arduino indicator light go dim.
please advise.
The 4N33 has the LED connected between pins 1 and 2. You need a current-limiting resistor just like with any other LED. You may also need a new 4N33.
What exactly are you trying to do? Normally one side of the LED in an opto is driven by a GPIO pin or some other controllable signal.
/mike
Thanks Mike.
The 4N33 seems to have survived. I threw in a 470 ohm resistor and it now works.
What might be a good value to the limiting resistor?
What I am doing in this case has nothing to do with the arduino. I am just using the prototyping area to work on a different circuit and really could use a little help.
I have devices that have ON indicator leds.
First - I wanted to connect second ON led through the opto. We will call this led1. This I can now do.
Second - I would like a second led to come on when led1 goes OFF. That I am trying to work out.
Please suggest something.
Consult the 4N33 data sheet for the maximum input current, although 10 mA is almost always safe.
The Arduino can turn off one LED when the other is on. Otherwise, you will need external circuitry, like a transistor inverter.
I will need to use external circuity.
When the output of the 4N33 goes low, the second led is to come on.
Can I do this with the 2N3904’s and 2N3906’s I have or do I need something else from my parts box?
Either one. For the 2N3904, use the common emitter configuration, a 10K base resistor and a 470 ohm current limiting resistor, in series with the LED on the collector. To use the same port pin to control both devices, you will have to wire the optoisolator input to Vcc through a current limiting resistor, so that it is activated when the pin is low. When the pin is high, it will activate the transistor through the base resistor.
I do not think I am doing it right. Is there a circuit diagram available on the web?
This circuit will light the LED when the output is high, and activate the optocoupler when the output is low.
This is sort of what I had in mind (but not quite) and it appears to be working.
I had to lower the value of R4 because led2 was dimly lit when led1 was on.
Note that the cathode of led2 is connected to Q1. I do not want it to be this way.
I want the cathode to connect directly to ground.
Therefore, If led2 and R2 could be replaced with a driver, then led2 and R2 could be attached at the end of a length of wire.
please suggest a way.
That circuit is mostly wrong.
You have the wrong type of transistor and if a PNP is actually being used, it is wired backwards.
You must have a current limiting resistor between “Source” and the LED input to the optocoupler.
You do not need R3, leave that pin unconnected.
Google “4n33 schematic” for lots of examples of how to use this device.
The source contains a current limiting resistor.
I am using a 3906 as I can not seem to get a 3904 to work.
I think I am getting somewhere using a transistor inverter with a 3904 which is what everyone was trying to explain to me above but I did not understand it and was not doing it right.
R3 is there for a reason but may not be the correct value. In some cases the source led high/low voltage can vary and R3 is used to try and tweek out that difference. If you can shed some light on this it would be most helpful.
Thanks
I never use the base lead, but here are some other opinions: