Skip to content

Arduino library and example code for Maxim's MAX31856 Thermocouple IC

Notifications You must be signed in to change notification settings

engineertype/MAX31856

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

This is the GitHub source code repository for the Arduino MAX31856 library and example code for Arduino.

This library offers the following features:
a. Returns both the junction (IC) and thermocouple temperatures
b. Handles negative temperatures
c. Returns thermocouple error codes, like open and voltage too high/low
d. Returns an error if the MAX31856 isn’t communicating (wiring issue?)
e. Automatic initialization of registers after losing power

In this folder are:
1. README - this file
2. MAX31856 folder - the Arduino library and example code for driving the MAX31856

Look for the MAX31856 breakout boards on www.whizoo.com and eBay (madeatrade)
http://stores.ebay.com/madeatrade

Looking to build yourself a reflow oven?  It isn't that difficult to do!  Take a look at the build guide here:
http://www.whizoo.com

Library Implementation Details
==============================
DRDY and FAULT lines are not used in this driver. DRDY is useful for low-power mode so samples are only taken when needed; this driver assumes power isn't an issue.  The FAULT line can be used to generate an interrupt in the host processor when a fault occurs.  This library reads the fault register every time a reading is taken, and will return a fault error if there is one.  The MAX31856 has sophisticated usage scenarios involving FAULT.  For example, low and high temperature limits can be set, and the FAULT line triggers when these temperatures are breached. This is beyond the scope of this sample library.  The assumption is that most applications will be polling for temperature readings - but it is good to know these features are supported by the hardware.

The MAX31856 differs from earlier thermocouple IC's in that it has registers that must be configured before readings can be taken.  This makes it very flexible and powerful, but one concern is power loss to the IC.  The IC should be as close to the cold junction as possible, which might mean there is a cable connecting the breakout board to the host processor.  If this cable is disconnected and reconnected (MAX31856 loses power) then the registers must be reinitialized.  This library detects this condition and will automatically reconfigure the registers.  This simplifies the software running on the host.

A lot of configuration options appear in the .H file.  Of particular note is the line frequency filtering, which defaults to 60Hz (USA and others).  If your line voltage is 50Hz you should set CR0_NOISE_FILTER_50HZ.

This library handles the full range of temperatures, including negative temperatures.


Change History:
25 June 2015        Initial Version
31 July 2015        Fixed spelling and formatting problems
26 December 2016    Added examples for Dual and Quad boards


To install the MAX31856 library, please refer to:
http://arduino.cc/en/Guide/Libraries

Peter Easton 2017
Whizoo.com

About

Arduino library and example code for Maxim's MAX31856 Thermocouple IC

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages