Anyhow, the zener shouldn't mess anything up, it's simply to prevent too high voltage between source and gate. If you're using a zener, then there's no need to worry about calculating the respective values of the two resistors - and all you need for the top one is a high value resistor to bleed any charge away. So you can ignore the top resistor, and simply calculate the bottom resistor based on the current you want through the zener.
A reasonably stable base voltage plus an emitter resistor = constant current!
Choose the gate-source resistor to give eg. 10V at that current and you should not need the zener, the gate voltage should be the same for any (adequate) supply voltage.
Add a small cap across the gate resistor if you are concerned about transients.
A reasonably stable base voltage plus an emitter resistor = constant current!
Choose the gate-source resistor to give eg. 10V at that current and you should not need the zener, the gate voltage should be the same for any (adequate) supply voltage.
I drew this up while waiting to hear that the Mosfet was driving a very small load and I didn't think it was worth the complexity but, depending on the opto, here is a universal solution.
It keeps 5mA across the zener and 10mA to the opto - regardless of the input voltage from 12VDC to 48v (or more).
The "load" (opto) can be any forward voltage (must be at least 2v below supply voltage). Also, your R(on) of the Mosfet can't cause the Mosfet to be the current limiting element in the path of the opto.
I think Ian Rogers asked for a high-side opto switch on the opto but I have no idea why. The other side of the opto (phototransistor) doesn't care if the source light is grounded or not.
I think Ian Rogers asked for a high-side opto switch on the opto but I have no idea why. The other side of the opto (phototransistor) doesn't care if the source light is grounded or not.