Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Passive Switch for NPN or MOSFET Ideas?

  1. Jun 30, 2013 #1
    Hi I would like some advice on what you think I should use as a passive switch for my NPN or MOSFET transistor. Im trying to PWM pulse with modulate an electromagnet with a 12V 3.6A battery and I want to have a passive switch. I have tried to use photo interrupters in the past but I am not smart enough to know how to make all the connections. If you have any ideas I would very much like to know, Thanks.
  2. jcsd
  3. Jul 1, 2013 #2


    User Avatar
    Science Advisor

    What do you mean by “passive” switch?
    How will the passive switch be controlled?

    You have an electromagnet and you efficiently regulate it's DC current by using a PWM current regulator. What decides the pulse width?

    Do you want the “passive” switch to switch the magnet between off and regulated on?
    Or does the passive switch produce the pulsing gate signal to the current switch?

    You can use PWM to regulate the DC current through an electromagnet, but it is very difficult to produce sharp magnetic transitions by switching the current on and off because the energy stored by the inductive circuit must be rapidly removed and replaced.

    There are too many interpretations of your question.
    Maybe your circuit diagram would help.
  4. Jul 1, 2013 #3
    sorry about my poor clarity.

    when I sed PWM I ment to manually turn on/off the electromagnet with a passive switch. Perhaps photo electric like a photo-interrupter. If you have any ideas of a beater switch for the mosfet or the npn I would be thankful.
  5. Jul 2, 2013 #4
    Define Passive? Automatic, electronic, not mechanical ?

    Otherwise stopping the PWM input will turn off the circuit, so I do not know what you mean.
  6. Jul 2, 2013 #5


    User Avatar
    Science Advisor

    I believe the term Passive and PWM have been misleading. This circuit should protect the MOSFET from your input experimentation.

    Use almost any enhancement mode N-channel MOSFET in a TO220 case. It needs to be rated at 30V or better. Like the power diode above it, the MOSFET need only carry the electromagnet current.

    When the switch turns off, a positive voltage spike from the inductance of the electromagnet is clamped by the power diode across the magnet coil. The diode prevents the flyback spike from destroying the MOSFET.

    The MOSFET should be turned fully on or fully off. Then there will be either low voltage across it, or low current through it, so there will be low V*A = low power dissipated in the MOSFET. A heatsink should not be needed, check it does not get hot in use.

    In order to safely control the MOSFET gate you must convert a slowly changing analog voltage into a digital signal that has sufficient current available to drive the MOSFET gate quickly through it's transition zone. That circuit is called a schmitt-trigger.

    The LM555 is a very common 8 pin timer IC, but it is being used here only as a simple schmitt-trigger. The input thresholds are at Vcc/3 and Vcc*2/3. For Vcc=12V, when the input voltage on pin 6 rises above 8V the output goes low and the MOSFET turns off. When the input voltage on pin 2 falls below 4V the output goes high, turning on the MOSFET and electromagnet. The input impedance of pins 2 and 6 is high, so easy to drive.

    The 47 ohm resistor limits the transition current from the LM555 into the gate capacitance of the MOSFET when switching. It also prevents parasitic oscillations of the gate structure.

    The two 0.1uF ceramic bypass capacitors are there to keep switching spikes out of the system when used with long cables or a tired battery.

    Start with say a 10k or 100k potentiometer on the input. Check the thresholds are 1/3 and 2/3 of Vcc. Then insert the MOSFET and check the electromagnet is controlled by the pot.

    Next you can experiment with a photo-interrupter. Connect the detector between + and in, and a resistor of say 22k between in and -. That makes a voltage divider to replace the potentiometer you used during testing. You will need a light source, maybe powered between B+ and B- through a series resistor, try 470 ohms if it is a LED.

    Attached Files:

Share this great discussion with others via Reddit, Google+, Twitter, or Facebook