MAX31865 gives bad readings

Hello, I’m a relative newbie and I’m looking for some advice. My MAX31865 RTD amp will not work. I am using a Le Potato w/ the Raspbian OS from the Distro server. Libretech wiring tools w/ spi and spicc and spicc-spidev enabled. I’m using a MAX31865 RTD amp w/ a PT1000 RTD. Correct ref resistor (4300 Ohms). Wiring is double-checked, solder joints double-checked. Replaced the MAX board once. When I query the amp I get 0 Ohms on the RTD. I’m using a 3-wire RTD and have jumpered the board appropriately (closed the 2/3 wire jumper, the 3/4 jumper, and opened the 2/4 junction with a cut). As I’ve double-checked the hardware, I am thinking this is a comms issue, maybe something associated with the Libre? Code and photos below. There is one last piece of the puzzle that I don’t understand, and maybe this will be the solution: when I try and use pin 24 as my chip select, I get an error (“Device or Resource Busy”). This board is simultaneously running a temperature sensor using I2C, but those are completely different pins and wiring.

#import time
#import gpiod
import digitalio
import adafruit_max31865
import board
#import sys

spi = board.SPI()
cs = digitalio.DigitalInOut(board.P26) # Chip select of the MAX31865 board.
sensor = adafruit_max31865.MAX31865(spi, cs, wires=3, rtd_nominal=1000.0,

print(‘Temperature: {0:0.3f}C’.format(sensor.temperature))
print(‘Resistance: {0:0.3f} Ohms’.format(sensor.resistance))

Looks like your using Blinka with board and digitalio. Please can you check you have the latest version with the Le Potato SPI fix.

Le potato patch by Iainrach · Pull Request #655 · adafruit/Adafruit_Blinka (

I uninstalled and reinstalled blinka last week. I noticed that some Libre functionality had just been added to some of my libraries, I don’t recall which one.

Is this close to the error you get ?

display_bus = displayio.FourWire(
File “/usr/local/lib/python3.9/dist-packages/displayio/”, line 64, in init
self._chip_select = digitalio.DigitalInOut(chip_select)
File “/usr/local/lib/python3.9/dist-packages/”, line 165, in init
self.direction = Direction.INPUT
File “/usr/local/lib/python3.9/dist-packages/”, line 195, in direction
File “/usr/local/lib/python3.9/dist-packages/adafruit_blinka/microcontroller/generic_linux/”, line 108, in init
OSError: [Errno 16] Device or resource busy

This is the result when I try and use pin 24 as CS:
Traceback (most recent call last):
File “/home/pi/”, line 9, in
cs = digitalio.DigitalInOut(board.P24) # Chip select of the MAX31865 board.
File “/usr/local/lib/python3.9/dist-packages/”, line 165, in init
self.direction = Direction.INPUT
File “/usr/local/lib/python3.9/dist-packages/”, line 195, in direction
File “/usr/local/lib/python3.9/dist-packages/adafruit_blinka/microcontroller/generic_linux/”, line 115, in init
File “/usr/local/lib/python3.9/dist-packages/gpiod/libgpiodcxx/”, line 572, in request
rv = libgpiod.gpiod_line_request(_m_line, conf, default_val)
File “/usr/local/lib/python3.9/dist-packages/gpiod/libgpiod/”, line 499, in gpiod_line_request
return gpiod_line_request_bulk(bulk, config, [default_val])
File “/usr/local/lib/python3.9/dist-packages/gpiod/libgpiod/”, line 542, in gpiod_line_request_bulk
return _line_request_values(bulk, config, default_vals)
File “/usr/local/lib/python3.9/dist-packages/gpiod/libgpiod/”, line 403, in _line_request_values
status = ioctl(fd, GPIO_GET_LINEHANDLE_IOCTL, req)
OSError: [Errno 16] Device or resource busy

Please could you try enabling spicc-cs1 & associated spidev while using P26 as your chip select.

Interested to see what happens - At the minimum I’m confident you will get a different error.

Ok here’s the outputs:
pi@raspberrypi:~ $ ldto status
#Overlays active:
pi@raspberrypi:~ $ python
Temperature: -242.020C
Resistance: 0.000 Ohms

Unfortunately this is the same output as before

Unfortunately I don’t have one of these amplifiers but looking at the instructions and your photos everything looks good.

I was going to suggest just using 2 wire and putting a resistor across as a test but I see that’s not practical seeing all the soldered configuration for 3 wire.

Do you have another SPI device that you could test ?

I haven’t tried the loopback test below but if you’ve run out of options it might be worth a try ???

Raspberry Pi SPI Loopback Testing | HalfaGeek (