I want to connect 2 speakers of 8 ohm to 2 (different) pins of the Arduino. However, for this example one speaker is enough.
I came across a lot of circuits without or with a single resistor which on other foras was not adviced, where one pin directly controls the speaker. This way (assuming 0,02A is the max recommended output for a pin), the resulting power is like 0.02A * 5V = 0.1W.
My speaker is 0.5W (8 ohm) and I want to hear how hard that is :-)
But it seems I have to use something with a transistor to isolate the path. I came across this circuit:
However, when I would calculate the values or R1 and R2 myself I would get:
R2: Afaik, the recommended output for a pin is 0.02 A. This means: V = I * R <=> 5 = 0.02 * R <=> R = 5 / 0.02 = 250Ω -> 270Ω (nearest higher value)
R1: my speaker is 0.5W, 8Ω. P = V * I <=> 0.5 = 5 * I <=> I = 0.1A V = I * R <=> 5 = 0.1 * R => R = 50Ω, which is Rtotal below: Rtotal = Rspeaker + R1 <=> R1 = Rtotal - Rspeaker = 50 - 8 = 42Ω => 47Ω (nearest higher value)
This result in V = I * R <=> 5 = I * (R1 + Rspeaker) <=> I = 5 / (47 + 8) = 5 / 55 = 0.0909 A P = V * I = 5 * 0.0909 = 0.4545 W (so I lose 'just' 10%)
Are my calculations correct, and I assume the +5V pin of the Arduino will not have trouble giving 90.9 mA ?
Update:
I have some more questions regarding the accepted answer:
- Would it mean if I use 7 transistors, all my voltages will be used for transistors and nothing is left (7 times 0.7 V which is approx. 5 V?) **** Answer = No, a transistor will add Voltage so 7*0.7= 4.9Volt added ***
- I assume I can better use as less as possible to 'switch' a transistor? * Answer = No, 0.7-Volt required, 5V is fine depending on the rating of the transducer (but enough to be able to switch it) ? You say R2 can be smaller, but I can better make it higher not to waist voltage? Answer = Changing the resistor will change the volume, look at the wattage rating for the speaker *
- I already built the circuit below (but with a BC547 transistor) ... using a 0,25W R1 resistor. I guess I was lucky (?) * Answer = No, luck has no part, that transistor would work fine within the parameters used, look at the datasheet *
- Regarding the base pin of the transistor ... by making the resistor higher (see item 2 above) ... that would help also not to burn the transistor pin? * Answer = No... please view the datasheet and ratings for the hw *
- Again about the transistor, so I should make the resistor R2 in such a way that the gain times the mA is driving the speaker? (need to calculate this again) * Answer No, and I think you are thinking of "Gain" the wrong way, "Gain" is a "DB" measure and is for how well AC is transferred between antenna. *
- You say to remove R1 completely ... but than I expect V = I * R <=> 5 = I * 8 => I = 0.625A ... P = V * I = 5 * 0,625 = 3.1W which blows the speaker? * Answer = Wrong way of looking at the 8-Ohm Impedance rating, Impedance is AC *