This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Microcontroller software shutdown with transistor 2N4401

I am trying to understand why connecting, say, an Arduino digital pin 4 to a 2N4401 pin 2 as well as 5V PSU to 2N4401 pin 1 and Arduino VCC to 2N4401 pin 3, won't keep power.

When shorting pin 1 and pin 3 on the 2N4401 the MCU is powered on and in-software pin 4 is set to pinMode OUTPUT and HIGHwhich should allow the 2N4401 to let power flow to the MCU for as long as power is available even when the short circuit between 2N4401 pin 1 and 3 is cut.
2n4401 pdf:www.kynix.com/.../2N4401BU.pdf
Instead what happens when the short between pin 1 and 3 is cut, the MCU is turned off instantly.

It's as if the transistor isn't reacting to the pin 4 MCU signal at all.

Could anyone explain why this is happening?

I'm sure I lack a lot of knowledge here and I want to know how I could utilize a 2N4401 to make a SW shutdown system.

Why 2N4401? Why not a MOSFET? MOSFET's circuits that do SW shutdown are available, but no transistor base SW shutdown circuits are to be found anywhere, and the 2N4401 is all that I have right now.

Parents
  • Pin 1, 2, 3 aren't really good names - they depend on type of package. That's why school books talks about base, collector and emitter. And why schematics uses a transistor symbol that graphically displays base, collector and emitter.

    A FET is best to use since they are voltage-controlled while a bipolar transistor is current-driven. So the gain of the transistor decides how much current you need to send in on the base. Then you need some extra current just to make sure it really is fully open - i.e. saturated. A bipolar transistor isn't linear all the way to max. To send in that base current, you need to have enough voltage potential on the pin. Your selected transistor is NPN - the data sheet notes that the minimum base-emitter saturation voltage is 0.75V and max is 0.95V. Suddenly you should start to see an issue here - how can the processor GPIO pin output be held almost a volt higher than the supply voltage you feed to the processor?.

    An NPN transistor is easier to work with as a sink, i.e. on the ground side, since it's easier to control the base voltage relative to the emitter if the emitter is grounded. If the emitter voltage can float up/down, then you need to have the base voltage also float up/down. But you still wouldn't want that NPN transistor between processor GND and real GND because you would get a voltage drop you wouldn't like. You really (!) want to keep all ground points as close to 0V as possible, i.e. to have virtually zero resistance.

    Best for you: go get a transistor that is well suited for the task.

Reply
  • Pin 1, 2, 3 aren't really good names - they depend on type of package. That's why school books talks about base, collector and emitter. And why schematics uses a transistor symbol that graphically displays base, collector and emitter.

    A FET is best to use since they are voltage-controlled while a bipolar transistor is current-driven. So the gain of the transistor decides how much current you need to send in on the base. Then you need some extra current just to make sure it really is fully open - i.e. saturated. A bipolar transistor isn't linear all the way to max. To send in that base current, you need to have enough voltage potential on the pin. Your selected transistor is NPN - the data sheet notes that the minimum base-emitter saturation voltage is 0.75V and max is 0.95V. Suddenly you should start to see an issue here - how can the processor GPIO pin output be held almost a volt higher than the supply voltage you feed to the processor?.

    An NPN transistor is easier to work with as a sink, i.e. on the ground side, since it's easier to control the base voltage relative to the emitter if the emitter is grounded. If the emitter voltage can float up/down, then you need to have the base voltage also float up/down. But you still wouldn't want that NPN transistor between processor GND and real GND because you would get a voltage drop you wouldn't like. You really (!) want to keep all ground points as close to 0V as possible, i.e. to have virtually zero resistance.

    Best for you: go get a transistor that is well suited for the task.

Children