China sensor manufacturers

China Temperature Sensor & Thermistor manufacturer

DC PTC thermistor constant temperature control system based on AT89C2051 chip

Most of the existing heaters are heated by conventional devices such as electric heating tubes and electric heating wires. The outer casing of the electric heating pipe is a steel pipe made of stainless steel, and has a heating element resistance wire, and heats the heat to the outside through the electric resistance wire and the steel pipe. When the air does not flow, the heat of the electric heating pipe will not be dissipated, the temperature will become higher and higher, and in severe cases, the electric heating pipe will be burnt and even a fire will occur. As a heating material, PTC thermistor has the characteristics of energy-saving constant temperature, no open flame, good safety, easy regulation of heat generation, small influence of fluctuation of power supply voltage, and rapid temperature rise. Therefore, designing a constant temperature heating system using a PTC thermistor as a heating material is of great interest for applications requiring high safety.

2, the overall design of the system
The system uses AT89C2051 as the control core, the PTC thermistor heats the heating area, and the digital thermometer DS18B20 collects the temperature in real time. The upper and lower limits of the temperature value to be heated are set by the peripheral keyboard.   It is determined whether the set temperature range is reached by comparing the temperature value collected in real time with the set temperature value. The multi-channel relay controlled by AT89C2051 realizes the switch control of the working state of the multi-chip PTC thermistor (one relay to control one PTC thermistor), so that the temperature of the heating region is maintained within the set temperature range. The system schematic is shown in Figure 1.

3, single chip control heating
3.1 Single Chip System

The AT89C2051 is a low voltage, high performance CMOS 8-bit microcontroller from ATMEL, USA. Produced by ATMEL's high-density, non-volatile memory technology, it is compatible with the MCS-51 command system, with a built-in general-purpose 8-bit CPU and 2K-byte Flash flash memory. 128 bytes of internal RAM, 15 I/O lines, 2 16-bit timer/counters, 1 5-vector two-stage interrupt structure, and 1 full-duplex serial communication port. Built-in 1 precision comparator, on-chip oscillator and clock circuit [1].
Schematic diagram of PTC thermistor constant temperature control system
System schematic

3.2 PTC thermistor
PTC is the abbreviation of English PosiTIve Temperature Coefficie-nt, which is the positive temperature coefficient, and its resistance value increases with the increase of temperature.
The resistance of the PTC thermistor changes very slowly with temperature before it reaches a certain temperature. When this temperature is exceeded, the resistance of the PTC thermistor increases sharply. This temperature, which is a sudden change in resistance, is called Curie temperature and is an important technical indicator of PTC thermistors [2].
Figure 2 shows the current-time characteristics of a PTC thermistor.
Current-time characteristic diagram of PTC thermistor

3.3 Digital Thermometer DS18B20
The DS18B20 digital thermometer is a 1-Wire, a single-bus device manufactured by DALLAS, which features simple wiring and small size. The measurement temperature range is -55 ° C ~ +125 ° C, in the range of -10 ° C ~ 85 ° C, the accuracy is ± 0.5 ° C. The accuracy of the DS18B20 is checked to ±2 °C. The on-site temperature is directly transmitted in the digital way of “first-line bus”, which greatly improves the anti-interference of the system.

Because the DS18B20 uses the 1-Wire bus protocol, it realizes bidirectional transmission of data on one data line. For the AT89C2051 microcontroller, the single bus protocol is not supported on the hardware. Therefore, software access must be used to simulate the protocol timing of a single bus to complete access to the DS18B20 chip. The protocol defines the timing of several signals: Initialize timing, read timing, write timing. All timings use the host as the master and the single-bus device as the slave. The data and command transfers are all low-order first [3].

3.4 MCU control multi-channel relay
The single-chip control relay is shown in Figure 1. Only the control circuit connection of one relay is given in the figure. It occupies one bit of the P3 port of the MCU, and the multi-channel relay can be realized by occupying different pins. The system uses the 3-position P3 port to control the 3-way relay. The PTC thermistor is DC 12V, and the voltage is supplied by the switching power supply. Since the driving current of the P3 port of the single chip microcomputer is 20 mA, and the driving of the relay is equivalent to the driving of the high power device for the single chip microcomputer, the driving current of the P3 port must be amplified. The PTC thermistor is powered by DC 12V, which may affect the stability of the MCU. Therefore, the optocoupler 4N33 is selected to improve the driving capability of the P3 port. At the same time, because the photocoupler 4N33 uses an electro-optical-electrical conversion form to amplify the drive current, thus isolating the microcontroller and the relay, eliminating the potential instability of the system. When the pin of the P3 port of the single-chip microcomputer is given a low level, the LED of the 4N33 input terminal is turned on, the output terminal outputs the amplified current, and the driving relay is pulled in, so that the PTC thermistor loop is turned on and starts to heat [4- 5].

The PTC thermistor has an inrush current at the beginning of the start of operation. This can be seen from its current-time characteristics (shown in Figure 2). After a period of time, the current drops to a stable state, and the current is small, about 0.8 to 1A. In this way, when the heating is started, the three relays cannot be turned on at the same time for heating, because the power supply of the PTC thermistor is DC 12V, 12A. If the three-way relay is turned on at the same time, when the inrush current of the PTC thermistor reaches the maximum value (5.7 to 7A), the current that the switching power supply will withstand exceeds its rated value, causing the power supply to stop working and even destroy. Affects the continuity and reliability of the system work. In view of this factor, the time S1 from the start of the operation of the single-chip PTC thermistor to the maximum value and the time S2 from the maximum value to below 4A are measured, so that the opening of the relay can be determined based on the two times. Now set three relay 1,2,3, respectively road. After the MCU is powered on, the first relay is turned on, and the second relay is turned on after the current has risen from the minimum value to the maximum time S1 (if the temperature provided by the first PTC thermistor does not reach the set temperature range) . The opening of the third relay also takes time S1. The on and off states of each relay are determined by comparing the real-time temperature measured by the digital thermometer DS18B20 with the upper and lower limits of the set temperature. The order of opening the relays is set to 1, 2, 3, and the order of shutdown is set to 3, 2, and 1. These settings are implemented by software.

3.5 keyboard, display
The peripheral keyboard of this system uses the HD7279A keyboard display chip. Since the upper and lower limits of the system set temperature and the temperature of real-time heating are to be displayed, only the keyboard function of the HD7279A is used, and the display portion of the system uses the LT12864I liquid crystal display module. When the system starts working, the heating temperature is set by the keyboard, the data is transmitted to the single chip microcomputer, and then the data is sent to the display module by the single chip microcomputer; During the system operation, the real-time temperature value measured by the digital thermometer DS18B20 is also transmitted to the single-chip microcomputer, and then the data is converted by the single-chip microcomputer and sent to the display module for display.

4, system software design
The overall flow chart of the system software is shown in Figure 3. After the system is powered on, it is initialized first, and the registers and I/O ports are set. When the button valid signal is detected, the button data is read, transmitted to the MCU and sent to the display module for display. After the keyboard setting is completed, the flag is set. After the MCU detects this signal, the first relay is turned on for heating. At this time, the digital thermometer DS18B20 is initialized for temperature measurement, and the measured real-time temperature data is sent to the single-chip microcomputer for processing, and then displayed by the display module. After each measurement of the temperature of the DS18B20, the measured temperature value is compared with the upper and lower limits of the set temperature value. If the measured temperature is higher than the upper limit of the set temperature, the relay is turned off. Detect the on/off status of each relay, and turn off the relay in the order of the 3rd, 2nd, and 1st channels (turn off 1 relay every time); If the measured temperature is lower than the lower limit of the set temperature, go to the relay open processing program, check the on and off status of each relay, and turn on the relay in the order of the 1st, 2nd, and 3rd channels (each time is turned on once). 1 way relay). In the subsequent system work, the process of measuring the temperature to the temperature value is compared to turning on or off the relay to achieve the purpose of constant temperature control of the heating zone.
System software overall flow chart
Figure 3 System software overall flow chart

The following is a flow chart of several subroutines in the system: the flow chart of the three-way relay control subroutine is shown in Figure 4.
Three-way relay control subroutine flow chart
The DS18B20 temperature measurement subroutine flow chart is shown in Figure 5.
DS18B20 temperature measurement subroutine flow chart

The keyboard display subroutine flow chart is shown in Figure 6.
Keyboard display subroutine flow chart
5 Conclusion
The system uses the AT89C2051 chip as the control core component and uses the DC PTC thermistor as the heating material. The hardware circuit and software programming are used to realize the sequential control of the PTC thermistor, which solves the problem that the inrush current is large at startup, and achieves the purpose of rapid constant temperature control. The system is safe and convenient to use, and can be applied in the fields of constant temperature heating of medical infusion, dryers and heaters in household appliances; In addition, the system also proposes a method to control large current, which provides a reliable basis for the single-chip drive high-current device and has wide application value.
PREV:WMZ12A PTC thermistor selection parameters
NEXT:What is a ptc heating element?





Email me

Mail to us