MUFF WIGGLER Forum Index
 FAQ & Terms of UseFAQ & Terms Of Use   Wiggler RadioMW Radio   Muff Wiggler TwitterTwitter   Support the site @ PatreonPatreon 
 SearchSearch   RegisterSign up   Log inLog in 
WIGGLING 'LITE' IN GUEST MODE

Radio Music SD Card Buzzing/Noise problem possible fix
MUFF WIGGLER Forum Index -> Music Tech DIY  
Author Radio Music SD Card Buzzing/Noise problem possible fix
starmandeluxe
So I saw a few posts in the main Radio Music project thread about buzzing/noise with their builds. This is also happening to me, only when the SD card is accessed and playing a file. I'm not sure how widespread this issue is.

Anyway I decided to make a separate topic about it since one doesn't exist for this issue yet, and I think I have found the probable cause, but not clear on the solution due to my limited DIY knowledge.

I wagered that the issue lies with the Teensy DAC because the noise only happens during SD card playback (even with silence in the audio file). So I went over to the Teensy forums and found this thread:

https://forum.pjrc.com/threads/27443-Audio-High-pitch-buzzing/page1

And someone even recorded the buzz...!

http://www.ledseq.com/downloads/buzz.wav

This is exactly the same as my issue! The thread suggests it's due to grounding problems, and one person tried powering the Teensy separately from the audio amplification which was a workaround. The other way to solve seems to be somehow to wire the grounding properly:

Quote:
In my case I solved the issue by making sure I was using the ground connections on the audio board to connect to the ground connection on line in / line out jacks, and all other ground went via the regular GND connection on the Teensy (except for analog input ground which are smoother if you use AGND to ground them).


So knowing this, would anyone have any idea how to apply this to the Radio Music board? Perhaps connecting some ground points together? I'd appreciate any suggestions!
mxmxmx
starmandeluxe wrote:


Quote:
In my case I solved the issue by making sure I was using the ground connections on the audio board to connect to the ground connection on line in / line out jacks, and all other ground went via the regular GND connection on the Teensy (except for analog input ground which are smoother if you use AGND to ground them).


So knowing this, would anyone have any idea how to apply this to the Radio Music board? Perhaps connecting some ground points together? I'd appreciate any suggestions!


note that the people who chimed in in this thread are/were talking about wildly different pieces of hardware. i think you can rule out "grounding problems" in your case. it should be easy to test, at any rate: simply run one of the examples that come with the pjrc / audio lib on your module (ie, ones which *don't* involve the SD card, some sine wave or the like). chances are it'll make the buzz go away.

fwiw: IIRC the problem ("buzzing" at ~ 344 Hz") had nothing to do with the "audio board"; it occurred if/when people tried to output audio from the MK20/onboard DAC *while* powering the SD card from the onboard 3v3 regulator. not entirely surprising perhaps because SD cards can/do consume a fair amount of power, and the DAC by default will be referenced to (basically) the same power bus (or the MK20 "VDDA" pin for that matter). (not 100%, but that's probably going on with Radio Music, too).

i don't think there's an obvious fix.

what might help, but probably doesn't (you can give it a try, anyways), would be trying to reference the DAC to VREF_OUT, that's the internal (1.2V) reference. you'd do that by using/adding analogReference(INTERNAL) to your code and see if that helps any. in real life (unless radio music is doing that already, idk) it'll be a bit more involved, because the gain will need to be increased and if memory serves will, analogReference() as is sets the reference for both the ADC and the DAC, which isn't really what you want. you'll need to customize things a bit, but that's easy (it'll basically look something like: DAC0_C0 &= ~DAC_C0_DACRFS; // = use 1.2V, take a look at analog.c in the teensy "core")

and what also might help would be to (somehow) add a 3v3 regulator, to isolate the SD card from the DAC.
starmandeluxe
mxmxmx wrote:
starmandeluxe wrote:


Quote:
In my case I solved the issue by making sure I was using the ground connections on the audio board to connect to the ground connection on line in / line out jacks, and all other ground went via the regular GND connection on the Teensy (except for analog input ground which are smoother if you use AGND to ground them).


So knowing this, would anyone have any idea how to apply this to the Radio Music board? Perhaps connecting some ground points together? I'd appreciate any suggestions!


note that the people who chimed in in this thread are/were talking about wildly different pieces of hardware. i think you can rule out "grounding problems" in your case. it should be easy to test, at any rate: simply run one of the examples that come with the pjrc / audio lib on your module (ie, ones which *don't* involve the SD card, some sine wave or the like). chances are it'll make the buzz go away.

fwiw: IIRC the problem ("buzzing" at ~ 344 Hz") had nothing to do with the "audio board"; it occurred if/when people tried to output audio from the MK20/onboard DAC *while* powering the SD card from the onboard 3v3 regulator. not entirely surprising perhaps because SD cards can/do consume a fair amount of power, and the DAC by default will be referenced to (basically) the same power bus (or the MK20 "VDDA" pin for that matter). (not 100%, but that's probably going on with Radio Music, too).

i don't think there's an obvious fix.

what might help, but probably doesn't (you can give it a try, anyways), would be trying to reference the DAC to VREF_OUT, that's the internal (1.2V) reference. you'd do that by using/adding analogReference(INTERNAL) to your code and see if that helps any. in real life (unless radio music is doing that already, idk) it'll be a bit more involved, because the gain will need to be increased and if memory serves will, analogReference() as is sets the reference for both the ADC and the DAC, which isn't really what you want. you'll need to customize things a bit, but that's easy (it'll basically look something like: DAC0_C0 &= ~DAC_C0_DACRFS; // = use 1.2V, take a look at analog.c in the teensy "core")

and what also might help would be to (somehow) add a 3v3 regulator, to isolate the SD card from the DAC.


Thanks for the info! That sounds pretty complicated, but I guess I could give it a try. The thing is, most of the demos I see on Youtube of this module don't exhibit this noise. Both of my Radio Music modules do this, and it's quite noticeable so it renders them not super useful. Could it be possible that it's a hardware issue with my soldering since not many people seem to have this problem?
batchas
starmandeluxe wrote:
And someone even recorded the buzz...!

http://www.ledseq.com/downloads/buzz.wav

This is exactly the same as my issue!

To be clear, what you define a buzz, is it what we hear from 0 to 1 and 9 to 11 seconds or the rest inbetween (highpitched sound)?
starmandeluxe
batchas wrote:
starmandeluxe wrote:
And someone even recorded the buzz...!

http://www.ledseq.com/downloads/buzz.wav

This is exactly the same as my issue!

To be clear, what you define a buzz, is it what we hear from 0 to 1 and 9 to 11 seconds or the rest inbetween (highpitched sound)?


The rest in between. Not the white noise but a pulse wave thing at a fixed frequency. It's really annoying and renders the module almost unusable unless I turn the trimmer all the way down (but even then it's noticeable). I would like to have the trimmer gain higher. I really think it's caused by the SD card since it doesn't do that unless a file is being played.
starmandeluxe
What about this idea: is it possible to remove the power coming from my main modular power bus to the Teensy by cutting the connection to the VCC pin, then solely power the Teensy always via USB cable (and bridge the USB trace once again)? Or with USB power trace cut, redirect VCC and ground on the Teensy to a battery instead?

Regardless if it will solve the issue or not, does that sound like the correct way to separate the power to the module and the Teensy? If so, it's worth testing out for me.
batchas
starmandeluxe wrote:
batchas wrote:
starmandeluxe wrote:
And someone even recorded the buzz...!

http://www.ledseq.com/downloads/buzz.wav

This is exactly the same as my issue!

To be clear, what you define a buzz, is it what we hear from 0 to 1 and 9 to 11 seconds or the rest inbetween (highpitched sound)?


The rest in between.

Oh I see. Weird!
So I confirm it is 100% not normal.

I don't know pers. what is the cause, but did you try with a different SD Card before modifying?
I'm using for instance SANDISK Carte Micro SDHC Ultra 16GB (98MB/s) (Class 10) without issue.
Grumble
Try adding some good (low ESR) capacitors at some tactical places (close to components that are switching with higher currents).
Maybe you (or whom ever built the module) used cheep capacitors might be the cause for your problem.

https://www.avnet.com/wps/portal/abacus/resources/engineers-insight/ar ticle/understanding-esr-in-electrolytic-capacitors/

Or maybe the usb cable is still attached?
starmandeluxe
Grumble wrote:
Try adding some good (low ESR) capacitors at some tactical places (close to components that are switching with higher currents).
Maybe you (or whom ever built the module) used cheep capacitors might be the cause for your problem.

https://www.avnet.com/wps/portal/abacus/resources/engineers-insight/ar ticle/understanding-esr-in-electrolytic-capacitors/

Or maybe the usb cable is still attached?


Hmm I don't have enough expertise to know where those points would be, and I'm not sure what a high quality capacitor looks like compared to a normal one. I built both of these modules from Thonk though.

The USB cable most certainly is not attached.

I guess for now I can just do lots of testing with a meter to try and isolate the issue. I mentioned this in another thread but still not sure if it matters: My power from my case is not connected to ground (no ground available in Japan). I wonder if anything would change if I grounded it.
starmandeluxe
OK I sort of worked around this problem.

I wasn't able to find a hardware solution after testing the audio output circuit for soldering issues.

However interesting to note is that the 2017 firmware's pitch knob actually controls the frequency of the unwanted buzzing, which is interesting because it implies the unwanted buzz is actually generated from the software.

So since the buzzing is most apparent during silence, I decided to add a silence trimmer when generating my audio sample files (with the help of StackOverflow).

Find it on Github here:

https://github.com/starmandeluxe/PrepareRadioMusicSamples
MUFF WIGGLER Forum Index -> Music Tech DIY  
Page 1 of 1
Powered by phpBB © phpBB Group