1. Overview

Tmpl01 is a low-power and high-precision intelligent temperature sensor based on I2C serial bus interface produced by TI company. It is internally integrated with temperature sensor, a / D converter, I2C serial bus interface, etc. The wide temperature measurement range and high resolution make it widely used in multi field temperature measurement systems, multi-channel temperature measurement and control systems and various constant temperature control devices. Tmpl01 has the following performance characteristics:

1) With I2C bus, the communication with MCU is realized through serial interface (SDA, SCI). Three tmpl01 devices can be connected to I2C bus to form a multi-point temperature measurement and control system.

2) The temperature measurement range is – 55% ~ 125 ℃, the accuracy of 9 ~ 12 bit a / D conversion, and the resolution of 12 bit a / D conversion is 0.0625 ~ C. The measured temperature value is serially output in the form of 16 bit digital quantity with symbol expansion.

3) The power supply voltage range is wide (+ 2.7 V ~ + 5.5 V), and the static current is small (only o.1 in standby mode) μ A)。

4) It has programmable upper and lower temperature registers and alarm (interrupt) output functions. The internal fault queuing function can prevent false triggering caused by noise interference, so as to improve the reliability of the temperature control system.

2. Tmpl01 pin function and internal structure

2.1 tmpl01 pin function

Tmpl01 has simple hardware connection. During operation, no external devices are required except pull-up resistors on SDA, SCI. And alert lines. Tmpl01 is packaged with SOT23-6. The pin arrangement is shown in Figure 1. The pin functions are as follows:

Performance of digital intelligent temperature sensor TMP101 and its application with picl8f458 single chip microcomputer

SCL: serial clock input terminal;

GND: grounding terminal;

Alert: bus alarm (interrupt) output terminal, open drain output;

V +: power terminal;

Add0: address selection end of I2C bus;

SDA: serial data input / output terminal. A 0.1 is connected between the power supply and the grounding terminal μ F coupling capacitance.

2.2 tmpl01 internal structure

The internal structure block diagram of TMP101 is shown in Figure 2. TMP101 contains diode temperature sensor, delta sigma A / D converter, clock oscillator, control logic, configuration register, temperature register and fault queuing counter. TMP101 first generates a voltage signal proportional to the measured temperature through the internal temperature sensor, and then converts the voltage signal into a digital quantity proportional to the Celsius temperature through the 12 bit △ – ∑ A / D converter and stores it in the internal temperature register. The device determines whether to start the alarm output through the temperature window comparator according to the Tigh and TLOW set by the user in the upper and lower temperature registers. After the system is powered on, the device is in the default state, and its default temperature alarm threshold is: upper limit temperature thigh = 80 ℃ temperature TLOW = 75 ℃.

3. Working principle of TMP101

The I2C bus serial data interface line SDA and serial clock interface line SDA of tmpl01 are controlled by the master controller. The master controller acts as the master and TMP101 acts as the slave, and supports the read / write operation command of 12C bus protocol. First, the address is set by the main controller. Enable the main controller to identify the address of tmp1o1 connected to the bus. In order to correctly obtain the temperature value data in the TMP101 internal temperature register, write corresponding data to the relevant registers in TMP101 through I2C bus, and set the resolution of temperature conversion result, conversion time, upper and lower temperature values of alarm output and working mode, that is, the configuration register in tmpl01 The upper temperature register and the lower temperature register are initialized.

3.1 address setting of tmp1o1

According to the 12C serial bus specification, tmp1o1 has a 7-bit slave device address code, the valid bit is “10010”, and the other two bits are set to “00”, “01” and “10” respectively according to the grounding, suspension and power supply terminals of pin add0. Three tmpl01 devices can be connected to one I2C bus.

3.2 TMP101 internal register

The function realization and working mode of TMP101 are mainly determined by five internal registers, as shown in Figure 3. These registers are address pointer register, temperature register, configuration register, upper limit temperature (TL) register and lower limit temperature (th) register respectively. The last four registers are data registers.

The address pointer register is an 8-bit read / write register, which internally stores the addresses of the other four data registers to be read and written. In the read-write operation. The register to be accessed is determined by setting the contents of the address pointer register. In the 8-bit data byte, the first 6 bits are all set to 0, and the last 2 bits are used to select the register. The relationship between the values of the last 2 bits P0 and P1 and the selected register is listed in table L.

The temperature register is a 16 bit readable register, which stores 12 bit temperature data after a / D conversion, and the last 4 bits are all supplemented with O to form a 2-byte readable register. You can also set the contents of the configuration register to obtain different conversion results of 9, 10, ll and 12 bits.

The configuration register is an 8-bit read / write register, and the data format is listed in Table 2. Set the working mode of the device through the configuration register. RL / R0 is the conversion resolution configuration bit of temperature sensor, which can set the resolution and conversion time of internal A / D converter: F1 / F0 is the configuration bit of fault queuing times. When the measured temperature exceeds n times continuously (by setting FL / F0 bit), there will be alarm output; Pol is the alert polarity bit. Through the setting of pol, the polarity of the output of the controller and alert can be consistent: SD is used to set whether the device works in the off mode: in the off mode, writing l to the OS / Alert bit can start a temperature conversion. In the temperature comparison mode, this data bit can provide the status of the comparison mode.

4. Interface with picl8f458 single chip microcomputer

TMP101 is widely used in various temperature measurement systems, power management systems, temperature monitoring devices and constant temperature control devices with high-precision measurement results and ultra-small chip packaging. It can be easily connected with the microcontroller through its serial data interface line SDA and serial clock interface line SCL to form a temperature measurement system. Figure 4 shows the connection application circuit between PIC18F458 single chip microcomputer and TMP101.

4.1 picl8f458 introduction

Picl8f458 is a single chip microcomputer produced by microchip company in the United States. The chip integrates a / D converter, EEPROM memory, comparison output, capture input, PWM output, I2C and SPI interface, asynchronous serial communication (USART) interface circuit, can bus interface circuit, flash program memory, etc. it has powerful functions and simple and reliable design circuit.

4.2 TMP101 initialization setting

To obtain the temperature value data in TMP101, first initialize the configuration register, upper temperature register and lower temperature register in TMP101 through picl8f458 single chip microcomputer. The process is as follows: picl8f458 MCU writes the address to TMP101, then writes the address of the configuration register to the pointer register, and finally writes the data to the configuration register. The timing of write operation of picl8f458 single chip microcomputer to TMP101 configuration register is shown in Figure 5. The write timing of upper and lower temperature registers is the same as that of configuration register.

4.3 TMP101 reading data

The process of reading the current value of TMP101 internal temperature register is: first write the TMP101 to be read, then write the TMP101 internal temperature register to be read, send a “restart signal” to I2C bus, and resend the TMP101 address byte once, change the transmission direction of data, and then read the temperature register. The timing of reading tmpl01 temperature register by single chip microcomputer is shown in Figure 6.

Figure 6 can be explained as follows: under the timing coordination of serial data line SDA and serial clock line SCL, set the start enable bit Sen of picl8f458 MCU to establish the start signal timing, then the MCU writes the TMP101 address byte to be read into the buffer, and transfers the byte to SDA pin through the internal shift register of the MCU. The first 7 bits of the 8-bit address byte are the controlled address of TMP101, The last L bit is the read / write control bit (when it is “O”, it indicates write operation). After the address byte is written, the single chip microcomputer releases SDA in the 9th clock pulse cycle, so that TMP101 can feed back an effective response signal for the single chip microcomputer to detect and receive after the address is matched. After the 9th clock pulse, the SCL pin remains low and the SDA pin remains unchanged until the next data byte is sent to the buffer. Then write the address byte of TMP101 internal temperature register to be read. The process is the same as the write operation of tmpl01 address byte. Change the data transmission direction by sending a “restart signal” to the bus. At this time, the addressing byte should also be retransmitted, but the address byte of TMP101 has changed to read operation. Then read the address byte of TMP101 internal temperature register, and finally read the temperature value data byte in TMP101 internal temperature register, The measured temperature value is serially output in the form of 16 bit digital quantity with symbol expansion. Each byte received by the single chip microcomputer must feed back a response signal. At this time, it should be noted that the response signal fed back by the single chip microcomputer is different from the response signal fed back by TMP101. Finally, by setting the stop enable bit, send a stop signal timing to the bus, indicating the end of the communication.

5. Conclusion

This paper introduces the performance, structure and working principle of digital intelligent temperature sensor TMP101 based on I2C serial bus interface, as well as its practical application with picl8f458 single chip microcomputer. It has been successfully applied to the “intelligent classroom control system based on single chip microcomputer”. The system can display the actual detected temperature value in the classroom, It is transmitted to the host computer through RS-485 communication data line for real-time display. The measurement results have high precision and the system runs stably.

Responsible editor: GT

Leave a Reply

Your email address will not be published. Required fields are marked *