Temperature detection is common in the field of industrial measurement and control. Using high-precision A/D conversion chips and single-chip microcomputers, a temperature detection system with high measurement accuracy and stable performance can be easily constructed. This paper uses the 12-bit serial controlled A/D conversion chip ADS1286 and cooperates with the AT89C2051 single-chip microcomputer to design the temperature acquisition part of the temperature detection system.
1 Chip Introduction
ADS1286 is a 12-bit micro-power A/D conversion chip produced by BURR-BROWN, USA. Its power supply current is only 250μA, the sampling rate is 20 kHz, and it provides a serial interface for two-wire or three-wire interface communication and is compatible with SPI or SSI. The characteristics of micro-power consumption and serial interface make ADS1286 very suitable for applications where data acquisition is required over long distances and shielding is required. ADS1286 adopts an 8-pin small DIP package. VREF is the reference voltage input terminal; +In is the in-phase input terminal; -In is the inverting input terminal; GND is the ground terminal; is the chip select terminal/low power mode selection. When this pin is low, the chip select is valid, and when this pin is high, it is in low power mode; DOUT is the serial data output terminal; DCLOCK is the clock input terminal; +Vcc is the positive power supply terminal (+6 V MAX). The internal structure of the ADS1286 chip is shown in Figure 1, which consists of a sample/hold differential amplifier, a capacitor digital/analog converter CDAC, a comparator, a successive approximation register, a control circuit and a serial interface circuit. The serial interface consists of two digital inputs (DCLOCK and /SHDN) and one three-state output port DOUT, forming a three-wire interface for serial communication with the microprocessor.
The working sequence of ADS1286 is shown in Figure 2. After power-on, the terminal is set to a high level. At this time, the chip select is invalid, the clock signal input of the DCLOCK terminal is prohibited, and the DOUT terminal is in a high-impedance state. After the terminal level changes from high to low, the chip select is valid, and the A/D sampling sequence begins. After the delay time tCSD, the clock signal is allowed to access the DCLOCK terminal. After the chip select is valid, the A/D conversion sequence begins from the second clock signal. The DOUT terminal is out of the high-impedance state and outputs a synchronous digital sequence at the falling edge of each clock signal. After outputting an invalid bit (NULL BIT) first, the DOUT terminal outputs the 12-bit A/D conversion result from the high bit (MSB) at the falling edge of each signal of the next 12 clock signals, and latches the 12-bit A/D conversion result at the rising edge of each clock signal. After the conversion time of 12 clock signal cycles ends until the next change from high to low at the /SHDN terminal level, the ADS1286 works in low power mode.
The difference between Figure 2(a) and Figure 2(b) is that after the DOUT terminal outputs the 12-bit A/D conversion result from high to low, if the DCLOCK terminal still maintains the clock signal, the DOUT terminal will output the A/D conversion result again from the second lowest bit (LSB+1 bit) from low to high until the /SHDN terminal level changes from low to high. If the DCLOCK terminal clock signal is still valid after the A/D conversion result is fully output, the DOUT terminal outputs a low-level signal. This process is shown in Figure 2(b).
2. Hardware Design of Temperature Collection
In the temperature detection system, in order to collect the current temperature of the target object, a platinum resistor with a wide temperature measurement range and good stability is used as the temperature measuring element. The Wheatstone bridge composed of platinum resistors converts the temperature signal into a small voltage signal, which is then amplified by the instrument amplifier to obtain the amplified analog temperature signal. In order to process the collected temperature signal, it is necessary to first convert the collected and amplified analog temperature signal into a digital signal, and then send it to the microcontroller for processing. This paper uses the 12-bit resolution analog/digital conversion chip ADS1286 to perform A/D conversion on the collected analog temperature signal to reduce the quantization error of the A/D conversion. ADS1286 is under the control of the clock signal sent by the AT89C2051 microcontroller, and when the chip select is valid, it provides 12-bit serial temperature data to the microcontroller through the serial data output terminal. The principle block diagram of the temperature acquisition part is shown in Figure 3.
The temperature acquisition circuit is shown in Figure 4. The Wheatstone bridge composed of platinum resistor Rt, resistors R1, R2, R3 and variable resistor W1 is used to measure the temperature of the target. The resistance of the platinum resistor changes accordingly with the temperature, and the Wheatstone bridge also outputs a changing voltage. The output voltage is small, and it needs to be connected to the AD620 instrument amplifier shown in Figure 4 for amplification to meet the input voltage range required for A/D conversion. The AD620 instrument amplifier has the characteristics of low power consumption and high gain. The amplification factor is changed by adjusting the resistance of the external variable resistor Rg, and its amplification gain G=1+49.4 k/Rg. According to the range of the detected temperature, the variable resistors W1 and Rg are adjusted in turn, so that at the lowest and highest detection temperatures, the amplifier outputs 0 and 5 V respectively. Therefore, when the temperature changes within the detection range, the amplifier can output an input voltage range (0~5 V) that meets the needs of A/D conversion.
After the analog temperature signal is collected and amplified, its output signal is connected to the ADS1286 chip through the +In pin for A/D conversion. The +VCC pin of the ADS1286 chip is connected to the positive power supply Vcc, the VREF pin is connected to the reference power supply VREF, and the -In and GND pins are grounded. The DCLOCK, DOUT and pins of the ADS1286 chip are respectively connected to the three pin outputs of the AT89C2051 microcontroller P1.5~P1.3. The microcontroller outputs the clock signal required for the ADS1286 to work from the P1.5 pin through the program. The microcontroller can select the ADS1286 chip and the low power mode through the P1.3 pin. When the pin outputs a low level, the ADS1286 chip select is valid. When the pin is high, the ADS1286 is in a low power state. AT89C2051 strictly follows the operation timing of the ADS1286 chip, controls the ADS1286 chip to perform A/D conversion on the analog temperature signal, and outputs the converted 12-bit digital temperature data from the DOUT pin and inputs it serially to the microcontroller through the P1.4 pin.
In the temperature acquisition circuit, the ±15 V voltage generated by the switching power supply is used as the positive and negative power supplies of the AD620 instrument amplifier. The +15 V voltage is connected to the shunt regulator composed of the TL431ALCP precision reference regulator and resistors R4~R6. Its output provides precise voltage to the outside and is used as the power supply of the Wheatstone bridge and the reference power supply of the ADS1286 chip.
The timing control of the ADS1286 chip by the AT89C2051 microcontroller adopts the operation timing shown in Figure 2(b). First, a low level is provided to the terminal through the P1.3 pin to make the ADS1286 chip select valid. The ADS1286 starts to sample the analog input voltage. After the delay time tCSD, the AT89C2051 provides a clock signal to the DCLOCK terminal through the P1.5 pin. After the ADS1286 chip select is valid, the A/D conversion timing starts from the second clock signal. At this time, the DOUT terminal first outputs an invalid bit. At the falling edge of each signal of the next 11 clock signals, the DOUT terminal starts to output the A/D conversion result from the high bit (MSB). At the falling edge of each signal of the next 12 clock signals, the DOUT terminal starts to output the 12-bit A/D conversion result again from the LSB bit. The AT89C2051 microcontroller receives the conversion result from the low bit to the high bit through the P1.4 pin at the falling edge of each clock signal. After receiving the 12-bit digital temperature data, the microcontroller sets the P1.3 pin to a high level and prepares to receive the A/D converted temperature data from ADS1286 next time.
3. Software Design of Temperature Acquisition
The AT89C2051 microcontroller needs to read the 12-bit A/D conversion result of the ADS1286 chip twice. The lower 8-bit conversion result is stored in the on-chip RAM31H unit, and the higher 4-bit conversion result is stored in the on-chip RAM32H unit. The temperature acquisition A/D conversion subroutine is as follows:
4 Conclusion
The ADS1286 chip is used in the design of the micro heater of the airflow liquid phase microextraction instrument. The detection temperature range is 0-350℃, and the micro heater temperature detection accuracy reaches ±0.1℃. It is precisely because the ADS1286 can simplify the circuit design and ensure the high accuracy of the measurement system that it has high practical value in the field of intelligent instrumentation and industrial measurement and control.
Previous article:Design of high-speed SPI interface based on AT25T1024 FLASH
Next article:Determination of Baud Rate in Serial Communication between Single Chip Microcomputer and PC
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- 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
- 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
- About bus conflicts (Part 2)
- PMOS is turned on
- CCS compiles and generates binary files
- Mobile phone calculators are all dead: What is 10% + 10%? [Have you ever calculated it?]
- When the serial port is connected, if the host receives wrong data, it will return to the initial state.
- How to set the temperature of the battery temperature detection pin TS of BQ24650 to -10℃-50℃
- Summary of DSP CMD file writing method
- IC WKN Driver Laser Diode
- [Live broadcast on May 9] Discussing solutions to reduce downtime in the new manufacturing era, ADI live broadcast expert Zhao Yanhui is here again
- MOS tube isolation drive circuit, if we drive high voltage MOS tube, we need to use transformer drive and integrated...