Electronic – Please review the schematic design

audiodaclm386r2r

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 2×6 '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!

Best Answer

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