Title: Wearable Tracking Device for Miners
By: sunnyiut
Design Challenge: Safe and Sound Wearables
Blog number: 11
Intro:
This blog is based on MSP432P401r and TMP007 Temperature Sensor interface.
Objective:
The TMP007 Temperature Sensor will provide contact-less temperature measurement of an object.
According to my project proposal I have to design a wearable device mounted on the wrist of the Miners.
This wearable device consists of several sensors to collect environmental information.
In this blog post, I'll focus on
- the interfacing of the TMP007 and the MSP432P401r MCU
- display the temperature on TFT
- send data to PC UART for graphical representation
Components:
- Sensors Boosterpack
- MSP432 Launchpad
- TFT Proto
- mikroplot [UART PC GUI]
Compiler:
MikroC pro for ARM - from MikroElektronika
Firmware:
Full source code and circuit diagram can be found in LIBSTOCK.
TMP007 [BOOSTXL-SENSORS]:
BOOSTXL-SENSORS board carries this TMP007 Infrared Thermopile Sensor. It has integrated MATH engine to combine the corresponding change in voltage across the thermopile with the internal cold-junction reference temperature sensor to calculate the target object temperature.
Features -
- Contact-less temperature measurement
- nonvolatile memory for storing calibration coefficients
- 14 bit resolution
- -40'C to 125'C operation
- communicates through I2C
- HW interrupt
ADD0 and ADD1 pins are connected to ground in BOOSTXL-SENSORS boosterpack which gives -
TMP007 I2C address = 0x40
Interfacing:
// TMP007 I2C address (ADD0 and ADD1 pins are connected to ground) #define TMP007_I2C_ADDR 0x40 char tmp_data[2]; /******************************************************************************* reading temperature data from TMP007 sensor *******************************************************************************/ float Get_TMP007_Data() { int TemperatureSum; float Temperature; tmp_data[0] = 0x03; // Object Temperature Result register address I2C1_Write(TMP007_I2C_ADDR,tmp_data,1,END_MODE_RESTART); // Send byte (tmp_data[0]) I2C1_Read(TMP007_I2C_ADDR,tmp_data,2,END_MODE_STOP); // Read temperature data and store it in tmp_data TemperatureSum = ((tmp_data[0] << 8) | tmp_data[1]) >> 2; // Justify temperature values if(TemperatureSum & (1 << 13)) // Test negative bit TemperatureSum |= 0xE000; // Set bits 13 to 15 to logic 1 to get this reading into real two complement Temperature = (float)TemperatureSum * 0.03125; // Multiply temperature value with 0.03125 (value per bit) return Temperature; // Return temperature data }
Circuit Diagram:
MSP432P401r with TMP007 TFT display connection
Output:
The sensor gives ~32'C at room temperature. When I put my finger about 3cm above the sensor it detects a temperature ~36.3'C.
At room temperature, when no object is placed above the sensor, the reading varies from 31.9'C to 32.4'C. On the other hand when I placed my finger 3cm above the sensor it took more than 3 seconds to rise upto the max temperature [36.3'C].
To check the response of the sensor on a hot object, I placed the Soldering Iron 3cm above. The max operational limit specified in the datasheet is 125'C. But it rises upto 209'C in this case.
It's also written in the product page that
"It is possible to measure object temperature beyond the device operating range as long as the device itself does not exceed the operating temperature range (–40°C to +125°C)."
However, it takes time and gradually reaches the highest reading. Stays there for a few seconds and then decreases as the Iron gets cool.
** I have added a visual notification on detecting hot object. If the temperature reading is below a threshold point the "FIRE" icon is dimmed. When the temperature rises above the threshold, the "FIRE" icon becomes bright.
Top Comments