user32861: I have been working on a project lately which uses Arduino to play a wav file from SD card. I am using TMRPCM library which made the job very easy. But the problem is that the output sound in the speaker is very low. I am using the below single transistor circuit with my Arduino to drive 1.2W / 8ohm speaker 

But the Audio output is barely audible. And i have tried many speakers with different wattage but same result. 
I am wondering that is there is something wrong with the Wav file i have used for my project. It is 16000Hz/ 8 bit unsigned PCM coded. So in a nutshell my questions are 
1) How can i improve the sound obtained from my speaker by making modifications in the transistor amplifier circuit?
2) Was the less audible sound is due to the Wav file i have used?
Kindly help me out, thanks in advance. 

user3917: You might try an audio transformer in the circuit, following a low-pass filter to smooth the PCM signal.  Here's a picture of suitable inexpensive transformers (from alexnld.com; but similar transformers are available on Ebay etc.):

The effect of the transformer in the circuit is transforming the high voltage, high impedance output of the transistor driving circuit to the low voltage, low impedance needed at the speaker.  The impedance ratio of the transformers in the picture is 1300 Ω to 8 Ω.

user4143: Your amplifier arrangement is fundamentally flawed. At the moment you are "tickling" the top end of the electromagnet in the speaker - that is, you are energising it when the Arduino outputs a HIGH, and leaving it energised to de-energise by itself when the Arduino outputs a LOW.  Coupled with that the fact that a PCM file outputs PWM with a carrier frequency much higher than a tone() function (and ideally above human hearing frequencies) you end up with almost nothing happening on the speaker.
The classic Class A amplifier has a different arrangement:

simulate this circuit – Schematic created using CircuitLab
With that arrangement the transistor and R1 form a simple RTL inverter. Size R1 to give the output current you need for your speaker (lower resistor = more power = more heat = bigger transistor as well). R3 and C2 remove the high frequency switching from the PWM (you could also replace R3 with a suitable inductor if you want less losses from the resistor). C1 removes the DC offset from the signal to give the full swing to the speaker and prevent excess clipping and heating.
It's not an efficient design by any means. A better "first stage" (replacing R1 and Q1) would be a high drive output logic gate (one of the CD4000 series, since it can run from 12V). I have seen AND gates used before - this also gives the benefit that you can use the second input to the AND gate as a MUTE signal. The rest (R3, C1, C2) remains the same.
The advantage of using a logic chip instead of the RTL arrangement is that it gives a more efficient "Push-Pull" output which can deliver much more current with far less heat losses.
Instead of the speaker you could connect an audio power amplifier to the output of C1 to then drive a more powerful speaker. In this case you can most likely remove the first stage (Q1/R1/R2) and drive the RC filter directly from the Arduino.

32861: <p>I have been working on a project lately which uses Arduino to play a wav file from SD card. I am using TMRPCM library which made the job very easy. But the problem is that the output sound in the speaker is very low. I am using the below single transistor circuit with my Arduino to drive 1.2W / 8ohm speaker 
<a href="https://i.stack.imgur.com/mvfzL.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mvfzL.jpg" alt="enter image description here"></a>
But the Audio output is barely audible. And i have tried many speakers with different wattage but same result. </p>

<p>I am wondering that is there is something wrong with the Wav file i have used for my project. It is 16000Hz/ 8 bit unsigned PCM coded. So in a nutshell my questions are </p>

<p>1) <strong>How can i improve the sound obtained from my speaker by making modifications in the transistor amplifier circuit?</strong></p>

<p>2) <strong>Was the less audible sound is due to the Wav file i have used?</strong></p>

<p>Kindly help me out, thanks in advance. </p>
 3917: <p>You might try an audio transformer in the circuit, following a low-pass filter to smooth the PCM signal.  Here's a picture of suitable inexpensive transformers (from <a href="http://alexnld.com/product/10pcs-1300-8-ohm-audio-transformer-ee14-transformateur-audio-pos-transformador/" rel="nofollow noreferrer">alexnld.com</a>; but similar transformers are available on Ebay etc.):</p>

<p><a href="https://i.stack.imgur.com/k6TWi.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/k6TWi.jpg" alt="1300:8 audio transformer, about 1/2&quot; on a side"></a></p>

<p>The effect of the transformer in the circuit is transforming the high voltage, high impedance output of the transistor driving circuit to the low voltage, low impedance needed at the speaker.  The impedance ratio of the transformers in the picture is 1300 Ω to 8 Ω.</p>
 4143: <p>Your amplifier arrangement is fundamentally flawed. At the moment you are "tickling" the top end of the electromagnet in the speaker - that is, you are energising it when the Arduino outputs a HIGH, and leaving it energised to de-energise by itself when the Arduino outputs a LOW.  Coupled with that the fact that a PCM file outputs PWM with a carrier frequency much higher than a tone() function (and ideally above human hearing frequencies) you end up with almost nothing happening on the speaker.</p>

<p>The classic Class A amplifier has a different arrangement:</p>



<p><img src="https://i.stack.imgur.com/8wg5z.png" alt="schematic"></p>



<p><sup><a href="/plugins/schematics?image=http%3a%2f%2fi.stack.imgur.com%2f8wg5z.png">simulate this circuit</a> &ndash; Schematic created using <a href="https://www.circuitlab.com/" rel="noreferrer">CircuitLab</a></sup></p>

<p>With that arrangement the transistor and R1 form a simple RTL inverter. Size R1 to give the output current you need for your speaker (lower resistor = more power = more heat = bigger transistor as well). R3 and C2 remove the high frequency switching from the PWM (you could also replace R3 with a suitable inductor if you want less losses from the resistor). C1 removes the DC offset from the signal to give the full swing to the speaker and prevent excess clipping and heating.</p>

<p>It's not an efficient design by any means. A better "first stage" (replacing R1 and Q1) would be a high drive output logic gate (one of the CD4000 series, since it can run from 12V). I have seen AND gates used before - this also gives the benefit that you can use the second input to the AND gate as a MUTE signal. The rest (R3, C1, C2) remains the same.</p>

<p>The advantage of using a logic chip instead of the RTL arrangement is that it gives a more efficient "Push-Pull" output which can deliver much more current with far less heat losses.</p>

<p>Instead of the speaker you could connect an audio power amplifier to the output of C1 to then drive a more powerful speaker. In this case you can most likely remove the first stage (Q1/R1/R2) and drive the RC filter directly from the Arduino.</p>
