Temperature transmitter based on ICL7135 and PIC microcontroller

Publisher:bullfishLatest update time:2011-08-01 Keywords:ICL7135 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Intelligent control of A/D conversion data. This article takes the actual engineering application of PIC microcontroller and ICL7135 as an example to introduce the application of an intelligent temperature control instrument in the temperature transmitter .

1 PIC microcontroller

The PIC series 8-bit CMOS microcontrollers have a unique RISC structure and a Harvard bus structure with separate data bus and instruction bus, which makes the instructions have the characteristics of single word length and allows the number of bits of instruction code to be more than the number of data bits of 8 bits. Compared with the traditional 8-bit microcontrollers with CISC structure, this can achieve 2:1 code compression and increase the speed by 4 times.

PIC has an excellent development environment and complete confidentiality. PIC uses confidential fuses to protect the code. After the user burns the code and blows the fuse, others can no longer read it unless the fuse is restored. It also has a watchdog timer, which can be used to improve the reliability of program operation. In this project, the PIC mid-range microcontroller PIC16F62x was selected, which contains 2K flash, 224 bytes of SRAM, 128 bytes of EEPROM, 16 I/O ports, 1 CCP capture channel, 2 comparator channels, 2 8-bit and 1 16-bit timers, and has UART function.

2 7135 A/D Conversion Principle

7135 uses high impedance differential input, the total offset voltage is less than 10μV, and its A/D converter uses dual integration, which is divided into 4 stages: automatic zeroing, input signal integration, standard signal anti-integration, and integrator zeroing. The conversion process is shown in Figure 1.

7135 A/D Conversion Principle

As can be seen from Figure 1, when 7135 integrates the input signal, its BUSY signal line jumps from low to high and remains at a high level until the standard signal anti-integration ends and then jumps to a low level. In this process, the integration of the input signal generally maintains 10001 clock pulses, and in the case of full scale, the inverted standard integration value is 20001 (when Vin="2Vref"). For different analog inputs, the number of reverse standard integration pulses of 7135 is different, and the high-level width of the BUSY signal is also different. The number of reverse integration pulses is proportional to the input signal amplitude, and has a one-to-one correspondence with the measurement result. During the conversion process, 7135 provides an input signal polarity judgment pin POL. When the input (Vin+-Vin-) is positive, the POL signal is high, and when (Vin+-Vin-) is negative, the POL signal is low.

3 7135 serial connection with PIC microcontroller

From the conversion principle of 7135, it can be known that the measurement result can be obtained by pulse counting, and only three control lines CLK, BUSY, and POL are required. The PIC series microcontrollers launched by Microchip have the advantages of large driving ability, strong anti-interference ability, and moderate price. The PIC16F6X series launched by it has 2~4K FLASH memory, 1 16-bit timer, 2 CCP comparison/capture modules, and more than 22 I/Os. The only regret is that there is no sampling clock that meets the 7135. Considering that the instrument needs communication and isolated analog transmission output, a 16M crystal oscillator is used, and the 16-bit timer T1 is used as the synchronous counting pulse of 7135. BUSY is connected to the CCP1 pin, working in capture mode, and used to measure the pulse width; and the CLK clock of 7135 is connected to the high-speed inverter using the CPU crystal oscillator, and then taken out by frequency division. Considering the sampling speed and the anti-interference effect on the 50Hz power supply, as well as the large inertia of temperature variables, CLK="250kHz" is selected, and the sampling speed is about 4 times/min. The system hardware connection is shown in Figure 2:

System hardware structure diagram

In practical applications, the object of monitoring is the temperature of the glass furnace, and the signal is collected to the transmitter using a thermocouple. As a temperature transmitter, the influence of ambient temperature must also be considered. Secondly, the temperature drift of the device must also be considered. The two interference quantities must be processed with the data obtained later to obtain the true temperature value. Therefore, there are three quantities that need to be collected in the analog input part, which are isolated through a multi-channel analog switch, and then the signal is sent to the operational amplifier for A/D conversion. In the A/D conversion part, since the ICL7135 itself does not have its own reference voltage, an accurate reference voltage source must be used in the design.

The actual application uses the TL431 adjustable voltage reference, which meets the production requirements and has a good effect. The output part of the transmitter needs to be isolated and the output terminal of the MAX485 is connected to the above pull-down resistor.

4 Calculation and processing of A/D conversion results

The clock of timer T1 and the clock of 7135 are not the same input. The clock of T1 is 1:128 of the system clock, while the CLK of 7135 is 125KHz, which is the square wave pulse output by the CPU pin. The BUSY pin of 7135 is connected to the pin with level interrupt function of CPU, so when BUSY is high, the pulse number starts to be counted until one conversion is completed. The data measured by the thermocouple channel is processed according to its voltage-temperature characteristic table to obtain its temperature value. The temperature drift depends on the polarity of POLARITY. If it is positive, it is subtracted from the thermocouple temperature value, otherwise it is added. The ambient temperature is directly added. After the temperature data is processed, wait for the host computer to send instructions to upload.

5 Software Design

The design of the system software contains the following processing modules: initialization and main program module, interrupt processing module, data processing and transmission control output module. The interrupt processing module includes communication interrupt and capture interrupt processing. The data processing and transmission control output module includes data processing of temperature objects and reception and transmission control of serial communication. The following briefly introduces the main program running process and 7135 level interrupt processing. The program flow is as follows:

Main program running process

7135 Level Interrupt Conversion Process

During the A/D conversion process, the pulse count starts when the BUSY pin rises, and the count ends when the pin falls. The result is stored in the CCP register, which is a 16-bit register divided into two bytes, CCPR1H and CCPR1L, high and low. Shift CCPR1H left by 4 bits, add CCPR1L, and then subtract 10001, which is the count value of the A/D conversion pulse. The converted data is further processed by the software according to the above method. In the process of processing the sampled data, it is possible to perform pulse filtering on every 4 or 8 sampling values, or combine other filtering methods such as the first-order filtering method to process, display, and control the data, which can make the measurement more accurate and the display more stable. This provides a strong guarantee for the continuous and stable production.

6 Conclusion

The working environment of this temperature transmitter is quite harsh, and the electrostatic interference is very large. During the debugging process, the chip was even burned out by electrostatic stimulation. Adding optocoupler isolation at the front end of serial communication and pulling up the MAX485 chip A and B to the power supply and ground respectively played a good protective role. During the long-term use, this transmitter performed well in terms of stability, accuracy, real-time performance and safety, meeting the needs of actual production.

Keywords:ICL7135 Reference address:Temperature transmitter based on ICL7135 and PIC microcontroller

Previous article:Design and production of a single-chip temperature data recorder
Next article:PIC16F84A MCU Tutorial Board Detailed Explanation (PCB Diagram and Schematic Diagram)

Recommended ReadingLatest update time:2024-11-16 16:02

Application of Serial Data Acquisition Method in Single Chip Microcomputer Voltage Meter
Among the commonly used A/D conversion chips (such as ADC0809, ICL7135, ICL7109, etc.), ICL7135 is different from the others. It is a four-and-a-half-bit dual-integral A/D converter with high precision (equivalent to 14-bit binary), low price, strong anti-interference ability, etc. Usually, designers use single-chip
[Microcontroller]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号