Utility model content
In order to overcome the deficiencies in the prior art, the utility model provides a kind of general medium voltage network electric network protection device, and the utility model is compared by the actual value of setting setting value and measurement, performs protection act.
The technical solution of the utility model is: a kind of medium voltage network electric network protection device; this device comprises microprocessor, button collecting unit, AD conversion unit, current/voltage collecting unit, input and output collecting unit, display driver unit, display module; button collecting unit connects microprocessor by AD conversion unit; microprocessor is connected to current/voltage collecting unit, input and output collecting unit, memory and display driver unit respectively; display module connects microprocessor by display driver unit, and protective device can also connect microprocessor by USB interface.Described protective device also comprises communication unit and host computer, and host computer connects microprocessor by communication unit.
A kind of medium voltage network electric network protection method, the method comprises the following steps: step one, carry out initialization by USB interface to equipment; Whether step 2, microprocessor judges have interrupt signal, if there is execution interruption subroutine, if not with execution step 3; Step 3, button collecting unit setting protective current voltage setting value, sends to microprocessor by A/D conversion; Step 4, micro-process send instruction, the electric current and voltage value will measured by the collection of current/voltage acquisition module or protect, and gather input and output signal by input and output collecting unit; Step 5, microprocessor calculate and logic analysis the electric current and voltage value gathered, and show on display module; Step 6, when collecting electric current and voltage value and being greater than current/voltage setting value, microprocessor send instruction protection medium voltage network send interrupt signal.Described step one comprises interrupts initialization to the distribution of microprocessor input/output port and definition, timer interruption initialization, communication unit, and baud rate initialization and device drive initialization.The method is further comprising the steps of: disconnected the judging whether of step one, communication unit performs serial communication; If step 2 performs communication, microprocessor is sent out by communication unit reception host computer data and is carried out CRC check; If step 3 CRC check result is correct, microprocessor sends corresponding control command; The information of execution is sent to host computer by communication unit by step 4, microprocessor.
The utility model has following good effect: only need to hardware testing once, downloads corresponding engineering protection software, realize different defencive functions, saved production cost according to different engineering demands by USB interface.Client as requested, can download and protect masterplate accordingly, realize defencive function.
Embodiment
Contrast accompanying drawing below, by the description to embodiment, embodiment of the present utility model is as the effect of the mutual alignment between the shape of involved each component, structure, each several part and annexation, each several part and operation principle, manufacturing process and operation using method etc., be described in further detail, to help, those skilled in the art conceive utility model of the present utility model, technical scheme has more complete, accurate and deep understanding.As shown in Figure 1, general medium voltage network electric network protection device, comprise microprocessor, button collecting unit, AD conversion unit, current/voltage collecting unit, input and output collecting unit, display driver unit, display module and memory, button collecting unit connects microprocessor by AD conversion unit, microprocessor is connected to current/voltage collecting unit, input and output collecting unit, memory and display driver unit respectively, and display module connects microprocessor by display driver unit; Protective device also comprises usb interface module, and usb interface module connects microprocessor.By the distribution of microprocessor to input/output port, thus button collecting unit, input and output collection, current/voltage collecting unit, communication unit, liquid crystal display are combined effectively.Microprocessor adopts the LPC2368 microprocessor of the up-to-date production of PHILIPS company, and LPC2368 microprocessor is the core of whole hardware, and crystal oscillator employing frequency is the passive crystal oscillator of 12MHZ.As Fig. 2, it is the partial schematic diagram of microprocessor.Described microprocessor, by the control of liquid crystal display input port to liquid crystal display, shows the current/voltage value gathered on a liquid crystal display.Described button collecting unit can arrange protective current voltage setting value.
If Fig. 3 is display driver unit of the present utility model; by LPC2368 microprocessor to P0.16-P0.22 input port inter-process; realize the control to liquid crystal display; the current/voltage value gathered can be shown on a liquid crystal display after computing; protective current voltage setting value can be set by the key that arranges on panel simultaneously; reached the control of protection by microprocessor analysis conversion, thus realize the protecting control to system.
If Fig. 4 is communication unit schematic diagram, the data that host computer sends over by serial communication RS-485 interface send microprocessor to by communication module RSM485CT, and microprocessor feeds back signal to host computer by it again, realize the conversion between information.RSM485CT is connected with P3.0 and P3.1 of microprocessor, and perform the instruction of host computer, receiving terminal RXD receives data, and transmitting terminal TXD sends data, realizes the transmission of tested electric quantity data.
Fig. 5 is USB and microprocessor LPC2368 connecting circuit, and USB interface is connected with the 21.29.30 pin of microprocessor LPC2368, is downloaded the protection template of different allocation projects by USB interface, realizes different engineering protection functions.
Microprocessor control method is as follows:
1.1 initialization apparatus: for distributing and definition LPC2368 input/output port, the initialization assignment of global variable, timer 0 interrupts initialization, the initialization of communication vector interrupt, baud rate Initialize installation, drives initialization etc.
1.2 timer interruption: read keyboard collection value for timing, read the control of input switch amount collection value communication time-out.
1.3 say that the protection seting value of collection carries out A/D conversion: by carrying out A/D conversion to protection seting value collection value, the value of conversion being carried out logic analysis thus reaches the object of protection.
The driving of 1.4 eeprom memories: by the I of LPC2368
2c square of bus controls the CAT24C256 of EEPROM, thus the current/voltage value of the measurement of the setting value of setting, collection, protection, address, communication baud rate equivalence is saved in EEPROM, so that dead electricity persistence.
1.5 data displays: by the display and control of LPC2368 microprocessor to liquid crystal; measurement current/voltage and the electric current of protection, the collection value of voltage correctly can be presented on liquid crystal through computing; menu can be entered by the key that arranges on panel, protection seting value is set simultaneously, thus realize the control to the protection of system.
1.6 serial ports interrupt Predicated execution device: perform communication for determining whether, if execution communication, when host computer wakes the machine up, then the corresponding saving scene immediately of the machine, after receiving frame data, microprocessor carries out CRC check to reception data, if check results is correct, illustrate that reception data are entirely true, the instruction of microprocessor responds host computer, query function code, goes to perform the functions such as remote signalling, remote measurement, remote control according to function code.
In view of above-mentioned project organization, native system is by initialization apparatus, timer interruption responds, the reading of electric quantity data, EEPROM stores setting data, the display of electric quantity data, the response etc. that communication serial ports interrupts integrally combines effectively, realize the function of universal protection device, owing to adopting high-precision synchronized sampling analog to digital converter, ADS8557IPMCAE makes certainty of measurement be greatly improved, and employ high accuracy integrated chip LPC2368, substantially increase the processing speed of software, simplify hardware design structure, strengthen the jamproof function of chip, improve the reliability of product.
As shown in Figure 6, for the utility model main program flow chart, step 1 is for starting action, and step 2 is initialization action, and namely initialization is carried out in the definition, interrupt register, global variable, timer 0, EEPROM interruption, serial communication interruption, Configuration of baud rate etc. of microprocessor input/output port.Judge in step 3 to open interrupt signal, interrupt being yes if open, then enter 4 execution interruption subroutines, if NO or execution of step 3 enter 5 execution and read in metering core chip value steps 6 calculating and carrying out logic analysis, in step 7 the electric current of the measurement calculated, voltage are shown, judge whether in step 8 to have pressed optimum configurations key simultaneously, if the optimum configurations then entered in 9 and parameter store, then return 3 circulations if not and perform this system program.
As shown in Figure 7, for initialize routine flow chart, step 10 is for starting action, first the input and output pin of microprocessor is defined in a step 11, interrupt carrying out Initialize installation and definition to EEPROM CAT24C256 in step 12, then the time constant of timer is set in step 13, in 14, serial communication is arranged, define communication baud rate simultaneously.In 15 steps, gather current/voltage in cabinet and setting value compares, if exceed setting value to perform protection, the priority arranging interruption in 16 steps opens interruption, finally arrives step 17 main program.
As shown in Figure 8, for computation chip reads flow chart, step 18 is for starting action, in step 19, to gather in switch cubicle current/voltage and and setting value compare, convert to collecting current/voltage in step 20, in step 21, correct current/voltage and Logic judgment information are shown to the numerical computations after A/D conversion and analysis, send Display panel by numerical value in step 22.
By reference to the accompanying drawings the utility model is exemplarily described above; obvious the utility model specific implementation is not subject to the restrictions described above; as long as have employed the improvement of the various unsubstantialities that method of the present utility model is conceived and technical scheme is carried out; or design of the present utility model and technical scheme directly applied to other occasion, all within protection range of the present utility model without to improve.