u/Fancy-Delivery5081
Hi everyone, I'm stuck on a thermal monitoring project and have run out of ideas..
I'm building a thermal monitoring system for a BGA rework station. The goal is to monitor up to 4 Type-K thermocouples simultaneously during BGA reflow/rework operations and display live temperature curves on a connected monitor. The system runs on a Raspberry Pi Zero W v1.1 on a custom PCB, boots directly into a Python/matplotlib dashboard via systemd autostart, and is powered by a single 5V/5A supply.
Hardware:
- Raspberry Pi Zero W v1.1
- Custom PCB with 4x MAX31856MUD (TSSOP-14), assembled by JLCPCB (standard assembly service, no functional testing)
- AMS1117-3.3V LDO regulator
- Raspberry Pi OS Lite (Trixie, fully updated)
Symptoms:
- SPI is enabled (
/dev/spidev0.0and/dev/spidev0.1present) - All registers read 0x00 – including register 0x01 (CR1) which should default to 0x03 according to the datasheet
- Write operations have no effect (write 0x55, read back 0x00)
adafruit_max31856library throws no exceptions but always returns 0.0°Cfault['open_tc']shows False even when no thermocouple is connected (which is physically impossible)
What I have measured/verified:
- AVDD (Pin 5) → AGND (Pin 1): stable ~3.3V ✅
- DVDD (Pin 8) → DGND (Pin 14): stable ~3.3V ✅
- CS pin (GPIO8) at idle: ~3.3V (HIGH = correct) ✅
- Routing verified: Pi Pin 19 (MOSI/GPIO10) → MAX31856 Pin 11 (SDI) ✅
- Routing verified: Pi Pin 21 (MISO/GPIO9) → MAX31856 Pin 12 (SDO) ✅
- IC marking: MAX31856MUD ✅
- Pin 1 orientation (square pad): matches between PCB footprint and physical IC ✅
What I have tried:
- Tested all 4 SPI modes (0-3) – all return 0x00
- Hardware CS vs. software CS (manual GPIO control) – no difference
- Bit-banging with RPi.GPIO – no difference
- Swapped MOSI/MISO jumpers at the Pi header – briefly got realistic-looking values (once 16°C, otherwise 8-9°C) but write operations still had no effect and values never changed with temperature
- Enabled SPI1 (
dtoverlay=spi1-3cs) – OSError: Invalid argument - External 3.3V source (Arduino) directly on AVDD/DVDD – no difference
start_autoconverting()+unpack_temperature()– returns values but they never change regardless of temperature applied (heat gun, fingers, etc.)
Known design issue: Pin 1 of the Pi GPIO header was accidentally connected to AMS1117 VOUT, meaning the Pi's internal 3.3V regulator and the AMS1117 were fighting each other on the 3V3 rail. I have since cut this connection. Tested with external 3.3V supply as well – no change in behavior.
Test code:
python
import spidev
import time
for mode in range(4):
spi = spidev.SpiDev()
spi.open(0, 0)
spi.max_speed_hz = 500000
spi.mode = mode
result = spi.xfer2([0x01, 0x00])
print(f"Mode {mode}: Reg 0x01 = 0x{result[1]:02X}")
spi.close()
time.sleep(0.1)
Output: 0x00 on all modes.
My question: What could cause the IC to seemingly respond (no exceptions, open_tc False) while all registers read 0x00 and write operations have zero effect? Could this be a footprint issue even though Pin 1 orientation appears correct? Is it possible the IC is damaged from the 3V3 rail conflict? Any ideas appreciated – this has been a very long debug session! 😅
(Text translated with AI - not native english, excuse me)