Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/07/03 01:38
Read: times


 
#60081 - 2 Methodes + Schematics
Responding to: ???'s previous message
Hallo Shazad,

if I understood you correctly, then you want to output stored message via loudspeaker or beep tones from microcontroller?

Then, I recommend you the following two alternatives:

1. You could output the beep tones from microcontroller via separate beeper, piezo, buzzer or similar. No relay switching is needed, then. (Don't underestimate power of modern piezos! They can produce very loud and distinct beep tones.)

2. If you want to output both sounds via same loudspeaker introduce of additional analog circuitry might help: By using simple passive voltage adder in combination with LM386 power amplifier, you can also omit relay switching.

Below, there's a schematic demonstrating both methodes:



Discussion on 'Methode 1':
If you connect loudspeaker to only one output of ISD1212, then you must do something to suppress DC output voltage at 'S-' pin! Aluminium electrolytic capacitor of 220µF/6V3 removes DC voltage from loudspeaker and introduces a corner frequency of about 1 / 2 / pi / 8Ohm / 220µF = 90Hz. Means, only frequencies above 90Hz can be transmitted, without relevant dampening. This is pretty good for vocal applications, more than needed.
Piezo is driven by NMOS transistor BS170, 2N7002 or similar. If micro outputs logical high state, NMOS transistor is turning-on and current flows through piezo. Current limiting resistor helps to limit output power. When using a good piezo, you can heavily increase current limiting resistor.
Diode is only necessary, when a beeper is used, which contains a coil, instead of piezo crystal. Then, diode acts like a free wheeling diode, protecting your circuit against induced voltage.
4k7 resistor at gate of BS170 is optional. It helps to minimze ground noise, when NMOS Fet is turned-on or off. Because of it's rather high input capacitance (gate to source) every fast edge reaching gate would cause a spike current to flow through gate to source capacitance to ground and back to microcontroller. 4k7 resistor heavily limits this spike current and helps you to keep ground routing quiet.
Don't forget to connect 100nF power supply decoupling capacitor directly at beeper terminal (not shown in schematic). Distance between ground terminal of this decoupling capacitor and source pin of NMOS Fet should be as minimal as possible. This also greatly reduces ground noise, especially when current through beeper is rather high.

Discussion on 'Methode 2':
LM386 is capable of driving your 8Ohm loaudspeaker. At its output there will also be a high DC voltage, about Vcc/2. 220µF/6V3 aluminium electrolytic capacitor helps to remove this DC voltage from loudspeaker.
At output you will also find this '47nF + 10R' combination. It's called 'Zobel-network' and is needed for stability.
LM386 provides a voltage gain of '20'. Because of this, signal coming from ISD1212 must be decreased by about the same factor. This is done with 43k and 2k2 resitors. 100nF capacitor near 43k resistor removes permanent DC voltage, which is present at 'S-' ouptut of ISD1212. Corner frequency introduced by this RC filter (43k + 2k2 and 100nF) is about 35Hz.
Interfacing microcontroller is done by 4n7 capacitor and 150k..1M resistor. Signal amplitude of beep tones at loudspeaker can be controlled by 150k..1M resistor. Normally, beep tones are not as loud as voice. Then, this resistor should be greater than 150kOhm.
4n7 capacitor is rather small. But beep tones normally are of higher frequencies. In combination with 150kOhm corner frequency is about 220Hz. A small time constant is helpful here, because it minimizes the influence of unavoidable DC component of signal coming from micro. Keep in mind, that port pin of micro will not show permanent DC voltage of Vcc/2! So, when beep tone begins, signal is highly asymmetrical, showing big DC component. Then, after the time 5 x 150k x 4n7 sec = 3.5msec 4n7 capacitor has charged to about Vcc/2 and signal has become symmetrically. Danger of overranging input of LM386 is minimal again.

All given values of parts are for experimenting purpose. Means, you must optimize them by yourself.
Also, simple passive voltage adder methode suffers a bit from output drive capability of sources, means port pin of microcontroller and ISD1212. And it's just the microcontroller which can introduce some problems: If output impedance varies with signal voltage, additional distortion can be introduced in the moment, when beep tones are produced. Increase of 150k..1M resistor will minimize this error. Also, if you can program output characteristics of port pin, then choose push-pull-configuration. In this case introduce of additional distortion is completely eliminated. Another way can be the introduce of additional low ohmic pull-up resistor at port pin, which is driving LM386.
It's on you to decide, whether any additional distortion can be accepted or not. I guess, there won't be anyone who could notice it...

If additional distortion cannot be tolerated (a case which is very unprobable!), then, not the micro's port pin directly should drive LM386, but an inserted CMOS inverter gate (CD4000, 74HCMOS or similar). Output impedance of such an inverter gate shows much less fluctuation of output impedance versus signal voltage than typical quasi-bidirectional output of microcontroller. Introduce of additional distortion will be highly minimized, then.

Good luck,
Kai

List of 13 messages in thread
TopicAuthorDate
need help in circuit adjustment.....            01/01/70 00:00      
   RE: need help in circuit adjustment.....            01/01/70 00:00      
   RE: need help in circuit adjustment.....            01/01/70 00:00      
   RE: need help in circuit adjustment.....            01/01/70 00:00      
      RE: Michael            01/01/70 00:00      
         RE: Michael            01/01/70 00:00      
      RE: need help in circuit adjustment.....            01/01/70 00:00      
   2 Methodes + Schematics            01/01/70 00:00      
      RE: 2 Methodes + Schematics            01/01/70 00:00      
         Muting needed?            01/01/70 00:00      
            RE: Muting needed?            01/01/70 00:00      
               RE: Muting needed?            01/01/70 00:00      
                  RE: Kai Michael            01/01/70 00:00      

Back to Subject List