I am using the 16 bit audio DAC from dsPIC33FJ128GP802 and I am having a lot of noise, even if the output value is held constant. I have obtained better results in the past using 8 bit PWM from an ATmega328. I have already checked that the power supply is properly filtered, also that the analog circuitry is properly working without adding any noise. Also the PCB was carefully designed and routed. All tests I have made indicate that the noise is coming from the DAC.

Searching on Microchip's forum I found that many people had the same problem in the past, see this link and links therein. I have found no one saying "this was the problem, it is solved". So I came to think that this DAC, although 16 bit, is not useful for audio applications.

Has any one here have used it without getting tons of noise?


Here is the schematic.

Here is the layout (bottom layer). The top layer is a GND plane.

Some tests I have made:

  1. Set the DAC output register to a constant value. There is no audio going out, but the noise remains exactly the same.
  2. Turn off the DAC module. Noise disappears.
  3. Connect things as in this link (while keeping DAC module on), I get good audio quality and noise disappears.

The noise sounds white. Unfortunately I have no instruments to characterize it further. I have an old analog oscilloscope and an audio amplifier.


Here there is the waveform, the spectrogram and the FFT of the background noise with and without the audio passing through the MCU. This was recorded using a cellphone recording the line input electrically connected to the output of my circuit.


Here is an audio sample of what I am getting. The first half is with the signal passing through the microcontroller, the second half (after the "clak") is without the microcontroller.

  • \$\begingroup\$ Noise will always be present - how much is another thing - and talking about tons of noise is pointless. \$\endgroup\$
    – Andy aka
    May 7, 2018 at 11:29
  • \$\begingroup\$ quantify the noise, compare it to your signal and express it in dB. Then we can talk about increasing the Signal to Noise ratio \$\endgroup\$ May 7, 2018 at 11:36
  • 1
    \$\begingroup\$ we're going to need schematic, layout, scope shot and FFT of noise on dac output \$\endgroup\$
    – bobflux
    May 7, 2018 at 12:04
  • 1
    \$\begingroup\$ For example it could be the noise on the analog supply voltage and ground, or output diff amp not working, or anything else really... impossible to know without more info. \$\endgroup\$
    – bobflux
    May 7, 2018 at 12:33
  • \$\begingroup\$ Hello, I have added more information. I would like to characterize the noise but I have not the instruments to do that. \$\endgroup\$
    – user171780
    May 7, 2018 at 12:54

1 Answer 1


Quick review:

Hypothesis: noise on AVDD.

LC ringing? If you want to do some passive lowpass filtering, and use separate regulators for analog and digital, the place to do it is before the regulator. L1 will create a LC circuit with C2 which may resonate and create lots of noise on AVDD. This depends on the ESR of L1 and the ESR of both caps on each side of L1. If checking with a scope reveals ringing on AVDD, then L1 is the problem.

Unstable LDO? AP1117 datasheet says "When using Aluminum electrolytic it is still recommended to also use a 1µF MLCC in parallel." Here we have 100nF only. Regulator may be marginally stable or ring.

Fix for previous 2 issues: replace L1 with wire. Remove C12 (redundant, we have C2 already). Replace C2 with largest value ceramic that will fit, at least 1µF according to AP1117 datasheet. Check ESR of 100µF cap in capacitor datasheet, compare with LDO requirements.

If you want to check if your LDO is stable, connect the output to a function generator, square wave, 0-3.3V, via a resistor of say about 100 ohms. This will cause a current of 0-33mA to flow and you will see the regulator's step response on the scope. Compare to step responses in datasheet, which are clean. If it wiggles or rings then you have a problem.

1.65V should be AVDD divided by two, not the presumably noisy input voltage going through a divider.

MCP6002 works on 5V max, schematic shows +9V supply.


Here is the layout (bottom layer). The top layer is a GND plane.

There are cutouts in the ground polygon pours on bottom layer, are there also cutouts on toplayer or is it a continuous ground plane?

  • \$\begingroup\$ Thanks for your answer. I have discarded power supply issues based on test number 3. Also the MCP6002 is being powered from the A3.3V rail (there was an error in the schem, I have just fixed it). With respect to the layout, the top layer is a continuous ground plane. I have followed the guidelines in this article: hottconsultants.com/pdf_files/june2001pcd_mixedsignal.pdf \$\endgroup\$
    – user171780
    May 7, 2018 at 14:00
  • \$\begingroup\$ ok, test #3 rules out the opamps being the source of the noise, but not the dac power supply. \$\endgroup\$
    – bobflux
    May 7, 2018 at 14:03
  • \$\begingroup\$ Maybe because of the power supply rejection ratio of the opamp the noise is not present in test number 2, but it is present in the DAC? I will make more tests and comment results. \$\endgroup\$
    – user171780
    May 7, 2018 at 15:17
  • \$\begingroup\$ I have made more tests on what you have suggested. In this link there are some pictures: dropbox.com/s/3dykz8mek3dl7q4/… \$\endgroup\$
    – user171780
    May 7, 2018 at 20:11
  • \$\begingroup\$ You were right about the stability of the regulator although the audible noise remains the same no matter what I do. \$\endgroup\$
    – user171780
    May 7, 2018 at 20:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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