Using different transistors in a simple arduino audio circuit

Discussion in 'Analog & Mixed-Signal Design' started by Green Bean, Feb 6, 2019.

  1. Green Bean

    Thread Starter Member

    Mar 31, 2017
    125
    1
    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:
    Scan 177.png
    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.
     
  2. Bordodynov

    Well-Known Member

    May 20, 2015
    2,046
    622
    Yes, you can use these transistors.
     
  3. Norfindel

    AAC Fanatic!

    Mar 6, 2008
    325
    25
    Remember to use a resistor on the arduino pin to the transistor bases, to limit the current to the required level.
     
  4. Green Bean

    Thread Starter Member

    Mar 31, 2017
    125
    1
    Ok i built it and it works great thanks fam.
     
  5. Audioguru

    Expert

    Dec 20, 2007
    10,739
    1,201
    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.
     
  6. AnalogKid

    AAC Fanatic!

    Aug 1, 2013
    7,298
    2,053
    Kjeldgaard likes this.
  7. Audioguru

    Expert

    Dec 20, 2007
    10,739
    1,201
    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.
     
  8. AnalogKid

    AAC Fanatic!

    Aug 1, 2013
    7,298
    2,053
    Because
    I don't know a lot of the details about an Arduino, but that sounds high for a uC output pin.

    ak
     
  9. Audioguru

    Expert

    Dec 20, 2007
    10,739
    1,201
    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.
     
Loading...