MAX31855 an einen Pi 3 anschließen: Die Anleitung nennt MOSI, mein Board hat keinen MOSI-Pin
Von English mit KI übersetzt ·
Backend-Entwickler, erstes Hardwareprojekt überhaupt, bitte seid nachsichtig. Ich montiere einen K-Typ-Thermoelement am Pizzaofen in unserem Pausenraum (ja, wirklich), das ist für eine Demo. Dafür nutze ich einen MAX31855-Breakout an einem Pi 3B, und die Messwerte gehen an Hermetry.Die Anleitung, der ich folge, sagt: „MOSI an GPIO 10 (Pin 19), MISO an GPIO 9 (Pin 21), SCLK an GPIO 11 (Pin 23), CS an CE0“. Mein Breakout hat VIN, GND, DO, CS, CLK. Kein MOSI, kein MISO. Was ist MOSI und welcher meiner Pins ist das? Habe ich das falsche Board gekauft?
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?
Von English mit KI übersetzt ·
MOSI und MISO sind die beiden Datenleitungen von SPI. Ich glaube, bei deiner Platine ist DO das MOSI? Also Datenausgang.
MOSI and MISO are the two data lines of SPI. I think DO is MOSI on yours? Data out.
Von English mit KI übersetzt ·
Fast, aber es ist andersherum, und das passiert allen. Die Namen sind aus Sicht des Pi benannt: MOSI ist der Pi, der an den Chip sendet, MISO ist der Chip, der an den Pi sendet. DO auf deinem Breakout bedeutet „Daten aus dem MAX31855“, also geht DO an MISO, GPIO 9, Pin 21.Der MAX31855 empfängt nie etwas, du ziehst einfach CS auf Low und taktest 32 Bit heraus, deshalb hat er gar keinen Eingangspin. Lass MOSI (Pin 19) unbelegt. Verdrahtung:
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)
Aktiviere SPI in raspi-config und lies dann 4 Bytes mit spidev bei 1 MHz oder weniger. Die Bits 31..18 sind die Thermoelement-Temperatur in 0,25-C-Schritten, Bit 16 ist das Fehlerflag. Prüfe dieses Flag, bevor du etwas sendest, sonst erscheint ein offenes Thermoelement als seltsame Zahl in deinem Diagramm.
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.
Von English mit KI übersetzt ·
So verkabelt wie von Ihnen beschrieben, zeigt er bei Raumtemperatur 21.75 C und mit eingeschaltetem Ofen 287 C an. Megans Vermutung war auch meine erste, es kamen nur Nullen zurück, das wäre ein langer Abend geworden.
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.
Von English mit KI übersetzt ·
Haha, gut, dass mich jemand korrigiert hat. Ich werde mir „aus Sicht des Pi“ merken.
Ha, good that someone corrected me. I’ll remember „from the Pi’s view“.
- Du musst angemeldet sein, um auf dieses Thema antworten zu können.
Mitdiskutieren
Melde dich an, um Fragen zu stellen und zu beantworten, hilfreiche Beiträge mit „Gefällt mir“ zu markieren und die Antwort zu kennzeichnen, die dein Problem gelöst hat. Jeder Beitrag bringt Punkte und Stufen.

