0
\$\begingroup\$

I'm working on a circuit that feeds a microphone into the ADC of the STM32F4 Discovery and then outputs that exact signal out of the microcontroller's DAC and then to a headphone jack.

I am able to hear everything that the microphone picks up, but I am getting a humming noise when listening to the circuit. The humming noise is present no matter if the microphone is attached or not. I've done the following to try and isolate the problem:

  • Connected the ADC pin to the DAC pin (still hums)
  • Disconnected the ADC pin (still hums)
  • Disconnected the DAC pin (no hum)
  • Grounded ADC pin (no hum)

I'm a little confused as to the what the problem could be. Judging by the tests I would think the problem would be in the Sallen-Key Filters after the DAC, but I have no idea how to alleviate it.

schematic

simulate this circuit – Schematic created using CircuitLab

Are there any glaring problems with the circuit above that would cause the hum?

EDIT: Sorry the 100 Ohm Resistor R5 is supposed to be 100k Ohms

\$\endgroup\$
7
  • \$\begingroup\$ How large are the filter capacitors on your 3.3volt and 5 volt power feeds? Along with a .1uF cap to ground you should have a 100 to 470uF cap from each power feed to ground, as close to the IC's as possible. That is a hint, not an answer, as we do not know the circuit layout and how the ground plane is done. \$\endgroup\$
    – user105652
    Commented Jun 14, 2016 at 2:56
  • \$\begingroup\$ What are you powering this circuit with? \$\endgroup\$ Commented Jun 14, 2016 at 2:58
  • \$\begingroup\$ The circuit is receiving power from the STM32F4 Discovery Board which is receiving power from USB. I have a 4.7uF capacitor going from 5V to GND and another one on 3.3V to GND. \$\endgroup\$
    – NoahPena7
    Commented Jun 14, 2016 at 3:04
  • \$\begingroup\$ I'm surprised you hear anything. Or is R5 supposed to be 100k rather than 100? If it is 100k, then maybe the problem is high gain at low frequencies. Add a high-pass between op-amp and ADC. Also, I would suggest re-arranging to use non-inverting topology on the mic amp. Right now, your input impedance is only 1k. I believe that is attenuating your mic signal. \$\endgroup\$
    – user57037
    Commented Jun 14, 2016 at 3:05
  • \$\begingroup\$ But if you use a larger resistor at R2, then you need a larger resistor at R5 also, and it starts to get kind of ridiculous. \$\endgroup\$
    – user57037
    Commented Jun 14, 2016 at 3:13

1 Answer 1

2
\$\begingroup\$

The power supply rejection is effectively -6dB because of R3/R4. Place a capacitor across R4 to filter the AC voltage from the divider.

\$\endgroup\$
5
  • \$\begingroup\$ and, if you still have hum after doing these two improvements, then you might have to get out the aluminum foil and look into shielding. \$\endgroup\$ Commented Jun 14, 2016 at 3:09
  • \$\begingroup\$ I've tried both suggestions apart from the high pass and non-inverting on the mic amp (which i'll get to), but the sound still persists. How would I go about shielding? \$\endgroup\$
    – NoahPena7
    Commented Jun 14, 2016 at 3:52
  • \$\begingroup\$ Do you have supply bypass caps near the opamps? The OPA datasheet should have examples on how to properly use ceramic bypass capacitors. \$\endgroup\$ Commented Jun 14, 2016 at 8:23
  • \$\begingroup\$ I added 100nF bypass capacitors to the opamps and I noticed a slight noise reduction. I also changed capacitor values over R4 and that helped as well. While I was doing so, I noticed that if I nudge some of the wires around that the noise would be gone, and I would still be able to hear. I replaced the bread boarding cables with some regular wire and the noise was gone! Thank you! \$\endgroup\$
    – NoahPena7
    Commented Jun 14, 2016 at 23:51
  • \$\begingroup\$ Good. Depending on the electret mic's noise figure, it might be worthwile to replace the LM358 opamp for one with a lower input voltage noise. Also, considering that the LM358 gain-bandwidth product is 1.1MHz, in your circuit, because of the gain of 100, you'll be left with 11kHz of bandwidth. \$\endgroup\$ Commented Jun 15, 2016 at 10:31

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.