The new power supply controller introduced in this paper uses STM32 as control chip and SimpleLink WiFi of CC3200 as networking scheme. It uses ADC manganese copper sampling resistance to analyze voltage, current, active power and other parameters. Intelligent control through mobile APP, cloud web pages and other ways can realize remote control and timing control of communication interruption. The controller has USB charging socket, real-time clock, timing reservation and other functions. When dangerous conditions such as overvoltage and overload occur, the system automatically identifies and controls the disconnection of power supply. With the rapid development of Internet of Things (IoT) applications, applications based on IoT (Internet of Things, IoT) emerge as the times require. Furniture industry, household appliances industry, consumer electronics, automotive electronics and agriculture will realize the networking mode to meet the needs of modernization and usher in the tide of the development of the Internet of Things. The hardware design of the whole system is divided into the main controller, power supply, WiFi, energy metering, parameter display, relay control, terminal and peripheral interface. The block diagram of the design module is shown in Figure 1.
When choosing the main controller chip, considering the cost-performance ratio, Flash capacity and internal resources, the Cortex-M3 chip of ST company was selected. Wireless communication uses the C32 series WiFi module of human technology. The module integrates MAC chip, fundamental frequency chip, RF transceiver chip and power amplifier; using Texas Instrument’s C3200 scheme, the chip has a Cortex-M4 core, which runs up to 80MHz; the internal low-energy management can effectively reduce the energy consumption of WiFi module; the WiFi protocol and TCP/IP protocol can be realized with ease. Settings enable serial devices to access the Internet. It can be set to AP for other devices to access the WiFi module, or STA, which can access the router. It has Socket communication connection and supports TCP/UDP transmission, HTTP, WEB Socket and SL Client communication. TCP/UDP transmission mode can be designated as TCP Server, TCP Client, UDP Server, UDP Client mode. The module supports UART transmission and can switch transmission mode arbitrarily by using AT command. The scheme adopted here is composed of ADC data acquisition, buffer and MCU data analysis. It can directly output effective voltage, current, active power, power factor, AC frequency and power consumption. When the module runs, after the voltage and current are separately sampled from the overvoltage resistance and the manganese copper resistance, they are connected to the buffer circuit of the amplifier circuit behind them, thermostatic element converted into digital signals by analog and digital signals, and then sent to the MCU for data analysis. The working principle block diagram is shown in Fig.
2. In order to compensate for the defect that traditional power controller must connect terminal devices such as mobile phones to check the running status of the equipment, a 0.96 inch OLED dual-color display screen is loaded in the design. The biggest feature of OLED is that it does not need backlight, so it is energy-saving, can run at ultra-low power consumption, only needs 23 mA dynamic running current, and can be displayed in real time. Electricity related data and equipment control status. Relay is the connection between strong and weak points, which is used to control the interruption of the communication. This paper mainly introduces the drive and recoil protection of relay. Because the output current of MCU’s drive port is insufficient, the relay can not be directly driven, so the driver circuit must be added. Common switch driver is controlled by triode saturation or cut-off state. In addition, because the relay is an inductive device, its coil has a large inductance, so when the relay is closed, it will produce a large backlash voltage, which is easy to have adverse effects on other circuits. Here, the diode backlash circuit is used to eliminate the reverse overvoltage signal. The specific circuit design is shown in Figure 3. The system software is mainly divided into five parts: parameter display, power monitoring, WIFI communication and mobile phone APP console.
The biggest characteristic of software system is to distinguish the master-slave relationship. If the overload current is monitored by the system, it is judged to be a non-dangerous operation. The relay is always in a closed state and does not respond to the control signal of the mobile terminal in order to avoid the occurrence of dangerous situations. Only when the power protection is normal, the other parts of the whole system can work normally. When establishing communication with the mobile phone, the mobile terminal can control the total relay and each relay at the same time to achieve the safest control. The software flow chart is shown in Figure 4 below. The software is mainly used to control each terminal. The content of APP interface is: IP address and port number of WIFI module on the controller side. The connection status is displayed after the port number. ON and OFF respectively represent the control state of the relay, that is, the working state of each socket. This test is carried out in the case of common electromagnetic interference.
Mobile phone testing refers to the interference of radio frequency signals of other mobile phones. 2.4 GHz signal interference refers to the interference signal generated by router signals.
Electromagnetic interference is generated in the frequency range of 433 MHz to 5 GHz.
The results of the test data are shown in Table 1.
Through the above tests, it can be seen that the equipment works stably under general conditions. In the interference controllability test, the equipment will not lose control when exposed to common mobile phone interference and computer host interference, only occasionally occurs in strong electromagnetic field. At the same time, in the stability test, the equipment exposed to all kinds of interference will not produce wrong action. Thanks to the perfect verification mechanism inside the program, the system will not act when the instruction verification error occurs, so it performs well in the strong interference source. This paper innovatively uses STM32F1 chip as MCU to design various functions of intelligent power supply. High-precision ADC collects electricity data through manganese-copper resistance, exchanges data and remote control through WIFI module, realizes human-computer interaction through OLED screen, and backs up clock through RTC to provide users with remote reservation function. Finally, the remote access of smart power supply is realized by using mobile APP.
The power supply controller has complete functions, powerful, stable system, real-time and low hardware cost. With the rapid development of Internet of Things technology, the power supply controller will have broad market value.