Hello, i'm trying to interface an SD card with my teensy 4.0 board. Ive made a pub and was trying to upgrade my project by designing a pcb with more SMD components. I included a spring loaded SMD SD card mount but the SD card is not being detected, I followed schematics online but I still think my wiring could be wrong.
Here is my wiring :
Here is the SD card mount :
As far as I know, the SPI pins don't need to be pulled high, the unused data lines (DATA1 & 2) can be pulled high to stop leaking current and CDN is not used at all)
any help would be greatly appreciated
Can you post a full circuit diagram and images of your PCB pattern.
You should be able to export images.
Did you breadboard your changes before going to PCB.
I'm not sure but you need some other component to interface an SD with your controller.
Look a an SD card module.
Here is a schematic I have found, it looks like you need an array of pull_up resistors.
Heres my schematic :
(It only includes the teensy board and SD as the other schematics are just sensors)
Heres the diagram I used from online, however as far as I'm aware you don't need to pull up the SPI lines on the teensy :
This pcb is a second variation of my project, which was to make it smaller and compact with SMD components, so I didn't get to test it on a breadboard especially as the pins of the SD mount are so small.
And also the power of the SD card comes straight form the teensy regulated at 3.3v 100mA
@TomGeorge I've managed to pull CS high, and I get this message :
Initializing SD card...Wiring is correct and a card is present.
Card type: SD2
Could not find FAT16/FAT32 partition.
Make sure you've formatted the card
Ive tried pulling MISO, MOSI and SCK high but it seems to freeze the program so i'm not sure what could be stopping the teensy from reading the card
At least it can detect the card
Okay, you need to pull CS high because it is the Chip Select pin.
It tells the card that it is being "spoken to"
Have you formatted the SD card, that is the next thing it is asking.
I've checked and the SD card is formatted as FAT 32, I have CS pulled high but not MOSI MISO and SCK, as they didn't work before, but if I pull the pins high, but from the teensy through a 10k resistor should that work?
thank you, Harvey
No don't pull MOSI (Master Out Slave In) or MISO (Master In Slave Out) or SCK (Clock) as they are the digital signal pins.
Can you please post a picture of your project so we can see your component layout?
That suggests to me that you have the correct electrical connections in place as the library is able to correctly interact with the registers on the card.
I wonder if it's a card formatting issue. There's a sticky at the top of the Storage section of the forums that gives useful information on how to format SD cards and what tools to use to do it.
You don't says which Micro-SD card you are using but sometimes the library can get picky. If you have Micro-SD cards of another brand to hand, you could try one of them just in case.
sorry for the late reply, I pulled CS MOSI and MISO all high through a 10k resistor and the SD Card was able to be read.
Here's the card being read :
and here is the
VERY ROUGH wiring fix that ill try to make more appealing :
Brown is CS
Blue and green are MOSI and MISO
The card has worked before with a breakout SD module I had and it can still be read by my laptop so i'm hoping it just can access the necessary info from the card due to my wiring.
Thank you, Harvey
October 18, 2021, 12:49pm
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.