I need a switch that can be controlled by MCU to switch on and off the whole circuit board.
I am using a BC547 NPN BJT as the switch, and connected my circuit as below:

When I construct the connection, I noticed that, when I connected the collector and emitter terminal with the diagram show above, the base will have a voltage of -4.4V showed on the multimeter (that is with the multimeter: negative connected with ground of the circuit, and positive on base terminal).
The circuit works when I use the power supply to supply voltage to the base terminal, the switch is on when Vbase > 0.7V, and off when Vbase < 0.7V.
However, when I use the MCU GPIO to supply the voltage to the base terminal of the BJT, no matter whether I turned on or off the GPIO pin (3.1V when on, and 10mv when off), the switch is always on.
I have also tried PNP with connection as below, but it is always on no matter whether I connected the base terminal with power supply or MCU GPIO pin.

I am trying to identify the problem and find a solution for this. Any help will be great. Thanks in advance.
I am using a BC547 NPN BJT as the switch, and connected my circuit as below:

When I construct the connection, I noticed that, when I connected the collector and emitter terminal with the diagram show above, the base will have a voltage of -4.4V showed on the multimeter (that is with the multimeter: negative connected with ground of the circuit, and positive on base terminal).
The circuit works when I use the power supply to supply voltage to the base terminal, the switch is on when Vbase > 0.7V, and off when Vbase < 0.7V.
However, when I use the MCU GPIO to supply the voltage to the base terminal of the BJT, no matter whether I turned on or off the GPIO pin (3.1V when on, and 10mv when off), the switch is always on.
I have also tried PNP with connection as below, but it is always on no matter whether I connected the base terminal with power supply or MCU GPIO pin.

I am trying to identify the problem and find a solution for this. Any help will be great. Thanks in advance.


