Go Down

Topic: Switch on/off MP3 player by using transistor (Read 933 times) previous topic - next topic

jose_francisco

Hi.
I'm trying to operate a MP3 module by switching it on/off by a transistor on its vcc terminal.
This module uses a 3.7v battery and 250 mA aprox. and it turns on when connected to the battery.

I have selected a BD139 transistor and connected it as follows:
  • Base connected to arduino GND/3.3v through a 220 ohm resistor
  • Collector connected to MP3 module ground
  • Emitter connected to arduino ground and battery ground 
  • MP3 module VCC connected to battery +3.7v


When Base is connected to arduino 3.3v, module leds lights up, but it doesn't work.
Same if Base is connected to 5v.
It seems that the system doesn't get enough power but BD139 can manage more than one amp.

what am I doing wrong?

thanks in advance.

slipstick

Not taking into account the volt drop across the transistor?

Try measuring the voltage that the MP3 player is actually getting.

Steve

jose_francisco

Ok.
I will do it.
If the voltage provided to the module is too low, how can I solve it?
Sorry. My knowledge about transistors is very poor.
Thanks.

MarkT

#3
Jun 15, 2018, 12:20 pm Last Edit: Jun 15, 2018, 12:44 pm by MarkT
Use a logic-level MOSFET, or a better BJT (one designed for switching which has a lower Vsat,
such as ZTX851).

For 3.3V operation you could try changing that 220 ohm resistor to 100 ohms though, 220 is
not going to allow much base current (only 12mA, you want as much as is safe to drive a BJT as
a switch, 25 to 30mA - remember output pins already have about 40 ohms in internal resistance
in your calculations)
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

jose_francisco

Thanks.
This is what i have in my toolbox:
BC556
BC546
BD139
BD140
IRF540
I will search for more.

Can you choose a good one to buy if those transistors aren't good enough?

Thanks.

MarkT

Have you tried 100 ohm base resistor?

A BJT as a switch needs about 10% of the load current supplied to the base to saturate properly.

Your MOSFET isn't logic-level unfortunately, and some logic level MOSFETs are only good for 5V anyway.

ZTX851 is the best BJT I know for switching.

You don't have a 2N2222A ?  That's the common switching transistor - only good for say 0.6A when
driven from an Arduino pin due to the need for 5 to 10% base current of course.

logic-level MOSFETs are the thing to use for higher currents.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

6v6gt

I can't work out from the description whether this 3 volt module is being switched on the high side or low side.

>> Collector connected to MP3 module ground.

Can you supply a diagram ?

Ideally you'd switch it on the high side and use a pnp transistor (or p channel logic level mosfet ) and connect it like this if your Arduino is a 5 volt device:



This circuit is suitable only if the voltage you are switching is lower than than that of the Arduino. It is also inverted so a LOW on the arduino pin switches the module ON.


MarkT

10k resistor will not work one little bit.  100 ohm like I said, and make it a good switching transistor (much
harder to find in PNP though).
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

6v6gt

Yes. You are right. I just looked for any diagram which illustrated high side switching. The resistor value must clearly be much lower in this case.

I'm still curious to see how the OP is attempting to connect it all up.

Wawa

Which Mp3 module.
It probably has a low power standby command.
Leo..

jose_francisco

#10
Jun 18, 2018, 10:35 am Last Edit: Jun 18, 2018, 10:37 am by jose_francisco
Hi.
Many thanks for your reply.
This is the schematic I'm using.

6v6gt

#11
Jun 18, 2018, 11:22 am Last Edit: Jun 18, 2018, 11:33 am by 6v6gt Reason: 3.3 volt ok
You should not attempt to switch a module in its path to ground. That is OK with a relay or led etc. but not a module which may have multiple paths to ground.

Connect the grounds of the MP3 player and the Arduino together and make the transistor switch the path between the battery positive and the modules vcc.

jose_francisco

Thanks 6v6gt
Something like this?

Wawa

Can't do that.
An emitter follower will drop >=0.65volt (from 3.3volt), and more with higher current draw.
And the player could still be powered throught the (TX/RX ?) signal pins.

Post#9
I assume a DFplayer (don't have one).
Did you try the module's sleep mode?
Leo..

6v6gt

OK. Post a link to your player so it is clear what the minimum voltage is.

Also, it appears that your circuit is also dependent on the Arduino Uno being powered (by something) to give you 3.3 volts to drive the switching transistor. So it is not completely clear what role the 3.7volt battery has. Or are you intending at some stage to make the MP3 player into a stand-alone device ?

If power saving is an issue, then you should also focus on the Arduino Uno which, also when doing nothing, happily takes c. 50 mA.

Go Up