0
\$\begingroup\$

I tried to make a simple latch with a PNP transistor and a MOSFET. The idea is that initially it is off, when you press the button it turns on and stays on.

But it doesn't stay on.

Here is the circuit: enter image description here

I've tried it with both 12v and 5v, it doesn't work.

I also tried increasing the pullup and pulldown resistors R1 and R4 to 4.7K, in which case the LED is initially on. (Not sure why!)

I attached a picture of the actual implementation, I don't know how much you can make out from it but here it is: enter image description here

\$\endgroup\$
16
  • \$\begingroup\$ The schematic looks OK, so maybe you have a wiring error. Can you show us your actual implementation? \$\endgroup\$
    – Dave Tweed
    Aug 28, 2017 at 1:59
  • \$\begingroup\$ the switch resistance can be the problem. It should be tied to base not drain using same as R2 \$\endgroup\$ Aug 28, 2017 at 2:02
  • \$\begingroup\$ @TonyStewart.EEsince'75 I connected it to the base, still the same problem. I attached a picture of the breadboard.. \$\endgroup\$ Aug 28, 2017 at 2:11
  • \$\begingroup\$ What's the PN of your MOSFET? \$\endgroup\$
    – The Photon
    Aug 28, 2017 at 2:16
  • \$\begingroup\$ @ThePhoton It's an IRFZ34N, data sheet is here: infineon.com/dgdl/… \$\endgroup\$ Aug 28, 2017 at 2:18

1 Answer 1

2
\$\begingroup\$

You could put a cap to ground at/near your mosfet gate. Perhaps across \$R_4\$ in your circuit.

Try this as an option:

schematic

simulate this circuit – Schematic created using CircuitLab

\$R_3\$ limits sudden currents to \$C_1\$ and the gate of \$M_1\$ and oscillations, but still also allows \$C_1\$ to discharge pretty fast through the LED load when the power is removed. \$R_4\$ is needed to keep trace currents from charging the mosfet gate and to also further discharge \$C_1\$ when the LED isn't conducting much anymore.

The above circuit is set up for an LED current of about \$20\:\textrm{mA}\$ as an example. If you plan some monster LED later on, the values and part selections would need to be changed.


EDIT:

I'd much have preferred the use of another BJT rather than a mosfet. In that case, the following circuit is an easy derivative, robust, and doesn't need \$C_1\$:

schematic

simulate this circuit

You could also get rid of one (or perhaps even both) of the two \$33\:\textrm{k}\Omega\$ resistors and further simplify it. The LED load is plenty, already, so I don't see much real need for \$R_4\$. And given that, the whole thing should power up in the right state also without the need for \$R_2\$. But this applies so long as there is a load. Otherwise, I'd keep at least one of them.

\$\endgroup\$
6
  • \$\begingroup\$ Thanks for the detailed response. What is the purpose of adding a capacitor? \$\endgroup\$ Aug 28, 2017 at 12:21
  • \$\begingroup\$ @CaptainCodeman Well, I'd have much preferred using a BJT rather than a mosfet. But with the mosfet in your arrangement I'm mostly bothered by \$C_{GD}\$. \$\endgroup\$
    – jonk
    Aug 28, 2017 at 14:48
  • \$\begingroup\$ @CaptainCodeman Let me know if it works for you. I'd be interested to know. \$\endgroup\$
    – jonk
    Aug 28, 2017 at 15:08
  • \$\begingroup\$ Hi! yes, it worked, thank you! I believe the problem with my original design was that the pullup and pulldown resistors were too small! \$\endgroup\$ Aug 30, 2017 at 8:16
  • \$\begingroup\$ (By the way the reason I used a MOSFET is because I need it to drive a motor!) \$\endgroup\$ Aug 30, 2017 at 8:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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