LM386N audio amp driven with propeller
mikea
Posts: 283
I'm trying to connect this audio ic to the prop to drive an 8 ohm, .25 watt speaker. Im using a 5 volt external power supply. How do i connect to the pins on the ic? I will initially be using the gain 20. Would pin 6 be the 5 volt +, and pin 3 be from the prop? Should i have a resistor in series from the i/o pin since the voltage will be higher than 3.3 to the ic? Is Pin 2 ground from the prop? Pin 4, 5 volt ground? Looks like the gain 200 picture posted instead of the 20 gain.
Comments
https://forums.parallax.com/discussion/100750/lm368-audio-amp
That said, the LM386 still works, and you can prune some parts. Pin7 C is optional, and lowest gain has fewer parts.
Looking at the internal circuit schematic, Pins 2 & 3 show 50k in, but there are also pins 1 & 8 & 7 that could have resistor-series signal drive.
If using 2 or 3, and a AV=20 you need a divider of 1/12 from 3V and AC coupling. (3+ parts)
Or, you could experiment with ~10k direct from your P1 pin to Pin 1 or Pin8, (Gnd Pin2 & Pin 3) and scope the output.
to boost the current (& maybe voltage).
https://forums.parallax.com/discussion/114155/simple-class-d-speaker-amp-using-a-mosfet-driver
-Phil
pik33's low-noise driver
MarkT's take on class D
As mentioned, bridge tied, differential outputs are superior to the single ended output that needs the fat capactor. Furthermore, differential inputs are nice too, if nothing else, to forestall the annoying pop that can occur when starting up single ended. The Prop's duty differential mode is convenient for that. The LM386 does have a PNP differential input stage, so it appears that it could accept differential input instead of the single ended input shown in the example schematics. Not easily though, because it has a narrow +/- 0.4V common mode range centered around ground, . The modern chips (I've used the TPA6204) have a common mode range that spans almost the full power supply range. The +/- inputs can sit at Vdd/2 = 1.65V, and the amplifier can be set up with a gain of close to x1 to take advantage of the full span of pwm input.