Optocoupler Input switch problem

Thread Starter

Timbob123

Joined Sep 30, 2019
29
If the 1500 ohm resistor was changed to 120 ohms, there would be 100ma available. It looks like there's only 8ma available with the 1500 ohm. But would that make a difference in the mosfet switching?
 

Thread Starter

Timbob123

Joined Sep 30, 2019
29
Okay, we want to be able to turn off the 12V supply to turn off the optocoupler input, or.. have 12V on and switch off the optocoupler input using the mosfet. The mosfet is controlled by PIC, the 12V is controlled by an external switch. The 5V switch shown on the schematic represents the PIC.
 

MaxHeadRoom

Joined Jul 18, 2013
23,642
Personally I would place the opto sensor in the Mosfet Drain load side and if inversion is required it can be done by using either sink or source (emitter/collector) side of the opto output detector
 

crutschow

Joined Mar 14, 2008
27,758
Here's the circuit suggested by Max:
Connect a series resistor (with value to give the desired opto input current) between 12V and the opto anode input, and the MOSFET drain to the opto cathode input with the source to ground (below).

1620056778291.png
 
Top