Hello together,
I'm working on a data logger project. I would like to read values from a digital gauge (digimatic protocoll) and temperature values (MAX31855) and save them to a sd card. Now I got my digital gauges and the sd card working. But I've read it could be a problem with SPI (MISO, MOSI, CLK) when I use a sd card board on SPI and also the MAX31855. The solution for this is to use software SPI instead of Hardware SPI for the temp sensor.
My Question is, can I use five MAX31855 with the same pins for: Data Out and CLK and only the CS on different pins, or do I ned for every tempsenor 3 different pins?
So for my project with at mega2560 : I use PIN 50-53 (53 = CS/SS) for the sd card. And now I would like to use pin 48/DO 49/CLK for software SPI and the pins 37-42 as CS for the Max31855.
Can this work?
The solution is to get a SD card module that does not tie up the MISO line. Some SD card modules will not play well with other devices on the SPI bus. The problem is with the way the level shifter on the SD module is wired. The ones that do not work well have the MISO signal running through the level shifter. That causes the MISO signal to not be released so that the other devices can control it. The modules made by Adafruit (and some others) have the MISO signal going from the SD card straight to the MISO, bypassing the level shifter. Look at the schematic for the Adafruit module to see what to look for. DO (data out) is the MISO signal.
So, with the proper SD module, the devices can all connect to the SPI bus as intended.
It may be that the problem you are referring to is in relation to the SD card module. Some do not correctly release the MISO signal when the card is deselected, which causes all sorts of problems on the SPI bus.
The quick fix that some people go with is to use a software SPI implementation to put either the SD card module or their other SPI devices on a separate SPI bus.