1
\$\begingroup\$

This is my first design, a 4-Bit stereo DAC with LM386 amplifier. I'm using it to interface with my FPGA eval board which doesn't have any audio connector. My board uses a 2x6 'PMOD' connector. My purpose is to create a stereo synthesizer which outputs square, triangle, sawtooth, and arbitrary 4-bit samples. Since each PMOD has 8 data pins, this works out great for 2 channels.

DAC

Rationale/Explanation:

*All parts are ones I currently own.

*FPGA outputs are 3.3V logic.

  1. Pins 1 and 2 on the connector are VCC pins on the PMOD connector and are left floating as they are unused. Pins 3 and 4 are ground pins on the PMOD connector. Pins 5,7,9,11 are LSB to MSB data pins for right channel. Pins 6,8,10,12 are LSB to MSB data pins for left channel.

  2. I'm using an R-2R DAC for simplicity and availability of components. Since my resistors are 1% tolerance and this is just a 4-bit DAC, small inaccuracies shouldn't cause much trouble.

  3. 68 Ohm resistor before LM386 because the maximum recommended input voltage is 400mV. When all bits are high, the output voltage is ~3.10V. Output impedance of R-2R DAC is equal to R. Using a voltage divider, 3.10(68/510+68) = ~360mV. It will run at a constant output with external speakers controlling the volume.

  4. Using standard gain of 20, therefore pins 1,7,8 are floating.

  5. Both amplifiers working with single 9V battery as power source.

  6. 47nF capacitor and 10 ohm resistor as snubber circuit to prevent high frequency oscillations.

  7. 220uF capacitor to remove any DC component from output.

Thank you!

\$\endgroup\$
  • \$\begingroup\$ Is this a design/schematic review site? \$\endgroup\$ – Alfred Centauri May 21 '17 at 2:15
  • \$\begingroup\$ Item 6 is typically referred to as a zobel network, I would double check you'll get the full supply swing on the output with a dc coupled input that never goes negative. \$\endgroup\$ – sstobbe May 21 '17 at 2:29
  • \$\begingroup\$ No design can be reviewed without specs and tolerances. e.g. power source, load impedance, power out, THD, BW I really hope it is not 8 ohm speakers from a 9V battery \$\endgroup\$ – Sunnyskyguy EE75 May 21 '17 at 4:07
  • \$\begingroup\$ One thing that I see is that you have the signals DC coupled to the 386s. You need to AC couple the signals. The + input to the 386 has a DC bias on it. If you DC couple the input, you mess with the bias and the output will be distorted. \$\endgroup\$ – JRE May 21 '17 at 8:46
2
\$\begingroup\$

68 Ohm resistor before LM386 because the maximum recommended input voltage is 400mV. When all bits are high, the output voltage is ~3.10V. Output impedance of R-2R DAC is equal to R. Using a voltage divider, 3.10(68/510+68) = ~360mV.

The LM386 is supposed to work with AC input. Your DAC output is DC, so you will only get half the expected output voltage swing. You should AC couple the signal to the LM386.

With 4 bits you only have 16 steps, which will be very audible. You can reduce stepping noise by adding a low pass filter. Since the DAC produces 3.1Vpp but you only need ~360mV, the filter can be a simple passive type with high insertion loss.

Something like this:-

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
  • \$\begingroup\$ Thank you! Since my DAC output is 3.1Vpp, the DC offset is ~1.55V, so after the rest of my current circuitry the LM386 would only operate on voltages from 0-360mV, hence half the output voltage swing. With AC coupling, the DC offset becomes zero, and with the rest of the external circuitry, you can make the signal ~720mV pp from -360mV to 360mV, thus operating in the full range of the LM386, so you can get the full expected voltage swing, correct? \$\endgroup\$ – supershirobon May 22 '17 at 11:50
  • \$\begingroup\$ On a 9V supply the LM386's maximum peak-to-peak output voltage is 7V into a 16 Ohm load. So with a voltage gain of 20 the peak-to-peak input voltage only needs to be 7V/20 = 350mV. \$\endgroup\$ – Bruce Abbott May 22 '17 at 18:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.