driving a speaker

Thread Starter

nearownkira

Joined Feb 19, 2008
20
is a 8051 controller pin output is enough to drive a 8ohm 2 W speaker, do u need additional resistor to pull up or transistor to drive it.
 

mik3

Joined Feb 4, 2008
4,843
is a 8051 controller pin output is enough to drive a 8ohm 2 W speaker, do u need additional resistor to pull up or transistor to drive it.
i dont think a microcontroller can drive a speaker directly. make a small amplifier and connect it to the 8051 to drive the speaker.
 

beenthere

Joined Apr 20, 2004
15,819
In addition to the above, the 8051's output pin is only capable of two states, a logic high and a logic low. You may need some additional intervening device like a digital to analog converter to reproduce sound.
 

mik3

Joined Feb 4, 2008
4,843
In addition to the above, the 8051's output pin is only capable of two states, a logic high and a logic low. You may need some additional intervening device like a digital to analog converter to reproduce sound.
i dont know the microcontroller but maybe it has an analogue output so it will be possible to connect the amplifier directly
 

bloguetronica

Joined Apr 27, 2007
1,541
You might fry the 8051 by connecting a speaker, with or without decoupling capacitor. I think you might need a DAC to make sound (unless you want a square wave output).
 

Thread Starter

nearownkira

Joined Feb 19, 2008
20
In addition to the above, the 8051's output pin is only capable of two states, a logic high and a logic low. You may need some additional intervening device like a digital to analog converter to reproduce sound.

yeah, you are right. I actually write a program using timer to create tone for my project,just some simple tone, no need to use a ADC.
 

Audioguru

Joined Dec 20, 2007
11,248
An 8 ohm speaker draws a high current. It can produce most audio frequencies.
A piezo speaker draws a very low current. It produces only high audio frequencies.

The max allowed output current from a PIC is 25mA. It will try to feed 60mA to an 8 ohm speaker which will cause the PIC to overheat.
A 25mA peak square-wave into an 8 ohm speaker is a power of only 200mW. It will sound like a low level buzzer.
 

RmACK

Joined Nov 23, 2007
54
A standard dynamic speaker has a magnet and a coil of wire (electromagnet). Current through the coil makes it move in relation to the fixed magnet. The cone is physically connected to the coil so moves and makes sound. A piezo speaker uses a piece of piezoelectric material. This type of material is used in ignitors on gas cookers because it is essentially two rocks that when rubbed together make a high voltage. The piezo speaker is more or less this in reverse. I suspect they operate on the principle of capacitive plates being moved in relation to each other by an electrostatic field but cannot be sure. The important thing here is that the impedance of a piezo speaker is much higher than the 8 ohms of a typical coil & magnet speaker. They are often used in toys to drive them from a micro like you are trying to do.
 
Top