Hi all. i am trying to route a PAM8403 amplifer module through a BC639 NPN transistor so i can turn it on an off with an arduino. Trouble is that it seems to suffer current loss when it goes through it as the amplifer keeps reseting when the bass notes hit if the volume pot is turned up enough causing the speaker to pop. it doesnt do this when it is connected directly to ground. Is it normal for transistors to exhibit resistance resulting in current loss? ive attached a circuit diagram which will hopefully allow you to understand my simple circuit.
any help would me much appreciated, thanks.
Transistors of course have a resistance, as do all components. How much depends on the amount of current you try to push through, and how much base current you supply (which should be enough to saturate the transistor).
OP's image:
gonadgranny:
So reducing the base resistor size would help? i chose the transistor size arbitrarily, how might find the resistor value to saturate the transistor(which i assume is it in its most non-resisitve phase?)
I thought it was possible to get a transistor to act like a switch with very minimal resistance. like a relay. is this incorrect?
thanks.
How much current are you trying to switch?
well the speakers resistance is 4 ohms and the voltage is 5 so the max (i think) is 1.25 amps but i doubt it gets this high as i am not maxing out the levels.
Don't mix up "resistance" and "impedance". While both have the same unit they're very different things when working with waveforms. Besides the input voltage is not necessarily the same voltage as what the speakers see.
Your transistor can't handle more than 1A for a long time according to the ratings in the datasheet. Do measure the current, so you know what you're dealing with. Look up the characteristics of your transistor, to see what amplification factor you really have. Then scale your base resistor so you supply enough current there.
The BC639 datasheet says the minimum beta is 40, but since we want to guarantee saturation, let's assume 20. 1.25/20 is around 60mA into the transistor base. 5V/60mA is around 80 Ohms. (Since we don't know the beta for your particular part and I'm just estimating, I ignored the ~0.7V B-E drop.)
That exceeds the Arduino's 40mA rating, so you might want to increase the resistor (and cross your fingers) or use a Darlington transistor or a MOSFET.
The BC639 is also only rated for 1A, and I assume it needs a heatsink to run at 1A. ...If it burns-up, try something with a little more safety margin. (Nothing terrible will happen if the transistor dies. It will probably short-out so the amp won't turn-off.)
so i can turn it on an off with an arduino.
...That's not what your schematic shows
The PAM8403 has a shutdown pin (pin 12), see the datasheet.
Pulling this pin low puts the IC into a low current (<1μA) state.
You might have more luck using this approach, although you may have to cut tracks/lift pins if you have a ready made PCB..
Ive tried it with a 200ohm resistor and the results are the same as far as i can tell. i can only increase the volume a fraction of what it can handle without passing through the transistor which has taken me by surprise. would a Darlington transistor or a MOSFET be a better fit?any chance of a recommendation? the speaker will only be running for short burst(30 seconds max) so that might be something worth mentioning. the reason why i am doing this is that it is a battery powered project which i would like to put to sleep mode when it isnt being used and if i have an amp connected it will drain the battery so i thought i could add a switch to turn it on and off. i didnt realise it would be so complicated!!!
The PAM8403 has a shutdown pin (pin 12), see the datasheet.
Pulling this pin low puts the IC into a low current (<1μA) state.
You might have more luck using this approach, although you may have to cut tracks/lift pins if you have a ready made PCB..
ive just tried this out and it does indeed shut it down. im just working on figuring out how to get it running again now, so fair it only starts up again when i disconnect and reconnect the power from the battery, defeating the purpose....
Ive just realised that that pin on the amp(12) was connected to vcc(i bought a broken out module) so i used a scalpel to sever the link and it works beautifully. ive yet to measure the actual current usage but hopefully it will work as a solution.
So thanks for the help folks!
just as an afterthought, is there a rule of thumb to go by when choosing a transistor to switch with? i also want to switch some sg90 servo motors which under my testing havent gone higher than 200mA. they seemed ok with these transistors but i did notice a slight change in pitch suggesting they were moving slower.
basically is it possible to create a proper short circuit between collector and emitter so that it acts as effectively as a galvanic switch?
thanks!
In almost all cases a MOSFET will work better (have much lower ON resistance and be easier to drive from the Arduino) than any conventional NPN/PNP transistor, often called a BJT, Bipolar Junction Transistor, round here.
The catch is that most small signal MOSFETs are only available in surface mount packages which makes them a bit fiddly to solder.
Steve
Hi,
You should be switching the high side, that is the positive supply to the amplifier.
Switching the gnd, especially with a device that does not have near zero ON resistance is not a good idea.
I have one of these boards and the power gnd is connected to signal gnd, so when you disconnect power gnd, current will flow through the signal gnd.
Tom... ![]()
Thanks very much for that Tom, i'll look into it. ps. which software did you use do draw your schematic?
slipstick:
The catch is that most small signal MOSFETs are only available in surface mount packages which makes them a bit fiddly to solder.Steve
Right. I do it all the time, but you can also buy SMT to through hole adapter PCBs for quite cheap.
gonadgranny:
Thanks very much for that Tom, i'll look into it. ps. which software did you use do draw your schematic?
Several packages available.
I'm using KiCAD. Works great.
EagleCAD is another name I see often, never tried it.
Hi,
google Expresspcb download
Tom... ![]()
Switching the gnd, especially with a device that does not have near zero ON resistance is not a good idea.
Im still slightly confused about high and low side switching. ive had best result when the load is between 5v and collector. when it was between emitter and ground the resistance seemed to be a lot higher. ive included a quick sketch. could you just confirm whether A) and B) are hi and low side switching please? note(this is for an NPN transistor) Thanks.
gonadgranny:
A is high side, which should be done using a PNP transistor or p-channel MOSFET.
B is low side, which should be done using a NPN transistor or n-channel MOSFET.
Switching the PNP to low side or NPN to high side is asking for problems as you can't get sufficient base current. NPN high side means the basis is at almost the same voltage as its collector, so you get too little current and that you experience as "high resistance".
gonadgranny:
Im still slightly confused about high and low side switching.
Read this
Leo..


