A solution to control and monitor four thermocouples using the MAX31855 Thermocouple Amplifier.
- Arduino Sketch
- Custom MAX31855 Library
- KICAD Generated Schematic and PCB
- Test Data
The Arduino sketch is designed to print both to a serial monitor on a PC and a LCD screen that is mounted on the device.
Custom library that creates a class instance of each thermocouple amplifier and provides functions to read data, check errors, and do a rational polynomial caluclation to accurately determine the temperature. Additionally a weighted average is used to filter the signal, resulting in a significantly smoothed reading.
The initial form of this library uses a switch statement to select the proper conversion function based on thermocouple type, of which only type 'T' and 'K' are currently supported. Additional types will be added in the future, so this library can be universally used across all thermocouple and MAX31855 types.
The circuit consists of four MAX31855 thermocouple amplifiers that are connected to an Arduino Micro. The Arduino Micro is connected to the the thermocouple amplifiers via SPI, utilizing the SCK, MISO, and CS lines. The Arduino also communicates the data to a PC via serial while also displaying it on an onboard LCD.
The MAX31855 transmits a cold-junction compensated thermocouple temperature, a cold-junction temperature (from a thermistor), and several fault checks over 32 bits. The first 14 bits are the cold-junction compensated thermocouple temperature, the next 12 bits are the cold-junction temperature, and the rest of the bits are either reserved bits or denote various fault checks.
The MAX31855 uses a linear conversion to convert the thermocouple voltage to a temperature. Specifically the type 'T' version uses a factor of
The data is simultaneously displayed on an LCD screen and transmitted to a PC via USB, where it is read into our lab's LabView program used to control our spectrometer. The data is "filtered" using a weighted average that takes a weighted average of the previous value with the current value. This weight can be adjusted via software. 30% of the previous value seems to be a sweet spot between data smoothing and quick response time.
The device is powered via a 9V external AC to DC power supply. In our current application, we have an approximately 15m USB cable, which is triple the specification for USB 2.0.
The MAX31855 requires 3.3V to operate, while the Arduino Micro operates at 5V, so two bi-directional level shifters were used for the data and power lines for the thermocouple amplifiers.
Overall, once the rational polynomial function and filtering was added, the performance was adequate for our lab's needs. It successfully reads temperatures from boiling water down to cryogenic temperatures used in our lab's spectrometer.
Cooling Bath | Measured Temperature ( |
Theoretical Value ( |
---|---|---|
Ice Water | -2.0 | 0 |
Dry Ice + Acetone | -79.4 | -78 |
Acetone + liquid N$^2$ | -95.0 | -94 |
n-pentane + liquid N$^2$ | -133.5 | -131 |
liquid N$^2$ | -200 | -196 |
Boiling Water | 98.0 | 100 |
Overall, the data matches very well with the theoretical values, within 2% error for all the cooling baths. The ice water and boiling water were done with tap water, so that is the likely source for the deviation there.
Further improvements will be implemented in v2. These include capacitors to clean up the power supply and capacitors added on to the VCC and GND lines of the thermocouple amplifiers to prevent coupling of the data and power supply lines.
- Proper power supply design
- Add appropriate capacitors to the input to reduce noise
- Add small capacitors to the VCC and GND lines of the thermocouple amplifiers to prevent coupling of the signal and the power lines.
- Transmit data over something other than USB