MAX31855 and SD Card datalogging

Hey all,

I'm very new to the community and haven't posted so I thought I'd give it a try. I have been using Arduino for a couple of years now and by no means am an expert.

I am trying to read the temperature from 8 K type thermocouples with the adafruit MAX31855 and log it onto an SD card (I am using the arduino sd breakout board, with standard 16gb SD card) on an Arduino Mega 2560. Temperature logs great for all thermocouples when using the software SPI interface; however, the write time is too large ~800ms. I am assuming this is coming from the 70-100ms read times of each MAX31855.

I read somewhere that using the hardware SPI interface is more efficient, which will lead to faster write times into my Arduino Mega 2560. After attaching all DO->MISO and CLK->SCK lines and having a different CS for each thermocouple MAX31855 Board, the write time was decreased dramatically (~100ms); however, NANs were being thrown for all the Thermocouples.

My question is, is it possible to use the hardware spi interface for the SD breakout board and MAX31855s at the same time? I am using the standard max31855 library from adafruits website, which has a hardware spi interface option, but to no avail. Any info on increasing write times to the SD or using MAX31855 and SD breakout at the same time would be helpful,

Thanks

My question is, is it possible to use the hardware spi interface for the SD breakout board and MAX31855s at the same time?

It depends. If the used SD breakout board has a correct SPI interface it's no problem but most cheap Chinese boards are not constructed correctly. This results in a MISO line that doesn't go tri-state if CS is pulled low, so blocking all other SPI bus devices. As you failed to provide a link to the product you're using I simply assume you have such a faulty board. If you have very good soldering skills you may fix the board (not all boards are fixable though), otherwise go and buy an SD card adapter from one of the serious suppliers (Arduino, Sparkfun, Adafruit, etc.).