Go Down

Topic: Puzzling voltage levels on SD card pins (Read 193 times) previous topic - next topic


Hi, I'm a bit stuck in debugging my custom PCB version of an Arduino Mega2560 with an Adafruit 1411 logger shield. I've designed dozens of production pcb's successfully before, using ground planes and decoupling caps and all the usual sensibilities.

I've used the reference schematic for the logger shield to make the pcb version. I was very happy with the working of the actual logger shield and my software when I was prototyping, but now while debugging the pcb, I find the following a bit disturbing and puzzling!

I'm using a 4050 for buffering the MOSI, SCK and SD_CS input lines from 5v to 3.3v, specifically a MC14050BDG that works down to a 3v supply rail. As per the diagram, I've left the 2560's MISO line directly connected to the DATA_OUT of the card. This doesn't fill me with confidence that it's correct though, i.e. a 3.3v logic part trying to talk to a 5v logic part.

The software I developed uploads and runs fine, but the call to the SD library to check the card fails, giving the standard "ERROR: card failed, or not present" as taken from the example code. The SD_CS line is correctly specified and connected however.

I've scoped my pcb's SD card's input pins, and I'm worried by the way that they occasionally exceed 3.3v - rising momentarily to 4v or higher. All the GND connections appear present and correct; I'm uncertain and confused, and wonder what I could have possibly missed?


1) Is it correct that the SD data out line is connected directly to the 2560 micro, without 3.3v->5v buffering?
2) Could this direct connection be raising the other 3.3v signal lines dangerously above 3.3v?
3) Can anyone suggest some simpler steps for establishing correct operation with the SD card?

Many thanks,


It's okay to have that direct connection because 3.3V will be seen as logic high by a 5V processor. The question is why your SD card input pins are spiking above 3.3V. Does the power pin also have a spike?


The MC14050BDG is slow (4000 series). 74HC4050 is the chip to use instead.



1) Thanks for the advice about the MISO line being ok without buffering; it clearly works ok on the original datalogger shield.
2) Yes, spikes were appearing on the 3.3v supply rail! Rising to about 4.1v for a few hundred milliseconds. The MISO (sd data out) was rising to 5v, asserted by the 2560 micro, measurable when the card was not present. My mistake: I've correctly wired the card to the hardware SPI pins (like the Uno), but I was initialising the card library for the Mega which was creating software SPI pins in the wrong places. So MISO was swapped with another I/O pin, and the others were in a mess :)

Thanks for pointing out the slowness of the 4050 I'm using; at the moment it doesn't look like it was the cause of the SD card failing to initialise, which it now does, now I've sorted out the SPI pins. I'll order what you suggest just in case.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131