SD card interface

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
dougr
 
Posts: 8
Joined: Thu May 09, 2013 10:20 pm

SD card interface

Post by dougr »

I would like to have a way to dual port an SD card.
I have a mini audio recorder that records audio files to an SD card.
My goal is to plug in an SD card extender cable into it and the other end
into a project board where the SD card would actually reside - but with
the ultimate goal of my project board also having the ability to read the
data at a later time and upload it via the Internet to my laptop at home
to be able to edit it.
The recorder will be at my church where we record sermons.
The idea is to not have to do a sneaker net with the little SD cards, taking
them home for file editing and then later remembering to take them back
next week.
I would have my project always on site and be able to SFTP into it remotely
and download the files to my PC at home and never have to remove and reinsert
the SD card again.
The question is, can an SD card support such a dual porting of its interface?

User avatar
adafruit_support_mike
 
Posts: 67391
Joined: Thu Feb 11, 2010 2:51 pm

Re: SD card interface

Post by adafruit_support_mike »

dougr wrote: Fri Sep 30, 2022 2:30 pm I would like to have a way to dual port an SD card.
It can't be done directly.. SD cards use SPI, and SPI only allows one device at either end of a connection.

You can work around that by putting logic buffers like the 74AHCT125 between the card and the devices at either end:

https://www.adafruit.com/product/1787

One set would control signals between the SD card and your recorder, and the other would control signals between the card and your access device.

There's another problem though:
dougr wrote: Fri Sep 30, 2022 2:30 pm My goal is to plug in an SD card extender cable into it and the other end into a project board where the SD card would actually reside
We've heard from people who haven't been able to make devices like a recorder recognize the SD card after it's swapped out.

SD cards need to go through an initialization process before they can store or retrieve data, so devices need to know when a card is inserted. Most use the Card Detect switch built into the SD carrier.. basically a metal tab that rests on a contact when the carrier is empty, and lifts away from the contact when a card is inserted.

An extender cable breaks the relationship between the Card Detect switch and a working connection to an SD card.

The workaround for that is to power cycle the recorder when you control the switches that disconnect the SPI signals between the recorder and the SD card.

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”