Design of Concentrator for Remote Meter Reading System Based on CAN Bus

At present, many of the electric meters, water meters, and natural gas meters of urban residents in my country are manually reading meters, and the meter reading staff check various meters one by one every month. In many areas, centralized meter reading has been achieved through meter reading renovation projects.

At present, many of the electric meters, water meters, and natural gas meters of urban residents in my country are manually reading meters, and the meter reading staff check various meters one by one every month. In many areas, centralized meter reading has been achieved through meter reading renovation projects.

Because the remote meter reading that has been used at present still faces some challenges: for example, the initial cost is high, and the data transmitted on the bus is important data such as water, electricity, and gas consumed by end users, and the anti-interference requirements of the bus are very high. To have the ability to resist capacitive and inductive coupling interference, in order to save costs, a remote power supply method should be used to provide power to the slave device, so as to reduce the use of components as much as possible.

In order to solve the above problems, this paper designs a remote meter reading system concentrator based on CAN bus. The smart meter system based on CAN bus has the advantages of low cost, high reliability, simple networking, convenient management, simple operation, etc., and can expand and upgrade hardware, use wired network or wireless network communication, and collect the data collected by the concentrator. The real-time data is sent to the management system of the electricity sales company for unified management, and higher intelligence is achieved through the application of functions such as line loss analysis, remote power-on and power-off, and electricity theft prevention analysis.

1 Analysis of the function and principle of the concentrator

A general smart meter system consists of four parts: meter head, concentrator, communicator, and host computer system. Specifically as shown in Figure 1, its working principle is that the integrated carrier meter or the power metering sensing system module installed at the end of the meter is networked through the CAN bus, and the concentrator receives the data according to the set time period and saves it to the internal In the flash, when the upper computer sends a signal to read data, the upper computer reads through RS232 or RS485, and the read data is transmitted to the power management center through the network.
In the remote meter reading system, the concentrator is an important part.

The concentrator controls and reads the data of the meter through the CAN bus, and the data is stored in the flash of the concentrator. The concentrator executes the control commands sent from the upper computer:

Time synchronization, flash reading, meter reading, power cut, increase meter header address, etc.

The concentrator sends the meter reading command signal to the bus through the CAN controller, and each meter head sends the collected signal to the concentrator through the CAN bus according to the meter reading command. The concentrator stores the collected signals in the flash chip. The host computer sends the read data signal to the concentrator through the serial port, and the concentrator transmits the data stored in the flash to the host computer.

2 Concentrator hardware design

The main control chip adopts STM32F103Tx of ST’s STM32 series. This series of microcontrollers is ARM’s CortexTM-M3 processor, which is the latest generation of embedded ARM processors. It provides a low-cost platform, reduced pin count, reduced system power consumption, while delivering superior computing performance and advanced interrupt system responsiveness. With fast running speed (system clock frequency up to 72MHz), 26 multiplexed GPIOs; 64KB on-chip RAM; 2 12-bit analog-to-digital converters, 1μs conversion time (up to 16 input channels); 3 SPIs, 5 USARTs, 2 IIC interfaces; 256KBFLASH on-chip; 2 watchdogs, 11 timers; the chip has an independent real-time clock, which can be rich in relevant information, and provides library functions for single-chip microcomputers. It is very convenient to program in C language and easy to develop.

Since the smart meter controller requires very accurate real-time performance, it is convenient for the electricity sales company to collect electricity charges. Because the main control chip has its own real-time clock, it only needs to connect an independent 32.768kHz crystal. The real-time clock can not only set the year, month, day and specific time through the register, but also has the function of alarm clock and scheduled interrupt for specified operation.

The hardware structure of the smart meter concentrator is shown in Figure 1, which is mainly composed of ARM, Flash, clock chip, interface circuit, RS232, RS485, power supply and so on. As a control chip, ARM has a standard design; the ARM interface circuit is relatively simple, and the following focuses on the CAN bus interface and Flash interface design.

Design of Concentrator for Remote Meter Reading System Based on CAN Bus

Figure 1 Structure block diagram of smart meter reading system

2.1 CAN bus interface circuit design

Because the system has high requirements on the stability and anti-interference ability in the process of signal transmission, the CAN interface adopts a high-standard interface circuit. The circuit diagram is shown in Figure 2.

Design of Concentrator for Remote Meter Reading System Based on CAN Bus

Figure 2 CAN interface hardware circuit diagram

The CAN-bus interface circuit uses +3.3V power supply and selects the CTM8251A isolated CAN transceiver. This chip is a 3.3V industrial grade isolated CAN transceiver. The CTD0 signal is connected to the sending pin of the CAN controller of the main control chip, and the CRD0 signal is connected to the receiving pin of the CAN controller. There is a complete CAN-bus isolated transceiver circuit in the CTM isolated CAN transceiver, which can convert the logic level from the CAN controller to the CAN bus signal, and has a DC2500V isolation function. In addition, the CTM transceiver can choose the “T” series with integrated ESD protection function, thereby omitting the extended ESD protection device. The common mode choke coil T1 plays an EMI enhancement function and is used to improve the EMI capability of the device; the inductance parameters of the common mode choke coil T1 are very important, select CAN-bus special devices, such as EPCOS’ B82793 choke coil.

2.2 Flash interface circuit design

The concentrator needs to collect data for each meter head connected to it, so the amount of data is large, so it has higher requirements for storage, so ST’s M25P64-VMF6TP is selected. The chip is 64M serial interface flash memory, the enhanced data transmission clock rate is 50MHz; the read throughput is 50Mbps; the interface is a simple 4-wire SPI (Serial Peripheral Interface) interface; deep power reduction mode, intermittent power consumption, current Consumption is only 1uA.

The M25P64Flash chip is connected to the ARM through the SPI bus. The SPI bus system is a synchronous serial peripheral interface, which enables the MCU to communicate with various peripheral devices in a serial manner to exchange information, generally using 4 lines: serial clock line (SCL), host input/slave Machine output data line MISO (SDO), master output/slave input data line MOSI (SDI) and active low slave select line CS. SPI works in a master-slave fashion, usually with one master and one or more slaves.

Fig. 3 is the connection circuit diagram of ARM and Flash. The following points are explained: (1) SCL serial clock signal, generated by the master device; (2) SDO master device data output, slave device data input; (3) SDI master device data input, slave device data output; (4) CS is the chip select, the slave device enable signal, which is controlled by the master device. (5) External pull-up resistors are connected to the 7, 15, and 16 corners to improve the noise tolerance of the chip input signal and enhance the anti-interference ability.

Design of Concentrator for Remote Meter Reading System Based on CAN Bus

Figure 3 Flash interface hardware circuit diagram

3 Concentrator software design

The concentrator system adopts the numerical sequence programming design, and designs the program according to the function module. The main program calls each function module program to realize each corresponding function, and each function module completes the corresponding operation by calling the underlying function. The specific process is shown in Figure 4. After startup, the system starts to initialize. The system enters the waiting command mode. If there is an operation command from the upper computer or a timing interruption occurs, it will enter the time synchronization program. If the time synchronization is not successful after a certain time, it will alarm the upper computer.

After the time synchronization is successful, the concentrator continues to wait for the reading command from the upper computer or wait for the interrupt reading command. After receiving the reading command, the timing reading enables the concentrator to automatically read the data collected by the meter head according to the set time; the reading enables the concentrator to read the data of the current meter head.

The concentrator can mount up to 100 headers through the CAN bus, and the concentrator sends the ID of the CAN bus device. After each sub-system table receives the corresponding ID number, it feeds back data according to the read header command issued by the system. If the CAN communication is faulty, the CAN controller communication will report a fault. If the system loop is normal, the concentrator sends command data packets. Each frame of CAN data contains 8 bytes. Because the data flow of each reading is not very large, only one frame of CAN data needs to be used for each communication. The header ID is identified by the frame ID, and each header corresponds to an independent Frame ID.

The concentrator sends the CAN data command packet to the CAN bus, and the meter selects to receive the meter reading command according to the respective ID and sends the response data to the CAN bus.

4 Conclusion

As a part of the smart meter reading system, this design has been successfully applied to some remote meter reading systems. Due to its moderate cost and stable performance, it has achieved good economic benefits and has a good promotion prospect. Other remote meter reading systems, such as gas remote meter reading systems, can be developed.

The Links:   FF200R33KF2C LTM15C448

Related Posts