Maker Pro
Maker Pro

help with coupling components

jrb

Dec 22, 2012
3
Joined
Dec 22, 2012
Messages
3
I am fairly new to electronics and while spending a lot of time on various websites getting myself educated, I have yet to find a place that explains how to connect circuit components. Transistors and diodes ok, but ICS have me and the data sheets don't seem to help much when it comes to an actual circuit.

I have a basic knowledge, but in this case I am connecting an ATTiny85 AVR which is programmed to generate pulses being fed into an TDA7052 audio amplifier. Will just a capacitor work, and if so how do I choose a value. The output from ATTiny85 pin 6 is a 5 volt square wave. The TDA7052 has a fixed gain of 40db and an input impedance of 100k. Link to TDA7052 data sheet is here ftp://ftp.elektroda.net/pub/Aplikacje/ANALOG/TDA7052.PDF. The output of the ATTiny85 pin 6 is max 250ma. I would sincerely appreciate any advice in this matter as to any tutorials on circuit design and specifically any recommendation to couple the devices in the attached circuit. Thanks in advance.
 

Attachments

  • test.jpg
    test.jpg
    52.8 KB · Views: 171

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Yes, a capacitor there is probably appropriate. The value depends on the frequency of your signal.

If you have a capacitor id between 0,1uF and 1uF, I'd try that first.
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
Hi jrb and welcome to the forums :)

The diagram on page 6 of the TDA7052 data sheet shows you how to use the device. See the two decoupling capacitors across the supply rails? You should have those in your design; they're needed for stability.

That diagram also shows you how to drive the input of the IC. Pin 3 should be tied to ground, as you have done, and pin 2 should be BIASED at ground voltage, using a resistor from pin 2 to ground. This resistor sets the DC voltage on pin 2 to 0V. You then need to couple the signal into pin 2 using a capacitor, which is called a coupling or DC blocking capacitor.

Actually that diagram is not entirely clear. The resistor from pin 2 to ground is labelled "RS = 5k ohms" which implies it's not a resistor; it's the equivalent resistance of the signal that's driving the amplifier. But it seems to imply that there should be a DC path from pin 2 to ground, so let's stick with that.

You can calculate the value of the capacitor from the minimum frequency you want to reproduce, using the formula for capacitive reactance. In this case, you'll be fine with a capacitor between 0.1 uF and 1 uF as Steve suggests. If you want me to explain how to calculate the value, let me know.

Finally, you will need to attenuate the signal from your micro. This signal will be a squarewave with an amplitude of 5V peak to peak. This is FAR too much for that amplifier, and will cause it to clip. Of course, a squarewave is already "clipped", so this won't make any difference to the sound (unless it causes a problem with the IC's protection circuitry, or upsets its operation in some other way), but the volume will be at maximum.

Here are the quick calculations I used to work out how much attenuation you will need.

Maximum output voltage = 10V pk-pk approx
Gain = 40 dB = voltage ratio of 100
Maximum input voltage = 100 mV pk-pk
Attenuation from 5V pk-pk = 50
With 10k log volume potentiometer, series resistor = 490k use 470k

Here's the circuit for what you need.

MCU output -----| |---------\/\/\/\/-------\/\/\/\/\/\/-------0V
. . . . . . . . . . . 0.1uF . . 470k .. . . . . ^ 10k potentiometer or trimpot
. . . . . . . . . . . . . . . . . . . . . . . . . . . .|
. . . . . . . . . . . . . . . . . . . . . . . . . . . .------ pin 2 of TDA7052

The micro's output feeds through a 0.1 uF coupling capacitor and a 470k series resistor into the top end of a 10k potentiometer or trimpot that sets the output volume. If you use a potentiometer, use a log (logarithmic) one, so the volume will vary smoothly. If you use a trimpot, you'll have to use a linear one, and the volume adjustment will have the wrong "taper" (look up log taper or audio taper on wikipedia).

The bottom end of the pot or trimpot goes to ground, i.e. a no-signal point, and the wiper goes straight to pin 2 of the amplifier IC. The pot/trimpot provides the DC bias of 0V on pin 2.

Are you intending to drive a loudspeaker from the amplifier? I ask because you have an LED and resistor connected across the output, and there's a 2-pin connector but no indication of what it's supposed to connect to.
 

jrb

Dec 22, 2012
3
Joined
Dec 22, 2012
Messages
3
Thanks!!

Hi KrisBlueNZ,

Thank you for your detailed reply. After all the time I have spent trying to figure this out, in a few paragraphs you have managed to help me understand a lot about how all this works. It is sincerely appreciated. I'll give your recommendations a try and let you know how it all works out, most likely after Christmas. Happy holidays and again, thank you for your help.
John
 

jrb

Dec 22, 2012
3
Joined
Dec 22, 2012
Messages
3
Just to follow up, I used your calculations and everything worked perfectly. Thanks again.
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
That's great jrb. Thanks for posting a follow-up.
 
Top