Orderly Charging Control Module Design

. This paper introduces the design of an orderly charging module. This paper analyzes the system structure of the orderly charging module, the embedded software architecture and business implementation mode of the orderly charging module, and introduces the hardware framework and implementation method of the orderly charging module. This design is mainly used in the charging pile of electric vehicle, which is used to realize intelligent and orderly charging, optimize energy management, provide various forms of Internet of things access scheme, and provide the software and hardware technology foundation for the reasonable management of energy.


Introduction
As a strategic emerging industry in China, the development of electric vehicles is an important way to ensure national energy security and realize the transformation of low-carbon economy. With the largescale application of electric vehicle charging facilities, it will bring many new challenges to the operation and development of power grid.
The first is the rapid growth of electric vehicle charging load, which will further increase the peak valley difference of power grid and put forward higher requirements for power grid upgrading, transformation and planning and construction; the second is the randomness and dispersion of charging demand, which will make the operation and management of distribution network more difficult; the third is that the construction mode of charging piles in residential areas is faced with such problems as difficult and expensive construction piles, low utilization rate of single piles, nonstandard construction and operation and maintenance, etc, To some extent, it affects the development of electric vehicle industry.
At present, industry experts generally believe that, AC slow charging in residential areas will be the main charging mode of electric passenger vehicles in the future, but most of the AC charging piles in the society are individual. There is no scheduling strategy for the operation platform of charging piles, and the existing AC charging piles do not have the hardware conditions for orderly charging, so it is necessary to develop modular products and charging piles that support orderly charging functions, and at the same time study them. It can guide the charging demand to participate in the management strategy of orderly charging. The intelligent and orderly charging of household electric passenger vehicles in residential areas will become an effective way to solve the problem of large-scale charging of electric vehicles in the future, and has been one of the pilot projects of the State Grid Co., Ltd. in the construction of the power Internet of things.
Therefore, the orderly charging module designed in this paper is based on the "national grid core" charging pile control system upgrade architecture scheme, which integrates multiple functional units and has a unified interface to form a class of standardized modules.

Composition of Orderly Charging System
The orderly charging control module is the core component of the orderly charging pile, which is connected to the energy controller in the uplink, interacts with the user's mobile phone, executes the orderly charging instruction, and controls the charging of the electric vehicle.
After the electric vehicle users connect the electric vehicle to the charging post, they use the mobile phone app to connect the orderly charging post via Bluetooth or through the wireless connection to the large-scale intelligent energy control system, and submit the orderly charging application. After the energy router or the intelligent energy control system receives the charging application, they upload and send the data to the energy controller, and the energy controller collects and queries the real-time use of the platform. According to the electric load, according to the actual capacity of the station area, issue the charging task to the orderly charging control module, start the orderly charging program of the charging pile, and realize the timesharing and segmented charging function of the electric vehicle.

Hardware Design Principle
The orderly charging control module is the core control component of the orderly charging pile, which is connected to the energy controller in the uplink, interacts with the user's mobile phone, executes the orderly charging instruction, and controls the charging of the electric vehicle. The orderly charging control module and other peripheral electrical components form an orderly charging pile to complete the business process interaction among the user's mobile phone app, energy controller and electric vehicle. Among them, the orderly charging control module is the main core component of the orderly charging pile, which consists of four units: the orderly charging main control unit, the charging control unit, the metering unit and the communication unit. Each unit is independent from each other, connected through a special interface, and meets different functional requirements by adding or removing different units.

Hardware design
According to the functional classification of standard modules of orderly charging module, it is divided into four standardized modules, corresponding to four research contents, and synchronized with appearance structure design and testing, so as to realize the orderly charging control function. Orderly charging master control unit: it is responsible for the communication command control with the energy controller, charging control unit, metering unit and the user end. It is the core unit of the orderly charging control module. It carries out the charging interactive command control of the user app through Bluetooth communication, issues the charging command to the charging controller unit, monitors the power data of the metering unit and other functions. The main control chip adopts the Haiyan 610 chip of "national network core", which adopts the arm cortex-m4 core and the main frequency is 150MHz. It provides a wealth of memory configuration and integrates a wealth of peripherals, including UART, ISO7816, SPI, I2C, ADC, Ethernet MAC, USB, and high-precision reference voltage source. Provide high-speed and comprehensive control ability for the main control unit of orderly charging. The encryption scheme of this unit adopts the hardware ESAM security control chip, which integrates SM1 national security algorithm, hardware random number generator, voltage and frequency detection and other security protection mechanisms, which can effectively ensure the confidentiality and integrity of the transmission data. It provides technical support for the orderly charging control module in the aspect of information security transmission.
Charging control: responsible for the completion of electric vehicle charging control and charging information collection functions. The main control chip adopts Haiyan 330 chip, a "national grid core" with low power consumption and high cost performance. It communicates with the orderly charging main control unit through 485 bus, drives the relay through IO port, realizes charging control, and has the functions of collecting fault information and environmental parameters.
Metering unit: responsible for monitoring and collecting charging current, voltage, power, electricity and other information parameters. The data exchange with the main control unit of orderly charging is completed by RS-485 communication. The measurement chip adopts the sc1185k measurement chip of "national grid core" to realize the collection and calculation of charged electric energy, which lays the technical foundation for the analysis of charged electric energy quality and electric load. The measurement unit adopts the standardized module form to shorten the development cycle.
Communication unit: responsible for the communication control and management between the orderly charging control module and the energy controller, which is the main information channel for charging task upload and release. The carrier communication chip with independent intellectual property rights can complete the development of communication unit quickly.
The overall modular design of the orderly charging control module is beneficial to adapt to different versions of charging piles, save the hardware cost of charging piles, shorten the development time of charging piles, and provide a flexible technical space for the upgrading of individual functional modules. In the prototype stage, the modular shell is first produced by 3D printing to ensure the rapid finalization and application of the product.

Principle of software design
The software program framework is designed in layers and categories according to the business, and the program is also designed in modules and interfaces. It reduces the program coupling of unnecessary business between different functions. It is conducive to the independent development, independent testing and functional expansion of each functional module of the software, and is suitable for the simultaneous implementation of business programs by multiple people.

Specific Design of Software
Software structure is classified according to function level: 1. Hardware driver layer. 2. Peripheral device driver layer. 3. Protocol processing layer. 4. Protocol business processing layer. 5. Core business processing layer. Software structure is classified by function business: 1. Bluetooth communication and interactive processing module with app service.
2. Carrier communication and business interaction processing module with energy controller.
3. Can communication and business interaction processing module with charge point control board. 4. 485 communication and meter reading business interactive processing module.
5. Security chip communication and service processing module.
6. Orderly charging core business processing module. 7. Order module parameter setting processing module. 8. RTC system time processing module. Software modular design: As shown in the figure below, each small block diagram is a small function module, and the function of the function module is relatively independent. The module provides standard interface functions for the program calling the function module, and the upper business calls the lower business as required. Call the underlying business layer by layer to construct a relatively independent functional business module.
Each module defines a unified interface function. Some function modules define some special interface functions according to the actual needs. The definition principle of interface function is to use pointer or cache array for data incoming and outgoing. Each function module has its own data processing cache space, which is not directly accessible outside the module. The basic return value definitions of interface functions are relatively consistent. When the return value is less than 0, it indicates that there is a fault or error in the implementation of the interface. The interface should define the corresponding fault or error definitions of these values. When the return value is greater than or equal to 0, it indicates that there are events to be processed or commands to be executed, and the business processing is based on the actually defined events or commands. On the basis of the above principles, the software program realizes the program function layer by layer and business by business.
The orderly charging module software realizes the communication with the energy controller, and implements the orderly charging business of the orderly charging system according to the energy router and controller communication protocol scheme.
Orderly charging module software realizes business communication and processing through Bluetooth and orderly charging app. The business of Bluetooth and the orderly charging module is to realize the communication between the two brains in the orderly charging system.
The orderly charging module realizes the security verification, encryption and decryption functions of communication with energy controller and orderly charging app.
The orderly charging module can read the metering equipment and calculate the power consumption information metering function.
The orderly charging module realizes the charging service control function with the charging pile controller.

Conclusions
This paper analyzes the hardware design and software design of the orderly charging module. The scheme is more reasonable in technical feasibility and cost level. The billing control unit and charging control unit module are integrated with each other. The metering unit and communication unit are separated separately, and their functions are relatively independent, which is conducive to the modular transformation and technical upgrading of charging piles. The subsequent operation and maintenance is more convenient and economic, and the functional modules are more integrated. It not only effectively solves the operation problem of the existing technical scheme, but also increases the orderly charging function, provides various forms of Internet of things access scheme, and provides the software and hardware technical basis for the rational management of energy.
Thank you for your participation in this project. It's your hard work that makes us such an excellent software product. Thank my colleagues in the project team for their help in writing my paper.