Arduino Pro Mini not recognizing SD Reader

Hey guys, I am working on an academic cubesat project and have been running into issues with our imaging board and cant seem to pinpoint the issue. I wasn't the original person who designed the board so I am trying to put everything together as I go along, but the primary concern here is getting the Arduino Pro Mini (3.3V) to initialize the SD card reader (using a 3M 2908-08-05WB-MG). Between the Pro Mini and the SD reader is a CD74HC4050 level shifter and also a LP2985 voltage regulator.

Here is the schematic for the connections, it seems like a near copy of the adafruit design found here.

Originally, the way the board is designed, there was no power being fed into the voltage regulator's on/off/sleep switch, so Vout was reading 0 and not 3.3V, and the SD card reader was not being powered. I have since fixed that by attaching a wire to VCC and the SD card is now getting 3.3V.

I am still not able to initialize the SD card and I have read through quite a lot of forums about it, but it seems like most peoples issues stem from them having incorrect connections or having the wrong chip select pin in their code. I think the next most likely candidate would be an issue with the card detect?

I have probed the level shifter and it reads 3.3V on the trace that connects pin 2/CS on the SD card regardless if the card is inserted or not.

The current code, which I have been running on a separate Mega 2560, checks out and works fine (obviously different pins). But for whatever reason the Pro Mini wont even recognize the SD card whatsoever. I'm using a SanDisk ultra 16gb, and have checked a few times to make sure its functional and formatted correctly, but there just doesnt seem to be any feedback from the SD reader to the Mini - for instance SD.begin doesn't return anything.

I have tried a combination of SPI speeds/pinMode(CS, OUTPUT)/digitalWrite/etc and still nothing.

Apologies for the hard to read photo, new users cant post more than one image/multiple links. Any help on this would be much appreciated.

Update: for some reason now the Pro Mini is picking up the SD card, but it is not able to find the fat32 partition. I reformatted it again using SD Card Formatter (instead of Disk Utility) and I am getting the same response.

Update 2: have now tried a separate PCB board (same design) with another Pro Mini and SD reader, and I am still getting the same response. Have done a continuity check on all the pins for the sd reader to the mini and everything checks out. Im pretty stumped with this one

Which SD library do you use ?
Some SD cards are not compatible. Try an old SD card of 1GByte or less.
There could be noise in your circuit. The capacitors for the LP298X should very close to it.

Ive been using the latest SdFat version, and have also tried the adafruit SdFat fork. I have played around with various configurations for clock speed and other random things but nothing seems to work.

It is hard to get small capacity micro sd's because not many companies make them anymore, but I managed to get one from amazon so hopefully that will fix the issue. Seems like that is the only likely solution left and if that doesn't work then it could likely be from board noise/configuration.

obviously a bit hard to tell without really knowing the board, but how likely is noise a problem for arduinos/sd's? Wouldn't it take a lot of current to affect that

Do you have more than one SPI device? SD card readers are notorious for not playing well when there is more than one SPI device connected to the micro, because the SD card never releases the MISO line when the SD card even when select is not set HIGH. Wondering if your test environment with the mega 2560 has only the SD card so it's playing nice vs the real target environment with the pro mini has other hardware and modules connected. Just a thought.

1 Like

Ive only got one SPI decide which is the SD reader. It has to be an issue with the PCB board I have been using it seems, but I wasn't the original designer so I am trying to pick up some pieces of the design choices. One thing I noticed was that the CLK trace is connected to two different pins on the level shifter, one of which seems to be so joined with the CS trace. This looks different than how it is on the original adafruit board design where the CLK trace connects to the CS trace after the level shifter.

Ive attached photos comparing my current board and the adafruit layout for reference. Disregard the messy design lol, I wasn't the original designer of this and am in the process of cleaning it up.


Can you post a schematic of your board as it's easier to analyse that than follow pcb tracks around.

EDIT: ignore that, I forgot that you posted it on the initial post!

Yeah I did up above on the original post. Heres a bigger snapshot since I couldn't post multiple photos on my first one.

From what it looks like, the schematic was pretty much copy and pasted from the Adafruit reader

Silly question, but is the resistor R2 on your PCB the correct value compared to the schematic?

Yeah just measured it and its reading 998 ohms

Apart from memory restrictions in some applications, a 3.3V Pro Mini is more than capable of writing and reading to an SD card.

Just use an adapter card that has no fancy logic level conversion stuff, since you can connect a SD card direct to a 3.3V Pro Mini, easy peasy.

Why you would want to have a pile of trouble using level shifters to connect an 3.3V Pro Mini to an 5V SD card adapter I do not undersrtand.

You are correct, it doesn't really make sense to have the unnecessary complication when the Arduino is already 3.3V. Although, the board in question is supplied with 5V and with the way it is currently designed it is necessary to convert that to 3.3V for the SD. This is for a student cubesat project and the other half of this particular board also powers a collection of magnetoquers with 5V, as well as a camera which takes a 5V input.

My last resort, if all else fails, will be to just take out the portion of the board that controls the SD power/data, and instead just hardware mount an off the shelf adafruit breakout and connect it to the arduino like would traditionally with a breadboard. Since it's a student project for learning I figured I might as well get practice redesigning the way the board is now for better functionality.

Still a bit puzzled as to why it isn't returning data correctly, and at this point it only seems logical that there is interference from noise on some of the lines.

It seems like a good time to connect up a scope and see what's going on.

Yeah I was thinking that would be next steps. To be completely honest I am not sure what I would really be looking for though on the scope as I don't have extensive experience with this. Ive probed all the lines and they seem to check out, but have yet to connect a scope.

mmm, well I have a little experience of desiging electronics for satellites, although somewhat smaller than cubesats.

If your basing the Cubesat design on breakout boards you can get cheap, then these are mostly designed for connection to 5V Arduinos.

However its very likley that the devices on the 'breakout boards' are 3.3V devices that dont need logic level conversion at all.

Yeah true. Again, I wasnt the original one who designed this so I am not sure why they chose a 3.3V Pro mini over the 5V...still that shouldn't be causing the issues that are happening right? I guess maybe the SPI pin on the Pro Mini being 3.3V may be messing it up since the SD is meant for 5V? Just spitballing ideas

Maybe they wanted a modern design and not what might have been common many years ago ?

Possibly, may have also been a temporary solution but not sure. I will probably be making some changes to the board layout.

Would that be a possible issue though with the arduino being a 3.3V?

There is a specific issue with SD Card adapters, mostly designed for 5V use, in that they interfere with proper operation of the SPI bus, there is a hack apparently.

I use SD cards quite a bit, but on 3.3V systems with a proper adapter board, I dont get a problem.

One issue to consider though, would you really put an SD Card into space, would the socket survive the significant vibration of launch ?.

And why store so much data anyway, the reality is you dont get a satellite back and the amount of data you can transmit from low Earth orbit is very limited indeed.