Go Down

Topic: [Closed] Connecting SD Card to USB port through Arduino (Read 2322 times) previous topic - next topic

CosmickGold

Jan 29, 2016, 03:40 pm Last Edit: Feb 07, 2016, 09:44 pm by CosmickGold
I have the below adapter for plugging my SD Card into my computer through a USB port.  But why require an adapter -- and move the card back and forth -- when my project has both an SD Card holder and a USB connection to the computer already?



Is there a library, or some Arduino code I can use to make this same connection through the AVR in my Arduino? I'm wanting the usual abilities: to look at card files from the computer, move them between hard drive and card, even open and update card files from the computer (without removing the card from Arduino).

nickgammon

What do you want to do? Have the card in the Arduino and read the files on it, on your computer?
Please post technical questions on the forum, not by personal message. Thanks!

More info: http://www.gammon.com.au/electronics

CrossRoads

#2
Feb 06, 2016, 05:32 am Last Edit: Feb 06, 2016, 05:34 am by CrossRoads
I've been working on the design of a card with VUB3000 chip that would let the PC access the SD card directly or let the Arduino access the card directly.
I think last time I looked at the design, there was something in the buffering I wasn't quite satisfied with, so I put it aside to think about it some more.
Software would be a little tricky; the SD card needs a reset between PC and Uno access, and between Uno and PC access, so the proper interface mode could be used for each system.

Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

GoForSmoke

#3
Feb 06, 2016, 05:57 pm Last Edit: Feb 06, 2016, 06:02 pm by GoForSmoke
Quote
I'm wanting the usual abilities: to look at card files from the computer, move them between hard drive and card, even open and update card files from the computer (without removing the card from Arduino).
Your device would have to identify as a drive to USB, which is what that adapter does.
1) http://gammon.com.au/blink  <-- tasking Arduino 1-2-3
2) http://gammon.com.au/serial <-- techniques howto
3) http://gammon.com.au/interrupts
Your sketch can sense ongoing process events in time.
Your sketch can make events to control it over time.

CosmickGold

#4
Feb 07, 2016, 08:24 pm Last Edit: Feb 07, 2016, 08:32 pm by CosmickGold
Wow.  Great replays.  Sounds to me like I'd better not try it; and instead, supply customers with a USB/SD converter like the one pictured at the top.

It's beyond my free-time and patience to learn and design and perfect software that complex.  I was hoping sketch software already existed. I guess not.

monte_carlo_ecm

You could try out my ZModem file manager sketch as one way to handle this.  Not as elegant as if you had true USB access to the SDCard mounted on the Arduino, but it's something, especially if your Arduino is difficult to access.

Go Up