Giter Site home page Giter Site logo

max31855-max6675-stm32's Introduction

MAX31855-MAX6675-STM32

Library for MAX31855/MAX6675 from Maxim Integrated for STM32

Update

As I needed to measure higher temperature and especially negative ones, I decided to use MAX31855 instead of MAX6675 in my new project. I updated the repo and added the library for MAX31855 too. Also, I uploaded a breakout board for MAX31855 and an example code in stm32cubeIDE.

Untitled-min 2021-02-19_192348 2021-02-19_192639 2021-02-19_192443

Introduction

For sensing a temperature in my hot air gun nozzle, I had to use an amplifier circuit to amplify output signal of a thermocouple. As you probably know, MAX6675 is an all-in-one Integrated circuit that provides a digital output from thermocouple input. As a result, you can save some components and space on your PCB. According to ‘Datasheet’, The MAX6675 performs cold-junction compensation and digitizes the signal from a type-K thermocouple. The data is output in a 12-bit resolution, SPI compatible, read-only format. I wrote a simple library that you can use to get the temperature from MAX6675. I used STM32F030F4P6. However, you can port it to other microcontrollers. I also provided a complete project in STM32CubeIDE that you can use as a reference. You can run code and see data in STMStudio.

Download Datasheet Here

IC

How to use

1- Activate SPI from STM32CubeMX. As I mentioned before, this chip is read-only, so that you can configure your microcontroller as a receive-only master. Also, the length of data is 16bit and MSB First. Use one of the GPIO’s as a Slave Select(SS). I used first pin from GPIOB (GPIOB_PIN_1).

uC SPI-Config

2-Add my library to your compiler and in MAX6675.h set the SS port and pin that you activated in STM32cubeMX. The output of Max6675_Read_Temp is the temperature in centigrade

#define SSPORT GPIOB       // GPIO Port of Chip Select(Slave Select)
#define SSPIN  GPIO_PIN_1  // GPIO PIN of Chip Select(Slave Select)

Results

You can see the test results of this chip. I put thermocouple in the ice to plot the temperature change. TS is connection flag. If you disconnect thermocouple from the chip, it goes high.

MAX6675

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.