Electric vehicle charging station – solution based on CAN bus communication for charging station (pile)

  1. Solutions based on EPC-9200

Electric vehicle charging piles require a special charging card to be used. During the charging process, the display of the charging pile can display data such as charging amount, cost, charging time and so on. As a human-computer interaction product for the charging state of electric vehicles, the charging pile can realize timing charging and electric metering charging. The card is pre-charged, and after each charge, it is automatically subtracted from the card according to the degree of electricity, and the receipt is printed out.
There are many internal devices in the charging station, and most of them are RS-232 interfaces. If each device uses a cable to connect to the industrial control motherboard, the internal circuit will be quite complicated, and the reliability and electromagnetic compatibility will be greatly reduced. The use of CAN bus communication can reduce the complexity of the signal line and facilitate the expansion of more devices.

(1) Rich interfaces, onboard 6 RS-232 and 2 CAN Bus.
(2) The data processing and communication capabilities are strong, the CAN driver is stable and reliable, and the frame is not lost when the bus load is high.
(3) It has one 10/100M Ethernet interface.
(4) Directly supports LCD display, supports resolution up to l366-68, and can be used for software UI and advertisement playback.
(5) Support large size touch screen.
(6) With audio interface (support audio output and microphone input).
(7) With SD card interface.
(8) All components of the industrial control board meet the environmental requirements of industrial grade -40℃~+85℃.

The advantages of the CAN bus communication solution based on EPC-9200 for electric vehicle charging stations are:
(1) CAN communication is stable. The EPC-9200 product adopts TI’s AM3352 processor and integrates the CAN controller inside. The data packet hardware FIFO of the CAN controller has a 64-frame data packet buffering capability, and there is no bottleneck in communication. The CAN driver of the EPC-9200 product is based on years of experience in the CAN bus industry and has been optimally designed to prevent frame loss under high bus load rates.

(2) Video playback. The general outdoor small advertising machine adopts a resolution of 720 × 576 or higher, and the EPC-9200 industrial control board can support high-definition resolution display of up to 1366-68, which can meet the requirements of pictures and advertisements on the charging pile.

(3) Printing of consumer receipts. The printed data is mainly consumer content, which requires miniaturization, fast printing speed, high reliability, and clear printed characters. ZY-TPl2 micro-printer adopts line thermal technology, meets the above requirements, and uses serial port RS-232 for communication, which is simple and powerful.

(4) Swipe card to record transaction information. It is a basic function that the user charges by swiping the non-contact IC card. ZL.G522S series card reader module complies with IS014443 standard, can support PLUSCPU, (CPU card), MIFARES50/S70, MIFARE0ultralight, MIFARE Pro, it adopts ultra-small, ultra-large-scale integrated circuit package, which is easy to use, reliable, diverse and bulky Small and other characteristics, can easily and quickly integrate today’s most popular non-contact IC card technology into the system to improve product quality.

(5) Remote data transmission. In the charging station, the main data of the communication between the charging pile and the monitoring center of the charging station is the control and collection information of a small amount of data, which requires high real-time monitoring during the operation of the charging pile. With the rapid development of charging stations, unattended self-service charging stations will also become a trend. At this time, remote centralized monitoring and emergency response are becoming more and more important. Therefore, the “CAN+Ethernet” dual network redundant data transmission method is adopted. , to ensure the safety of each charging pile in the charging station and the smooth and reliable data. If some charging piles require wireless communication, the transaction information will be uploaded to the service center through the GPRS remote module. Such requirements can be easily added to this solution, and the ZWG-28AGPRS communication module can be used.

(6) Environmental reliability test. “Technical Specifications for Electric Vehicle Charging System” requires that the working environment temperature of the charger is -20 ℃ ~ 50 ℃, and has a certain shock resistance. The EPC-9200 has passed the design standard of industrial grade 4 and can work stably in the environment of -40℃~85℃. The EPC9200 basically uses chip components, with excellent seismic performance, and all components are industrial-grade components.

(7) Electromagnetic compatibility test. The electromagnetic sensitivity of the electronic equipment in the charging station must comply with the GB6833 series standards.
(8) Support remote application upgrade. The communication system adopts the Ethernet redundant transmission structure. When upgrading the application program and system, the remote unified upgrade can be carried out through the Ethernet.

  1. Distributed management system based on CAN bus

The system needs to realize various functions of different types. The centralized or central processing method cannot meet the safety requirements, so a distributed structure must be adopted. The working environment of the system is harsh, often under the interference of strong electromagnetic interference and pulse current. In order to ensure reliability Therefore, the high-performance CAN field bus should be considered as the communication system; CAN bus has been used in automobiles for a long time and has strong anti-interference. It is realized by CAN bus.

Distributed management system based on CAN bus
Distributed management system based on CAN bus

1) Introduction to CAN
CAN is the abbreviation of Controller Area Network (CAN). , and eventually become an international standard. CAN bus is also considered to be the best communication bus for electric vehicles. The CAN bus adopts the physical layer and data link layer in the seven-layer structure of the ISO/0S1 model, which has high reliability, real-time and flexibility.

CAN bus solutions provide communication and connectivity for embedded designs, bringing them into a new phase. The CAN serial bus protocol is a high-speed and reliable communication protocol that was originally created for automotive applications and is now widely used in robust communication networks requiring bit rates up to 1Mb/s. In product design, integrating the CAN protocol will be a low-cost and reliable way to achieve highly real-time communication capabilities in harsh electrical environments.

One of the biggest features of the CAN protocol is that the traditional station address encoding is abolished, and the communication data block is encoded instead. The advantage of this method is that the number of nodes in the network is theoretically unlimited, and the identification code of the data block can be composed of 11-bit or 29-bit binary numbers, so 2 or more different data blocks can be defined. A way of coding by data blocks can also enable different nodes to receive the same data at the same time, which is very useful in distributed control systems. The length of the data segment is up to 8 bytes, which can meet the general requirements of control commands, working status and test data in common industrial fields. At the same time, 8 bytes will not occupy the bus for too long, thus ensuring the real-time communication. CAN protocol adopts CRC check and can provide corresponding error handling function, which ensures the reliability of data communication. CAN bus has excellent characteristics, extremely high reliability and unique design, especially suitable for the interconnection of industrial process monitoring equipment, so it has been paid more and more attention by the industry and has been recognized as one of the most promising fieldbuses .

2) Design of the main module of the management system
The main functions of the management system include data acquisition, power estimation and display diagnosis, etc. Since the 80C552 has the function of 8-channel 10-bit AVD conversion, the acquisition module first uses the linear optocoupler method to measure the voltage of the single battery, and the 4 AVD ports are used to measure the voltage of the single battery. The analog quantity is converted into digital quantity and stored in the memory, and the temperature measurement adopts the single bus technology, and the Dallas digital chip is used to measure the temperature. The chip has a 12-bit accuracy level and can measure the temperature of the system very accurately. The total voltage and current signals are converted into 0~10V signals through special sensors, and are converted into digital quantities by 14-bit A/D conversion devices and stored in the charging system.

The communication and display module provides dual CAN communication interfaces, which can transmit data with each module in the charging system and the external vehicle system through CAN; at the same time, the system provides RS-232 interface, which can communicate with PC; the module also provides 5-inch Semi-liquid crystal display drive function and buttons for human-machine friendly operation; the module also has upper and lower limit alarms and self-check functions for voltage, power, current and temperature to ensure the safety of the charging system.

3) Electricity estimation
Electricity estimation adopts real-time current integral ampere-hour method for basic estimation, and then corrects various parameters such as temperature, self-discharge and aging that affect battery capacity, and considers the inconsistency between individual batteries, so as to obtain accurate battery packs power.

4) CAN bus design
The overall structure of the CAN bus: two 120Q resistors are configured at both ends of the bus. Its function is to match the bus impedance, which can increase the stability and anti-interference ability of the bus transmission and reduce the error rate in data transmission. The structure of CAN bus nodes is generally divided into two categories: one is connected to the PC using a CAN adapter card to realize the communication between the host computer and the CAN bus; the other is composed of a single-chip microcomputer, a CAN controller and a CAN driver. Node and CAN bus for data transmission. The CAN controller in the design adopts SJAl000 and 82C200 produced by Philips as a sending and receiving buffer to realize data transmission between the main controller and the bus; the CAN transceiver adopts the PCA82C250 chip, which is the interface between the CAN controller and the physical bus , can provide the differential transmission capability of the bus and the differential reception capability of the CAN controller.

5) Software design of CAN bus
The three-layer structure model of CAN bus is physical layer, data link layer and application layer. The functions of the physical layer and the data link layer are completed by SJA1000. The development of the system is mainly in the design of the application layer software. There are mainly three subroutines: initialization subroutine, data transmission and data reception procedures, as well as some data overflow interrupts and frames. Error handling.

After the SJAl000 is powered on and reset by hardware, it must be initialized by software before data communication can be performed. The initialization process mainly includes configuring the clock frequency division register CDR, bus timing registers BTRO and BTR1 in its reset mode, acceptance code register ACR, acceptance masking Register AMR and output control register OCR, etc., realize the definition of bus speed, acceptance mask code, output pin driving mode, bus mode and clock frequency division.

The basic process of SJAl000 sending and receiving data is that the main controller saves the data to the SJA1000 sending buffer, and then sets the send request TR flag of the command register to start sending; the receiving process is that the SJAl000 will store the data received from the bus. Enter the receiving buffer, notify the main controller to process the received information through its interrupt flag bit, clear the buffer after receiving, and wait for the next reception.

6) CAN bus system using P8xC592 chip
(1) Introduction of P8xC592 chip. The control circuit of the electric vehicle charging system should not only support CAN bus communication, but also detect the analog quantities such as load voltage and current, make various logical judgments, and drive other chips to complete the power conversion function. Therefore, simply choosing a single CAN controller is not enough, the most convenient option is to use a controller with on-chip CAN functionality. P8xC592 is an 8-bit microprocessor developed and produced by PHILIPS, which mainly includes:
① An 80C51 central processing unit (CPU).
② Two standard 16-bit timer/counter.
③ 16-bit timer/counter including four capture and three compare registers.
④ 10-bit A/D converter with 8 analog inputs.
⑤ Two-way PWM output with a resolution of 8 bits.
⑥ l5 interrupt sources with two levels of priority.
⑦Five groups of 8-bit I/O ports and a group of 8-bit input ports shared with the analog input of the A/D converter.
⑧ CAN controller for DMA data transfer with internal RAM.
⑨1Mb/s CAN controller with bus fault management function.
⑩Compatible with standard 80C51 full-duplex UART.

The P8xC592 has a total of 68 pins. Among them, 6 8-bit I/O ports, P0~P3 are the same as 80C51, but P1 can be used as some special functions, 4 capture inputs, external counter input, external counter reset input and CAN interface CTX0 and CTX1 output. The function of parallel I/O port P4 is the same as P1, P2 and P3. The P5 port is a parallel input port with output function, which is mainly used as the analog input terminal of the A/D converter.

The P8xC592 contains a CAN controller, which includes all the hardware necessary to implement high-performance serial network communication, so that it can control the flow of communication through the CAN protocol’s local area network. In order to avoid confusion, the CAN controller added in the chip appears to the CPU as a memory mapping peripheral device that can work independently on both sides, that is, the P8xC592 can be simply imagined as an integration of two independent working devices. If the function of the CAN controller part is turned off, the chip can only be used as an ordinary 8-bit microcontroller with analog A/D conversion.

The four special function registers are:
①Address register (CANADR), the CPU reads/writes the acceptance code register of the CAN controller through CANADR.
②Data register (CANDAT), CANDAT corresponds to the internal register of the CAN controller pointed to by CANADR.
③ The control register (CANCON) has two functions. Reading CANCON means accessing the interrupt register of the CAN controller, and writing CANCON means accessing the command register.
④The status register (CANSTA) has two functions. Reading CANSTA is to access the status register of the CAN controller, and writing CANSTA is the address of the internal data memory RAM of the subsequent DMA transmission device. In addition, DMA logic allows high-speed data exchange between the CAN controller and the CPU and the CPU’s on-chip main RAM.

In the chip initialization stage, the CPU completes the function initialization of the CAN controller by writing content to CANCON and CANSTA. In the actual communication process, the CPU uses four registers to make the CAN controller receive and send data information.
(2) CAN bus communication program. The CAN bus communication program includes several subroutines. After the communication program is triggered, the CAN controller of the P8OC592 performs related tasks according to the command word. When the host computer requests data, it transmits various operating parameters to the vehicle system; when the host computer queries the node status, it sends the current CAN node status and other data.

The introduction of the CAN communication network provides conditions for the global optimal control of electric vehicle charging, and each subsystem of the electric vehicle thus becomes an intelligent node in the entire control. The P8xC592 microcontroller with integrated CAN controller is used as the control core, which not only has high safety and stability, but also can fully participate in the data exchange and control of the vehicle. For electric vehicles that use different CAN bus protocols, it is only necessary to properly modify part of the program segments related to CAN communication in the control program, and then the entire vehicle system can be successfully connected, making the electric vehicle charging system more versatile.

Read more: What is wireless charging technology for electric vehicles?