1 Introduction
In measurement and instrumentation, temperature detection has almost become an indispensable part. Traditional analog temperature sensors are either complicated in peripheral circuits or require the design of A/D conversion and cumbersome operation, which are subject to certain restrictions in use. The digital temperature sensor AD7416 is used to design various control systems. It is small in size, low in power consumption, simple in programming and convenient in operation. The chip has automatic comparison and programmable control output terminal OTI, which has great advantages in the design of temperature control systems. In addition, AD7416 has low power consumption and can be programmed to control the switching between working and sleeping states. It is also widely used in low-power system design.
2 Structure and function of AD7416
2.1 Pin function
AD7416 has a total of 8 pins and adopts SOIC/MSOP package. Pin 1 is the data input and output port, IIC bus bidirectional data port; Pin 2 is the IIC bus clock port; Pin 3 OTI is the temperature comparison output terminal; Pin 4 GND ground terminal; Pin 5, 6, and 7 are IIC bus address programming bit input terminals; Pin 8 VDD is the power supply.
2.2 Internal Structure and Function
The internal structure of AD7416 is shown in Figure 2. The on-chip bandgap temperature sensor and 10-bit AD converter form a temperature measurement circuit, and the measurement result is stored in the temperature value register. There are 5 registers, a temperature comparator, and an error queue counter on the chip. The functions are introduced below. A serial bus interface is used for IIC address control and data transmission.
2.2.1 Internal registers
AD7416 has 5 internal registers: address pointer register, temperature value register (00H), upper limit register TOTI (03H), lower limit register THYST (02H), and configuration register (01H).
The address pointer register stores the address pointing to one of the four data registers. The first data byte of each serial write operation to AD7416 is the address of the data register, which is the address to which the subsequent data bytes are to be written. This value is stored in the address pointer register. Only the lowest two bits of this register are used to select a data register, and its value corresponds to the register address. The temperature value register is a 16-bit read-only register. Its upper 10 bits store the 10-bit temperature reading sent by the AD converter in 2's complement format, and the lower six bits are unused. The
configuration register is an 8-bit read/write register, which is used to set the working mode of AD7416. D7, D6, and D5 are used for channel selection and are all kept at 0; D4 and D3 set the error queue length; D2 sets the OTI output polarity; D1 sets the OTI working mode; DO sets the chip working mode. The THYST set point register and the TOTI set point register are both 16-bit read/write registers. Their 9 most significant bits store the low and high temperature threshold set points expressed in 2's complement format, corresponding to the upper 9 bits of the temperature value register, and the lower 7 bits are unused.
When the AD7416 is powered on, the address pointer points to the temperature value register, TOT1=80℃, THYST=75℃.
2.2.2 Basic working principle
The bandgap temperature sensor and the 10-bit A/D converter can measure the ambient temperature in real time according to the preset working mode. At the same time, the conversion result is saved in the temperature value register in the form of a 10-bit binary number. The
set point comparator compares the actual measured temperature value with the preset high and low threshold values. If the limit is exceeded, the high and low levels are output at the OTI end according to the configuration register setting. OTI needs to be connected to an external pull-up resistor of about 10 k when in use.
There is a fault queue counter in the AD7416 to avoid false triggering of the OTI output end caused by interference. The queue length of this counter is set by the configuration register. If the queue is set to 4, then it takes 4 consecutive temperature over-limit measurements to cause the effective output of OTI. Any less than 4 times is considered interference and the fault queue counter will be reset.
3 System Design
3.1 Hardware Design
The hardware schematic diagram of the AD7416 part of the system is shown in Figure 3. A2, A1, and A0 are connected to low, low, and high levels respectively. In the eight-bit address, the upper four bits are 1001 to select 7416, and the lower three bits are the addresses represented by A2, A1, and A0. The lowest bit represents read and write, so the write address of AD7416 in the application is 10010010B and the read address is 10010011B. In this example, only AD7416 is used to measure temperature, and OTI is left floating and not used. The serial clock and data bus correspond to the clock and data bus ports connected to the processor. [page]
3.2 Software Design
01H of AD7416 is the configuration register. If the lowest bit is 0, the chip is started to collect temperature values and perform AD conversion; if it is 1, the chip is stopped. The software starts the chip first, and the program is as follows:
This program writes 00H to the configuration register of AD7416 to complete the temperature measurement startup of the chip. The I2C_START subroutine starts the IIC bus, the I2C_WwRITE subroutine writes a byte to the IIC bus, and the I2C_STOP subroutine shuts down the IIC bus. The program first writes 92H to the IIC bus, selects the AD7416 chip, then writes 01H to the address pointer register of the AD7416, selects the configuration register, and finally writes 00H to the configuration register.
When reading a double-byte temperature value, first write the destination register address 00H to the AD7416, that is, the address of the register to read the data, which is stored in the address pointer register. Then send a read command. After receiving the first byte, the processor sends a response signal to the bus, and sends a non-response signal after receiving the second byte. After completion, the bus operation is stopped. Part of the program to read the temperature value from the AD7416 is as follows, TEMPH stores the high byte, and TEMPL stores the low byte:
4 Conclusion
The temperature measurement function of AD7416 is used in the system design. From the use process, the chip has a simple structure, easy operation, and low power consumption. It is the best choice for low-power temperature measurement systems. And because of the use of on-chip temperature sensors, the design structure is greatly simplified, and the reliability of the system is also greatly improved.
Keywords:AD7416
Reference address:Application of AD7416 in Low Power Temperature Detection System
In measurement and instrumentation, temperature detection has almost become an indispensable part. Traditional analog temperature sensors are either complicated in peripheral circuits or require the design of A/D conversion and cumbersome operation, which are subject to certain restrictions in use. The digital temperature sensor AD7416 is used to design various control systems. It is small in size, low in power consumption, simple in programming and convenient in operation. The chip has automatic comparison and programmable control output terminal OTI, which has great advantages in the design of temperature control systems. In addition, AD7416 has low power consumption and can be programmed to control the switching between working and sleeping states. It is also widely used in low-power system design.
2 Structure and function of AD7416
2.1 Pin function
AD7416 has a total of 8 pins and adopts SOIC/MSOP package. Pin 1 is the data input and output port, IIC bus bidirectional data port; Pin 2 is the IIC bus clock port; Pin 3 OTI is the temperature comparison output terminal; Pin 4 GND ground terminal; Pin 5, 6, and 7 are IIC bus address programming bit input terminals; Pin 8 VDD is the power supply.
2.2 Internal Structure and Function
The internal structure of AD7416 is shown in Figure 2. The on-chip bandgap temperature sensor and 10-bit AD converter form a temperature measurement circuit, and the measurement result is stored in the temperature value register. There are 5 registers, a temperature comparator, and an error queue counter on the chip. The functions are introduced below. A serial bus interface is used for IIC address control and data transmission.
2.2.1 Internal registers
AD7416 has 5 internal registers: address pointer register, temperature value register (00H), upper limit register TOTI (03H), lower limit register THYST (02H), and configuration register (01H).
The address pointer register stores the address pointing to one of the four data registers. The first data byte of each serial write operation to AD7416 is the address of the data register, which is the address to which the subsequent data bytes are to be written. This value is stored in the address pointer register. Only the lowest two bits of this register are used to select a data register, and its value corresponds to the register address. The temperature value register is a 16-bit read-only register. Its upper 10 bits store the 10-bit temperature reading sent by the AD converter in 2's complement format, and the lower six bits are unused. The
configuration register is an 8-bit read/write register, which is used to set the working mode of AD7416. D7, D6, and D5 are used for channel selection and are all kept at 0; D4 and D3 set the error queue length; D2 sets the OTI output polarity; D1 sets the OTI working mode; DO sets the chip working mode. The THYST set point register and the TOTI set point register are both 16-bit read/write registers. Their 9 most significant bits store the low and high temperature threshold set points expressed in 2's complement format, corresponding to the upper 9 bits of the temperature value register, and the lower 7 bits are unused.
When the AD7416 is powered on, the address pointer points to the temperature value register, TOT1=80℃, THYST=75℃.
2.2.2 Basic working principle
The bandgap temperature sensor and the 10-bit A/D converter can measure the ambient temperature in real time according to the preset working mode. At the same time, the conversion result is saved in the temperature value register in the form of a 10-bit binary number. The
set point comparator compares the actual measured temperature value with the preset high and low threshold values. If the limit is exceeded, the high and low levels are output at the OTI end according to the configuration register setting. OTI needs to be connected to an external pull-up resistor of about 10 k when in use.
There is a fault queue counter in the AD7416 to avoid false triggering of the OTI output end caused by interference. The queue length of this counter is set by the configuration register. If the queue is set to 4, then it takes 4 consecutive temperature over-limit measurements to cause the effective output of OTI. Any less than 4 times is considered interference and the fault queue counter will be reset.
3 System Design
3.1 Hardware Design
The hardware schematic diagram of the AD7416 part of the system is shown in Figure 3. A2, A1, and A0 are connected to low, low, and high levels respectively. In the eight-bit address, the upper four bits are 1001 to select 7416, and the lower three bits are the addresses represented by A2, A1, and A0. The lowest bit represents read and write, so the write address of AD7416 in the application is 10010010B and the read address is 10010011B. In this example, only AD7416 is used to measure temperature, and OTI is left floating and not used. The serial clock and data bus correspond to the clock and data bus ports connected to the processor. [page]
3.2 Software Design
01H of AD7416 is the configuration register. If the lowest bit is 0, the chip is started to collect temperature values and perform AD conversion; if it is 1, the chip is stopped. The software starts the chip first, and the program is as follows:
This program writes 00H to the configuration register of AD7416 to complete the temperature measurement startup of the chip. The I2C_START subroutine starts the IIC bus, the I2C_WwRITE subroutine writes a byte to the IIC bus, and the I2C_STOP subroutine shuts down the IIC bus. The program first writes 92H to the IIC bus, selects the AD7416 chip, then writes 01H to the address pointer register of the AD7416, selects the configuration register, and finally writes 00H to the configuration register.
When reading a double-byte temperature value, first write the destination register address 00H to the AD7416, that is, the address of the register to read the data, which is stored in the address pointer register. Then send a read command. After receiving the first byte, the processor sends a response signal to the bus, and sends a non-response signal after receiving the second byte. After completion, the bus operation is stopped. Part of the program to read the temperature value from the AD7416 is as follows, TEMPH stores the high byte, and TEMPL stores the low byte:
4 Conclusion
The temperature measurement function of AD7416 is used in the system design. From the use process, the chip has a simple structure, easy operation, and low power consumption. It is the best choice for low-power temperature measurement systems. And because of the use of on-chip temperature sensors, the design structure is greatly simplified, and the reliability of the system is also greatly improved.
Previous article:Research and design of protection circuit for high impedance weak signal measurement
Next article:Design of voltage measurement system with automatic range switching
Recommended Content
Latest Test Measurement Articles
- Keysight Technologies Helps Samsung Electronics Successfully Validate FiRa® 2.0 Safe Distance Measurement Test Case
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Seizing the Opportunities in the Chinese Application Market: NI's Challenges and Answers
- Tektronix Launches Breakthrough Power Measurement Tools to Accelerate Innovation as Global Electrification Accelerates
- Not all oscilloscopes are created equal: Why ADCs and low noise floor matter
- Enable TekHSI high-speed interface function to accelerate the remote transmission of waveform data
- How to measure the quality of soft start thyristor
- How to use a multimeter to judge whether a soft starter is good or bad
- What are the advantages and disadvantages of non-contact temperature sensors?
MoreSelected Circuit Diagrams
MorePopular Articles
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
MoreDaily News
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
Guess you like
- EEWORLD University ---- Industrial Motor Driver - Introduction to Texas Instruments System Solutions
- Updated PYBCN_V2 and PYBNANO_V2 firmware
- IIR filter software implementation (Matlab+C++)
- Design of ultrasonic distance measuring sensor system
- Crowdfunding of micro:bit robot PLEN:bit
- AD19 only shows wireframe after copper is laid, which does not look like laid copper
- Application of MSP430F5xxx in the highway toll collection system (ETC)
- Is it useful for people who work with microcontrollers to read "Introduction to Algorithms" and "Data Structures"?
- Design of electronic piano based on LPC2000 series ARM chip
- How do analog switches ensure bandwidth without distortion?