Our teaching assistant showed us this circuit, saying that the MOSFET acts as a switch. When the power supply is OFF, the MOSFET allows the filter capacitors to be discharged via the switch circuit. enter image description here

I know that capacitor C3 gets discharged when the switch is off. If the gate-source voltage exceeds the threshold voltage, then the MOSFET switches ON, allowing the filter capacitors to be discharged. However, I am not too certain as to what is the function of the diode and the drain resistor. Could anyone give me an explanation of the logic behind the operations? Thanks.

  • \$\begingroup\$ Why is the FET represented as an optocoupler? Also if there is really a resistor missing in parallel with D1 as my answer suggests, this schematics is kinda wrong and missleading.. \$\endgroup\$ – Wesley Lee Mar 8 '15 at 21:17
  • \$\begingroup\$ What a mess! What MOSFET? What switch? Which capacitor do you think is the "filter" capacitor? Do you realize that D1 will always be reverse biased and therefore off? What's with the base of the transistor tied to the case of the opto, which also seems to be shorting across both inputs of the LED? \$\endgroup\$ – Olin Lathrop Mar 8 '15 at 21:17
  • \$\begingroup\$ @Olin The MOSFET will be case-insensitive :-) \$\endgroup\$ – Russell McMahon Mar 9 '15 at 0:20
  • \$\begingroup\$ @Olin: LTspice parts are bounded by an outline which uses little squares to indicate I/Os. if a little square persists in the drawing, after it's been parsed, that indicates that that node is floating. Accordingly, the base of the opto's transistor is shown as floating. The connection to the cathode of the diode is, unfortunately, drawn clumsily, and should be stepped away from the part's outline before being connected to ground. But, be aware that the outline is just an outline and carries no weight other than that.; \$\endgroup\$ – EM Fields Mar 9 '15 at 1:04

Unfortunately, your teaching assistant has done you a great disservice.

1) If Vs is a DC supply, with D1 wired as shown, Vs is essentially disconnected from the circuit.

2) If Vs is an AC supply, supplying 17.3V peak, C3 can only charge up to about minus 16.6 volts and the IRLED in the OPTO will be stressed beyond its reverse-bias limit.

3) A 2N7000 is an N-Channel enhancement mode MOSFET, not an optocoupler, and an MOC205 is an optocoupler, not a MOSFET.

4) There is no power supply associated with C1, C2, and Rdrain, so that part of the circuit might as well not exist.


Rdrain limits the current that flows from C2, through 2N7000 and to C1. If it is not there, then the current will only be limited by the FETs Rdson and the capacitors ESR, which can cause excessive current and maybe a fault.

About D1, I think that he missed a resistor in parallel with D1. In such case, the resistor limits the current that drives de FETs gate during turn on, and during turn off, D1 bypasses the resistor when Vs goes low. This makes the FET turn off a bit faster which enhances efficiency. A config like this:

enter image description here


Not the answer you're looking for? Browse other questions tagged or ask your own question.