Level Shifters. One of the more important but rarely addressed subjects. for the record either the 3K9 or 4K7 resistors will work fine. There is a slightly different method that can be used to give true level shifting. Instead of 2 resistors (Besides the bus pull-ups) a single mosfet is used. There is truly an added advantage in that the device is fully bi-directional it is described in this app note: AN10441. I have attached it to this post.
basically the Drain connects to the 5 V side (data - I/O), The Source connects to the 3V3 side (data - I/O) and the gate connects to 3V3. I had a bunch of 2N7000's and for the 3 or 4 I've built they've worked well. A BSS138 is recommended for this device and 2 or more? should fit nicely on one of those small SMT prototype boards. I also chose the 2N7000's because I had a bunch of them but I've not found it necessary to "Select" devices to make functional 2 wire translators, all have worked and I also use them in preference to the BSS138 because I breadboard everything and interconnect and a test all of any modules before I have an idea of what the final PCB is going to be.
As a note: Adafruit sells inexpensive level shifters for 2, 4, 8 channels but I've not bothered as it takes a fet/channel and a jumper not the 6 wires that breakout board does for 2 channels.
Unfortunately, it still doesn't work
This is my connection.
CS---------D4
MOSI------D11
SCK-------D13
MISO------D12
If I turn on the crapduino and upload absolute minimum, what readings should I get from this pins: D4, D11, D12 and D13 provided that I have not made any connection yet.
Because I am getting:
D4: 0.1 volt
D11: 5volts
D12: 0.1 volt
D13: 0 volt
yes, I'm using a level shifter.
I followed the second circuit. Resistor values are 4k7 and 10k.
If I supply my level shifter with 5 volts, the drop across 10k with respect to ground is around 3.37 to 3.4 volts.
This means that my level shifter is OK.
If I turn on my crapduino, what voltage should I read from the SPI pins?
Can you take a picture of your setup and post it here?
Are you using an SD Card or a Micro SD Card in an adaptor?
What's the error code thrown out by the BareMininumWithDebug example, error code: 1 or error code: 08?
if it is error code 1, if your not using a shield, check your connections and contacts with the SD-Card pins. if it is error code 8, try level shifting using 1.8k and 3.3k resistor.
I recently had a problem with my setup above using CD4050. So i ditched that setup and use resistor divider with above values. I am using a micro-sd on an adaptor.
also if no error code and it is saying in the serial monitor "Initialising SD card...Wiring is correct and a card is present....... playing EXAMPLE.AFM.found.playing" lean-in, or put the speaker, closer to your ear, the audio volume is quite low. that it can be unnoticeable when your in a noisy environment.
and my *duino is even more crappier than yours XD XD and it's from five years ago...
Hi, it seems that is still something wrong, either with wiring or something else.
Regarding post 145: If you build your voltage dividers correctly and assuming that you are not driving MISO as output you should not measure more than 3.3 - 3.6v anywhere on the SD card.
Please also check:
You use a SD or SDHC card, but not SDXC. Old MMC cards may work - not tested.
You use Arduino IDE 1.0 or up to 1.0.3, but not 1.5 (the beta version only for Due)
If you use a ATmega328 based Arduino, even a clone, you should use an unpatched Arduino IDE and program the Arduino using one of the boards-setting that came already with the standard IDE.
If all is ok, check if your Arduino is still working on all ports used by the SD card. Set ports to output and high and you should measure 3.3v at appropriate SD pins.
I have some SD cards that just won't initialise in my card reader. I have two cards exactly the same, 2gb and same make and model, and only one will work with the reader. Both work in the pc. I also have some microSD that won't work either, where others do.