50mm Speaker: 8 Ohm, 1 W

Hi !

Do we need to use power amplifier with this speaker 50mm Speaker: 8 Ohm, 1 W ?

Thanks in advance.

Regards,
Raghad

Hello.

What are you intending to drive the speaker from?

- Ryan

I intend to drive it from a micro-controller AVR Atmel (EVK1100 board)

Hello.

You want to use an IO pin on an AVR? Yes, you’ll need an amplifier.

- Ryan

Hello.

I’m not sure exactly what you’re thinking of for power amplification, but you can get by with something as simple as a MOSFET. As the product page says:

Just to give you a better sense for the electronics you are working with, you should definitely not expect to be able to get a watt directly from a typical microcontroller I/O line. Rather, typical I/O lines can generally source and sink on the order of a few milliamps (AVRs I/Os are a bit better than normal and can actually handle around 40 mA, with certain additional restrictions you can find in the datasheet).

- Ben

Hi!

I am going to use an I/O pin on an AVR.
I will try to use a MOSFET with that speaker.
Is there is any risk that the speaker will be burned without using an amplifier(or MOSFET)? I just want to test it without MOSFET first but I’m afraid that I might burn it in that case.

Thanks for all the useful information :astonished:

Regards,
Raghad

The risk isn’t to the speaker, it’s to your I/O pin. If you connect it directly to that speaker, you will be trying to draw more current than the I/O pin is rated for and you could potentially burn it out. If you want to connect it directly to an I/O line for testing, you could try putting the speaker in series with a current-limiting resistor (maybe 100 - 200 Ohms), but I wouldn’t expect great results.

- Ben

Hi!

I want to play a sound file from my EVK1100 board and I am using 7w amplifier with the speaker. When i check the output of Digital to Analog converter (DAC) on oscillator , I can see the signal, but when I connect amplifier and speaker then I get a very strange sound (Not the desired sound), and I can not know what is the reason. I am seeing the signal on Oscillator but the speaker output is not correct, it looks like noise(I am not sure if it is noise), but I should get the desired sound with some noise.
Any help is appreciated.
Thanks in advance.

Regards,
Raghad

Can you post some oscilloscope screenshots of your amplifier input and output with the speaker disconnected?

- Ben

Hi Ben !
I can not get the screenshots from oscilloscope because there is no way to connect oscilloscope to computer!!!
I am using PWM to output the audio [DAC channel through PWM]. I can get a pwm signal on oscilloscope but when i connect to amplifier and speaker then I get nothing but that sound(Like a noise). I have an amplified signal from the amplifier when I check on oscilloscope[Too much amplified that I can not understand anything from it ]. Is there any chance that my clock settings and sample rate are not correct and it lead to that problem??
How I can know the exact clock settings and the required sample rate for the program?? The sound that I want to play is 8kHz and 8 bit mono.

Thanks in advance.

/Raghad

Given that you have an oscilloscope, you should be able to debug this fairly easily yourself by looking at the signal you are providing to the amplifier and looking at the signal that the amplifier is providing the speaker. Can’t you verify your clock rate using the scope? And what do you mean that the signal is “too much amplified” to understand anything from it? Can you just use a camera to take some clear pictures of your oscilloscope screen and post those here?

By the way, what specifically are you using for your amplifier and how do you have it connected to everything? Can you just use a MOSFET like I originally suggested? I suspect you’re not using an appropriate part (or not using it properly).

- Ben

Now I can not get any signal form my DAC channel!!! I don’t know what is the exact problem. Since I am new to this field then I did not know that I should store the haxadecimal values for the .wave file in memory. Now I have a better understanding for this , so I am using PDCA(Peripheral Direct memory controller ) for storing the values of hexadecimal, but still I can not get any sinewave from DAC channel on the board!!! I have contacted atmel to know what is the problem, and they said that: " The DAC on the board is not intended for speakers or headphones but it can be used for that purpose if I use an amplifier and low pass filter", but then they said that the amplifier I am using should be compatible with the MCU. So I checked the datasheet for the amplifier and there is nothing mentioned about if it is compatible with MCU. Any help would be really appreciated!!

/Raghad

I think you should do some research on audio amplifier circuits. Sparkfun’s audio amplifier kit seems like it might be a good place to start, but please note that I have no experience with this particular kit.

- Ben

Thank you, but I have ordered this DAC board sparkfun.com/products/8736 and I hope I can make it work through I2C. The important thing is to get a sound from it. This is a part of a project and my goal is to get a sound, if I need amplifier then I may use the one I already have and if it doesn’t work then I can order the amplifier from sparkfun. I wish I get sound soon.
Thanks Ben :wink:

I do not expect that DAC to be able to drive that speaker any more than your MCU’s DAC could. You will still need an external amplifier.

By the way, if the goal of your project is just to “get sound”, then I think you’re going a bit overboard with the DACs and amplifiers. If you just want basic notes, you can simply use a MOSFET controlled by a PWM output from your MCU to drive the speaker.

- Ben

Hi !

I have used pwm output with mosfet to the speaker. I am able to get some notes. But I want a Miaw sound that is of .wav format. I am converting that .wav file to hexadecimal values using winhex program. Is it possible to get that Miaw sound through pwm output, or pwm output is used only for basic sound notes?
My .wav file is 8 bit, 8 KHz mono.
what type of sound data should I pass to pwm? Hexadecimal or binary ? and is there any specific program to do that?

Any help would be appreciated
Thanks in advance.
/Raghad

and is it necessary to use timer interrupt for the generation of PWM??

/Raghad

I am not familiar with the format of .wav files, so I can’t really help you there, though I suspect it’s not hard to find some information if you google around. The PWM frequency will determine the frequency of the sound the speaker plays, and the PWM duty cycle will give you some control over the speaker volume. Therefore, you need to find a way to extract frequencies as a function of time and use them to set the PWM frequency appropriately. Using a hardware PWM output is generally the easiest way to get a PWM, though you can also use a timer interrupt or even just generate it entirely in software.

This question does not make sense, at least not in the context of any information you’ve provided so far about your system.

- Ben