Interfacing WeMos D1 Minii Pro with AF Max31865

Hello!

I am writing first time on this site. I hope to find help for my interfacing problem. I also hope to give some help to other users.

I have WeMos D1 Mini Pro and AF Max31865 boards connected together. But I can't get out the temperature inf.

Board setting is: LOLIN (WEMOS) D1 Mini Pro

Uploaded program: max31865.ino

Library: <Adafruit_MAX31865.h>

HW SPI: Adafruit_MAX31865 maxthermo = Adafruit_MAX31865(8);

I have gotten next message:

"Adafruit MAX31865 PT100 Sensor Test!

ets Jan 8 2013,rst cause:4, boot mode:(3,6)

wdt reset
load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v8b899c12
~ld"

I have tested this with Arduino Uno and it works fine.

Help me, please!

I'm missing the wiring diagram of your setup and the exact code you used (don't forget the code tags!).

Hi!

Thanks for your answer!

I have made some documents to clear the situation by frizing.

There was not part for Max31865. I used SCP100 pcb. Max31865 has 5V input. In diagram I used SCP100's 3,3V pin. PT100 thermocoupler is type 3-wire.

Hi!

I am sorry forthe mess!
I am using these posts first time and be not so familiar with it - yet.

Here is the code I used:

/***************************************************
This is a library for the Adafruit PT100/P1000 RTD Sensor w/MAX31865

Designed specifically to work with the Adafruit RTD Sensor
----> Adafruit PT100 RTD Temperature Sensor Amplifier - MAX31865 : ID 3328 : $14.95 : Adafruit Industries, Unique & fun DIY electronics and kits

This sensor uses SPI to communicate, 4 pins are required to
interface
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!

Written by Limor Fried/Ladyada for Adafruit Industries.
BSD license, all text above must be included in any redistribution
****************************************************/

#include <Adafruit_MAX31865.h>
#include <spi.h>

// Use software SPI: CS, DI, DO, CLK
//Adafruit_MAX31865 max = Adafruit_MAX31865(10, 11, 12, 13);
// use hardware SPI, just pass in the CS pin
Adafruit_MAX31865 maxthermo = Adafruit_MAX31865(8);

// The value of the Rref resistor. Use 430.0 for PT100 and 4300.0 for PT1000
#define RREF 430.0
// The 'nominal' 0-degrees-C resistance of the sensor
// 100.0 for PT100, 1000.0 for PT1000
#define RNOMINAL 100.0

void setup() {
Serial.begin(115200);
Serial.println("Adafruit MAX31865 PT100 Sensor Test!");

maxthermo.begin(MAX31865_3WIRE); // set to 2WIRE or 4WIRE as necessary
}

void loop() {
uint16_t rtd = maxthermo.readRTD();

Serial.print("RTD value: "); Serial.println(rtd);
float ratio = rtd;
ratio /= 32768;
Serial.print("Ratio = "); Serial.println(ratio,8);
Serial.print("Resistance = "); Serial.println(RREF*ratio,8);
Serial.print("Temperature = "); Serial.println(maxthermo.temperature(RNOMINAL, RREF));

// Check and print any faults
uint8_t fault = maxthermo.readFault();
if (fault) {
Serial.print("Fault 0x"); Serial.println(fault, HEX);
if (fault & MAX31865_FAULT_HIGHTHRESH) {
Serial.println("RTD High Threshold");
}
if (fault & MAX31865_FAULT_LOWTHRESH) {
Serial.println("RTD Low Threshold");
}
if (fault & MAX31865_FAULT_REFINLOW) {
Serial.println("REFIN- > 0.85 x Bias");
}
if (fault & MAX31865_FAULT_REFINHIGH) {
Serial.println("REFIN- < 0.85 x Bias - FORCE- open");
}
if (fault & MAX31865_FAULT_RTDINLOW) {
Serial.println("RTDIN- < 0.85 x Bias - FORCE- open");
}
if (fault & MAX31865_FAULT_OVUV) {
Serial.println("Under/Over voltage");
}
maxthermo.clearFault();
}
Serial.println();
delay(1000);
}

Attachment: Fritzing breathboard figure to show connections.

Please edit your post and insert code tags!

Hello pylon!

Sorry about I haven't code tags available.

I have continue eor resolving the problem.

I selected this card for get longer WiFi distance by external antanna possible.
I have now checked wiring and library. I had to change some variable names. Compiler didn’t accept the name “max”. I changed it to “maxthermo”.
Then I tried to s/w spi with pins:

D5
IO, SCK
GPIO14

D6
IO, MISO
GPIO12

D7
IO, MOSI
GPIO13

D8
IO, 10k Pull-down, SS
GPIO15

It must use those GPIO pin numbers in the sketch.

"// Use software SPI: CS, DI, DO, CLK
//Adafruit_MAX31865 max = Adafruit_MAX31865(15, 12, 13, 14);
// Use hardware SPI, just pass in the CS pin
//Adafruit_MAX31865 maxthermo = Adafruit_MAX31865(15);"

Now D1 don’t restart but give error from MAX31865:

TD value: 32767
Ratio = 0.99996948
Resistance = 429.98687744
Temperature = 988.79
Fault 0xFF
RTD High Threshold
RTD Low Threshold
REFIN- > 0.85 x Bias
REFIN- < 0.85 x Bias – FORCE- open
RTDIN- < 0.85 x Bias – FORCE- open
Under/Over voltage

Weii, Checking the sensor wires and fixed those their correct pins…….

I got the result:

RTD value: 8381
Ratio = 0.25576782
Resistance = 109.98016357
Temperature = 25.6

YIPPEE!

Thanks for keep me trying!
Regards,
Hannu