I have a 3d printer that has the ability to read the gcode from the sd card so it knows what to print.

I have added to this a MAX6675 thermocouple driver. I believe the sd card shares the same spi bus. I am getting major problems with temperature readings shouting up and down when I'm printing.

since they both have to in real-time i.e. ideally no delay could my woes be because the arduino (mega 2560) is simply struggling to do both at the same time hence the temperature goes down then shoots up when the SPI is available again?

The max6675 is meant to be support by the marlin firmware. Am guessing they didn't mean it to be used in conjunction with the sd card reader.

[moderator note
The original title of this question was: "Two slave devices on the same SPI bus. What are the limitations?"
On closer examination, however, this turned out to be an analog thermocouple problem, rather than a digital SPI problem.]

  • 1
    \$\begingroup\$ There shouldn't be any problem sharing an SPI bus as long as you make sure that only one chip select line is active at a time. And if there were a logic problem like that, then I would expect everything to just completely fail (since both devices would be seeing invalid data). I agree with @NickAlexeev that this is probably a thermocouple problem. Possibly interference from the motor being picked up by the thermocouple amplifier? \$\endgroup\$
    – Evan
    Commented Dec 10, 2016 at 0:59
  • 1
    \$\begingroup\$ An exchange on the SPI bus typically takes a few tens of microseconds. I doubt the temperature has the time to drop significantly with that. \$\endgroup\$
    – dim
    Commented Dec 10, 2016 at 4:11
  • \$\begingroup\$ I have a heater block which where is the pla material gets melted. Its essential a block of aluminium i believe. Is it ok for me to stick the bare ended themocouple into the hole where the thermistor used to be ? The ones i have seen have a metal cap over the hot junction \$\endgroup\$
    – Ageis
    Commented Dec 10, 2016 at 9:27
  • \$\begingroup\$ Thermocouples are constructed from conductive materials. Sometimes they are insulated, and sometimes not. Does yours look like a tiny melted bead where two wires were fused together? \$\endgroup\$
    – user57037
    Commented Dec 10, 2016 at 9:56
  • \$\begingroup\$ Yes. The junction is exposed. So it looks like someone has soldered them together but badly \$\endgroup\$
    – Ageis
    Commented Dec 10, 2016 at 17:41

1 Answer 1


Chances are that this is a thermocouple issue. I doubt that this is an SPI bus issue.

MAX6657 is intended for a a floating thermocouple. When you connect the tip of the thermocouple to the aluminium block, it's no longer floating.

We have a thread about floating vs grounded thermocouple. See this answer and the discussion in the comments under it.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.