3

I am sure everyone trying to record sound with a Raspberry Pi has experienced a lot of issues with noise pollution. Although there is any number threads on various forum adressing this I have yet to find any conclusive and comprehensive answers. I have made some basic tests and I thought I would pose the question here to find other ways to improve sound recording.

So far I have traced the main course of noise to the following:

  1. Magnetic / Radio interference (EMI / RFI). This is caused by cables acting like recieving antennas and pick up radio frequencies or magnetic induction from nearby electrical cables and radio sources (wifi, fans in computers, TVs & screens, even the PI's own wifi). This is typically low frequency buzzing (50-150 HZ), usually associated with powercables, and higher frequency clicking and ticking from other electric equipment like wifi or electrical motors. The best cure I have found so far is to shield the entire soundcard and microphone with tin foil and ground it to the USB ground (the USB contact shield). As seen in picture below it reduces the lower frequencies with about 10db, the most marked reduction is below 1500 hz. I have also found it reduces interference by wifi.

(please note that the scale is different on the two pictures, so it looks like the unshielded has less noise but in fact it is more ) enter image description here enter image description here

  1. The USB soundcard itself. Some cheaper USB soundcards seem to generate their own noise frequencies. I have commonly had a cheaper USB cards give me strange spikes in noise at given frequencies, see picture below. I have tried several different usb soundcards and some will produce this strange z-wave. It sounds like a high pitched whining that drowns other sounds. Go with a known brand of USB soundcard! enter image description here

  2. Ground-loops is generally not a problem unless your USB sound card or your microphone is powered seperately. If the power goes RPI-soundcard-Microphone, then so does the ground and a loop is unlikely. Please correct if wrong

  3. The PSU and Pi itself. Once you have removed the outside sources of noise with shielding, what remains is probably coming from the PI itself. Poor power supplies seem to be the main cause here but I have yet to find something that is working. Even official PSUs seem to cause noise. Ferrite beads will help some but they usually capture high frequency noise. The highest peaks of noise is below 1000 Hz.

These tests were performed on a RPI3 A+ with a moderatly good soundcard (approx 12 euro) and a small microphone. I am sure I could improve things with better equipment but then I would probably use a better computer for recordings.

I will try to test other setups and post results here.

But please, any suggestions by yea wise and knowledgeable are very welcome!

Add: Here are two pictures of an unshielded USB card and when it is less than 50cm from a computer screen and a wifi router (again, note difference in scale). Both sounds like ticking noise. enter image description hereenter image description here

UPDATE: Update!

I have tried to put 3 electret microphone capsules in parallell as described in this post: https://electronics.stackexchange.com/questions/324450/can-i-connect-multiple-electret-microphones-for-better-gain

It works! I still have the noise from the pi (dirty PSU) and the soundcard but the recorded sound is so much louder that the noise is no longer covering the wanted sound (as much). The hardest part was to get the shielding to be coherent and closed all the way from capsule to USB connector. My 3 x mic seem to pick up a little more EMI than before but it also has more openings in the shield, i.e. the brass net I used to over the actual mic-membranes

Next will be trying to clean up power to Pi and Usb-soundcard.

3
  • I appreciate you experiment results very much. I also have noise problems in my projects. (1) I often use Lipo power banks (18650 x 3) 12VDC and step it down to 5V for Rpi and other circuits. (2) I even avoid using switching power supplies (LM2596/LM2941) and use series regulators (7805) and LDOs, (3) I use huge bypass capacitor (electrolytelyte) 10,00 uF), 0.1~1uF tanlum/cermic caps. (4) I also use dedicated/separate PSUs for Rpi and power amps, / to continue, ...
    – tlfong01
    Commented Apr 19, 2020 at 2:42
  • (5) Grounding is also very important, I separate my grounds into (a) power ground, (b) logic ground, and (c) audio signal ground, and of course shielded or double shielded AV cableseparate my grounds into (a) power ground, (b) logic ground, and (c) audio signal ground, and of course shielded or double shielded AV cables. I even dedicate the Rpi's several ground pins into groups, for I2C/SPI/UART/GPIO (audio) etc. Of course I need to use "ground stubs" later. For also signals Audio or I2C etc, I have separate ground lines going with them, / to continue, ...
    – tlfong01
    Commented Apr 19, 2020 at 2:44
  • (6) For power amps, I sometimes use differential input D type power amp. (7) I also have digital low/band pass filters (for my EEG/ECG/GPS etc) to try to reduce noise. (8) I use UGreen USB sound cards (OK, they are not very HiFi, but cheap, with button selection of raw/music/gaming band widths. (9) I also try dynamic/moving coil (Sony grade) and cheap pizo microphones.
    – tlfong01
    Commented Apr 19, 2020 at 2:46

1 Answer 1

3

Answer

(moved from comments, to tidy up later)

I appreciate you experiment results very much. I also have noise problems in my projects. (1) I often use Lipo power banks (18650 x 3) 12VDC and step it down to 5V for Rpi and other circuits. (2) I even avoid using switching power supplies (LM2596/LM2941) and use series regulators (7805) and LDOs, (3) I use huge bypass capacitor (electrolytelyte) 10,00 uF), 0.1~1uF tanlum/cermic caps. (4) I also use dedicated/separate PSUs for Rpi and power amps,

(5) Grounding is also very important, I separate my grounds into (a) power ground, (b) logic ground, and (c) audio signal ground, and of course shielded or double shielded AV cables. I even dedicate the Rpi's several ground pins into groups, for I2C/SPI/UART/GPIO (audio) etc. Of course I need to use "ground stubs" later. For also signals Audio or I2C etc, I have separate ground lines going with them,

(6) For power amps, I sometimes use differential input D type power amp. (7) I also have digital low/band pass filters (for my EEG/ECG/GPS etc) to try to reduce noise. (8) I use UGreen USB sound cards (OK, they are not very HiFi, but cheap, with button selection of raw/music/gaming band widths. (9) I also try dynamic/moving coil (Sony grade) and cheap pizo microphones.


References

(1) UGreen USB Sound Card Discussion 1/2

(2) UGreen USB Sound Card Discussion 2/2

(3) Rpi GPIO Push Button Circuit Grounding Problem

(4) Ground loop problems and how to get rid of them Written and copyright by Tomi Engdahl 1997-2013

(5) RpiZero Power Supply through 40 pin Power/GPIO Header or microUSB connector

(6) Why Grounding is used - Epanorama

(7) Using bypass capacitors to reduce voltage spikes and noise causing I2C read/write errors

(8) Clean Power for Every IC, Part 1: Understanding Bypass Capacitors - R Keim 2015sep21

(9) Clean Power for Every IC, Part 2: Choosing and Using Your Bypass Capacitors - R Keim 2015sep27

/ to continue, ...


Appendices

Appendix A -

psu4


Appendix B -

psu1


Appendix C -

psu2


Appendix D -

psu3


Appendix E -

psu5


Appendix F - MAX4466 Microphone Amplifier and 24 but HiFi Stero ADC

MAX4466 Microphone Amplifier and 24 but HiFi Stero ADC

cjmcu1802


End of Answer


3
  • Wow! That was a very detailed answer! Thank you! I will have to read up on this to fully understand it I think. Commented Apr 20, 2020 at 11:36
  • Hi @Carl-Fredrik von Essen, I am glad that you like my answer. Your lab report is already rather comprehensive and inspiring. I particularly like your comment that "Even official PSUs seem to cause noise, ...". Perhaps I should also comment my unofficial Rpi PSU and share my experience with you. Happy audio recording. Cheers.
    – tlfong01
    Commented Apr 20, 2020 at 12:44
  • Thanks again! I would like to experiment with several capacitors to reduce "noise" from the powersupply. But what range of freqencies do this setup adress? From what I have read it is mostly high frequencies, such as this: andybrown.me.uk/2015/07/24/usb-filtering I thought I would also use a small 1-1 transformer to se if that cleans up the power. Ideally I would like to make a small filter that could just be added bwtween a regular powersupply and the pi. Commented Apr 21, 2020 at 10:35

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.