Conectar un MAX31855 a una Pi 3: la guía habla de MOSI, mi placa no tiene pin MOSI
Traducido del English por IA ·
Desarrollador backend, es mi primer trabajo con hardware, por favor tened paciencia. Voy a poner un termopar tipo K en el horno de pizza de la sala de descanso (sí, en serio), es para una demo. Uso una placa breakout MAX31855 en una Pi 3B, y las lecturas se enviarán a Hermetry.La guía que sigo dice: «conecta MOSI al GPIO 10 (pin 19), MISO al GPIO 9 (pin 21), SCLK al GPIO 11 (pin 23), CS a CE0». Mi placa tiene VIN, GND, DO, CS, CLK. Sin MOSI, sin MISO. ¿Qué es MOSI y cuál de mis pines es? ¿Compré la placa equivocada?
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?
Traducido del English por IA ·
MOSI y MISO son las dos líneas de datos de SPI. Creo que en la tuya DO es MOSI, ¿no? Data out, es decir, salida de datos.
MOSI and MISO are the two data lines of SPI. I think DO is MOSI on yours? Data out.
Traducido del English por IA ·
Casi, pero es al revés, y eso confunde a todo el mundo. Los nombres están vistos desde el punto de vista de la Pi: MOSI es la Pi enviando al chip, MISO es el chip enviando a la Pi. DO en tu breakout significa «datos que salen del MAX31855», así que DO va a MISO, GPIO 9, pin 21.El MAX31855 nunca recibe nada, simplemente pones CS en bajo y extraes 32 bits, así que no tiene ningún pin de entrada. Deja MOSI (pin 19) sin conectar. Cableado:
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)
Activa SPI en raspi-config y luego lee 4 bytes con spidev a 1 MHz o menos. Los bits 31..18 son la temperatura del termopar en pasos de 0,25 C, el bit 16 es el indicador de fallo. Comprueba ese indicador antes de enviar nada, porque un termopar abierto aparecerá como un número extraño en tu gráfico.
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.
Traducido del English por IA ·
Conectado tal como lo escribiste, marca 21.75 C a temperatura ambiente y 287 C con el horno encendido. La suposición de Megan también fue mi primera idea, y solo volvían ceros, así que habría sido una tarde larga.
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.
Traducido del English por IA ·
Ja, qué bien que alguien me corrigiera. Recordaré «desde la perspectiva de la Pi».
Ha, good that someone corrected me. I’ll remember «from the Pi’s view».
- Debes estar registrado para responder a este debate.
Únete a la conversación
Inicia sesión para preguntar y responder, dar me gusta a las publicaciones útiles y marcar la respuesta que resolvió tu problema. Cada aportación suma puntos y niveles.

