codesuidae
Newbie level 5
4n33 example
Greetings,
I am working on a project that will as part of its function control current to a 12v lightbulb that draws up to 2A (signal bulb from an American car).
I'm using an IFR540 to switch the bulb. I'm also using a 4n33 optocoupler to provide feedback to the system as to whether or not the bulb has actually turned on. To do this I want to place the 4n33 input in parallel with a resistor on the ground side of the light bulb. If the light bulb is burnt out, no current will flow and the 4n33 output side will not show current flow.
My problem is that I need to have at most 2mA flowing into the 4n33, and I'm not sure how to do that correctly. The diode in the 4n33 needs at least 2v to turn on, which means that if I wanted to run it directly off the sense resistor I'd have to have at least a 2v drop there, which would be much more power than i want (since its a 12-14v bulb I'd lose some brightness too). I think what I need is an NPN transistor with its base and emitter across the sense resistor to feed the diode.
I don't know if i need a resistor in the base lead of the transistor though. I think the voltage drop across the sense resistor is small enough that I can do without a base resistor (R1 in the diagram below).
Is this a reasonable way to use the 4n33 to confirm that the bulb is actually on?
Thanks for any advice.
Greetings,
I am working on a project that will as part of its function control current to a 12v lightbulb that draws up to 2A (signal bulb from an American car).
I'm using an IFR540 to switch the bulb. I'm also using a 4n33 optocoupler to provide feedback to the system as to whether or not the bulb has actually turned on. To do this I want to place the 4n33 input in parallel with a resistor on the ground side of the light bulb. If the light bulb is burnt out, no current will flow and the 4n33 output side will not show current flow.
My problem is that I need to have at most 2mA flowing into the 4n33, and I'm not sure how to do that correctly. The diode in the 4n33 needs at least 2v to turn on, which means that if I wanted to run it directly off the sense resistor I'd have to have at least a 2v drop there, which would be much more power than i want (since its a 12-14v bulb I'd lose some brightness too). I think what I need is an NPN transistor with its base and emitter across the sense resistor to feed the diode.
I don't know if i need a resistor in the base lead of the transistor though. I think the voltage drop across the sense resistor is small enough that I can do without a base resistor (R1 in the diagram below).
Is this a reasonable way to use the 4n33 to confirm that the bulb is actually on?
Code:
VCC 12v VCC 5v
^ +
| ___ |
o----|___|----+ .-.
| R2 10k | | | R3
,---. | | | 10k
| X | Lamp 2A +----+ '-'
'---' | | |
| ___ |/ | |
o---|___|---| | +---o--->Sense
| R1??? |> | | |
.-. | | |/ |
0.005R| | | V 4N33 | |
1W | | | - Opto |> |
'-' | | | |/
| | | o-|
o-------------+ | |>
| | |
| | |
||-+ | |
||<- IFR540 | |
In >--||-+ | |
| | |
+------------------+ |
| |
=== ===
GND GND
Thanks for any advice.