Quantcast
Channel: Blogs at All About Circuits
Viewing all articles
Browse latest Browse all 742

Handheld Lab Thermometer Using the MAX31856

$
0
0
Introduction
Description: A handheld, battery operated thermometer suitable for lab or field use. By designing the thermometer around the MAX31856, the user is afforded a wide selection of themocouple types. A 16x4 character LCD displays the temperature measured by the TC, the maximum measured temperature, the minimum measured temperature, and a LOW BATTERY alert. A 2 pushbutton user interface allows for the selection of units (degrees F, C or K), resetting the maximum and minimum recorded temperatures to the current value, selecting the TC type and turning the LCD backlight on and off. The various functions of the unit are controlled by an Arduino Pro Mini.

BOM

Qty Description
1 MAX31856PMB1 Evaluation Board (USB adapter board is not used)
1 Arduino Pro Mini, 3.3V
1 LCD, 16x4 characters (Crystalfontz P/N CFAH1604B-YYH-ET)
2 Pushbutton, N.O.
1 NPN transistor (P/N TBD)
? Resistors, 1/4W 5%, values TBD
4 Battery, alkaline, AA
1 Connector, mini thermocouple type
1 Enclosure



Schematics
In progress.

Instructions
Design: The Pro Mini connects to the MAX31856 via the SPI bus and to the LCD via a 4-bit parallel interface, using the RS and E control lines. Two of the Pro Mini's digital input pins are connected to the pushbuttons and one analog input is used to measure the battery voltage through a resistor divider. One output pin is used to control power to the LCD backlight via an NPN transistor.

Operation: At power on, the Pro Mini reads two bytes from its EEPROM - the previously stored states of the units (degrees F, C or K) and the thermocouple type. Using these values, the LCD is initialized to display the proper units and the MAX31856 is initialized to the proper TC type. By storing the last selected values of units and TC type, the thermometer powers up in the last configuration set by the user.

Once the thermometer is initialized, the Pro Mini reads the TC temperature from the MAX31856 and displays it on the 1st (top) line of the LCD. Also displayed on the top line is the selected thermocouple type. The Pro Mini then compares the current temperature value with the last maximum and minimum values; if these values are exceeded, the display is updated accordingly. The MAXIMUM value is displayed on the 2nd line of the LCD, while the MINIMUM value is displayed on the 3rd line. The temperature is displayed to an accuracy of one decimal point (i.e. XXXX.X or -XXX.X).

Next, the Pro Mini checks the states of the 2 pushbuttons. These pushbuttons are designated as FUNCTION and SELECT. The FUNCTION button performs the following:
1) if pressed and held for less than 1 second, the displayed MAX and MIN temperature values are reset to the current measured temperature;
2) if pressed and held for more than 1 second but less than 5 seconds, the units are changed from F to C on the 1st press, then C to K on the 2nd
press, then back to F on the 3rd press. If the button is not pressed again for 2 seconds, the selected unit is stored in EEPROM and the thermometer resumes normal operation;
3) if pressed and held for more then 5 seconds, the unit is put into the THERMOCOUPLE SELECT mode. Pressing the button again stores the
selected TC type in EEPROM and returns to normal operation.

The SELECT button performs the following:
1) if the unit is in the THERMOCOUPLE SELECT mode, each press of the SELECT button steps through the various TC types that can be
programmed into the MAX31856 (K, J, N, R, S, T, E, and B);
2) if the unit is not in the THERMOCOUPLE SELECT mode (i.e. in normal operating mode), pressing the the button turns the LCD backlight on and off.

After checking the states of the pushbuttons (and acting on them as required), the Pro Mini reads the value of the battery voltage. Using 4 AA batteries supplies a nominal 6V to the circuitry. When the battery voltage falls to a low enough value, the flashing "LOW BATTERY" warning is displayed on the bottom line of the LCD.

The design of the thermometer is simplified by the fact that the regulated voltage (3.3V) on the Pro Mini is available on one of the board's pins. The on-board regulator can supply up to 150mA of current. The Pro Mini itself uses approximately 3mA while operating; the LCD controller uses approximately 1.2mA and the MAX31856 uses approximately 2mA; thus the total current required for the entire thermometer (not including the LCD backlight) is approximately 6.2mA. As a result, the 3.3V regulator on the Pro Mini can also be used to power the MAX31856 and the LCD. Since the LCD backlight requires approximately 4.2V at 100mA, it is powered directly from the batteries, using a current limiting resistor and controlled by the NPN transistor.

Video
TBD

Source Code
In progress.

CAD Files
TBD

Viewing all articles
Browse latest Browse all 742

Trending Articles