Speakers connected to a Picaxe

Manual 3 shows a speaker connected to the Picaxe with a 10uF capacitor but there is no mention of the speaker size (impedance, power)
I have 2 speakers, one is 2W 8 Ohms, the other is .1W 8 Ohms. My question is:
Can either speaker be connected as shown on the manual without any additional components?
 

1968neil

Senior Member
32 ohms is about the ideal value, the PICAXE will drive it but to honest its better to use and amplifier of some sort.
Anything any larger will eventually damage the chip
 

premelec

Senior Member
I have found that an old telephone earpiece unit works pretty well - in any case use the capacitor coupling...
 

moxhamj

New Member
For a really cheap test, a 100 ohm resistor in series will work. It is not ideal, in that the travel of the speaker is only half what it would be with a capacitor, and the volume is low, but at least you can hear something and it won't harm the picaxe.
 

John West

Senior Member
The reason for using the capacitor is to ensure that DC doesn't sit on the speaker coil when the PICAXE is not actually sending any audio. That amount of current flow might possibly damage a very small speaker - and it will very likely kill the PICAXE speaker pin in short order.

An 8 Ohm speaker that is connected to a PICAXE with its output sitting at 5 Volts will attempt to draw a constant 625 mA. That's easily high enough to pop a PICAXE output. Just one more reason to run experiments from the AA battery pack and try to keep in the magic smoke.

Be sure to connect away from ground the + side of any polarized electrolytic cap used for this purpose. They will likely last longer that way.

On one of my projects I run a tiny 16 Ohm speaker with a 330 Ohm resistor in series. It's just loud enough to do what I want and yet it can't harm the PICAXE even if the speaker wires short out. With that much resistance in line I'm not concerned about what voltage the PICAXE speaker pin is at when the speaker is not in use. It works and it's safe - but that's not the best design practice. A series capacitor is always a good idea to block unwanted DC to the speaker from the PICAXE chip.
 

westaust55

Moderator
Manual 3 shows a speaker connected to the Picaxe with a 10uF capacitor but there is no mention of the speaker size (impedance, power)
I have 2 speakers, one is 2W 8 Ohms, the other is .1W 8 Ohms. My question is:
Can either speaker be connected as shown on the manual without any additional components?
This very same question was raised quite recently.

from manual 2 page 239:
A 40 or 80 ohm speaker can be connected with two capacitors as shown.
For an 8 ohm speaker use a combination of the speaker and a 33R resistor in series (to generate a total resistance of 41R).
[/quote
 

Dippy

Moderator
The whole idea is that you have an impedance such that the average current isn't too much for the PICAXE o/p driver.

My Manual 3 show 10uF (pos to PICAXE pin) in series with a speaker marked 40R.

Obviously with an inductive device all this can get complicated if you want to get carried away, so don't.

So, consider that as your MINIMUM requirement wrt impedance and output load.

Therefore if your speaker is too loud then add some ohms with a small resistor.
If it is too quiet then you will have to amplify it, using electronics and/or a clever enclosure.
I realise that's not Rocket Science, but so many people forget about it.
And if you have a spare half-hour, have a read up about using capacitors/resistors in filter circuits.


A couple of example circuits from other places are shown below.
Like everything , once you have sussed out the reason 'why' something is required then you can relax about your design.


Let me just add one note; 10 years ago when I tried a Stamp I followed the Parallax example circuit (the bottom one below). My Stamp went bonkers. Not the Stamp's fault. It was my particular cheapo speaker. It was bunging lots of back emf into pin. A small series resistor cured it.
Thank goodness I had a 'scope and didn't have to wait 3 weeks for a forum reply.:)
 

Attachments

BeanieBots

Moderator
Just one extra little bit of info.
In general, with this arrangement, the higher the speaker resistance, the louder it will be. That is because you can only draw a maximum current from the PICAXE and you want to convert as much of that current as possible into sound, hence, you want most of the volt-drop to be across the speaker and not across the series resistor.
Power = I^2*R
I is fixed at 20mA max, so higher R = more power from speaker.
(up to a limit of 250R but you don't often find speakers as high as that).
 
Top