Adafruit MAX31856 Universal Thermocouple Amplifier Created by lady ada Last updated on 2018-08-22 03:56:24 PM UTC
Guide Contents Guide Contents Overview Pinouts 2 3 6 Power Pins: 6 SPI Logic pins: Additional Pins Assembly 6 6 8 Prepare the header strip: Add the breakout board: And Solder! 8 8 9 Wiring & Test SPI Wiring Download Adafruit_MAX31856 library Attach Thermocouple Load Demo Library Reference Faults 17 Downloads Files Schematic Fabrication Print © Adafruit Industries 13 13 13 14 14 16 19 19 19 19 https://learn.adafruit.
Overview Thermocouples are very sensitive, requiring a good amplifier with a cold-compensation reference, as well as calculations to handle any non-linearities. For a long time we've suggested our MAX31855K breakout, which works great but is only for K-type thermocouples. Now we're happy to offer a great new thermocouple amplifier/converter that can handle just about any type of thermocouple, and even has the ability to give you notification when the temperature goes out of range, or a fault occurs.
This breakout does everything for you, and can be easily interfaced with any microcontroller, even one without an analog input. This breakout board has the chip itself, a 3.3V regulator and level shifting circuitry, all assembled and tested. Comes with a 2 pin terminal block (for connecting to the thermocouple) and pin header (to plug into any breadboard or perfboard). We even added inline resistors and a filter capacitor onboard for better stability, as recommended by Maxim.
© Adafruit Industries https://learn.adafruit.
Pinouts Power Pins: Vin - this is the power pin. Since the sensor 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.g. for a 5V micro like Arduino, use 5V 3Vo - this is the 3.
DRDY - This pin is used for advanced uses where you tell the sensor to begin a reading and then wait for this pin to go low. We don't use it in our library code because we keep it simple with a delay/wait, but it is available in case you need it! © Adafruit Industries https://learn.adafruit.
Assembly 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. Add the breakout board: Place the breakout board over the pins so that the short pins poke through the breakout pads © Adafruit Industries https://learn.adafruit.
And Solder! Be sure to solder all 5 pins for reliable electrical contact. (For tips on soldering, be sure to check out ourGuide to Excellent Soldering (https://adafru.it/aTk)) © Adafruit Industries https://learn.adafruit.
Now you can do the terminal block, this is what you'll use to attach the thermocouple since you cannot solder to thermocouples The terminal block goes on the top with the open ends pointing out Solder the two pads as you did with the plain header. They're quite large and require a lot of solder © Adafruit Industries https://learn.adafruit.
© Adafruit Industries https://learn.adafruit.
Insert the thermocouple wires and tighten down the clamps with a small Phillips or flat screwdriver That's it! you are now ready to wire and test © Adafruit Industries https://learn.adafruit.
Wiring & Test 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. https://adafru.it/rAK https://adafru.it/rAK 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.
repository (https://adafru.it/rAL). You can do that by visiting the github repo and manually downloading or, easier, just click this button to download the zip https://adafru.it/rAM https://adafru.it/rAM Rename the uncompressed folder Adafruit_MAX31856 and check that the Adafruit_MAX31856 folder contains Adafruit_MAX31856.cpp and Adafruit_MAX31856.h Place the Adafruit_MAX31856 library folder your arduinosketchfolder/libraries/ folder.
Upload to your Arduino and open up the serial console at 115200 baud to see a print out of the cold junction temperature (temperature of the microcontroller chip) and the thermocouple temperature (temperature detected at the end of the thermocouple probe You can also see some of the faults that are detectable by say disconnecting one of the pins: © Adafruit Industries https://learn.adafruit.
Library Reference You can start out by creating a MAX31856 object with either software SPI (where all four pins can be any I/O) using // Use software SPI: CS, DI, DO, CLK Adafruit_MAX31856 max = Adafruit_MAX31856(10, 11, 12, 13); Or you can use hardware SPI. With hardware SPI you must use the hardware SPI pins for your Arduino - and each arduino type has different pins! Check the SPI reference to see what pins to use. (https://adafru.
MAX31856_TCTYPE_T MAX31856_VMODE_G8 MAX31856_VMODE_G32 The last two are not thermocouple types, they're just 'plain' voltage readings (check the datasheet for more details, we don't use these modes in the library) If you're ever not sure which mode you're in, query it with max.getThermocoupleType() Once that's set you can read the cold junction temperature, which will return a floating point Celsius reading. This is the temperature detected inside the MAX31856 chip ('ambient' temp) max.
max.setColdJunctionFaultThreshholds(lowtemp, hightemp) Where lowtemp and hightemp range between -127 and +127 Centigrade (the chip wont function down to -127 but that's the lowest number you can put in. For the thermocouple, use setTempFaultThreshholds(lowtemp, hightemp) Where lowtemp and hightemp are floating point numbers with a range of -4096 to +4096 and a resolution of 0.0625 degrees Centigrade © 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/rAN) Library on GitHub (https://adafru.it/rAL) MAX31856 Datasheet (https://adafru.it/rAO) Schematic Fabrication Print © Adafruit Industries https://learn.adafruit.
© Adafruit Industries Last Updated: 2018-08-22 03:56:19 PM UTC Page 20 of 20