Summary of the invention
The present invention is the weak point existing in above-mentioned prior art for avoiding, and provides that a kind of real-time is good, precision is high, easily controlled and size is little, the simple intelligent integral power switch of peripheral circuit amount monitoring module.
The present invention be technical solution problem by the following technical solutions.
Intelligent integral power switch amount monitoring module, its design feature is to comprise main control chip, jtag interface circuit, relay drive circuit, buffer circuit, power circuit, addressing circuit and RS485 interface circuit;
Described jtag interface circuit, relay drive circuit, buffer circuit, power circuit, addressing circuit and RS485 interface circuit are all connected with described main control chip; Eight roads are outputed relay and are connected with described main control chip by described relay drive circuit, by described main control chip, by described relay drive circuit, drive described eight roads to output relay; 40 road fault isolating switch detection signals input to described main control chip by buffer circuit;
Described jtag interface circuit, for making the main control chip can download online program and programming debugging;
Described relay drive circuit, for making main control chip can drive relay coil;
Described buffer circuit, for accessing 40 road fault isolating switch detection signals, and is converted into light signal by peripheral forceful electric power and the undesired signal of fault isolating switch detection signal, then light signal is converted into light current that main control chip can accept and clean signal;
Described power circuit, is used to main control chip that normally stable+5V working power is provided;
Described addressing circuit, allows main control chip identify and distinguish the signal that different switching value detection module gathers for realize when a plurality of switching value modules are worked simultaneously;
Described RS485 interface circuit, for the differential signal of input being converted to the TTL communication signal that main control chip can be identified, realizes and peripherals normal communication.
The design feature of intelligent integral power switch amount monitoring module of the present invention is also:
As shown in Figure 2, described jtag interface circuit comprises plug connector JM1 and resistance R 1~R5, and described resistance R 1~R5 is all connected with described plug connector JM1.
As shown in Figure 3, described relay drive circuit comprises that resistance R 6~R12, R20~R28, relay drive chip UH5; Described resistance R 6~R12, R20~R28 all drive chip UH5 to be connected with described relay.
As shown in Figure 4, described buffer circuit comprises resistance R 29~R32, capacitor C 1, capacitor C 2, optocoupler Q1, diode D2 and voltage dependent resistor (VDR) RV1; After one end of described resistance R 29 is connected with one end of described voltage dependent resistor (VDR) RV1, be connected with described main control chip, the other end of described resistance R 29 is connected with described optocoupler Q1 by described resistance R 30, resistance R 31 successively; Described capacitor C 1 is connected between described resistance R 31 and described optocoupler Q1 with described diode D2 one end after parallel with one another connection, and described capacitor C 1 is connected rear ground connection with the other end of described diode D2 after parallel with one another connection with the other end of described voltage dependent resistor (VDR) RV1; Described optocoupler Q1 is connected with main control chip; One end of one end of described resistance R 32 and capacitor C 2 is all connected on the link of described optocoupler Q1 and main control chip, the equal ground connection of the other end of the other end of described resistance R 32 and capacitor C 2.
As shown in Figure 5, described power circuit comprises voltage-dropping type pulse-width controlled DC/DC converter AP1501, resistance R 13~R14, capacitor C 3~C4, stabilivolt D1 and inductance L 1; Described resistance R 13~R14, capacitor C 3, stabilivolt D1 and inductance L 1 are all connected with described voltage-dropping type pulse-width controlled DC/DC converter AP1501, and described capacitor C 4 is connected with described voltage-dropping type pulse-width controlled DC/DC converter AP1501 by described inductance L 1.
Compared with the prior art, beneficial effect of the present invention is embodied in:
Intelligent integral power switch amount monitoring module of the present invention, core processing module is comprised of with being correlated with to assist, isolate and drive NUC100LC1BN processor.Circuit can be divided into isolation processing module, driver module according to function; download module, power supply processing module, WTD module, geocoding module, amplifier are followed module, RS485 communication interface modules; can in supervisory system is logical, monitor all kinds of on-off states; and make corresponding output action, the steady operation of protection power source system.
Intelligent integral power switch amount monitoring module of the present invention, has the advantages such as real-time is good, precision is high, easy controlled and size is little, peripheral circuit is simple.
Embodiment
Referring to Fig. 1-Fig. 7, intelligent integral power switch amount monitoring module comprises main control chip, jtag interface circuit, relay drive circuit, buffer circuit, power circuit, addressing circuit and RS485 interface circuit;
Described jtag interface circuit, relay drive circuit, buffer circuit, power circuit, addressing circuit and RS485 interface circuit are all connected with described main control chip; Eight roads are outputed relay and are connected with described main control chip by described relay drive circuit, by described main control chip, by described relay drive circuit, drive described eight roads to output relay; 40 road fault isolating switch detection signals input to described main control chip by buffer circuit;
Described jtag interface circuit, for making the main control chip can download online program and programming debugging;
Described relay drive circuit, for making main control chip can drive relay coil;
Described buffer circuit, for accessing 40 road fault isolating switch detection signals, and is converted into light signal by peripheral forceful electric power and the undesired signal of fault isolating switch detection signal, then light signal is converted into light current that main control chip can accept and clean signal;
Described power circuit, is used to main control chip that normally stable+5V working power is provided;
Described addressing circuit, allows main control chip identify and distinguish the signal that different switching value detection module gathers for realize when a plurality of switching value modules are worked simultaneously;
Described RS485 interface circuit, for the differential signal of input being converted to the TTL communication signal that main control chip can be identified, realizes and peripherals normal communication.
As shown in Figure 2, described jtag interface circuit comprises plug connector JM1 and resistance R 1~R5, and described resistance R 1~R5 is all connected with described plug connector JM1.Described plug connector JM1 is CON8_1D25, is 8 cushions rows, by this Interface realization main control chip download online program, programming debugging, the needed jtag interface of DEBUG, has greatly facilitated writing and producing debugging of program.
As shown in Figure 3, described relay drive circuit comprises that resistance R 6~R12, R20~R28, relay drive chip UH5; Described resistance R 6~R12, R20~R28 all drive chip UH5 to be connected with described relay.
As shown in Figure 3, described relay driving chip is Darlington driver ULN2803.R6~R12, R20 are connected with described Darlington driver ULN2803 by a light emitting diode respectively.Having altogether 8 light emitting diodes, is respectively LED1~LED8.Be specially adapted to low logic level digital circuit (such as TTL, CMOS or PMOS/NMOS) and the higher current/voltage interface between requiring, be widely used in computing machine, in lamp, relay, printing hammer or other similar load in industrial and consumer product.All devices have open collector output and afterflow case position diode, for suppressing transition.The design of ULN2803 and standard TTL series is compatible, and ULN2804 is suitable for 6 to 15 volts of high level CMOS or PMOS most, has the feature of high withstand voltage, large electric current.
ULN2803 drives relay, output terminal is directly succeeded electric apparatus coil one end, another termination V+ power supply of relay coil, your use be 5V relay, namely 9 pin of another termination of relay coil 5V power supply .ULN2803 will connect 5V positive supply, in sheet, there is the input end of fly-wheel diode .ULN2803 to be directly connected with single-chip processor i/o, needn't add resistance. single-chip microcomputer output high level just can drive the actuating of relay.
Uln2803 is eightfold darlington transistor array, and pin 1,2,3,4,5,6,7,8 is input, and corresponding pin 18,17,16,15,14,13,12,11 is output.10 pin are the fly-wheel diode common port of 8 tunnel outputs.Input voltage 5V, the cmos circuit of TTL and 5V can directly drive.Output 500MA, 50V.Because output is open collector, so output connects load, the other end of load must connect positive supply.Application is 9 pin ground connection.When being input as 0, the cut-off of output Darlington transistor, load no current.While being input as high level, output Darlington transistor is saturated, and load just has electric current to flow into delivery outlet.10 pin are used when driving inductive load, while driving inductive load 10 pin connect load power source+.
As shown in Figure 4, described buffer circuit comprises resistance R 29~R32, capacitor C 1, capacitor C 2, optocoupler Q1, diode D2 and voltage dependent resistor (VDR) RV1; After one end of described resistance R 29 is connected with one end of described voltage dependent resistor (VDR) RV1, be connected with described main control chip, the other end of described resistance R 29 is connected with described optocoupler Q1 by described resistance R 30, resistance R 31 successively; Described capacitor C 1 is connected between described resistance R 31 and described optocoupler Q1 with described diode D2 one end after parallel with one another connection, and described capacitor C 1 is connected rear ground connection with the other end of described diode D2 after parallel with one another connection with the other end of described voltage dependent resistor (VDR) RV1; Described optocoupler Q1 is connected with main control chip; One end of one end of described resistance R 32 and capacitor C 2 is all connected on the link of described optocoupler Q1 and main control chip, the equal ground connection of the other end of the other end of described resistance R 32 and capacitor C 2.
Referring to Fig. 4, realize peripheral forceful electric power and undesired signal is converted into light signal, then be converted into the acceptable light current of system and clean signal by light signal, thoroughly blocked the influence of external factors to main system.
As shown in Figure 5, described power circuit comprises voltage-dropping type pulse-width controlled DC/DC converter AP1501, resistance R 13~R14, capacitor C 3~C4, stabilivolt D1 and inductance L 1; Described resistance R 13~R14, capacitor C 3, stabilivolt D1 and inductance L 1 are all connected with described voltage-dropping type pulse-width controlled DC/DC converter AP1501, and described capacitor C 4 is connected with described voltage-dropping type pulse-width controlled DC/DC converter AP1501 by described inductance L 1.
Fig. 5 is the circuit diagram of power circuit, and it can support wide pressure input 40VDC~7.5VDC input, can stablize output 5VDC, can supply with the normal stable working power of main circuit.
As shown in Figure 6, described addressing circuit comprises plug connector J1~J4 and chip RP1; Described plug connector J1~J4 is all connected with described chip RP1.
Referring to Fig. 6, be the circuit diagram of addressing circuit, its is realized and to allow monitoring and controlling system identify and distinguish disparate modules collection signal simultaneously when a plurality of switching value modules are worked, and supports 4 powers (2 of two 2
8individual) the normal work simultaneously of the switching value module of number; The real time reaction of operation indicating circuit energy goes out current system duty, facilitates system integration and test and production to install.Realize the differentiation work of multiple equal modules, realize expansion and cascade collaborative work.Chip RP1 is paster exclusion, and its fundamental purpose is to disturb in order to prevent, increases the stability of circuit.Improve the anti-electromagnetic interference capability of bus.
As shown in Figure 7, described RS485 interface circuit comprises RS485 transceiver U2, resistance R 16~R19, capacitor C 5~C7; Described resistance R 16~R19, capacitor C 5~C7 are all connected with described RS485 transceiver U2.
Referring to Fig. 7, be RS485 interface circuit, U2 is SP485EEN, and it is converted to by the differential signal of input the TTL communication signal that main control chip can be identified, and realizes and peripherals normal communication.The Transistor-Transistor Logic level communication signal that RS485 module realizes MCU is converted into RS485 differential signal, greatly extends its transmission range.
As shown in Figure 1, intelligent integral power switch amount monitoring module of the present invention, use be that NUC100 series is 32 single-chip microcomputers, built-in ARM Cortex-M0 kernel, for Industry Control and the relevant application scenario that need to enrich signal and communication interface.The function realizing has: realize 40 road fault isolating switches and detect, closing switch amount detection can arrange, No. 8 relay outputs, a road expansion AD, and send the information of detection to main monitoring by RS485 serial line interface, as the foundation of main monitoring management power-supply system and handling failure alarm.
The up-to-date processor cores of Cortex-M0 WeiARM company also has the price being equal to traditional 8 bit products.The highest 50MHz external clock that moves to of NUC100Cortex-M0 kernel series, has the built-in Flash storer of 32K/64K/128K byte, the built-in SRAM of 4K/8K/16K byte.And in have timer, WatchDog Timer, RTC, PDMA, UART, SPI/SSP, I2C, I 2 S, PWM timer, GPIO, 12 ADC, analog comparator, low-voltage detects and economize on electricity detecting function.
Core processing module is comprised of with being correlated with to assist, isolate and drive NUC100LC1BN processor.Circuit can be divided into isolation processing module, driver module according to function, and download module, power supply processing module, WTD module, geocoding module, amplifier are followed module, RS485 communication interface modules.Take RS485 as communication port, the data that collect are sent out, and by the command driven Control peripherals receiving.Power circuit is input as alternating current-direct current 220V, is output as direct current 24VDC.Buffer circuit is realized the interference of external circuit in isolation by photosignal conversion.Relay drive circuit changes forceful electric power signal by driving chip to complete weak electric signal.Described WTD module is monitored master chip duty in real time, if any extremely, carries out reset processing.Addressing circuit is realized the differentiation work of multiple equal modules, realizes expansion and cascade collaborative work.It is 0~5V voltage that described amplifier is followed module realization+5V voltage transitions, and reads in real time analog signals numerical value by AD treatment circuit.RS485 communication interface modules changes the TTL signal of communication of Master control chip into RS485 differential signal.
As Fig. 2, peripheral circuit comprises program download module (In-Circuit Programming) (being described jtag interface circuit), this module realizes program download, programming and debug function, its comprise+5VDC power supply and three control pin ICE-DAT, ICE-CK, tri-pins of ICE-RST, realize programming machine and target machine cross compile, DEBUG etc. function.Reset circuit is realized and when system powers on, is exported a pulse signal to MCU, and makes it to reset, and avoids master routine pointer to run and flies, and makes it to enter the work of principal function normal entry address.Crystal oscillating circuit offers the lasting 12MHz pulse signal of master chip, and internal power supply system is supported wide pressure input 40VDC~7.5VDC input, can stablize output 5VDC, can supply with the normal stable working power of main circuit.Addressing circuit is realized and to be allowed monitoring and controlling system identify and distinguish disparate modules collection signal simultaneously when a plurality of switching value modules are worked, and supports 4 powers (2 of two 2
8individual) the normal work simultaneously of the switching value module of number; The real time reaction of operation indicating circuit energy goes out current system duty, facilitates system integration and test and production to install.Self-recovering function when WTD circuit is realized system in case of system halt, primary system program sends certain pulses signal at regular intervals to WTD, if primary system program is run and to be flown or during abnormal cisco unity malfunction, WTD can monitor out and allow main MCU involution, allows system program from recovering normal work.Relay drive circuit is realized the weak filling of the GPIO of MCU and is drawn electric current, cannot normally work by driven relay coil, need to by driving tube, strengthen the driving force of GPIO, makes it the driven actuating of relay.Buffer circuit is realized the treatment circuit that peripheral forceful electric power disturbed and destroyed main system weak electricity system, and its principle is to allow peripheral forceful electric power signal be converted into light signal, then transfers main system weak electric signal to by light signal, has thoroughly isolated the influence of forceful electric power to system.Amplifier and follower are realized negative pressure and are raised effect, and MCU can only gather 0~5V analog signals, but by can raise+-5V analog quantity voltage of amplifier and follower, are converted into 0~5V signal that MCU can identify.RS485 module is converted to by the differential signal of input the TTL communication signal that main control chip can be identified, and realizes and peripherals normal communication.The Transistor-Transistor Logic level communication signal that RS485 module realizes MCU is converted into RS485 differential signal, greatly extends its transmission range.
The function that intelligent integral power switch amount monitoring module of the present invention is realized has: (1) provides 40 way switch fault detects, and closing switch amount detection can arrange; (2) provide No. 8 relay outputs, 8 tunnels all can arrange output content by user oneself.The 1668VA (250VAC10A, 100VDC5A) that can load, adopts silver alloy contact technology; (3) by RS485 serial line interface, send the information of detection to main monitoring, as the foundation of main monitoring management power-supply system and handling failure alarm; (4) switching value input adopts the input of fault normal opened contact or the optocoupler OC input after isolation processing; (5) supply voltage AC/DC universal, 85~264VAC or 120~370VDC.
Referring to Fig. 3, realize light current and driven the circuit of relay coil, and can drive that circuit by the convenient understanding of its corresponding LED light and judgement.Facilitate Installation And Test.
Referring to Fig. 4, realize peripheral forceful electric power and undesired signal is converted into light signal, then be converted into the acceptable light current of system and clean signal by light signal, thoroughly blocked the influence of external factors to main system.
Referring to Fig. 5, be that power supply system is realized circuit, it can support wide pressure input 40VDC~7.5VDC input, can stablize output 5VDC, can supply with the normal stable working power of main circuit.
Referring to Fig. 6, be the circuit diagram of addressing circuit, its is realized and to allow monitoring and controlling system identify and distinguish disparate modules collection signal simultaneously when a plurality of switching value modules are worked, and supports 4 powers (2 of two 2
8individual) the normal work simultaneously of the switching value module of number.
The Transistor-Transistor Logic level communication signal of having realized master chip MCU referring to Fig. 7 is converted into RS485 differential signal, greatly extends its transmission range.
Embodiment recited above is described the preferred embodiment of the present invention, not the spirit and scope of the present invention is limited.Do not departing under the prerequisite of design concept of the present invention; various modification and improvement that this area ordinary person makes technical scheme of the present invention; all should drop into protection scope of the present invention, the technology contents that the present invention asks for protection, is all documented in claims.