Close
0%
0%

4 Channel Temperature Logger

A box that reads 4 K type Thermocouples and outputs in CSV format over USB Serial.

Similar projects worth following
In the past few years, I have been running into thermal problems more and more, as board sizes shrink and more features get packed in. Reading Heat Transfer textbooks has a place, but "hands on" experience goes a long way. My plan with this project, is to verify that what I think is correct about thermal management really is correct, starting with heat sink behavior. Hopefully, I can learn some new stuff along the way.
The purpose of this project is to be able to read 4 temperatures simultaneously and log them to a file for plotting. This will let me observe how well a heat sink is dispersing heat to the outside world.
This project was built from things that I had hanging around or left over from previous projects.

A few years ago, I wanted to be able to read thermocouples for controlling an oven for powder coating, so I bought 4 of the Maxim MAX31855PMB Thermocouple to Digital Converter eval boards. That project got pushed to the back burner when I realized that powder coating is not very critical with respect to temperature.  The boards sat in their little boxes since then.

It is hard to tell from this picture, but there is a stack of 4 of these boards mounted between two pieces of Delrin with slots cut in them as card guides.

Here, you can see all 4 boards.

These boards use a 3 wire SPI interface, 3.3V and ground. The power, ground, Chip Select and Clock signals were all bussed, with the Data Output line from each board kept separate.

The WIFI board that I built a couple of years ago, has all the features that I wanted to add to this box, and I have pretty good low level driver software written for it. Desired features include Non Volatile Memory (NVM) for machine setup, a Clock Calendar chip for easy time keeping in log files. parallel output for a 40 x 2 line character LCD display, and a power supply that accepts 8 - 15VDC input to make powering it easy. At this time, I am not planning to use the WIFI module on the board. Also, this module has an internal antenna, so it would have to go into a different enclosure or have the module swapped for one with an external antenna.

An additional bonus is that I have a mechanical drawing for a box that is easy enough to fabricate.

The picture shows the back side of the box. Thermocouple boards are on the right side, the LCD is under the thermocouple and the processor boards, the processor board and a USB to UART board in the upper left corner.

Hardware SPI interfaces all support 8 bit transfers, many support 16 bit transfers, but longer than that, you usually have to deal with the chip select in software and play games with the interface. Since I had 4 boards to interface, and they return a 32 bit word, it seemed just as easy to implement a 4 input "bit banged" SPI interface as it would have been to deal with the hardware interface. The processor is an Atmel ATSAM3S4C M3 processor, so this interface will not tax it at all.

A number of years ago, I picked up a box of 40 character x 2 line LCD displays very cheaply at a hamfest. When a project will tolerate the physical size of these display, they are a good choice.

For the software, I started with the latest version of the code from my WIFI board and stripped out the old data input code, the radio manager and associated data structures in the user interface and NVM. All math done in this system is done in fixed point integer format.

The MAX31855 boards return two integer values in fixed point format and a few flags in the 32 bit word. Dealing with signed, fixed point numbers is kind of a pain, and getting that part working was the longest part of the software development. I added individual gain and offset values to the conversions, so that the individual thermocouples could be calibrated. The NVM data structure now includes space for each channel's gain and offset data, system output format (F or C) and measurement period. Right now, all of the NVM values are set to defaults. The last major task for the software is to add the input  functions to set the new NVM values. 

Data is available for logging on a PC through the USB serial port. All 4 thermocouple temperature values, the internal temperature (cold junction reference temperature)  of one of the converter chips, and time of day are spit out on a line. The default interval between measurements is 2 seconds, but that will be adjustable when I get the user interface software written.  



  • 4 × MAX31855PMB1 Eval Boards Thermocouple to Digital Converter boards
  • 1 × WIFI Interface Board One of the Atmel ATSAM3C4S boards that I built a couple years ago.
  • 1 × Panel Mount USB UART board Another project board that I had an extra one built up already.
  • 1 × 40 Character x 2 Line parallel interface LCD
  • 1 × 4 K Type thermocouples

View all 6 components

  • CPU Board Swap

    Bharbour10/27/2019 at 21:38 0 comments

    When I built this project back in 2018, I used a CPU board left over from another project. That board has a WIFI module on it that was not being used at all here. That particular module has been discontinued by ST (Boo ST) and I have a lot of software developed for that module. In the interest of using that module for another project so that I don't have to write more code for a different module, I designed a replacement CPU board that has the same processor, clock chip and NVM chip as the original board. The bare boards arrived from OSHPark, and I built it this morning. The new board powered up and operates fine. I swapped the boards and connected the thermocouple boards to the new one and all looks good.

    One plus of the new board is that it is about 1/3 smaller than the WIFI version, so it is a less expensive board. The new board is the same width as the original, so two of the bolt holes still line up. As this temp logger is not a rugged environment project and the CPU board is pretty light weight, two bolt mounting seems sufficient now.

    When I did the design on the new CPU board, I just removed the WIFI module and it's voltage regulator and brought the now unused I/O out to connectors. I juggled parts around a little bit and was able to reduce the length of the board about an inch. Looking at the finished board, it had a lot of unused space on it. By modifying the power supply design some, moving the clock battery to the back side of the board, and juggling stuff around more, I got about 25% more out of the board area. A number of my projects need some non-volatile memory, and an external hardware clock is a nice option, if slightly expensive. There are two unbuilt boards for the replacement CPU. When they get used up, I will send out the size reduced version of the PCB for fabrication.

  • User Interface Software done

    Bharbour06/23/2018 at 03:10 0 comments

    I finished the user interface software tonight. Screwed the back on the case. There is always something special about being done enough to screw the case together. Now it is time to see what I can see by using it!

  • Sheetmetal Work before Caffeine

    Bharbour06/17/2018 at 22:28 0 comments

    People looking at the front of the box may notice a gap between the left end of the LCD and the edge of the window for it. I machined the box early in the morning, before getting my caffeine, and transposed a digit, putting the end of the window at 9.844" instead of 9.484". In general, erasing mistakes in machining is painful. It is possible to weld a patch into that panel, but this box is a tool, not a piece of art...

View all 3 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates