The majority of Arduino Projects I've seen that involve using an SD card use 1 pin for ground and 4 for communicating and 1 for powering(3.3v)(if I'm not mistaken), when you insert said card into an USB adapter and then into the PC it use 1 for ground and 1 for TO and 1 for FROM and 1 to power(5v)(If I'm again, not mistaken)

  • I wish to attach one female standard USB to an arduino and communicate through that to a micro SD card that sits in an USB adapter. - What obstacles must I overcome?

  • Background, I shall remove & attach said USB adapter with SD inside of it a lot, taking it out of SD adapter and then into an USB adapter and then back is going to get annoying very fast.

  • If I'm wrong then please correct me.


1) You are mistaken. USB uses a power, ground, and a differential pair of data signals which are used together as mirror opposites for both sending and receiving. (They also get used slightly independently for device detection)

2) To host a USB storage device with an Arduino you will need to add an embedded USB host chip or USB host "shield". This will be a much more expensive solution than simply using a socket for the SD card.

Instead of doing that, you might want to come up with a scheme for transferring data to and from the Arduino by some other means (and potentially having the Arduino write it to the card). Even with USB, you have to make sure that the system accessing the device (Host shield or PC) has unmounted the device before unplugging it ("safely remove", "eject" etc) - that will be annoying too.

  • \$\begingroup\$ Not to mention that you would need to write a driver that can talk to the USB frontend of the USB-SD adapter, while you can use the well-documented and simple SPI interface when wiring up an SD slot directly to the Arduino. \$\endgroup\$ – us2012 Jul 2 '13 at 23:06
  • \$\begingroup\$ @us2012 - I believe there is already library code available for both possibilities. It's not out of the question that an embedded USB host chip could implement a file system and let you do file- rather than device-level operations over its processor interface. \$\endgroup\$ – Chris Stratton Jul 2 '13 at 23:09
  • \$\begingroup\$ @ChrisStratton if you have a link to an arduino otg/host usb-mass-storage-device driver, that would be appreciated. \$\endgroup\$ – Passerby Jul 2 '13 at 23:20
  • \$\begingroup\$ I suspect anyone else can use a search engine as well as I can... These are not parts I have experience with, as they don't seem to make economic sense to me in comparison to simply using a processor with a USB host mode. When I solved a similar problem, I left the card in the device and implemented a scheme for writing to it through the microcontroller via a USB connection to a PC. \$\endgroup\$ – Chris Stratton Jul 2 '13 at 23:21
  • 1
    \$\begingroup\$ @Passerby I did some research and it seems there is a fairly extensive USB stack for AVR: fourwalledcubicle.com/LUFA.php \$\endgroup\$ – us2012 Jul 2 '13 at 23:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.