I would like to use a transistor to disconnect the DFPlayer mini when the arduino pro mini 3v is not using it, to avoid consomnsion. I use a transistor PN2222 and 1k resistor.
But it doesn't work. When the pin 12 is high i have 0v at the pin when the DFPlayer mini is connected. But when he is not connected i have 3V to pin 12. What doesn't mean ?
But it doesn't work. When the pin 12 is high i have 0v at the pin when the DFPlayer mini is connected. But when he is not connected i have 3V to pin 12.
I'm not sure I understand... You write a high to pin 12 with nothing connected and it works - you get 3V.
Then, you connect the 1K resistor and the transistor and pin 12 drops to zero?
In that case, your 1K resistor is shorted (or it's way lower than 1K).
...Or your Arduino is bad, or maybe you're not really writing a high to pon 12. (If pin 12 is configured as an input with the internal pull-up enabled, that would give you a "weak" high that would be pulled-down with a 1K resistor.)
...Under normal conditions, a 1K resistor can't change an output state.
Hi,
You are trying to low side switch an active component.
You should be HIGH SIDE switching.
Your config, disconnects gnd from the player, so any other player is still at Vcc, other terminals of the player will now draw gnd current through the Tx and Rx pins, so it never completely turns off.
PLEASE draw a circuit diagram, not a fritzy picture.
What is "P", what are its lead outs.
You need to do something like this, switch the high side, so when turned off the player is at gnd.
Which is an NPN transistor but your diagram shows a P on that component which means a PNP transistor. If you use Tom’s circuit you must make pin 11 into an input when you switch off the player to prevent parasitic powering of your module.