4.1 w/Audio Shield - SD card plays, but there's a constant hum just below 440 hz.

rholt51

Member
I have a 4.1 Teensy w/ a 4.0 audio shield piggy-backed. no other wires.
audio example plays fine, but when I play the 3 files on the SD card, there's a constant hum(buzz?) a few notes below A-440.
the hum has a bite to it, almost like a sawtooth. it's volume is slightly below the Audio wave volume.

ALSO...
I am using the Tutorial Example: "Part_1_04_Blink_While_Playing" and have changed the
#define SDCARD_MOSI_PIN 7, to PIN 11 for my 4.1.
but
the LED is almost solid on. in that i think it's blinking along with that background hum.

any thoughts?
thanks from
Russ in Ocala, Florida, USA
 
Last edited:
Update: I'm now using the example: "Part_1_05_Do_More_While_Playing" (Examples/Audio/Tutorial).
I've added a 3rd button (button01) which will toggle playing with
button1.update();
if (button1.fallingEdge()) {
playSdWav1.stop();
bOn=!bOn;
Serial.printf("bOn: %i, button1.fallingEdge: %i\n", bOn, button1.fallingEdge());
}

where bOn is a boolean.
This works, and I noticed that when the playing is "stopped" (paused), the LED that was on almost constant, goes off and remains off until I push the button01 again to continue playing.
Still need help on the noise(hum) and the LED problem.
 
the examples/tutorials you are using are designed for T3*, not Teensy 4. The Teensy 4 has no alternate SPI pins, it will use pins 10-13 for SPI. Pin 13 is SPI CLK, so that'swhy LED is flashing while SPI is being used. You probabIy should get rid of pinMode(13,...) and digitalWrite(13,...) code.

since T4.1 has BUILTIN SD card, you might try using that #define SDCARD_CS_PIN BUILTIN_SDCARD

you could also try WavFilePlayer example.

I assume you have Rev D of audio shield for use with Teensy 4 and that all of your headers are properly soldered.

I have a Teensy 4.0 with Rev D audio shield, and example Blink_while_playing works for me with SDCARD_CS_PIN 10 and pin 13 statements removed
 
Last edited:
the examples/tutorials you are using are designed for T3*, not Teensy 4. The Teensy 4 has no alternate SPI pins, it will use pins 10-13 for SPI. Pin 13 is SPI CLK, so that'swhy LED is flashing while SPI is being used. You probabIy should get rid of pinMode(13,...) and digitalWrite(13,...) code.

since T4.1 has BUILTIN SD card, you might try using that #define SDCARD_CS_PIN BUILTIN_SDCARD

you could also try WavFilePlayer example.

I assume you have Rev D of audio shield for use with Teensy 4 and that all of your headers are properly soldered.

I have a Teensy 4.0 with Rev D audio shield, and example Blink while_playing works for me with SDCARD_CS_PIN 10 and pin 13 statements removed

Manitou,
Thanks so much for your quick replay... it's nice to know that people are supporting this forum so well, and in the future, I hope to be able to help out in the same way.
I am, also using the Rev D (for T4.0, 4.1) and have the 4.1 board well soldered with socket headers and the shield piggy-backed.
Also, I have revised the tutorial examples updating the SPI pins as you mentioned and commented out the pin 13 references. I'm surprised that they did share the SCLK with the ONBOARD LED, but I'll get over it.
Just to let you know, that my HUM problem was due to my 1/8" jack/cabling to my audio interface. a very bad rookie move was not to troubleshoot the output side of the audio signal. with headphones directly connected to the shield's audio jack, the SD card files (which I will soon change to something more my style) are playing noise-free!
I appreciate you help very much.
My project is to build a polyphonic synth with a built-in Oscilloscope to display the waveforms on a TFT 9341. I've already successfully tested out the scope using guidelines that I found from another user on this forum.
moving forward!
thanks, again,
Russ from Ocala, Florida, USA
 
Back
Top