User Tools

Site Tools


arduino:sd-card-modules

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
arduino:sd-card-modules [2019/11/08 15:54]
Ilias Iliopoulos [LC Studio]
arduino:sd-card-modules [2024/02/02 21:47] (current)
Ilias Iliopoulos
Line 75: Line 75:
 It is obvious that this SD Card Module complies only with criteria 1 and 2 set in our [[#​Introduction|Introduction section]]. The module will of course operate if wired to a 3.3V Raspberry Pi, but shall it survive the 5V Arduino voltages? One can find several internet pages which advice that this is safe, because "​several"​ SD cards can tolerate 5V signals. My approach is that if your project requires the use of an SD card, the type of SD card and its specifications are totally outside the control and the original intentions of the designer. Even users who had been warned about specific precautions,​ will (and shall) behave eratically at some point in time. We must therefore assume that our project will receive various SD cards from several origins and manufacturers. **I need to point out that the module does not buffer in any way the SD card pins, so whatever voltage we send, goes directly to the SD card**. ​  Such wiring will probably have no effect on the controller but will rather damage the SD card itself and risk the loss of its valuable data. This is absolutely not acceptable for a reasonable design. An addition of a level shifter, external to the module, is mandatory for safe operation in all circumstances where a 5V architecture is implemented. In the case where the project architecture is based on 3.3V, the module can be used without any problem. It is obvious that this SD Card Module complies only with criteria 1 and 2 set in our [[#​Introduction|Introduction section]]. The module will of course operate if wired to a 3.3V Raspberry Pi, but shall it survive the 5V Arduino voltages? One can find several internet pages which advice that this is safe, because "​several"​ SD cards can tolerate 5V signals. My approach is that if your project requires the use of an SD card, the type of SD card and its specifications are totally outside the control and the original intentions of the designer. Even users who had been warned about specific precautions,​ will (and shall) behave eratically at some point in time. We must therefore assume that our project will receive various SD cards from several origins and manufacturers. **I need to point out that the module does not buffer in any way the SD card pins, so whatever voltage we send, goes directly to the SD card**. ​  Such wiring will probably have no effect on the controller but will rather damage the SD card itself and risk the loss of its valuable data. This is absolutely not acceptable for a reasonable design. An addition of a level shifter, external to the module, is mandatory for safe operation in all circumstances where a 5V architecture is implemented. In the case where the project architecture is based on 3.3V, the module can be used without any problem.
  
-Can we expand the module with a level shifter, while at the same time allow the board to work in a multi-participant SPI bus? I have developed the circuit that is depicted in the following diagram for that purpose. We are adding an external chip which operates both as a voltage level shifter and as a chip selector for the SPI bus. This chip is the 74LV125 or 74HCT125N. This is the same chip type used in the Catalex module, in a DIP version, so that we can work with it easily. In this circuit, the wiring allows multiple participation to the SPI bus, because the MISO output (as seen from the module side) is activated only when the controller has explicitly indicated that it intends to communicate with the module, activating the CS pin, which subsequently activates pin 8 of the 74125 chip and finally brings the buffer handling the MISO signal out of the high impedance state. Whenever CS is not active, MISO output is kept at the high impedance state, leaving other modules and devices free to use the SPI bus. We could also wire pin 8 to pins 4 and 10 instead of wiring 4 and 10 to ground, but I just wanted to point out in its simplest form the correction that would be required to the Catalex module to make it operate properly. When CS is not active, the SD card by itself ignores the signals in its inputs, so it is OK to have pins 4 and 10 connected to ground. ​+Can we expand the module with a level shifter, while at the same time allow the board to work in a multi-participant SPI bus? I have developed the circuit that is depicted in the following diagram for that purpose. We are adding an external chip which operates both as a voltage level shifter and as a chip selector for the SPI bus. This chip is the 74LV125 or 74HCT125N. This is the same chip type used in the Catalex module, in a DIP version, so that we can work with it easily. ​**(I was not able to find in the market a PDIP 74LV125, so I used an 74HCT125 instead. It is specified at 5V, whereas the 74LV125 works from 2V to 5.5V. Yet it worked, but I cannot guarantee that it will work at all circumstances.)** ​In this circuit, the wiring allows multiple participation to the SPI bus, because the MISO output (as seen from the module side) is activated only when the controller has explicitly indicated that it intends to communicate with the module, activating the CS pin, which subsequently activates pin 8 of the 74xx125 ​chip and finally brings the buffer handling the MISO signal out of the high impedance state. Whenever CS is not active, MISO output is kept at the high impedance state, leaving other modules and devices free to use the SPI bus. We could also wire pin 8 to pins 4 and 10 instead of wiring 4 and 10 to ground, but I just wanted to point out in its simplest form the correction that would be required to the Catalex module to make it operate properly. When CS is not active, the SD card by itself ignores the signals in its inputs, so it is OK to have pins 4 and 10 connected to ground. ​
  
 The chip is powered by the 3.3V which is present in the module connector, so, although we hated it above, we are exploiting it to our benefit and avoid the need of an extra power source. The schematic is shown below: ​ The chip is powered by the 3.3V which is present in the module connector, so, although we hated it above, we are exploiting it to our benefit and avoid the need of an extra power source. The schematic is shown below: ​
Line 98: Line 98:
  
  
 +~~DISQUS~~
arduino/sd-card-modules.1573221291.txt.gz ยท Last modified: 2019/11/08 15:54 by Ilias Iliopoulos