Wednesday, September 27, 2017

DEBUGGING ON TMP112 INTERFACE WITH MSP430FR5969 #20102016

  • Temperature sensor was successfully interfaced with the processor and giving the current temperature data in degree Celsius.
  • Minimum resolution of the current sensor is 0.0625 degree C, and accurate up to 0.5 degree C up to 65 degree C and 1 degree C beyond.

  • The picture shows the temperature at the time of measurement highlighted, upto precision of 3 digits after decimal.
  • ‘a’ section of the waveform is the address of temperature sensor,
    ‘b’ section is the internal temperature register address, which is all zero.
    ‘c’ and ‘d’ are the temperature value in binary(16 bits).

  • Changes made in Code
A) After software reset of IIC some delay is required, this issue took most of the time.
B) Set the IIc master mode with synchronous setting of 400Khz of data rate.
C) Low power implementation in current sensor for the long term battery life.
D) This configuration keeps the sensor in sleep mode and only waking up when temperature is need to be measures and then sent to sleep again. 




Saturday, September 23, 2017

TMP112 INTERFACING WITH MSP430 MICROCONTROLLER #19102016

TMP112, temperature sensor by Texas Instrument, with very interesting features as
a) SOT563 Pacakge (1.6mm x 1.6mm) is 68% smaller than SOT23.
b) Accuracy of 0.5C
c) Low quiescent of 10uA active and 1uA sleep
d) 12 bit resolution (0.0625C)
e) Supply range 1.4 to 3.6V




The i2c algorithm that we are using to sense the temperature sensor is as

A)      Should be in reset state while changing some register content. (check in datasheet)
B)      Set the IIc master mode with synchronous setting.
C)      Set IIc clock equal to sub master clock
D)     Set some divider smclk/x = 100khz (can be varied as per requirement up to 400khz)
E)      Set the slave address in 7 bit format
F)      Disable or enable the interrupts
G)     Disable the reset state


a)      Again put in reset mode
b)      Generate the stop condition after transmission of 1 byte automatically.
c)      Disable reset mode
d)      Send the start condition, it will also send the slave address.
e)      Wait until transmission is finished
f)      Send the register we need to read from and wait till transmission is done
g)      Set IIC write operation in receiver mode to generate auto stop after two bytes are received.
       TMP112 sensor gives 16 bits of data
h)      Setup for repeated start
i)       Receive two bytes of data
j)       Convert according to the formula

 (50°C) / (0.0625°C / LSB) = 800 = 320h = 0011 0010 0000
 0011 0010 0000 = 320h = 800 × (0.0625°C / LSB) = 50°C

(|–25°C|) / (0.0625°C / LSB) = 400 = 190h = 0001 1001 0000 Two's complement format: 1110 0110 1111 + 1 = 1110 0111 0000