Adafruit MAX31865 RTD PT100 or PT1000 Amplifier Created by lady ada Last updated on 2018-08-22 03:57:30 PM UTC
Guide Contents Guide Contents Overview Pinouts 2 3 6 Power Pins: 6 SPI Logic pins: Sensor Terminal Blocks Configuration Jumpers Assembly 6 7 7 9 Prepare the header strip: Solder! 10 10 RTD Wiring & Config 15 4-Wire RTDs 3-Wire RTDs 2-Wire RTDs 15 15 16 How To Wire Up! 17 4-Wire Sensors 17 3-Wire Sensors 2 Wire Sensor Arduino Code SPI Wiring Download Adafruit_MAX31865 library Attach PT100 or PT1000 RTD Load Demo More Accuracy Library Reference Reading Resistance Calculating Temperature 23 23
Overview For precision temperature sensing, nothing beats a Platinum RTD. Resistance temperature detectors (RTDs) are temperature sensors that contain a resistor that changes resistance value as its temperature changes, basically a kind of thermistor. In this sensor, the resistor is actually a small strip of Platinum with a resistance of 100 or 1000 ohms at 0°C, thus the name PT100/PT1000.
However, to get that precision and accuracy out of your PT100x RTD you must use an amplifier that is designed to read the low resistance. Better yet, have an amplifier that can automatically adjust and compensate for the resistance of the connecting wires. If you're looking for a great RTD sensor, today is your lucky day because we have a lovely Adafruit RTD Sensor Amplifier with the MAX31865 sensor. © Adafruit Industries https://learn.adafruit.
We've carried various MAXIM thermocouple amplifiers and they're great - but thermocouples don't have the best accuracy or precision, for when the readings must be as good as can be. The MAX31865 handles all of your RTD needs, and can even compensate 3 or 4 wire RTDs for better accuracy. Connect to it with any microcontroller over SPI and read out the resistance ratio from the internal ADC. We put a 0.1% resistor as a reference resistor on the breakout.
Pinouts The MAX31865 is a tiny surface mount chip, and it needs a lot of other parts to make it work, so we've got it on a nice breakout board for you. You can control the chip and read data from it using the breakouts at the bottom. Let's go thru these! Power Pins: Vin - this is the power pin. Since the chip uses 3 VDC, we have included a voltage regulator on board that will take 3-5VDC and safely convert it down. To power the board, give it the same power as the logic level of your microcontroller - e.
Sensor Terminal Blocks If you have an RTD sensor, you need to connect it somehow! the terminal block area is where you can clamp down to the sensor wires. There are four contacts, but you can use 2, 3 or 4 wire sensors. You may need to solder or jumper some pads depending on how many wires you want to use. You can also use a 3 or 4 wire sensor as a 3-wire or 2-wire sensor (just don't connect the extra wires).
By default the sensor is wired up for 4-wire RTD usage but can be set up for 2 or 3 wire very easily. For 4-wire usage, do nothing with the jumpers! For 3-wire usage. Solder closed the jumper labeled 2/3 Wire and cut the wire connecting the left side of the 2-way jumper right above Rref.
Assembly © Adafruit Industries https://learn.adafruit.
Prepare the header strip: Cut the strip to length if necessary. It will be easier to solder if you insert it into a breadboard - long pins down Solder! Be sure to solder all pins for reliable electrical contact. (For tips on soldering, be sure to check out our Guide to Excellent Soldering (https://adafru.it/aTk)). © Adafruit Industries https://learn.adafruit.
© Adafruit Industries https://learn.adafruit.
Next we will solder in the two 3.5mm terminal blocks used to connect power & the motor to the breakout board. Make sure the open parts of the terminals face outwards so you can easily connect wires To make it easier to keep these in place, you can use some tape to hold down the two header pieces. Tacky clay also works, whatever you've got handy! © Adafruit Industries https://learn.adafruit.
Solder in both pins of each terminal block. You can remove the tape when done. © Adafruit Industries https://learn.adafruit.
OK You're done! © Adafruit Industries https://learn.adafruit.
RTD Wiring & Config RTDs are really very simple devices: just a small strip of Platinum that measures 100Ω or 1000Ω exactly at 0°C. Bonded to the PT100/PT1000 are 2, 3 or 4 wires. 4-Wire RTDs We'll explain the 4-wire version since that's the most complex. Normally if you want to measure a resistor you just connect your multimeter to each side of the resistor. The multimeter puts a small current through the resistor and measures the voltage generated across it (remember V = I * R).
These are very similar to the 4-wire type but there is only one 'pair' of connected wires. The reasoning for this is that the wires for the RTD are all pretty much the same gauge and length, so rather than having two pairs, the amplifier will just read one pair and use that resistance as the same for both wires. 2-Wire RTDs These are as simple as it gets, only one wire per side.
How To Wire Up! 4-Wire Sensors Connect the four wires to each of the pads. Use a multimeter to determine which wires connect together directly (2 ohms or so between them) and which connect through the RTD. Chances are the wires that connect together are the same color. The two pairs connect so that the ones that are connected together go into the two matching terminal blocks on left or right. It doesn't matter which of the matched pair is on the outside or inside.
3-Wire Sensors Connect the three wires to the three right-most contacts. Use a multimeter to determine which wires connect together directly (2 ohms or so between them) and which connect through the RTD. Chances are the wires that connect together are the same color. The two wires that are connected together should go in the right-most blocks (labeled F+ and RTD+). It doesn't matter which of the matched pair is on the outside or inside.
You will have to cut the thin trace in between the 2-way jumper on the right side of the board, and then solder closed the blob on the right side. Then next to the terminal block on the left, solder closed that jumper as well. Alternatively you can put a piece of wire into the terminal blocks to 'short' them 2 Wire Sensor This is the easiest wiring, you can just use either terminal block slot on the sides for each wire.
Arduino Code You can easily wire this breakout to any microcontroller, we'll be using an Arduino. For another kind of microcontroller, as long as you have 4 available pins it is possible to 'bit-bang SPI' or you can use hardware SPI if you like. Just check out the library, then port the code. SPI Wiring Since this is a SPI-capable sensor, we can use hardware or 'software' SPI. To make wiring identical on all Arduinos, we'll begin with 'software' SPI.
https://adafru.it/swB Rename the uncompressed folder Adafruit_MAX31865 and check that the Adafruit_MAX31865 folder contains Adafruit_MAX31865.cpp and Adafruit_MAX31865.h Place the Adafruit_MAX31865 library folder your arduinosketchfolder/libraries/ folder. You may need to create the libraries subfolder if its your first library. Restart the IDE. We also have a great tutorial on Arduino library installation at: http://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use (https://adafru.
Upload to your Arduino and open up the serial console at 115200 baud to see a print out of the sensors data. The MAX31865 doesn't actually return the resistance it measures. Instead it returns the ratio between the resistance measured and the Rref reference resistor. For the PT100 version of the breakout, this is a 430 ohm 0.1% resistor (marking is 4300 !!!) For the PT1000 version of the breakout, this is a 4300 ohm 0.
More Accuracy Our library is efficient and small and uses an algorithm to calculate temperature. While this works very well, it isn't as accurate as it could be. Check out this ITS-90 conforming library from DrHaney that uses a lookup table for better accuracy! (https://adafru.
notes/AN709_0.pdf (https://adafru.it/swC) It's fast and seems to work very well! We have a one-stop function that does everything for you, just call: max.temperature(100, RREF) Where the first argument is the resistance of the RTD at 0°C (for PT100 that's 100) and the second argument is the value of the reference resistor. This function returns the tempreature in °C Faults The MAX31865 has a wide-ranging fault mechanism that can alert you via pin or function when something is amiss.
Python & CircuitPython It's easy to use the MAX31865 sensor with Python or CircuitPython, and the Adafruit CircuitPython MAX31865 (https://adafru.it/Cbp) module. This module allows you to easily write Python code that reads the range from the sensor. You can use this sensor with any CircuitPython microcontroller board or with a computer that has GPIO and Python thanks to Adafruit_Blinka, our CircuitPython-for-Python compatibility library (https://adafru.it/BSN).
CircuitPython Installation of MAX31865 Library Next you'll need to install the Adafruit CircuitPython MAX31865 (https://adafru.it/Cbp) library on your CircuitPython board. First make sure you are running the latest version of Adafruit CircuitPython (https://adafru.it/tBa) for your board. Next you'll need to install the necessary libraries to use the hardware--carefully follow the steps to find and install these libraries from Adafruit's CircuitPython library bundle (https://adafru.it/zdx).
following this example exactly). By default the MAX31865 class assumes a 2 wire sensor, however you can change this by setting the wires keyword argument in the initializer. Set this to the number of wires in your sensor (2, 3, or 4). For example to create a 3 wire sensor: import board import busio import digitalio import adafruit_max31865 spi = busio.SPI(board.SCK, MOSI=board.MOSI, MISO=board.MISO) cs = digitalio.DigitalInOut(board.D5) # Chip select of the MAX31865 board. sensor = adafruit_max31865.
Full Example Code # Simple demo of the MAX31865 thermocouple amplifier. # Will print the temperature every second. import time import board import busio import digitalio import adafruit_max31865 # Initialize SPI bus and sensor. spi = busio.SPI(board.SCK, MOSI=board.MOSI, MISO=board.MISO) cs = digitalio.DigitalInOut(board.D5) # Chip select of the MAX31865 board. sensor = adafruit_max31865.
Python Docs Python Docs (https://adafru.it/Cbs) © Adafruit Industries https://learn.adafruit.
Downloads Files Fritzing object in Adafruit Fritzing library (https://adafru.it/c7M) EagleCAD PCB files on GitHub (https://adafru.it/swF) Library on GitHub (https://adafru.it/swA) MAX31865 Datasheet (https://adafru.it/sxa) A "lookup table" based library is bigger but more precise since it doesn't do an approximation of the temperature - for advanced users! (https://adafru.it/uBo) Schematic & Fabrication Print © Adafruit Industries https://learn.adafruit.
© Adafruit Industries Last Updated: 2018-08-22 03:57:25 PM UTC Page 31 of 31