Coder Social home page Coder Social logo

max31855's Introduction

MAX31855 Arduino Library

A simple and lightweigth Arduino library for MAX31855 thermocouple-to-digital convert chip. I created this library because some of similar libraries are unnecessary complicate with extra dependency library or some with wrong negative temperature reading.

Basic Usage

The basic usage of the library can be as simple as this:

#include <MAX31855.h>

#define CS 10

MAX31855 sensor(CS);

void setup()
{
  Serial.begin(115200);
  while(!Serial);
  sensor.begin();
}

void loop()
{
  Serial.print("Temperatures in Celsius- ");
  Serial.print(sensor.thermocoupleTemperature());
  delay(1000);
}

See demo.ino for more complete usage with fault detection as well as reading the internal chip(junction) temperature.

Notes

According to MAX31855 datasheet, It is strongly recommended to add a 10nF differential capacitor, placed across the T+ and T-pins, in order to filter noise on the thermocouple lines.

In additional to thermocouple temperature reading, MAX31855 also provides an output for its internal(junction) temperature reading, which can be access via MAX31855::internalTemperature(), the internal chip junction temperature provides the reading between 127 and -55 degree Celsius with precision of 0.0625/C. See datasheet for more details. Depend on where the sensor board is mounted, this internal temperature can be viewed as the temperature that is close to Ambience temperature.

The MAX31855::begin() returns a non-zero fault status, the value could be used to further detect the root cause of the the thermocouple connection fault.

Value   Root Cause
1       The thermocouple is not connected
2       The thermocouple is short with the GROUND
4       The thermocouple is short with VCC

License

MIT License. See LICENSE file for details.

max31855's People

Contributors

e-tinkers avatar

Watchers

 avatar  avatar

max31855's Issues

Reading fail status, possible mistake

Hello, I think there is a mistake in reading the fail status. According to the datasheet, I believe that line 58 should be either:
_fault = data[3] & 0x01;
or
_fault = data[0] & 0x07;

Best regards and HNY!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.