Electronic – How to drive a speaker/microphone from a digital circuit

microphonespeakerssynthesizerwave

I’m having a hard time understanding how to use speakers or microphones. My end game here is a sequencer

I’m going to lay out what I think so that you guys can correct me and help me understand why I’m wrong.

Suppose I built a square wave generator from a Schmitt Trigger using 5 V. From what I understand, the output will fluctuate between 0 V and 5 V.

But from my extremely limited understanding of speakers, as analog components they should “rest” at 0 V and fluctuate below and above 0. But isn’t voltage relative? Couldn’t we just “say” that 2.5 V is ground, and the oscillator actually fluctuates between -2.5 V and 2.5 V? How would I “set” that?

I’ve also heard that you have to use a coupling capacitor to block the DC component. In this example – a square wave from 0 to 5 V, what’s the DC component? And how would we pick that? If I’m using an 8 ohm speaker, with a range of about 200 Hz – 20 kHz, this calculator would suggest that I should use a 200 uF cap if I want the -3 dB frequency to be at 100. Does that sound right? I’ve also seen diagrams where there’s a resistor between the negative end of the cap and ground… why?

Is 5 V even enough to drive one of those tiny 8 ohm speakers? Do I need a higher voltage? How would I go about amplifying the output if I did need a higher voltage?

If I were to turn off the oscillator, it would rest at 0v. But, as I assumed earlier, wouldn’t the speaker have to rest at the reference voltage of 2.5 V? How would I go about doing that? Or if I wanted to turn down the amplitude?

If I wanted two tones playing – two frequencies – how would I add their wave forms?

I basically have no idea how to do anything and I can’t seem to find a guide that both shows the circuit AND explains it.
I also have basically no idea how to use a mic.

Any explanations or links would be appreciated.

Best Answer

The speaker moves both ways, this is why you want it to rest at 0V. Otherwise you are only ever pushing on the speaker and never pulling on it (or vice versa). This works, but you are not using your speaker optimally.

The series capacitor with resistor to ground form a high pass filter (which blocks DC and idles at 0V). Now you can DC bias your signal so it idles at 2.5V. The high pass filter blocks the DC, so on the speaker side of the filter it is idling at 0V. This way your signal both pushes and pulls on the speaker.

To answer if 5V is enough to drive your speaker, we would first need to know how much power you are expecting. To find the RMS value of your 0-5V signal: Vrms=0.707∗5V=3.5V

And since power is voltage squared over resistance: (3.5V * 3.5V) / 8Ω = 1.53W

Your question about adding two sources should be a separate question.