Amplifying signal with a Transistor?

Hi,

I am building a paper speaker that is driven by digital output from the Arduino, but the audio is very quiet. Speaker is quite small at the moment, but will be about 4ft in diameter eventually.

What I want to do is amplify the signal so that I can increase the volume. When connected to an amp, the speaker is loud enough, but since I am creating the sound simply by rapidly switching a digital pin on and off (rather than inputting audio), I don't want to use the amp.

Can I make a very simple circuit to make the speaker louder? I've been researching this for the last couple of days (assuming that I could use a transistor ) but am quite confused, and don't want to mess about too much without understanding the circuit, since I'm worried about damaging the Arduino.

Any help really appreciated, or at least a pointer in the right direction.

Thanks,

Ben.

Maplins recommended this transistor, which I bought from them. But I don't entirely understand all the info on the datasheet, so am dubious about using this (Also looks like it requires 11 V input?? Or is this up to 11V?):

http://www.taiwansemi.com/db/pictures/modules/PDT/PDT060207001/TS7800_A07.pdf

[u]Here[/u] is a schamatic for what you want. It's supposed to be for a solenoid, but it will do what you want. You can delete the diode with a speaker.

What's the impedance and power rating for your speaker? We can't know what transistor or what voltage to use without knowing what we are "driving".

A power amp has a couple of advantages - It (normally) has a volume control, and it will (normally) filter-out the DC component from the signal. (DC into a speaker just generates heat & wastes power without contributing to the sound, and it can actually make the speaker operate non-linearly.)

Maplins recommended this transistor...

That's not a transistor... It's a voltage regulator... WRONG PART.

The circuit that DVDdoug gave you will make a lot of distortion .If you want to make a true Class A amp yo have to use other circuit
1- Use capacitor in the input to avoid dc got direct to transistor.
2 Use any trick to avoid DC go into Speaker.

Ok the easy way is to use Darlington transistor connection for example TIP 140

Hi,

Thanks for the replies. The impedance shows as 1.7ohms, but, since it is a homemade speaker, I don't know the wattage. Just doing a bit of research to see whether it's possible to work this out, but since I only know the impedance it looks like this isn't possible? If I'm wrong about this, please let me know.

I've tried with 9volt battery (in place of Arduino's 5V), and a transistor as in this circuit, which I used for a relay a while ago, but this makes no difference to the volume.

Transistor used is BC547: BC547 Datasheet pdf - 0.500W General Purpose NPN Plastic Leaded Transistor. 45V Vceo, 0.100A Ic, 110 - 800 hFE - Continental Device India Limited

I'm not too worried about distortion, since the artwork is concerned with the nature of failure, and involves too homemade speakers communicating morse code to one another - in case a bit of context helps :slight_smile:

Hello!

Read this http://www.allaboutcircuits.com/vol_6/chpt_6/10.html ; it should clarify a lot of doubts.

And if you send to the speaker just "ON-OFF", you could use this http://www.allaboutcircuits.com/vol_3/chpt_4/2.html ; is very well explained.
Have fun! :slight_smile:

Hi all,

Thanks suirammarius for those links. Am still not 100%, but definitely feel I understand better.

Using DVDdoug's suggested schematic (with transistor BC547, and a 10k pot in place of the resistor between dig. out and base), amplitude is almost what I'm looking for, but I still need to up it a bit more.

Looking at the datasheet (assuming I'm interpretting the info correctly - I may not be), this transistor allows for a 'controlling' voltage of a maximum of 6v (VEBO = 6) and a maximum 'switched' voltage of 50V (VCES = 50).

Currently I have arduino's 5V output running across the emitter - collector.

My questions are:

1.Can I simply use a bigger voltage in place of the Arduino's 5V (up to 50V with this transistor) in order to increase amplitude?

(When I use a 9V battery instead of the 5V pin, the sound is quieter than with the 5V). I'm assuming this is to do with a problem with my circuit wiring when introducing the battery.

2.Do I risk damaging the Arduino by increasing the voltage across the transistor?

3.And, just to clarify: I don't need a diode with this circuit?

Thanks,

Ben.

bngllghr:
The impedance shows as 1.7ohms, but, since it is a homemade speaker, I don't know the wattage. Just doing a bit of research to see whether it's possible to work this out, but since I only know the impedance it looks like this isn't possible? If I'm wrong about this, please let me know.

1.7 ohms is rather low and difficult to drive even with an amplifier. If you rebuild the speaker for a higher impedance (i.e use thinner wire and more turns), then you won't need so much amplification. For example, use twice as many turns of wire of half the cross sectional area, then you will have the same coil weight but the resistance will be 6.8 ohms.

The attached schematic is good for driving a low impedance speaker from an Arduino digital output. Choose the series resistor R so that R + the speaker resistance is at least 5 ohms, or omit it if the speaker resistance is 5 ohms or greater.

Hi, sorry, just read this. Thanks so much for the heads up, and the schematic. I'm locked out of the studio til after Monday (Arduino's in there), but will give this a go on Tuesday and repost.

Thanks again,

Ben.

(When I use a 9V battery instead of the 5V pin, the sound is quieter than with the 5V).

I am not surprised with a resistance of 1.7R and 5V you get:-
5 / 1.7 = 2.9 Amps !!!!
With 9V you get:-
9 / 1.7 = 5.3 Amps
You are not going to get anything like that sort of current from a battery especially the small square type, lucky if you get 0.4 Amps and not for very long at that.

Your low impedance speaker needs a serious amount of current and needs a much better power source than you have. For example you can only get 0.5 Amps from the +5V pin on an arduino.

Your transistor can only handle a current of 0.1 Amps before burning up, so I am surprised if anything works at all.

Can I simply use a bigger voltage in place of the Arduino's 5V (up to 50V with this transistor) in order to increase amplitude?

Yes but with 50V you have a current of 29 Amps, and that is just a stupidly large amount.

Hi guys,

Haven't posted for a while because I've been trying to resolve this based on your advice. but I'm struggling and not getting anywhere.

I ordered two types of transistor to build DVDdoug's circuit:

BC327-25: ST Microelectronics 8852 datasheet pdf
BC337: Philips BC337, 3 datasheet pdf

I also increased the resistance of the speaker to around 8ohms.

But I don't get any extra amplitude from this circuit.

Also, I have tried an adaptor with each of these transistors (separately), using an Arduino pin at the base. Adaptor says: 9v at 400mA (though my multimeter shows 12V). Also tried a 10V adaptor at 1.2A.

Using the 9V adaptor with BC337, I get no extra amplitude.
Using the 9V adaptor with BC327, I get some, slight amplitude plus quite a bit of distortion.
In both cases the transistor and Arduino get quite hot.

Why does it get so hot with only 9V at 0.4A?

Am a bit overwhelmed by all of the info on the datasheets for transistors. But I think they can handle what I'm putting through them.

Also, does the extra weight of the coil (same wire wrapped more times around) require extra current to move it?

Thanks,

Ben.

bngllghr:
Hi guys,

Haven't posted for a while because I've been trying to resolve this based on your advice. but I'm struggling and not getting anywhere.

I ordered two types of transistor to build DVDdoug's circuit:

BC327-25: ST Microelectronics 8852 datasheet pdf
BC337: Philips BC337, 3 datasheet pdf

I also increased the resistance of the speaker to around 8ohms.

But I don't get any extra amplitude from this circuit.

No, use dc42's push-pull circuit - its the classic class B audio output stage. You are aware that you have both NPN and PNP transistors?

Why does it get so hot with only 9V at 0.4A?

Because you should be using dc42's circuit and only from 5V - 9V x 0.4A is a lot of power for small transistors - you want to limit the dissipation to 0.6W or so per transistor.

Am a bit overwhelmed by all of the info on the datasheets for transistors. But I think they can handle what I'm putting through them.

Also, does the extra weight of the coil (same wire wrapped more times around) require extra current to move it?

Yes, but the wire should be half the thickness anyhow. In practice the weight of the air the speaker cone is pushing and the cone itself usually dominates.

bngllghr:
Using the 9V adaptor with BC337, I get no extra amplitude.
Using the 9V adaptor with BC327, I get some, slight amplitude plus quite a bit of distortion.
In both cases the transistor and Arduino get quite hot.

The BC327 is a PNP transistor and not suitable for that circuit. It is quite likely that you have damaged it, and possibly the Arduino as well (with any luck, you will have only damaged that particular output pin). BC327 is NPN and therefore the correct polarity, however you have quite likely exceeded its power dissipation rating.

Try the circuit I gave in reply #6, preferably with fresh transistors and a different output pin. Don't run it from more than 5v (if you run it from 9V, it won't be any louder but the BC337 will overheat). Make sure you connect the transistors the right way round. You might want to add a 100 ohm series resistor between the output pin and the transistors, to protect the Arduino in the event of bad or incorrectly connected transistors.

Hi guys,

thanks.

I should correct myself there.

It was actually your schematic that I used, dc42, not DVDdoug's. i ordered both the PNP (BC337) and the NPN (BC327) because that's what i thought was on your diagram. Should I instead use two BC337's? And is it ok that i have the BC337-25?

Yes, but the wire should be half the thickness anyhow. In practice the weight of the air the speaker cone is pushing and the cone itself usually dominates.

I'll buy some thinner wire (currently I think it's 32 bwg). I should add that the speaker will be almost 4 foot. Also have a 470uF capacitor.

Arduino pin seems ok, so far.

thanks guys.

I'll retry with 2 x BC337's.

ben.

bngllghr:
It was actually your schematic that I used, dc42, not DVDdoug's. i ordered both the PNP (BC337) and the NPN (BC327) because that's what i thought was on your diagram. Should I instead use two BC337's? And is it ok that i have the BC337-25?

No, one BC337 and one BC327 is correct. Check that you have them wired correctly. The BC337 is NPN so its collector goes to +5v. The BC327 is PNP so its collector goes to ground. Both base connections go to the Arduino (optionally through a 100 ohm resistor), and both emitters to the +ve side of the 470uF capacitor, whose -ve side goes to the speaker, and the other speaker connection goes to ground.

What you say "I don't get any extra amplitude from this circuit", what are you comparing it with? If you want to drive the speaker directly from the Arduino, you should use at least 100 ohm series resistor and 470uF series capacitor. If you use less than 100 ohms or omit the resistor completely, you will overload the Arduino pin and damage it.

bngllghr:
I'll buy some thinner wire (currently I think it's 32 bwg). I should add that the speaker will be almost 4 foot. Also have a 470uF capacitor.

I'll retry with 2 x BC337's.

Don't do that, you'll damage the transistors, or the Arduino, or both. Thinner wire may not be necessary.

Just tried that (with 2 x BC337-25), pretty certain all wired correctly. But still only just audible.

What you say "I don't get any extra amplitude from this circuit", what are you comparing it with? If you want to drive the speaker directly from the Arduino, you should use at least 100 ohm series resistor and 470uF series capacitor. If you use less than 100 ohms or omit the resistor completely, you will overload the Arduino pin and damage it.

The loudest I have gotten so far has been with the 1.7ohm speaker and a BC547 transistor (link above), which Grumpy Mike advised wasn't suitable since I was risking the Arduino. That was probably almost loud enough for what I need. The two speakers will be communicating across a gallery floor, relatively quietly but distinctly audible.

That was from the Arduino pin (I think with a 330ohm resistor before the base).

When I use one of my bookshelf speakers (8 ohm), the audio is perfectly loud enough - that is directly driven by Arduino pin 8 (with resistor, but no transistor) so I assumed I could get a similar volume by building an 8 ohm speaker?

I think I can do this with an amplifier, but that feels like cheating. Ideally i want to build the whole system from scratch. Code, amp circuit, speakers and all.

Could it be that my magnets aren't strong enough? yet, they're fine with my own amp.

Update: my homemade speaker is 6.3 - not 8ohms.

As I said in my previous post, 2 x BC337 is NOT correct, you must use one of each and they must be wired as I described. If you are getting more volume using a single BC547, something is wrong with your wiring or one of the components.

I suggest you try the following:

  1. Connect your 8 ohm bookshelf speaker to the Arduino output pin via the 470uF capacitor and 100 ohm series resistor. This should give you the same volume as without the capacitor (unless you are testing with a very low frequency tone). The capacitor makes it kinder to the speaker by removing the DC component (this becomes more important when you use the amplifier).

  2. Now connect the same speaker using the amplifier circuit I gave you (1 x BC337 and 1 x BC327). It should be much loader. If it isn't, you have faulty wiring or a faulty component. If you are using a bread board to wire the circuit up, you could post a photo.