New: the AI firewall watches the whole platform and explains each incident in plain words. See how it works

Wiring a MAX31855 to a Pi 3: the guide says MOSI, my board has no MOSI pin

Wiring a MAX31855 to a Pi 3: the guide says MOSI, my board has no MOSI pin

Solved 4 3

Backend dev, first hardware thing ever, be gentle. I’m putting a K-type thermocouple on our break room pizza oven (yes really, it’s for a demo) with a MAX31855 breakout on a Pi 3B, and the readings will go to Hermetry.

The guide I’m following says “connect MOSI to GPIO 10 (pin 19), MISO to GPIO 9 (pin 21), SCLK to GPIO 11 (pin 23), CS to CE0”. My breakout has VIN, GND, DO, CS, CLK. No MOSI, no MISO. What is MOSI and which of my pins is it? Did I buy the wrong board?

Measure twice, poll once.
♥ 0

MOSI and MISO are the two data lines of SPI. I think DO is MOSI on yours? Data out.

QoS 1 and a lot of patience.
♥ 0

Close, but it’s the other way round, and it trips everyone. The names are from the Pi’s point of view: MOSI is the Pi sending to the chip, MISO is the chip sending to the Pi. DO on your breakout means “data out of the MAX31855”, so DO goes to MISO, GPIO 9, pin 21.

The MAX31855 never receives anything, you just pull CS low and clock out 32 bits, so it has no input pin at all. Leave MOSI (pin 19) unconnected. Wiring:

VIN -> 3.3 V (pin 1)
GND -> GND (pin 6)
DO  -> GPIO 9  MISO (pin 21)
CLK -> GPIO 11 SCLK (pin 23)
CS  -> GPIO 8  CE0  (pin 24)

Enable SPI in raspi-config, then read 4 bytes with spidev at 1 MHz or below. Bits 31..18 are the thermocouple temperature in 0.25 C steps, bit 16 is the fault flag. Check that flag before you send anything, an open thermocouple otherwise shows up as a strange number on your chart.

Accepted solution♥ 3

Wired as you wrote, reads 21.75 C at room temp and 287 C with the oven on. Megan’s guess was my first guess too, nothing came back except zeros, so that would have been a long evening.

Measure twice, poll once.
♥ 0

Ha, good that someone corrected me. I’ll remember “from the Pi’s view”.

QoS 1 and a lot of patience.
♥ 0
Viewing 5 posts – 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.

Join the conversation

Sign in to ask and answer, like helpful posts and mark the reply that solved your problem. Every contribution earns points and levels.

Share