Abstract: This paper describes the hardware and software design of an Internet-based industrial air conditioner intelligent controller. The controller can not only complete the conventional control functions of the appliance, but also communicate with the embedded network interface module, receive commands sent by the host computer, process and return the corresponding parameters, and realize the user's remote monitoring of the equipment. The actual operation results show that the scheme is practical and feasible. The controller has the characteristics of low cost, simple and fast development, and flexibility.
1 Introduction
Network-based monitoring of equipment has become a major application area at present, such as remote control of industrial air conditioners through the Internet, including power on, power off, temperature adjustment, etc. In addition to completing conventional functions, it is also necessary to communicate with the external network, receive instructions sent by remote users through the Internet, analyze the instructions and perform corresponding operations, and return the working status parameters of the equipment as needed. This article introduces the software and hardware design of the industrial air conditioner intelligent controller in detail. The controller communicates with the embedded network interface module through the serial port, allowing the appliance to access the Internet and complete communication with the external network.
2 Working principle of industrial air conditioning
Figure 1 Schematic diagram of industrial air conditioning refrigeration
The refrigeration principle of industrial air conditioning is shown in Figure 1. When the industrial air conditioning is working, the low-pressure and low-temperature refrigerant vapor in the refrigeration system is sucked in by the compressor, compressed into high-pressure and high-temperature superheated steam and then discharged to the condenser; at the same time, the outdoor air sucked in by the outdoor fan flows through the condenser, taking away the heat released by the refrigerant, and condensing the high-pressure and high-temperature refrigerant vapor into high-pressure liquid. The high-pressure liquid flows into the evaporator through the throttling capillary tube to reduce pressure and temperature, and evaporates at the corresponding low pressure, absorbing the surrounding heat; at the same time, the indoor fan allows the indoor air to continuously enter the fins of the evaporator for heat exchange, and sends the cooled gas after heat release to the room. In this way, the indoor and outdoor air circulates continuously to achieve the purpose of lowering the temperature.
3 Detailed design of controller hardware
The hardware principle block diagram of the industrial air conditioner intelligent controller is shown in Figure 2. As can be seen from the figure, the hardware of the industrial air conditioner intelligent controller is based on the AT89S52 microprocessor, and is mainly composed of power supply circuit, panel buttons, infrared receiving circuit, temperature detection circuit, serial communication interface, digital display circuit and relay drive circuit.
Figure 2 Schematic diagram of industrial air conditioning intelligent controller
3.1 Power supply circuit
There are three voltages on the entire main control board: AC220V, DC12V and DC5V. AC220V directly powers the compressor and fan; DC12V and DC5V are used to power the relay and microcontroller system. The power supply circuit is shown in Figure 3. The power transformer converts the 220V voltage of the AC power grid into the required voltage value, and then inputs it from the socket J1, undergoes full-wave rectification through the rectifier bridge, and filters out the ripple through the filter circuit composed of a parallel 2200u/35V electrolytic capacitor and a 0.1μF capacitor to obtain DC12V, and then the voltage is stabilized at +5V through the three-terminal voltage regulator tube 7805.
3.2 Temperature detection circuit
The design uses the digital temperature sensor DS18B20, which has a temperature measurement range of -55℃-+125℃, can be programmed to 9-bit-12-bit A/D conversion accuracy, and a temperature measurement resolution of up to 0.0625℃. The measured temperature is serially output in the form of a 16-bit digital quantity with symbol extension; its working power supply can be introduced at the remote end or generated by parasitic power supply; its convenience lies in the single-line interface design, so that the processor only needs to connect one data line to perform all operations on it, realize the transmission of operation instructions and measurement data, and save a lot of leads and logic circuits. The above characteristics make DS18B'20 widely used in temperature measurement and control systems.
There are two typical ways to connect DS18B20 and microcontroller: (1) parasitic power supply, where both VDD and GND are grounded. (2) external power supply, where VDD is powered by a 3V~5.5V power supply. This design uses an external power supply.
3.3 Digital display circuit
The display module is mainly composed of a digital LED display block and 74HC164. The 74HC164 is a unidirectional 8-bit shift register that can realize serial input and parallel output. The 74HC164 is easy to program and has a high cost-effectiveness. The two I/O ports of the microcontroller are selected to complete the serial display connection with the display module, in which the P2.4 port of the microcontroller is used as the shift pulse output terminal and the P2.5 port is used as the data output terminal. The P2.2 port of the microcontroller is connected to the CLK terminal of the 74HC164. The high and low levels output to the P2.2 port of the microcontroller are the clock pulses for the data shift of the 74HC164. At the moment when the 74HC164 obtains the clock pulse, if the data input terminal is high, a 1 will enter the inside of the 74HC164. If the data input terminal is low, a 0 will enter its inside. This cycle can be repeated 8 times to transmit an 8-bit data to the 74HC164. The output (parallel output) of 74HC164 is directly used as the segment selection control signal of the digital tube, and the P2.0 and P2.1 ports of the microcontroller drive the output to display the bit selection control signal. The display segment code driving circuit is shown in Figure 4.
Figure 4 Display drive circuit
3.4 Ethernet control and serial communication module design
The Ethernet control module mainly acts as a bridge between Ethernet/Internet and microprocessor. It packages the data transmitted by microprocessor and sends it to Ethernet, or receives the data on Ethernet for processing by main processor. Its core is Ethernet control chip RTL8019AS. In order to make RTL8019AS work with 8-bit microprocessor, its working mode, status and related parameters need to be set by hardware.
The Ethernet control chip RTL8019AS implements the functions of the Ethernet media access layer (MAC) and physical layer (PHY), including MAC data frame assembly/disassembly and transmission and reception, address recognition, CRC encoding/checking Manchester encoding and decoding, receiving noise suppression, output pulse shaping, timeout retransmission, link integrity test, signal polarity detection and correction, etc.
The serial communication module is a bridge connecting the device controller and the embedded network interface module. Since the serial data interface of the microcontroller is not a standard RS-232-C serial port, the MAX232 level conversion chip of MAXIM is used to connect the serial data interface of the microcontroller with the standard RS-232-C serial interface. MAX232 is a special chip that can realize the conversion between RS232 and TTL logic levels. The chip contains two receivers and drivers and a power supply voltage converter, and only needs a single +5V power supply. The hardware interface of the MAX232 chip is very simple. The serial receiving and transmitting terminals RXD and TXD of the microcontroller can be directly connected to the corresponding ports of MAX232. By connecting an external 1.0μF electrolytic capacitor, MAX232 can output the ±10V signal level required for RS-232-C serial communication. Since the MAX232 chip has no chip select terminal, it only plays the role of level conversion in the application system, so it does not occupy the external data storage space of the microcontroller.
3.5 Relay drive circuit
In the single-chip microcomputer application system, the switch output circuit mainly completes the output of the action signal, which is used to control the switch state of the compressor and the fan. Since the output signal is not enough to drive the switch action of the relay, ULN2003A is used between the signal output port of the single-chip microcomputer and the relay to realize signal amplification and drive. ULN2003A is composed of 7 groups of Darlington transistor arrays and corresponding resistor networks and box-position diodes. It has the ability to drive 7 groups of loads at the same time. It is a monolithic bipolar high-power high-speed integrated circuit; it has the characteristics of high current gain, strong load capacity, wide temperature range and high working voltage, and is suitable for driving high-power devices such as relays and displays.
The design of the relay drive circuit is shown in Figure 5. The microcontroller control signal is output through the P1.0~P1.3 ports, and the signal is latched in the 74LS273 through the control of P3.4. The output of the 74LS273 is then reversely amplified by the Darlington driver ULN2003A and added to the input of the relay, so that the compressor and fan can operate as required. The 74LS273 latches the control signal, which increases the output power on the one hand, and prevents the control from malfunctioning when the microcontroller is reset on the other hand.
4 Software Design and Implementation
The system software is written in C51, adopting a modular design concept, and consists of three parts: the main program module, various functional subroutine modules, and interrupt service subroutine modules. The functions of the main program are system initialization, control program direction, and call functional subroutines; functional subroutines include data acquisition, digital display, fan and compressor control, etc.; interrupt service subroutines include remote control reception, timer interrupt processing, etc. The main program modules are described below.
The main program is the hub of the entire control system software. Through the main program, various subroutines and modules in the system are organically called to form a closely connected whole, and various predetermined operation instructions are completed in an orderly manner. After the system is powered on or reset, the system is first initialized, including the initialization of various registers and chips; then the room temperature is sampled and weighted; the serial communication module is started to determine whether the command and data sent by the gateway are received. If the command and data are received, the corresponding parameters and flags are set; the keyboard scanning program is called to check whether a key is pressed. If a key is pressed, the key is identified and the corresponding parameters and flags are set; the display module is called to display the set temperature, current room temperature, timing time, wind speed, function and timing status and other information; the function query and processing module is called to make the system work according to the set parameters and flags. As long as the system is powered on, the main program cannot be stopped and is always in a loop waiting state, so the main program has no instructions to end the operation.
Previous article:Brief Introduction to the Principle of Temperature Collection Alarm System
Next article:Design of motion control platform and acquisition card based on USB
- Popular Resources
- Popular amplifiers
- Molex leverages SAP solutions to drive smart supply chain collaboration
- Pickering Launches New Future-Proof PXIe Single-Slot Controller for High-Performance Test and Measurement Applications
- CGD and Qorvo to jointly revolutionize motor control solutions
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Nidec Intelligent Motion is the first to launch an electric clutch ECU for two-wheeled vehicles
- Bosch and Tsinghua University renew cooperation agreement on artificial intelligence research to jointly promote the development of artificial intelligence in the industrial field
- GigaDevice unveils new MCU products, deeply unlocking industrial application scenarios with diversified products and solutions
- Advantech: Investing in Edge AI Innovation to Drive an Intelligent Future
- CGD and QORVO will revolutionize motor control solutions
- 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
- Measuring poles and zeros from a Bode plot
- LM324 mask
- MSP430 default MCLK, SMCLK, ACLK clock frequency
- Excellent Award-winning Works: High Power Factor Power Supply
- Download the information and get free gifts! A century of technology, a decade of disruption: How to survive in the electric vehicle revolution?
- DSP28335 R&D Notes
- What is R2 used for?
- [GD32L233C-START Review] 16. IIC obtains the temperature, humidity and atmospheric pressure of the x-nucleo-iks01a3 board
- Zigbee node cannot access the network?
- DB9 pin type: RS485 output signal and terminal pin assignment