element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Arduino Forum SD Card interface board made by LC Studio/lcsoft.net
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Verified Answer
  • Replies 43 replies
  • Answers 2 answers
  • Subscribers 407 subscribers
  • Views 5697 views
  • Users 0 members are here
  • aduino
  • sd_card
  • uno
Related

SD Card interface board made by LC Studio/lcsoft.net

neilk
neilk over 14 years ago

I am trying to get the above SD Card interface board working with my Arduino UNO. The interface board includes a 5v to 3.3v regulator and appears to have appropriate resistors to cope with 5v signals from the UNO.


The pinout on the board is not directly compatible with the header on the UNO, so I have made up some connectors and I am fairly sure I have made the connections to the SPI correctly:

 

I/F Board     Arduino Pin

CS               10

MOSI           11

SCK            13

MISO           12

 

I have tried supplying +5v, to derive 3.3v via the I/F card regulator and also supplied +3.3v directly.

 

My test program fails to find the card and returns "Card Failure", irrespective of whether there is a card present or not.

The card I am using is 2GB, formatted as FAT16 and contains a single file - "test.txt", the contents of which are simply:

test1,test2

I keep checking the card in a reader on my PC and, so far, I don't seem to have damaged it.

 

I would be grateful for any advice, please.

 

A fragment of the program is shown below:

 

//Program by Jeremy Blum

//www.jeremyblum.com

//SD Card Demonstration

//Based on Example by Tom Igoe

//Further adapted simplified by NGK to try and prove my SD Card interface board actually works!!!

 

#include <SD.h> // This is the standard SD library in version 0023

 

//These values are used by default in the standard SD Card Library

//MOSI = 11

//MISO = 12

//SCLK = 13

 

//We need to set the CS Pin - it's 10 for the UNO

int CS_pin = 10;

 

void setup()

{

  Serial.begin(9600);

  Serial.println("Initializing Card");

  //CS Pin is an output

  pinMode(CS_pin, OUTPUT);

 

  if (!SD.begin(CS_pin))

  {  

   Serial.println("Card Failure");

   return;

   }

 

  Serial.println("Card Ready");

 

  //Now read the File test.txt)

  File commandFile = SD.open("test.txt");

  if (commandFile)

  {

    Serial.println("Reading Command File");

    while(commandFile.available())

    {

      char temp = (commandFile.read());

      Serial.println(temp);

     }

  }

  else

  {

    Serial.println("Could not open command file.");

    return;

  }

}

  • Sign in to reply
  • Cancel

Top Replies

  • fustini
    fustini over 14 years ago +1 suggested
    Hi - I tried looking up the module put couldn't find much detail on the board (that translated to English with Google at least). One idea I had from working with other 3.3V modules is that logic level…
  • fustini
    fustini over 14 years ago in reply to neilk +1 suggested
    Yeah, I think the issue is 3.3V & 5V interfacing. I'm not sure if the resistor method is very good per this advice from Adafruit: http://www.ladyada.net/products/microsd/ One is that they are strictly…
  • nermash
    nermash over 14 years ago in reply to neilk +1
    According to specs at http://www.arduino.cc/en/Main/arduinoBoardUno digital IOs operate at 5 volts, so you need apropriate level shifter/buffer for SI line on the uno board. I had a simillar problem interfacing…
  • fustini
    0 fustini over 14 years ago

    Hi -

     

    I tried looking up the module put couldn't find much detail on the board (that translated to English with Google at least).  One idea I had from working with other 3.3V modules is that logic level shifting (e.g. converter) might be necessary.  I believe the Arduino UNO runs at 5V so this could be an issue.

     

    I ran into this when working with interfacing an Arduino with a 3.3V Microchip SRAM chip.  SparkFun has a nice tutorial called "Sensor Interfacing" that describes different solutions to this issue:

     

    http://www.sparkfun.com/tutorials/65

     

    I ended up ordering SparkFun's little converter boards which worked very well:

     

    http://www.sparkfun.com/products/8745

     

     

    Cheers,

    Drew

    http://twitter.com/pdp7

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • neilk
    0 neilk over 14 years ago in reply to fustini

    Hi Drew - many thanks for your quick answer.

     

    I have already looked at the SparkFun tutorial and the lcsoft board appears to have appropriate resistors, as in the example they show. The board is double sided, with thru-hole plating and I am finding it VERY difficult to trace the cicuit to be certain.

    Thanks again

     

    Neil

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • neilk
    0 neilk over 14 years ago in reply to neilk

    I have finally located a schematic of the lcsoft SD board, if it helps anyone to help me further.

     

    I have arttached a .pdf

    Attachments:
    imagelcsoft SD module.pdf
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • fustini
    0 fustini over 14 years ago in reply to neilk

    Thanks - I think that gives me a better understanding.  However, I'm not sure why JP1 is a 8x2 header - it seems to have the same layout on both sides.  Could you post a pic of the board?

     

    I'm not sure if there is any there doing level shifting.  Those four 10k resistors look just like pullups to me.

     

    Thanks,

    Drew

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • neilk
    0 neilk over 14 years ago in reply to fustini

    Maybe JP1 is a 8x2 header (male) to give mechanical stability??

     

    Yes, the connections are the same in both rows of pins.

     

    You are right, of course - the resistors are purely pullups. Do you think I need series resistors as in the tutorial?

     

    Pics attached.

     

    Thanks again

     

    Neil

    Attachments:
    image
    image
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • fustini
    0 fustini over 14 years ago in reply to neilk

    Yeah, I think the issue is 3.3V & 5V interfacing.  I'm not sure if the resistor method is very good per this advice from Adafruit:

     

    http://www.ladyada.net/products/microsd/

    One is that they are strictly 3.3V devices and the power draw when writing to the card can be fairly high, up to 100mA (or more)! That means that you must have a fairly good 3.3V power supply for the card. Secondly you must also have 3.3V logic to interface to the pins. We've found that SD cards are fairly sensitive about the interface pins - the newest cards are edge triggered and require very 'square' transitions - things like resistor dividers and long wires will have a deleterious effect on the transition speed, so keep wires short, and avoid using resistor dividers for the 3.3V logic lines. We suggest instead using level shifters, such as HEF4050, 74LVX245 or74AHC125 chips.

     

    Might you have one of those types of ICs available?

     

    Cheers,

    Drew

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • neilk
    0 neilk over 14 years ago in reply to fustini

    Hi Drew......once again, many thanks.

    The first thing I'll do is shorten my cables. I was going to do it anyway, for tidiness!

    I'll also look for a level-shifter in my box-of-bits.

    Thanks again

    Neil

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • neilk
    0 neilk over 14 years ago in reply to neilk

    I shortened the cables to a couple of inches - still no joy.

    I'll be looking for a level shifter later on.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • nermash
    0 nermash over 14 years ago in reply to neilk

    According to specs at http://www.arduino.cc/en/Main/arduinoBoardUno digital IOs operate at 5 volts, so you need apropriate level shifter/buffer for SI line on the uno board. I had a simillar problem interfacing PIC18F and ENC28J60 ethernet controller, and I solved it with 74F125PC. 

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • harbo
    0 harbo over 14 years ago in reply to fustini

    Drew, how did you make the connection from the Arduino [SCK-MISO-MOSI-CS] to the 8745{RX, TX]  ??

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube