According to the domestic demand for the performance of air conditioning controller, an air conditioning controller based on Cortex-M4 is designed. It takes NUC472 as the main control core, and uses electric parameter monitoring sensor, flammable gas sensor, ionic smoke sensor, human pyroelectric infrared sensor, temperature sensor and temperature and humidity sensor to collect real-time electrical parameters of air conditioning, the security status of the environment, personnel mobility, temperature and humidity and air conditioning status, etc. Information, through Wi-Fi to achieve information communication and overall control between the controller and the PC server. After field test, the system runs stably, the human-computer interaction is convenient, the communication is reliable and the overall control of coordination and prediction is stable. The comfortable and energy-saving control of air-conditioning is realized, especially under the most economical temperature control mode, the energy-saving of the system is 30.6% compared with that before transformation, which can be used in civil and industrial intelligent air-conditioning occasions. Air conditioning came into our country in the 1980s, and now in the 21st century, air conditioning has become a common household appliances in people’s daily life. According to the latest “China Air-conditioning Products Market Research Report in the First Half of 2016”, the consumer attention of frequency conversion air-conditioning is 60.1%, which has become the most concerned air-conditioning products. With the progress of science and technology and the improvement of social living standards, people’s demand for air-conditioning controllers is increasing, and their performance requirements are also increasing. At present, the domestic air-conditioning controller is built by low-end single-chip computer, which has low cost and high power consumption, while the foreign air-conditioning products have high performance, low power consumption and complete functions, but the price is also expensive. Combining with the development situation at home and abroad, air conditioning controller will develop towards the trend of high cost performance, multi-function, networking, low power consumption, intellectualization and simple operation. According to the development trend of air conditioning, to improve the limitation that traditional air conditioning can only be controlled on site or in advance, this design adopts multi-sensor and Internet of Things technology, and designs a multi-functional, intelligent, networked and integrated control air conditioning controller. At present, the basic structure of domestic air-conditioning control system includes system control part, temperature acquisition part, keyboard control part, display board part, compressor part, indoor and outdoor fan device part and communication circuit. After recent years’development, air conditioning system has developed from traditional constant frequency and constant air volume air conditioning to variable frequency and variable air volume air conditioning. This design mainly realizes the signal acquisition and processing of various sensors. Combining with the traditional design method of air conditioning controller, according to the collected sensing information and the user’s control strategy, the optimal control scheme is generated by PC server software, and then the whole air conditioning controller system is monitored and controlled. The system block diagram is shown in Figure 1. Fig. 1. The structure of the air conditioning controller is composed of Cortex-M4 NUC472, JSY-MK-163 electric parameter monitoring sensor, TGS2611 flammable gas sensor, NIS-07 ionic smoke sensor, HC-SR501 human pyroelectric infrared sensor, TMP275 temperature sensor, HTU21D temperature and humidity sensor, touch display module, Wi-Fi wireless module, insulation. Separation drive circuit, IPM intelligent power control module and control module of each part of frequency conversion air conditioning are composed of.
Among them, high-precision temperature sensor TMP275 collects the temperature of condenser in real time, HTU21D temperature and humidity sensor collects the ambient temperature and humidity, Wi-Fi module is responsible for wireless communication between air conditioning controller and PC server, touch display module carries out human-computer interaction, isolation drive circuit is mainly responsible for controlling the left and right sweep control of air conditioning. IPM intelligent power control module mainly realizes frequency conversion control of air conditioning compressor. NUC472 series of Nuvoton New Tang Company is a high performance chip based on 32-bit ARM Cortex-M4 core. It uses low-cost, low-power, high-performance ARM Cortex-M4 core with floating-point computing unit and DSP. It is widely used in industrial automation, frequency converter, thermostatic element smart home and security system. Therefore, the NUC472VG8AE chip encapsulated by LQFP100 is chosen as the main control chip of the system. The high precision temperature sensor TMP275 produced by TI (Texas Instruments) company is used in the temperature detection part of the condenser. The temperature measurement range is from – 40 to 125 degrees C. The maximum temperature measurement error is only ( 0.5 degrees C). It is suitable for high precision temperature detection in the fields of environment, consumption, industry and instrumentation.
The schematic diagram of TMP275 temperature measurement circuit is shown in Fig.
2. This design realizes the measurement of temperature and humidity in the environment of air conditioning controller through HTU21D temperature and humidity sensor of Humirel Company, France. Its application circuit is shown in Figure 3. HTU21D chip is packaged in standard IIC protocol and 3*3mm double-row flat pinless DFN.
The maximum error of temperature measurement is ( 0.4 C), and the maximum error of humidity measurement is ( 5%). JSY-MK-163, an electrical parameter monitoring sensor with 380V voltage range and 50A current range, is selected in this design. It is fully isolated from high and low voltage, small in size, and easy to be embedded in air-conditioning equipment. With standard MODBUS-RTU protocol, up to 255 devices can be connected on one line at the same time. Its application circuit diagram is shown in Fig.
4. This design uses RS485 communication parameters of 4800 BPS baud rate with 8 data bits and no check bits. TGS2611 sensor is one of FIGARO’s new thick-film screen-printed metal oxide semiconductor 2600 series sensors. It can detect flammable gases such as methane. The detection range is 500-10000 ppm, and the sensitivity is 0.60 0.06. It is packaged in standard TO-5 metal package. As shown in Fig. 5, the circuit diagram of flammable gas detection is designed. Among them, RH is the heating device of TGS2611 sensor, and Rs is the resistance value of sensor in different concentration gas. According to the principle of resistance voltage dividing, as long as the voltage values of ADC0 and ADC1 terminals are measured, the resistance values of sensors in different concentrations of gases can be calculated. According to the resistance ratio Rs/Ro of TGS2611 sensors, the concentration of flammable gases can be obtained by looking up tables. In this design, NIS-07 ionic smoke sensor is selected. There is an ionization chamber inside the sensor, which is in the balance of electric field under normal condition. When smoke enters, the balance between internal and external ionization chambers is destroyed, resulting in changes in current and voltage, so as to determine the smoke status in the air. Fig. 6 is the smoke detection circuit diagram of NIS-07 ionic smoke sensor. It drives 2SC1623 transistor Q1 through two-foot alarm cascade output function of MC14468, and connects OUT1 to main control chip through collector output of transistor Q1, so as to achieve alarm reporting function. HC-SR501 module with LHI778 probe is used in the design of human pyroelectric infrared sensor. Its maximum induction radius is 7 meters and maximum induction angle is 100 degrees. It has high sensitivity.
When someone enters the sensor’s sensing range, the effective level is output. When the person leaves the sensor’s sensing range, the sensor automatically delays for a period of time to restore the initial state. The delay time can be set, default 2.5 seconds. This design uses ESP8266 serial Wi-Fi wireless module ESP-12E, which supports 802.11b/g/n wireless standard and uses a small circuit board antenna. The design of Wi-Fi is configured in STA AP mode to realize the connection between air conditioning controller and PC server. The serial communication parameters of “9600 bps, 8,1, no check, no flow control” are used. The application circuit is shown in Figure 7. This design uses a high performance ATK-4.3 TFTLCD display module developed by ALIENTEK, which supports 800*480 high resolution, uses 16bit 8080 interface communication control and integrates five touch capacitor touch screen of IIC communication. This design uses the sixth generation DIPIPM intelligent power chip PSS30S92F6-AG of Mitsubishi motor, which integrates the functions of power silicon chip, gate drive circuit, short circuit protection and undervoltage protection. It is suitable for frequency conversion control of AC 100-240V small-capacity motor. Figure 8 shows the IPM intelligent power control circuit diagram used in this system. Among them, P1 and P2 are 220 V City electrical connection seats, P3 is protective ground connection seats. 220V city electric power passes through over-voltage protection circuit, common-mode filter circuit, single-phase bridge uncontrollable rectifier circuit and large capacitor filter circuit, and becomes a stable 310V DC power supply for the high-voltage side of intelligent power chip PSS30S92F6-AG. P5, P6 and P7 are the U, V and W output terminals of the high voltage side. The input control terminals of intelligent power chip PSS30S92F6-AG are UP, UN, VP, VN, WP and WN, respectively. Three sinusoidal storage tables with 120 degrees of phase difference, 0.8 degree of modulation and 180 points are set up in the control chip NUC472 program. Enhanced PWM Generator (EPWM) of the main control core enhances the PWM generator to generate three-phase 120 degrees of phase shift sinusoidal wave. UP and UN, VP and VN, WP and WN are complementary differential output pins. By changing the modulation frequency of EPWM, the frequency conversion frequency of U, V and W output terminals can be changed, and then the frequency conversion control of compressor can be realized. The software design of the system is developed on the uC/OS-II operating system, which further facilitates and simplifies the scheduling and management of various functional tasks of the system program. The main program design of the system is mainly responsible for receiving and sending the data communicating with the server, collecting the information of each sensor module such as temperature and humidity, executing the tasks of controlling the air-conditioning related executing mechanism and driving the touch screen display by the fuzzy PID control algorithm, etc. The flow chart of the main program is shown in Fig. 9. After the system starts to run, the execution system and its functional modules (such as Wi-Fi module, electrical parameter monitoring sensor, temperature and humidity sensor, touch display module and isolation drive circuit) will be initialized. After the initialization is completed, task scheduling of uC/OS-II system is carried out, communication processing of Wi-Fi transmission and reception is carried out, and data of various sensors such as working electrical parameters of air conditioning, security status of the environment, personnel mobility, air conditioning status, condenser temperature, ambient temperature and humidity are judged and processed according to the collected data. The sensor information is gathered to execute the output of the fuzzy PID control algorithm control system and isolation drive circuit, capacitance touch acquisition and processing, and display various states on the touch screen according to the data information processed before. On the basis of the hardware and software platform, the network test, control instruction test and sensor data acquisition and transmission test are completed. Finally, with the consent of a production company in Zhuhai, the controller is applied to the air conditioning system of the company. The test environment of the system is in a workshop with an area of about 146 square meters.
The workshop has installed 4 sets of 3 P vertical DC converter air conditioners with KFR-72LW/BP2DN1Y-PA401. The internal layout of the workshop has been fixed and can not be changed greatly.
Wi-Fi signals have been covered in the workshop. The test scheme designed in this paper is to transplant the controller into the air conditioning system of the United States. Using the original Wi-Fi network of the workshop, the system can be tested with a computer equipped with server software. In order to compare the control effect, only statistical analysis is made on the environmental temperature change data, and the temperature before modification and under the custom mode is set to 27 degrees Celsius. The temperature and humidity measuring instrument of this system is FLUKE F971 temperature and humidity measuring instrument of the United States. The total power consumption of DDS738 measuring equipment of Shanghai Huali 30A electronic single-phase watt-hour meter is connected in series at the front end of the main power supply line of air-conditioning equipment. This design tests and statistics the most economical, fast, comfortable and customized control modes of the air conditioning controller system before modification. It uses a control mode in one day, and its statistics are shown in Table 1. The test results show that the air-conditioning controller system runs stably, communicates reliably and predicts well. Especially in the most economical control mode, the system has the best energy-saving effect compared with the total power consumption of air-conditioning equipment before transformation, and the energy-saving is up to 30.6%.
The design of air conditioning controller based on Cortex-M4 combines Internet of Things, networking, integrated control technology and on-chip system technology to make full use of NUC472 resources and adopt efficient data.