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
    About the element14 Community
  • 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 414 subscribers
  • Views 6718 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…
  • terryking
    0 terryking over 14 years ago in reply to r3cgm

    Hi, The Lc Soft stuff can be found here:  http://tmp.www.lcsoft.net:8080/Hardware/#

    (May need to click ENGLISH at upper right).

     

    I was looking at sourcing some of their other modules, but after the board quality problems detailed above, I'll want a REAL good look at samples before I sell any of them..

     

    The LadyAda Tutorial is great!  I know how much work that stuff is; I have some at http://arduino-info.wikispaces.com/

     

    Regards, Terry King

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

    Hi Christopher

    You don't say whether you have checked for a short circuit between MOSI, MISO and ground on your 3 LCsoft boards.

    I would be very interested to know if any of them have the same symptoms as mine.

     

    Currently in discussion with the supplier as to what they are going to do.

     

    I have seen the LadyAda - looks good, but quite expensive to buy here in UK, or have shipped from the states.

     

    Terry's board looks very attractive - I may invest!

     

    Please let me know if you can find any short circuits on your board(s)

     

    Best wishes

     

    Neil

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

    Hi Terry

    Thanks for the information - your shop website looks very interesting and your HongKong mail shipping costs seem reasonable.

    Thanks for the link to your Tutorials

    best wishes

    Neil

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

    Hi Neil,

     

    I checked for ground shorts for the MOSI and MISO pins, on all 3 of my boards, but found none.  Doesn't necessarily mean that my boards aren't defective, but probably not due to that cause.

     

    Hope you have success working with the supplier.

     

    Cheers.

     

    Christopher

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

    Hi Christopher (and anyone else reading this thread)

     

    I got nowhere with the supplier of the LCstudio card.

     

    I invested in a card from Terry's shop; unfortunately, UK customs held on to it for a very long time hence the dilence

     

    Terry's board includes FET level shifters so I jumpered it direct to the relevant pins on my arduino UNO. Using the test sketch I published at the beginning of this thread, it still failed to initialise an SD card........OH NO!

     

    I have now upgraded to Arduino-1 and discovered there is an SD test sketch called Cardinfo that wasn't in Arduino - 23 - I tried it and found that it recognised my SD card, but could not find a partition on it.

    This card is an unbranded (here is a lesson!!) 2GB card which is formatted FAT16 and works fine on myPC........

     

    I also tried a brand new Transcend 2GB microSD, with the same result

     

    I then remembered I had some 3 year old San Disk Extreme III 1GB cards for my digital camera...tried one and it worked fine, even listing out the directories and their contents (came straight out of the camera).

     

    So I tried the read.write tests and more and it all works fine with the San Disk card

     

    Searching the Internet I find plenty of warnings that not all cards will work with the arduino - to do with the rise time of the signals on the SPI bus lines. However there is little clear guidance about which cards will work and which cards won't!  I did find one article which gave several San Disk cards a good report.

     

    I now wonder if the LCStudio interface card, tested with the Cardinfo sketch, might have partially worked and given me the hint that the card was actually the problem - I will never know because my LCStudio card is now totally dead - destructive testing.

     

    SO if anyone is having trouble with any SD Card interface make sure you use the Cardinfo sketch FIRST to help you find an SD Card that actually works in your setup. The fact that it is correctly Fat16/Fat32 fromatted and works on you PC is no guarantee. I have wasted hours and hours on this problem

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

    Hi Neil (and others),

     

    I admire your tenacity in working the issue.  What a crazy trip it's been, between distructive testing and import customs and different SD cards and partition types... glad in the end you found a setup that works!

     

    My own epilogue has a similarly happy ending.  I'd found out about the Arduino-23 > Arduino-1 upgrade some weeks ago, so I'd been using the Cardinfo program during testing.  Handy tool.  I took the setup() function from it, copy/pasted it into my sketch, and seasoned to taste (modified the bootup debug messages a bit).

     

    I completely gave up on those LCsoft boards and went with Lady Ada's micro SD card reader.  It worked like a charm.  I had a couple generic MicroSD cards (2 gigs, pre-formatted FAT16), and Cardinfo saw the cards and partitions without any additional tweaking on my part.  Now my project is able to use the SD the way I originally hoped it would.  But thanks for mentioning that Terry's board also worked; good to know that there are multiple known working options.

     

    Not related to this SD card discussion, but I bumped into a new problem.  The ATMega328 only has 2k of RAM.  I'd never given RAM availability much thought until my Arduino started crashing.  I started checking for free mem, and sure enough it was running out.  So, two consequences came of that: 1. I had to retool my sketch to keep a restricted "window" of the data read from the SD card because not enough RAM to hold it, and 2. discovered a trick to recover more RAM.

     

    That trick is:

     

    (old way) Serial.println("Hi, this string is loaded at boot time and will consume ~70 bytes of RAM.");

     

    (new way) Serial.println(F("This string is kept in flashmem (the 32k area where compiled sketches are stored), and will consume no additional RAM during program execution.");

     

    This doesn't really relate to the SD card effort here, just mentioning it in case others go down the same path I did and notice their Arduinos crashing due to running out of memory.  Wrapping your print() and println() strings in F("") is an easy way to save some bytes.

     

    The final piece of the puzzle in my project is to produce a production board, and for that I'm attempting to reverse engineer the Lady Ada reader so I can reproduce it in Eagle PCB.  I know this board works, so I'm trying to use similar components on my PCB.  But I'm still a newbie when it comes to surface mount components, so I can't tell yet what the 2 capacitor values are from this board just by looking at them.

     

    Not sure if you're hoping to make a production board from your project or not, but if so I'd be interested in comparing schematics and notes.

     

    Cheers.

     

    Christopher

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

    Hi Christopher (and others)

     

    Congratulations on getting your SD Card working as well. I looked again at the Lady Ada stuff - the guidance seems to have been substantially upgraded since I looked at it before christmas - it uses Arduino-1.0 for a start!

     

    I am intrigued by the use of flash memory - please can you tell me where is the technique described? And how do you check for free RAM?

     

    I am long way from even thinking about a production board yet, but when I do I will be happy to share my schematics with you

     

    Please let me know about the flash memory technique

     

    Best wishes

     

    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

    Ouch - I just found the flash memory information..

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

    My LC Studio is working on my Chipkit max32. I had some problems aswell but I could figure out which pins to use

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

    That's fantastic, Pablo. Congratulations. As a matter of interest, does the Chipkit max32 deliver 3.3v signals directly to the LC Studio board, or did you have to build a level shifter?

    • 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 © 2026 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