Hi all,
I’m having trouble getting a RAK12022 PT100 temperature sensor module to work with my 4631 core module with the RUI3 firmware. The sensor and works fine when I use the Open Source firmware on the 4631 core, but not when using the RUI3 firmware. I find this surprising for several reasons, but the main one is that this should be a simple SPI interface and well supported. So I’m wondering what I’m doing wrong here?
Some details:
- My core module is a 4631 running RUI3 v4.0.6
- My base board is a RAK19007
- My sensor module is a RAK12022 PT100 sensor with MAX31865 IC accessed over an SPI interface
- My Arduino IDE is v2.2.1 and I’m developing on Windows 10
- I’m using the RAK12022-MAX31865 v1.0.1 library installed via the Arduino Library Manager
To reproduce the issue:
- Use WisToolBox to install the latest 4.0.6 RUI3 firmware on the 4630 module (AT+VER=? returns RUI_4.0.6_RAK4631)
- Use the Arduino Board Manager to install the RAKwireless RUI nRF Boards v4.0.6 (or v4.1.0 - it gives the same problem), and select ‘WisBlock Core RAK4631 Board’ as the board type on the right COM port. Sidenote: in my opinion, RUI3 should be included in the board type name to distinguish it from the open source ‘WisBlock RAK4631’ board type!
- Use the Arduino Library Manager to install the Install the RAK12022-MAX31865 library v1.0.1
- Open the example sketch with File->Examples->RAK12022-MAX31865->RAK12022_Max31865_Example (version 0.1 is listed in the header comments for this sketch)
- Change the PT100 probe type in line 35 with maxTemp.begin to match your probe (I have a 3 wire probe so select MAX31865_3WIRE)
- Compile and upload.
The output I get is per below, and I am unable to get temperature readings:
RAK12022 Max31865 Test
MAX31865 is not connected, Please check your connections
With the same example sketch loaded, and changing the 4631 firmware to the open source firmware per the instructions at Device Firmware Upgrade | RAKwireless Documentation Center , and changing the board type to ‘WisBlock RAK4631’ in the Arduino IDE and compile->uploading, then I get the following successful output:
RAK12022 Max31865 Test
Found MAX31865
Resistance = 109.96 Ohms, Temperature = 25.50 °C, RTD Low Threshold
Resistance = 109.95 Ohms, Temperature = 25.47 °C, RTD Low Threshold
Resistance = 109.96 Ohms, Temperature = 25.50 °C, RTD Low Threshold
Resistance = 109.98 Ohms, Temperature = 25.53 °C, RTD Low Threshold
–
I’ve tried downgrading to 4.0.5 of the firmware and the Arduino Board type, with the same results
- I’ve also tried an Adafruit library from Adafruit MAX31865 library - Arduino Reference and their single example (remembering to enable power by setting WB_IO2 to HIGH), and I don’t get valid readings either.
So my conclusion is that there’s something about RUI3 firmware (or the Arduino Board definition?) that prevents a simple SPI-based sensor working?
I do see that the quickstart guide for this sensor block under point 2 of the heading ‘Initial Test of the RAK12022 WisBlock Module’ specifically mentions using the package_rakwireless_index.json board installation package which implies that this sensor might only work with the open source firmware; but if its just SPI I don’t understand why?
I will kick myself if this turns out to be some simple or obvious thing that I should have quickly seen, but I’m a bit stumped and not sure how to troubleshoot further - some insights or assistance would be appreciated!
Thanks in advance.
As a quick sidenote: what would be nice during development is some little breakout board that could sandwich in between the 24 and 40 pin connectors and break the pins out where they would be easier to get to with an oscilloscope (I was initially trying to confirm power was reaching the sensor module and that I could see SPI signals, but this was tricky given the tiny size of all the components)