Audio Adaptor SD card and Flash Memory

Status
Not open for further replies.

phi

Member
Hello!
I have a few questions with my project. I made my very first PCB using fusion360 software and surface mount assembly by JLPCB. A teensy4, adafruit MPR121 touch sensor, and audio adaptor connect with headers, and there are 33 surface mount leds.
Amazingly enough, the pcb works! The feeling when those leds lit up, just wow lol. There’s was just one thing, however...

The audio adaptor works, all of my audio synthesis and audio files stored in program memory work fine. But, The SD card is not recognized. On my custom pcb, the audio adaptor is ~3 inches away from the teensy, connected with traces.

Question 1:
Could it be the distance from the teensy that is causing the SD card to fail? I remember reading warnings about using long wires to connect the audio adaptor, but was hoping 3” traces would be ok. Anything else I could check?

My project uses 8 wav files that play from the SD card. In reality, a SD card is far more memory than I need. I have here 16MB flash memory chips from a reputable teensy distributor, so was thinking to use these instead. Maybe the SDcard failure was a hidden blessing after all.

Question 2:
Is there anything about the SD card failing that would also affect flash memory? Pins or distance from the teensy.

Question 3: is it possible to load files onto flash memory using a teensy 4 *without using copyfromSD*, since I have no SDcard?

I suppose I could build up the audio adaptor and use a second teensy with stacking headers to load and test the flash, then move the audio adaptor to the project pcb. Probably should do that anyway! But curious to know if I can load or change files on the flash without access to the SD card.

Thanks for any help!
 
Does the SD have good power? Are the wires properly connected? An early for T_4.0 breakout ended up with swapped wires and that needed revised,

Post in recent days says TeensyTransfer works on T_4.0 - a HID sketch runs on Teensy and file transfers over USB for storage.
 
I’ll look into TeensyTransfer, thanks!

The audio adaptor is connected pin for pin according to the webpage on pjrc, which only lists 3.3V. How could I measure if it’s getting enough power?

The adaptor was purchased from an online retailer; any way to know if it’s an old one that has wires swapped? (If I’m understanding correctly)
 
Note, be sure to connect both ground pins (the one next to pin 0 on the left side, and the one between VIN and 3.3v on the right side).

On the Teensy 3.x, these are separate ground pins (the one next to pin 0 is the digital ground and the one between VIN and 3.3v is the analog ground). The audio adapter uses the analog ground for audio stuff, but it uses the digital groun for SPI stuff (SD card, flash memory).

On the Teensy 4.x, these two pins are both digital ground (there is no concept of analog ground on the Teensy 4.x). But when Paul redesigned the revision D audio adapter, he kept using the ground next to pin 0 for the SPI devices, and the ground between VIN and 3.3v for the rest of the audio board.
 
I’ll look into TeensyTransfer, thanks!

The audio adaptor is connected pin for pin according to the webpage on pjrc, which only lists 3.3V. How could I measure if it’s getting enough power?

The adaptor was purchased from an online retailer; any way to know if it’s an old one that has wires swapped? (If I’m understanding correctly)

Underneath the audio shield, you will see either "Rev d" or "Rev c". If you see "Rev d" that is the appropriate adapter for the Teensy 4.0 an 4.1. If you see "Rev c", "Rev b", or possibly no "Rev" that adapter is the correct adapter for the Teensy 3.1, 3.2, 3.5, or 3.6.
 
Does the SD have good power? Are the wires properly connected? An early for T_4.0 breakout ended up with swapped wires and that needed revised,
...

This part was off base - didn't read the Audio adapter - saw T_4.0 and PCB and assumed the under pads were used ...
 
Question 1:
Could it be the distance from the teensy that is causing the SD card to fail? I remember reading warnings about using long wires to connect the audio adaptor, but was hoping 3” traces would be ok. Anything else I could check?

On the wire length, all of the issues we saw were with the MCLK signal to the SGTL5000 chip.

Usually SD cards work fine with 3 inches of wire. With all wiring, running the ground wire along the same path as the signals is best. Adding a decoupling capacitor between 3.3V and GND close to the SD socket is a good plan.
 
Well this is embarrassing but a huge relief: the sd cs pin was routed on my schematic but didn’t make it onto the pcb. One piece of wire later, SD card is recognized. What’s a first-time PCB without a kludge, ha! Full spectrum roller coaster synth dev experience...do I get a badge?:)

What an incredible community to get so much help in such short time, you guys are amazing. I hope you all have a wonderful week!
 
Might have spoke too soon,
The SD card is recognized, but when I play an audio file from it, the output from the audio adaptor goes to a zippering click sound that remains until I restart the device.

Is this likely due to a short in the kludge, or something else to consider?
 
The kludge meters continuity and no shorts...

One of the grounds from the audio adaptor goes direct to the Teensy.
The other ground from the audio adaptor looks like autoroute sent it through the ground leg of an led before it gets to the teensy.
Most of the board was routed manually, but I missed this.
The leds have decoupling caps between ground and V, and the leds get 5V.
The sound from the audio adaptor when a SD file is playing is much much louder and distorted, with a zippering sound, and gradually becoming more so.
 
Hi!
Quick update and case closed:
I soldered a wire direct from teensy to audio adaptor for the MCLK signal. That trace was right on the edge of design rules in my layout.
Thanks to Paul for pointing out that is the touchy one to watch out for. With the wire soldered, everything works. Thanks everyone!
 
Status
Not open for further replies.
Back
Top