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 5789 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…
Parents
  • 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
  • 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
  • fustini
    0 fustini over 14 years ago in reply to harbo

    Hi Harrie,

     

    I think I've since disconnected it but I'll have a look tonight.  I remember there was a bit of trial and error - wish I would have documented it better (last worked on it in February).

     

    Cheers,

    Drew

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

    and Drew, did you find the something?

     

    Cheers

     

    Harrie

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

    Hi Harrie,

     

    Sorry this slipped by my mind before I left for a wedding in Canada.  I'll check tonight.

     

    Thanks,

    Drew

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

    Hi Harrie -

     

    Sadly, my project has been dismantled so I can't recollect.  But I hooked it up based on advice I read on arduino.cc forum.  Were you able to get it working?

     

    Thanks,

    Drew

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

    Drew,

     

    Finale I got it working, attached the scheme I used. But.....The SD, apart,

    is working, and the Max31855 Temperature read-out also apart working. But

    together .....Noy yet.

    I'm not real a C-specialist, so I'm struggling with SPI now.

     

     

    2011/12/12 Drew Fustini <messages@element14.com>

     

    **

        image: element14<http://www.element-14.com?CMP=e14notificationemail_header> Re: SD Card interface board made by LC Studio/

    lcsoft.net  created by Drew Fustini<http://www.element14.com/community/people/fustini>in

    Arduino Projects | Arduino Programming - View the full discussion<http://www.element14.com/community/message/41273#41273/l/re-sd-card-interface-board-made-by-lc-studiolcsoftnet

     

    Attachments:
    imageBOB8745_MAX31855.pdf
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • harbo
    0 harbo over 14 years ago in reply to fustini

    Drew,

     

    Finale I got it working, attached the scheme I used. But.....The SD, apart,

    is working, and the Max31855 Temperature read-out also apart working. But

    together .....Noy yet.

    I'm not real a C-specialist, so I'm struggling with SPI now.

     

     

    2011/12/12 Drew Fustini <messages@element14.com>

     

    **

        image: element14<http://www.element-14.com?CMP=e14notificationemail_header> Re: SD Card interface board made by LC Studio/

    lcsoft.net  created by Drew Fustini<http://www.element14.com/community/people/fustini>in

    Arduino Projects | Arduino Programming - View the full discussion<http://www.element14.com/community/message/41273#41273/l/re-sd-card-interface-board-made-by-lc-studiolcsoftnet

     

    Attachments:
    imageBOB8745_MAX31855.pdf
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
  • r3cgm
    0 r3cgm over 13 years ago in reply to harbo

    I'm in the same boat as Neil.  Same pin connections (tried CS on both pin 10 and pin 4), and the CardInfo diagnostic program still returns:

     

    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?

    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?

    Anyone else have success with this component from LC Studio?  Is the 3.3V conversion with a 74HC4050 really needed?  Any tips appreciated.
    Christopher

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

    Hi Christopher - I have spent hours trying to get this to work, including building a 5v to 3.3v logic conversion with a 74HC4050 (sourcing that at a sensible price is another story!)

    Out of sheer frustration, I took a meter to the LC Studio board (unplugged from my arduino stuff). What I appeared to find confused me - MISO and MOSI were both shorted to ground ??

    I suspected the soldering around the card socket & so went over with very carefully and eventually unsoldered it, damaging it in the process. I then scraped off the protective layers from areas of the PCB and tried to follow the copper - I found what appeared to be shorts in the copper and so tried to scrape them away.

     

    In short, I virtually destroyed the board, but more or less convinced myself that it was originally faulty. Christmas and New Year have intervened and I am only just picking up the Arduino project again. I haven't yet communicated with the (eBay) seller, but am wondering what can be done........It would cost me more to return the board (to the far east) than I paid for it.

     

    Just to buy an SD Card connector (I mean 1, not 100 or 10,000) is ridiculously expensive, so I am now contemplating cannibalising a USB/SD Card reader.

     

    I would be fascinated to know if your LC Studio board shows the same symptoms as mine??

     

    Neil

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

    Hi, I had similar problems with a different SD Card module. I found these that use FETs for level translation and include a 3.3V regulator set up to run on both 5V Arduinos etc. and 3.3V controllers:

     

    http://arduino-direct.com/sunshop/index.php?l=product_detail&p=246

     

    I now stock these for $9.50   DISCLAIMER: Mentioned stuff from my own shop...!! Which is what I know most about :-)

     

    Regards, Terry King  ...On the Mediterranean in Italy  terry@yourduino.com

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

    Hi Neil,

     

    Our stories sound really similar.  I was staring at the board and trying to figure out where all the connections were running just to satisfy myself that everything was wired correctly, but the protective layers prevented being able to follow the traces.  I'm glad you went through the effort to scrape the protection off in your investigations.   It doesn't fill me with a lot of confidence in these boards that you found apparent shorts.

     

    I'd bought some 74HC4050 chips as an "insurance policy" in case I had to do manual 5 > 3.3V conversion, but was really hoping this LC Studio board already had that conversion on it so I wouldn't have to.  Again, I'm glad you went through the effort to build this additional circuitry because learning from your experience it sounds like that might not solve my problem either.

     

    I'm starting to get the sense that these may not be the highest quality components. :|  Even though I would have preferred to fix the board or at least find out what was wrong with it, I may just cut my losses and order a different SD card reader.

     

    I guess one minor consolation is that I won an auction for 3 of these on eBay for only $11.94 including shipping, so I didn't lose a lot of money here.

     

    I like Terry's link to the model of SD reader on YourDuino.com.  And $9.50 per unit doesn't seem too expensive.  And we know there's at least one other person on this earth who made these boards work. image

     

    Also I noticed that Lady Ada has a spiffy looking SD reader, although it's a little more expensive at $15: https://www.adafruit.com/products/254  The upshot with that one is great online documentation: http://www.ladyada.net/products/microsd/

     

    Anyway, if a fix can be found for these LC Studio boards than I'll be glad to use them, but meantime I'm going to consider them defective.

     

    Cheers,

     

    Christopher

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • terryking
    0 terryking over 13 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 13 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 13 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 13 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 13 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 13 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
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