Portable analog meter module
Technical Field
The invention belongs to the technical field of electricity, and particularly relates to a small-sized portable analog electric energy meter.
Background
In the development and field maintenance processes of the electric meters or the centralized reading products, a computer is often used for communicating with the electric meters or the centralized reading products by using an RS485 communication interface. In addition, no matter the current desktop or notebook is provided with a serial port, a commercially available USB-to-RS 232 module is adopted to convert the USB interface into an RS232 interface, and then a commercially available passive RS 232-to-RS 485 module is used to convert the USB interface into an RS485 interface, and the structure is shown in FIG. 1.
The mode of adopting the USB to RS232 module and the RS232 to RS485 module in FIG. 1 has the following problems:
the method cannot be used for electrical isolation, certain insecurity is brought to computers and people in field environments, electric shock or damage to the computers easily occur if the electric meters or the meter reading equipment are provided with strong electricity, and therefore the risk is effectively avoided by developing an isolation electricity taking method and an RS485 magnetic isolation method.
As the commercially available RS 232-RS 485 modules are passive modules, the transmission distance is short, and the modules are easily interfered and unstable.
The conversion module in the prior art is too large in size, complex in wiring and inconvenient to carry.
Because the two structures of the USB and RS232 modules jointly realize one function, the problem of any structure can be abnormal and is inconvenient to check.
The prior art cannot carry out protocol conversion.
If two or more than two paths of modules need to be used, two or more than two sets of modules are needed, and two or more than two USB interfaces of the computer need to be occupied.
If a set of software needs to be developed on a computer for realizing the function of the virtual electric meter on the basis, the computer is needed at any time, and the computer is inconvenient to use in many occasions on the site because the power supply is inconvenient.
Because the traditional analog meter module has the problems and needs to use functions of infrared communication, burning programs, upgrading programs, modifying parameters and the like in the development and field maintenance processes, a portable multifunctional virtual electric meter needs to be developed for the purpose of integrally meeting the use requirements of electric meter enterprises and electric meter customers.
Disclosure of Invention
The invention aims to provide an improved technical scheme for the analog meter module in the prior art, and the technical scheme can solve the problem of inconvenience in development and field maintenance of the analog meter module and realize an integrated technical scheme with functions of infrared communication, program burning, program upgrading or parameter modification and the like.
The invention is realized by the following technical scheme:
a portable analog electric energy meter comprises a shell, a memory, a main board arranged in the shell and a communication interface arranged on the shell;
the main board comprises a USB-to-serial port module, a first RS 232-to-RS 485 module, a second RS 232-to-RS 485 module, an infrared conversion module and a micro control unit;
the first RS 232-to-RS 485 module is connected with a first UART interface of the USB-to-serial port module; a second UART interface of the USB-to-serial port module is connected with a first UART interface of the micro control unit;
the second RS 232-to-RS 485 module is connected with a second UART interface of the micro control unit;
the infrared conversion module is connected with a third UART interface of the micro control unit;
the memory is connected with an SPI interface of the micro control unit;
the communication interface comprises a USB interface, a first RS485 interface, a second RS485 interface and an infrared interface;
the USB interface is connected with the USB-to-serial port module; the first RS485 interface is connected with the first RS 232-RS 485 conversion module; the second RS485 interface is connected with the second RS 232-RS 485 conversion module; the infrared interface is connected with the infrared conversion module.
Furthermore, a key, a display screen, a man-machine interface and a burning interface are also arranged on the shell.
Furthermore, the main board also comprises a key module and a display module; the key module and the display module are both connected with a first I/O port of the micro control unit; the key module and the display module are both connected with the human-computer interface.
Furthermore, the mainboard also comprises a level conversion module; the level conversion module is respectively connected with the second I/O port of the micro control unit and the burning interface.
The memory is a FLASH memory.
Furthermore, a change-over switch is also included; one end of the change-over switch is connected with the second RS485 interface, and the other end of the change-over switch is connected with at least one interface of the man-machine interface or the burning interface respectively.
The invention has the beneficial effects that:
1. according to the invention, two RS485 interfaces are arranged, and the second RS485 interface has an ammeter simulation function, so that the communication and data of a plurality of ammeters can be simulated, and the meter reading test of a centralized reading product is met.
2. According to the invention, the first RS485 interface adopts a function of converting USB into RS485 with active magnetic isolation, so that the on-site ammeter box centralized meter reading equipment can be conveniently debugged, and whether the on-site RS485 wiring is normal or not is checked.
3. The infrared interface has the function of converting USB into infrared, and can realize the communication between the infrared interface and the meter reading device on site through a computer, so that the operation and maintenance of the current meter or the meter reading device can be realized without any wiring.
Drawings
FIG. 1 is a schematic diagram of a prior art connection between an analog meter module and a computer;
FIG. 2 is a block diagram of the analog table module of the present invention;
FIG. 3 is a top view of a simulation meter module according to the present invention;
FIG. 4 is a bottom view of the analog watch module of the present invention;
FIG. 5 is a left side view of an analog watch module of the present invention;
FIG. 6 is a right side view of an analog watch module of the present invention;
FIG. 7 is a schematic diagram of a motherboard structure according to the present invention;
FIG. 8 is a functional block diagram of an analog table module of the present invention.
Description of the reference numerals
The USB flash disk comprises a shell body 1, a mainboard 2, a 01 USB-to-serial port module, a 02 first RS 232-to-RS 485 module, a 03 second RS 232-to-RS 485 module, a 04 infrared conversion module, a 05 micro-processing unit, a 06 memory, a 07 key module, a 08 display module, a 09 level conversion module, a 10 USB interface, a 11 first RS485 interface, a 12 second RS485 interface, a 13 infrared conversion interface, a 14 man-machine interface and a 15 burning interface.
Detailed Description
The technical solutions of the present invention are described in detail below by examples, and the following examples are only exemplary and can be used only for explaining and explaining the technical solutions of the present invention, but not construed as limiting the technical solutions of the present invention.
In the present application, the uart (asynchronous receiver and transmitter) interface is an asynchronous serial communication interface.
The invention provides a portable analog electric energy meter, which comprises a shell 1, a memory 06, a mainboard 2 arranged in the shell and a communication interface arranged on the shell, as shown in fig. 2 to 7.
The mainboard 2 comprises a USB-to-serial port module 01, a first RS 232-to-RS 485 module 02, a second RS 232-to-RS 485 module 03, an infrared conversion module 04 and a micro control unit 05.
In the present application, isolated terminal USB power is used; the USB-to-serial port module uses an FT2232D chip, and the chip has the function of converting USB to two paths of UART interfaces with TTL levels. In the application, the first RS232 to RS485 module and the second RS232 to RS485 module both adopt ADM2582E chips, and the chips can realize the functions of level isolation and magnetic isolation of RS232 to RS 485; in the application, the micro control unit adopts an MCU chip RN8211 with three paths of UART interfaces, and the chip can realize the infrared 38K carrier modulation function. In this application, the infrared conversion module uses a HS138-W infrared receiving and emitting device.
The first RS 232-to-RS 485 module 02 is connected with a first UART interface of the USB-to-serial port module; a second UART interface of the USB-to-serial port module is connected with a first UART interface of the micro control unit;
the second RS 232-to-RS 485 module is connected with a second UART interface of the micro control unit;
the infrared conversion module is connected with a third UART interface of the micro control unit;
the memory is connected with an SPI interface of the micro control unit;
the communication interface comprises a USB interface 10, a first RS485 interface 11, a second RS485 interface 12 and an infrared interface 13;
the USB interface is connected with the USB-to-serial port module; the first RS485 interface is connected with the first RS 232-RS 485 conversion module; the second RS485 interface is connected with the second RS 232-RS 485 conversion module; the infrared interface is connected with the infrared conversion module.
Further, a key, a display screen, a man-machine interface 14 and a burning interface 15 are also arranged on the shell 1.
Further, the main board 2 further comprises a key module 07 and a display module 08; the key module and the display module are both connected with a first I/O port of the micro control unit; the key module and the display module are both connected with the human-computer interface.
Further, the main board 2 further includes a level conversion module 09; the level conversion module is respectively connected with the second I/O port of the micro control unit and the burning interface.
The memory is a FLASH memory.
The analog meter module also comprises a change-over switch; one end of the change-over switch is connected with the second RS485 interface, and the other end of the change-over switch is connected with at least one interface of the man-machine interface or the burning interface respectively. Different functions of the analog meter module are realized by turning off and turning off the change-over switch, wherein when the change-over switch is turned off, the second RS485 interface is respectively short-circuited with one interface or two interfaces of the man-machine interface or the burning interface, and at the moment, the analog meter module is changed into a function of converting USB into RS 485; when the change-over switch is switched off, the analog meter module realizes the function of the analog meter.
As shown in fig. 8, the present invention can realize the following functions:
the second RS485 interface has the function of simulating the electric meter through the second RS 232-RS 485 module, can simulate the communication and data of a plurality of electric meters, and meets the meter reading test of a centralized reading product.
The debugging and installation functions, the first RS485 interface of the invention can conveniently debug the on-site ammeter box centralized meter reading equipment through the first RS 232-to-RS 485 module and the USB-to-serial port module, and check whether the on-site RS485 wiring is normal or not. In addition, the first UART interface of this embodiment is a USB conversion RS485 function with active magnetic isolation.
The infrared interface has the function of converting USB into infrared, and can realize the communication between the infrared interface and the meter collecting device and the communication between the infrared interface and the meter collecting device through a computer on site, so that the operation and maintenance of the on-site meter and the meter collecting device can be realized without any wiring.
The second RS485 interface can realize the software upgrading of the centralized reading or ammeter products on site, and the specific realization process is that the program files of the centralized reading or ammeter to be upgraded are downloaded to a Flash memory of the multifunctional virtual ammeter through a USB interface, and then the sub-package of the program files is transmitted to the centralized reading or ammeter through the second RS485 interface through key operation on site, so that the online upgrading function is realized, the upgrading process does not need computer access, and the upgrading is convenient and rapid.
The program burning function can realize the program burning of the centralized copy or the ammeter product in the production process through the program burning interface, and the specific realization process is that the program file of the centralized copy or the ammeter which is to be burnt is downloaded into a Flash memory of the multifunctional virtual ammeter through a USB interface, and then the program file is burnt into a CPU of the centralized copy or the ammeter through the burning interface through key operation on site, so that the program burning function is realized, and the program burning process is convenient and rapid without computer access.
Parameter setting function, this technical scheme carries out parameter setting to the centralized meter reading or ammeter through second RS485 interface off-line. The specific implementation process is that parameters to be set are downloaded to a Flash memory of the multifunctional virtual ammeter through a USB interface, and then the parameters are sent to a centralized meter or the ammeter through a second RS485 interface through key operation on site, so that the parameter setting function is realized; the setting process does not need computer access, and is convenient and quick.
The technical scheme has two RS485 interfaces and one infrared communication interface, and can realize the data communication function of computer reading and collecting or electricity meters.
According to the technical scheme, the protocol conversion function, the timing acquisition function of the electric meter data and the timing acquisition of the electric meter data are realized through the second RS485 interface, the electric meter data are acquired and stored in the FLASH storage chip, and then the stored data are read into a computer through the USB interface.
Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.