Pages: [1]   Go Down
Author Topic: SD card adapter bought on ebay  (Read 2786 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I bought an SD card adapter on ebay but could not get it to communicate with my Arduino Mega2560 using the Arduino IDE 1.0.1 "CardInfo" sketch.  The adapter has "http://www.lcsoft.net" and "LC STUDIO" printed on the back.

I made an accidental breakthrough.  To make a long story short, there is apparently something wrong with the labeling and/or wiring of the voltage supply pins on the adapter.  The pin labeled "+3.3v" on the adapter must be jumpered to Arduino pin "+5v".

From top to bottom on the adapter:
adapter pin<-->Arduino pin
GND GND
+3.3v +5v
+5v *nothing
CS pin 53
MOSI pin 51
SCK pin 52
MISO pin 50
GND *nothing

So far, I have only tried two older SD cards (no SDHC cards) and both work.  One is a 512MB SanDisk card, the other is a 512MB SanDisk Ultra II card.

I get one of the following outputs in the Serial window with the three other supply voltage combinations (+3.3v <--> +3.3v, +5v <--> +3.3v, +5v <--> +5v):
Quote
Initializing SD card...Wiring is correct and a card is present.
Card type: SD1
Could not find FAT16/FAT32 partition.
Make sure you've formatted the card

Quote
Initializing SD card...initialization failed. Things to check:
* is a card is inserted?
* Is your wiring correct?
* did you change the chipSelect pin to match your shield or module?
Logged

Colorado
Offline Offline
Edison Member
*
Karma: 47
Posts: 1562
Reviving dead brain cells with Arduinos.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You can not feed 5V to an SD card, you will fry it.  Nothing above 3.6V max.  You need to add a level converter, or a hex converter between all the signal lines since on the Arduino side they're all 5V, but on the SDcard side they're 3.3V.  I use SFE's logic level converter to pass the signals through:

DO -> TXI (CH1) on LV side -> TXO (CH1) on HV side -> MISO
GND -> GND
SCK <- TXI (ch2) on LV side <- TXO (ch2) on HV side <- SCK
VCC <- 3.3V
DI <- RXO (CH1) on LV side <- RXI (CH1) on HV side <- MOSI
CS <- RXO (ch2) on LV side <- RXI (ch2) on HV side <- pin 4
Logged

Offline Offline
Edison Member
*
Karma: 49
Posts: 1670
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The card itself won't like 5V but my guess is that the 5V pin on the adapter is the 5V input to a 3.3V regulator on the adapter card and that the 3.3V pin is an output. There does appear to be a regulator on the board.
Wire the 5V adapter pin to the Arduino 5V and leave the 3.3V pin unconnected.
If this doesn't work, it may be because you've fried the card while you were playing around with the voltages so try a card that you know is good.
Also, if it fails, use a meter to measure the voltage on the 3V3 pin. If it's 3V3 you've still got a working board.

Pete
Logged

Colorado
Offline Offline
Edison Member
*
Karma: 47
Posts: 1562
Reviving dead brain cells with Arduinos.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If the card has both a 5V as well as a 3V3 pin, they are generally both inputs the 5V is input only, the 3V3 can be either: an output when you're feeding 5V, or an input when you're feeding 3V3.  If you only have 5V, then you feed it to the 5V pin.  If you have 3V3 available, then you feed it to the 3V3 pin.  However, you still need to protect the signal lines between the Arduino and the card reader itself.  A better option is Adafruit's breakout which incorporated a hex buffer on the signal lines.
« Last Edit: June 04, 2013, 04:04:28 pm by KirAsh4 » Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 63
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey !
i was the same problems, and i have solve it with a CD4050 :

http://www.instructables.com/id/Arduino-DIY-SD-Card-Logging-Shield/
a basic interface for 5v -> 3.3V conversion and work perfectly smiley-wink

we can find 10 CD4050 for 3$ with ebay

timiti29
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for all of the responses.  FWIW,

1) I've attached a photo of the board; I purchased it from "TxHang Electronic" on ebay - http://stores.ebay.com/TxHang-Electronic/_i.html?_nkw=170895501953&submit=Search&LH_TitleDesc=1&_sid=1103958046.
2) Here is a copy/paste from the ebay product listing:

Quote
Description: (We only provide high qulity products,please choose us.)

1.Brand new and high quality.

2.SD Card module can make your SD application more easier and simple.

3.It is easily interfaced as a peripheral to your arduino sensor shield module.

4.Through programming, you can read and write to the SD card using your arduino.

5.Can be used for SD Card more eaisly, such as for MP3 Player, MCU/ARM system control.

6.All SD SPI pins output, MOSI, SCK, MISO and CS.

7.Support 5V/3.3V input.

8.Size:5.1cm x 3.1cm - 2.01inch x 1.22inc


* Photo Jun 06, 10 14 44 AM.jpg (1798.63 KB, 2592x1936 - viewed 90 times.)
Logged

Colorado
Offline Offline
Edison Member
*
Karma: 47
Posts: 1562
Reviving dead brain cells with Arduinos.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yeah, it supports 5V or 3V3 for power, but the signal lines are not 5V tolerant ... there's nothing on there that corrects that.  You need a level converter on all the signal lines.  Something like a TXB0104 (or TXB0108).  Earlier I suggested this level converter as well, however after more testing I found out it's really slow and hinders fast SPI communications.  In order for that to work on an SD card, I had to slow down the SPI data transfer rate considerably.  I've since switched to an TXB0108 and can now run SPI at full speed reading/writing to an SD card.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks, KirAsh4.  I'll put a TXB0108 board on my next Adafruit order.
Logged

Colorado
Offline Offline
Edison Member
*
Karma: 47
Posts: 1562
Reviving dead brain cells with Arduinos.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This is how i have mine connected.  As you can see I'm only using 4 channels and have the other 4 for future use.


* txb0108_LRG-amk.jpg (328.69 KB, 1058x774 - viewed 139 times.)
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I too have 1 or 2 of these "old" Full size SD adapters ..... from LC studios. Never used because of the 3.3V issue  smiley-cry
Feel cheatet as it needs level converter. I bought one, but it had only 2 channels smiley-sad - so perhaps I should use 6 resistors?

Well, guess its more easy to go for the new one with level converter on it - as they cost only $2 on ebay.
http://www.ebay.com/itm/200958993125?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649
Logged

Offline Offline
Faraday Member
**
Karma: 62
Posts: 3080
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have one of those,  and it works fine with 5V supply and 5V on the signal lines.
Logged

0
Offline Offline
Edison Member
*
Karma: 67
Posts: 1658
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I have one of those,  and it works fine with 5V supply and 5V on the signal lines.

The LC Studio modules do work with some SD cards.  I have checked several cases where cards work.  The card draws a lot of current on the 5V signal lines which may not good for the card or the Arduino  The Arduino can only supply enough current to reach about 4 V on the signal lines.

The card input lines should not draw current so I think the excess current is due to input protection devices in the card.

Not a desirable condition.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I have one of those,  and it works fine with 5V supply and 5V on the signal lines.

The LC Studio modules do work with some SD cards.  I have checked several cases where cards work.  The card draws a lot of current on the 5V signal lines which may not good for the card or the Arduino  The Arduino can only supply enough current to reach about 4 V on the signal lines.

The card input lines should not draw current so I think the excess current is due to input protection devices in the card.

Not a desirable condition.

Mine is an SD breakout board bought from China on ebay for £1. Spent several hours trying to resolve the problem.

There is no need for any level converters. If the Arduino sees the card connected properly but you get the error "Could not find FAT16/FAT32 partition, simply connect the 5V Arduino supply to the 3.3V input pin on the SD board and the problem is solved.

Also, the MISO and MOSI labels on the SD breakout are labels for the Arduino board not the SD Card.
So, MOSI on SD board goes to MOSI on Arduino; MISO on SD Board goes to MISO on Arduino NOT the other way.

Just had my breakthrough a couple of minutes ago and I've written multiple data to my SD Card and successfully retrieved it.

 smiley
Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 150
Posts: 6130
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@kreativ: If your Arduino is the same device as in your other post, you are using a Due. The Due is a 3.3v device. Most Arduinos are 5 volt signal, and do require a level converter.

edit: My bad. The other post does not say you are using a Due. Some cards are more sensitive to 5 volts on the data lines.
« Last Edit: August 11, 2014, 07:28:33 am by SurferTim » Logged

Pages: [1]   Go Up
Jump to: