# Using different transistors in a simple arduino audio circuit

#### Green Bean

Joined Mar 31, 2017
126
I am doing an arduino project that involves sounds (square waves) generated with the tone() function. I had a 8 ohm 0.5 watt speaker connected to the arduino with a 100 ohm series resistor, but this isnt quite loud enough.

While researching i found this thread on another forum: https://forum.arduino.cc/index.php?topic=164436.0

One user suggested a very simple amplifier circuit using two transistors:

Also note:
"It's simple because it only has to amplify square waves of a fixed amplitude, which is what comes out of an Arduino digital pin or PWM pin. It's no good for amplifying general audio signals, or the outputs from the DACs on the Due."

The two transistors are a BC337 and BC327, an NPN and PNP. I do not have these two transistors, but I do have an A1659A and a C4370A. One is NPN one is PNP. Could i use these instead?

Sorry if this is a dumb question or i have not provided enough information.

#### Bordodynov

Joined May 20, 2015
2,661
Yes, you can use these transistors.

#### Norfindel

Joined Mar 6, 2008
326
Remember to use a resistor on the arduino pin to the transistor bases, to limit the current to the required level.

#### Green Bean

Joined Mar 31, 2017
126
Ok i built it and it works great thanks fam.

#### Audioguru

Joined Dec 20, 2007
11,249
Remember to use a resistor on the arduino pin to the transistor bases, to limit the current to the required level.
With the 5V supply, if the Arduino output goes to +0.5V V and +4.5V then the emitter of the transistors will try to go to +1.3V and +3.7V. But the current in the 8 ohm speaker will be 1.2V/8= only 150mA and since the transistors do not saturate and have a minimum hFE of about 80 then the maximum output current from the Arduino will be 150mA/80= only 1.88mA which is nothing. Then current-limiting resistors are not needed.

#### Audioguru

Joined Dec 20, 2007
11,249
Since the peak current in the 8 ohm speaker is only 150mA then the RMS current is 106mA then the RMS power is only 90mW but since the squarewave has lots of harmonics the fundamental frequency power is only 45mW which is almost nothing. Why bother using the transistors.

#### AnalogKid

Joined Aug 1, 2013
8,608
Because
the peak current in the 8 ohm speaker is ... 150mA
I don't know a lot of the details about an Arduino, but that sounds high for a uC output pin.

ak

#### Audioguru

Joined Dec 20, 2007
11,249
The output voltage swing of an Arduino is less if it is powered from only 3.3V because with a high load resistance its output is Cmos rail-to-rail.