CN114551154A - Multi-channel programmable relay - Google Patents

Multi-channel programmable relay Download PDF

Info

Publication number
CN114551154A
CN114551154A CN202210281248.4A CN202210281248A CN114551154A CN 114551154 A CN114551154 A CN 114551154A CN 202210281248 A CN202210281248 A CN 202210281248A CN 114551154 A CN114551154 A CN 114551154A
Authority
CN
China
Prior art keywords
relay
input
chip
mcu processor
circuit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210281248.4A
Other languages
Chinese (zh)
Inventor
林善平
谢应钦
张强
魏小东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujian Shunchang Hong Run Precision Instruments Co ltd
Original Assignee
Fujian Shunchang Hong Run Precision Instruments Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujian Shunchang Hong Run Precision Instruments Co ltd filed Critical Fujian Shunchang Hong Run Precision Instruments Co ltd
Priority to CN202210281248.4A priority Critical patent/CN114551154A/en
Publication of CN114551154A publication Critical patent/CN114551154A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H01ELECTRIC ELEMENTS
    • H01HELECTRIC SWITCHES; RELAYS; SELECTORS; EMERGENCY PROTECTIVE DEVICES
    • H01H47/00Circuit arrangements not adapted to a particular application of the relay and designed to obtain desired operating characteristics or to provide energising current
    • H01H47/001Functional circuits, e.g. logic, sequencing, interlocking circuits
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Programmable Controllers (AREA)

Abstract

The invention discloses a multi-channel programmable relay, which comprises an MCU (microprogrammed control Unit) processor, a memory, a clock chip, a watchdog chip, a communication chip, a plurality of input circuits, a plurality of output circuits and an auxiliary machine interface circuit, wherein the memory, the clock chip, the watchdog chip, the communication chip, the input circuits, the output circuits and the auxiliary machine interface circuit are respectively in communication connection with the MCU processor. The multi-channel programmable relay is provided with a plurality of input circuits and output circuits, the input circuits and the output circuits form a plurality of channels, the multi-channel programmable relay can meet the requirement of inputting a plurality of external signals to control the relay K of the output circuits to be opened or closed, and the multi-channel programmable relay has strong bearing capacity; in the application process, according to the requirement, part of the input circuits and the output circuits can be selected to be used, and all the input circuits and the output circuits can be used at the same time, so that the use is flexible and convenient.

Description

Multi-channel programmable relay
Technical Field
The invention relates to the field of relays, in particular to a multi-channel programmable relay.
Background
The programmable relay has the characteristics of independent programming by a user and free design of a logic control flow, and can realize scene application such as parking lot access control, urban light night scene control, agricultural automatic irrigation and the like by compiling a logic control program in a product. The domestic programmable relay mainly depends on the imported and overseas programmable relay, the programming mode of the domestic programmable relay adopts a ladder diagram programming mode, the programming mode needs professional training to master related control symbols and control sentences for programming, the whole programming process is complex, the operation is not easy, the use threshold is high, and the user group range cannot be expanded to the maximum extent; the input and output interface of the programmable relay is not only single, but also extremely limited, the expansion capability is also poor, and the application range is greatly limited.
Disclosure of Invention
The invention aims to provide a multi-channel programmable relay.
The technical scheme for realizing the purpose of the invention is as follows: a multi-channel programmable relay comprises an MCU (microprogrammed control Unit) processor, a memory, a clock chip, a watchdog chip, a communication chip, a plurality of input circuits, a plurality of output circuits and an auxiliary machine interface circuit, wherein the memory, the clock chip, the watchdog chip, the communication chip, the input circuits, the output circuits and the auxiliary machine interface circuit are respectively in communication connection with the MCU processor; wherein the content of the first and second substances,
the input circuit comprises a resistor, a transient diode TVS, an optocoupler U1, an input circuit input end IN and an input circuit output end GPIO1, wherein the light emitting side of the optocoupler U1 comprises diodes which are opposite IN two directions and are connected IN parallel, a resistor R1 is connected IN series between the input circuit input end IN and the anode of the light emitting side of the optocoupler U1, a resistor R2 is connected IN series between the anode and the cathode of the light emitting side of the optocoupler U1, a transient diode TVS is connected IN series between the cathode of the light emitting side of the optocoupler U1 and the input circuit input end IN, the collector of the photosensitive side of the optocoupler U1 is connected with the input circuit output end GPIO1, the input circuit output end GPIO1 is connected with the MCU processor, a resistor R3 is connected IN series between the input circuit output end GPIO1 and a power supply VCC1, and the emitter of the photosensitive side of the optocoupler U1 is grounded; a negative electrode of a light emitting side of the optocoupler U1 is used as a common terminal COM, the common terminals COM of all the input circuits are connected with a toggle switch, and the toggle switch is connected with a power supply VDD1 and a power supply VDD 2;
the output circuit consists of a resistor, a diode D, NPN triode T, an optocoupler U2, a relay K and an output circuit input end GPIO2, the input end GPIO2 of the output circuit is connected with the MCU processor, the input end GPIO2 of the output circuit is connected with the negative electrode of the light-emitting side of the optocoupler U2, a resistor R4 is connected in series between the positive electrode of the light-emitting side of the optical coupler U2 and a power supply VCC2, a resistor R5 is connected in series between the collector of the light-sensing side of the optical coupler U2 and a power supply VCC3, an emitter of a light sensing side of the optocoupler U2 is connected with a resistor R6 in series with the ground, an emitter of a light sensing side of the optocoupler U2 is also connected with a resistor R7 in series with the base of the NPN triode T, the emitting electrode of the NPN triode T is grounded, the relay K is provided with a coil, the coil of the relay K and the diode D are connected between the collector electrode of the NPN triode T and the power supply VCC4 in parallel, and the collector electrode of the anode of the diode D of the NPN triode T is connected.
Further, the number of the input circuits and the output circuits is eight each. On one hand, the eight input circuits and the eight output circuits do not need to occupy excessive IO ports of the MCU processor, and the requirement on the MCU processor is low; on the other hand, most applications are satisfied.
Furthermore, in the eight output circuits, the relay K of two output circuits is a single-pole double-throw relay; and the relays K of the other six output circuits are single-pole single-throw relays. The arrangement is adopted, so that different relays K can be used according to requirements to adapt to different application scenes; the multi-channel programmable relay is more flexible to use and wider in application.
Further, the MCU processor is a 32-bit processor. The 32-bit processor integrates a plurality of interfaces, such as PWM, interrupt, I2C bus, SPI bus, UART interface and the like, and when the 32-bit processor is used in the multichannel programmable relay, the design requirement can be met, and the cost performance is relatively high.
Further, the memory comprises a Flash memory and an EEPROM memory. The Flash memory has the characteristics of quick writing and erasing, and is mainly used for storing a control program written by a user and an operating state; the EEPROM memory has a power-down holding function and is mainly used for storing internal parameters of the Chinese programmable relay.
Further, the clock chip is a clock chip with a model of RTC 8010; the watchdog chip is a watchdog chip with the model of MAX 706; the communication chip is a communication chip with the model ADM 3202.
Furthermore, the multichannel programmable relay also comprises a display module, and the display module is in communication connection with the MCU processor. The display module is arranged so as to be manually interactive.
Furthermore, the multichannel programmable relay also comprises a key module, and the key module is in communication connection with the MCU processor. Through the key module, the function options can be conveniently carried out by the key module. The key module may generally include eight keys, up, down, left, right, delete, select, confirm, and exit, respectively.
Furthermore, the MCU processor, the memory, the clock chip, the watchdog chip and the communication chip are arranged on a mainboard; the input circuit, the output circuit and the auxiliary machine interface circuit are arranged on a control board; the display module and the key module are arranged on a key display panel. Each circuit can be arranged on the same PCB board, and can also be arranged on different PCB boards according to functions and reasonable partitions.
Furthermore, the multi-channel programmable relay further comprises a power panel, and the power panel is respectively connected with the main board, the control panel and the key display panel. The power panel provides power for the main board, the control panel and the key display panel.
The multi-channel programmable relay is provided with a plurality of input circuits and output circuits, the input circuits and the output circuits form a plurality of channels, the multi-channel programmable relay can meet the requirement of inputting a plurality of external signals to control the relay K of the output circuits to open or close, and the multi-channel programmable relay is high in bearing capacity; in the application process, part of the input circuits and the output circuits can be selected and used according to requirements, and all the input circuits and the output circuits can be used simultaneously, so that the use is flexible and convenient.
The common end COM of the input circuit is connected with the toggle switch, so that a power supply VDD1 and a power supply VDD2 connected to the common end COM of the input circuit can be switched through the toggle switch, the voltage of the common end COM of the input circuit is further switched, and the high-level input and low-level input of the input circuit are identified by the MCU processor, so that the multichannel programmable relay can be used under different conditions.
According to the multichannel programmable relay, the input circuit and the output circuit respectively adopt the optical coupler U1 and the optical coupler U2 to transmit signals, and when the optical coupler U1 and the optical coupler U2 transmit signals, the MCU processor can be effectively protected from being damaged due to interference due to the isolation effect of the optical couplers. IN the input circuit, a transient diode TVS is also connected between the input end IN of the input circuit and the common end COM IN series, and the arrangement of the transient diode TVS can effectively prevent the input end IN of the input circuit and the common end COM from being short-circuited manually to cause circuit damage, so that the safety of the circuit can be greatly improved. In the output circuit, the setting of the diode D can be after the relay K of the output circuit is powered off, the current of the coil of the relay K can be passed through by the diode D, so that the relay K is protected, and the relay K is prevented from being damaged. The multi-channel programmable relay can greatly improve the safety and the reliability of the circuit through the arrangement.
Drawings
FIG. 1 is a functional block diagram of a multi-channel programmable relay according to the present invention;
FIG. 2 is a circuit diagram of an input circuit of the multi-channel programmable relay of the present invention;
FIG. 3 is a circuit diagram of the toggle switch of the multi-channel programmable relay of the present invention;
FIG. 4 is a circuit diagram of the input circuit and toggle switch connections of the multi-channel programmable relay of the present invention;
FIG. 5 is a circuit diagram of the output circuit of the multi-channel programmable relay of the present invention, wherein the relay K is a single pole double throw relay;
FIG. 6 is a circuit diagram of the output circuit of the multi-channel programmable relay of the present invention, wherein the relay K is a single pole, single throw relay;
fig. 7 is a flow chart of the operation of the multi-channel programmable relay of the present invention.
Detailed Description
The preferred embodiments of the multi-channel programmable relay of the present invention will be described in detail below with reference to the accompanying drawings:
as shown in fig. 1 to 5, a multi-channel programmable relay includes an MCU processor 1, a memory 2, a clock chip 3, a watchdog chip 4, a communication chip 5, eight input circuits 6, eight output circuits 7, and an auxiliary interface circuit 8, where the memory 2, the clock chip 3, the watchdog chip 4, the communication chip 5, the input circuits 6, the output circuits 7, and the auxiliary interface circuit 8 are all in communication connection with the MCU processor 1; wherein the content of the first and second substances,
the input circuit 6 comprises a resistor, a transient diode TVS, an optical coupler U1, an input circuit input end IN and an input circuit output end GPIO1, wherein the light emitting side of the optical coupler U1 comprises diodes which are opposite IN two directions and are connected IN parallel, a resistor R1 is connected IN series between the input circuit input end IN and the anode of the light emitting side of the optical coupler U1, a resistor R2 is connected IN series between the anode and the cathode of the light emitting side of the optical coupler U1, a transient diode TVS is connected IN series between the cathode of the light emitting side of the optical coupler U1 and the input circuit input end IN, the collector of the photosensitive side of the optical coupler U1 is connected with the input circuit output end GPIO1, the input circuit output end GPIO1 is connected with the MCU processor 1, a resistor R3 is connected IN series between the input circuit output end 1 and a power supply VCC1, and the emitter of the photosensitive side of the optical coupler U1 is grounded; a negative electrode of a light emitting side of the optocoupler U1 is used as a common terminal COM, the common terminals COM of all the input circuits 6 are connected with a toggle switch 61, and the toggle switch 61 is connected with a power supply VDD1 and a power supply VDD 2;
the output circuit 7 consists of a resistor, a diode D, NPN, a triode T, an optocoupler U2, a relay K and an output circuit input end GPIO2, the input end GPIO2 of the output circuit is connected with the MCU processor 1, the input end GPIO2 of the output circuit is connected with the negative electrode of the light-emitting side of the optocoupler U2, a resistor R4 is connected in series between the positive electrode of the light-emitting side of the optical coupler U2 and a power supply VCC2, a resistor R5 is connected in series between the collector of the light-sensing side of the optical coupler U2 and a power supply VCC3, a resistor R6 is connected between the emitter of the light-sensing side of the optocoupler U2 and the ground in series, a resistor R7 is also connected between the emitter of the light-sensing side of the optocoupler U2 and the base of the NPN triode T in series, the emitting electrode of the NPN triode T is grounded, the relay K is provided with a coil, the coil of the relay K and the diode D are connected between the collector electrode of the NPN triode T and the power supply VCC4 in parallel, and the collector electrode of the anode of the diode D of the NPN triode T is connected.
In the multi-channel programmable relay, the MCU processor 1 is a 32-bit processor. The 32-bit processor integrates a plurality of interfaces, such as PWM, interrupt, I2C bus, SPI bus, UART interface and the like, and when the 32-bit processor is used in the multichannel programmable relay, the design requirement can be met, and the cost performance is relatively high.
The memory 2 of the multi-channel programmable relay comprises a Flash memory 21 and an EEPROM memory 22. The Flash memory 21 has the characteristic of fast writing and erasing, and is mainly used for storing a control program written by a user and an operating state; the EEPROM memory 22 has a power-down holding function and is mainly used for storing internal parameters of the Chinese programmable relay.
In the multi-channel programmable relay, the clock chip 3 is a clock chip with the model of RTC 8010; the watchdog chip 4 is a watchdog chip with the model of MAX 706; the communication chip 5 is a communication chip with the model number of ADM 3202.
When the multichannel programmable relay is used, an external signal is input from the input circuit input end IN of the input circuit 6, and the MCU processor 1 sends a corresponding control signal to the output circuit 7 according to the external signal input by the input circuit 6, so that the relay K of the output circuit 7 is opened or closed.
Specifically, after an external signal is input by the input circuit input end IN of the input circuit 6, voltage division is performed by a resistor R1 and a resistor R2, voltage is provided for the light emitting side of the optocoupler U1 after voltage division, and then the optocoupler U1 transmits the signal to the MCU processor 1 connected with the input circuit output end GPIO1 IN an electro-optic-electrical manner.
According to the multichannel programmable relay, after receiving a signal input by the input circuit 6, the MCU processor 1 sends a control signal to the output circuit 7 according to the received signal, specifically, the control signal output by the MCU processor 1 is input into the output circuit 7 through the GPIO2 input end of the output circuit, the control signal of the MCU processor 1 is transmitted to the base electrode of the NPN triode T in an electro-optic-electric mode through the optocoupler U2, and the control signal controls the on and off of the NPN triode T by controlling the voltage of the base electrode of the NPN triode T, so that the power on or off of a coil of the relay K is controlled, and the on and off of the relay K are controlled.
The multi-channel programmable relay is provided with a plurality of input circuits 6 and output circuits 7, the input circuits 6 and the output circuits 7 form a plurality of channels, the multi-channel programmable relay can meet the requirement of inputting a plurality of external signals to control the opening or closing of the relay K of the output circuits 7, and the multi-channel programmable relay is high in bearing capacity; in the application process, according to the requirement, part of the input circuit 6 and the output circuit 7 can be selected and used, and all the input circuit 6 and the output circuit 7 can be used simultaneously, so that the use is flexible and convenient.
The multi-channel programmable relay of the invention can switch the power supply VDD1 and the power supply VDD2 connected to the common end COM of the input circuit 6 through the toggle switch 61 by connecting the common end COM of the input circuit 6 with the toggle switch 61, further switch the voltage of the common end COM of the input circuit 6, and switch the identification of the high level input and the low level input of the input circuit 6 by the MCU processor 1, so as to be applicable to different situations.
According to the multichannel programmable relay, the input circuit 6 and the output circuit 7 respectively adopt the optical coupler U1 and the optical coupler U2 to transmit signals, and when the optical coupler U1 and the optical coupler U2 transmit signals, the MCU processor 1 can be effectively protected from being damaged due to interference due to the isolation effect of the optical couplers. IN the input circuit 6, a transient diode TVS is also connected IN series between the input terminal IN of the input circuit and the common terminal COM, and the arrangement of the transient diode TVS can effectively prevent the input terminal IN of the input circuit and the common terminal COM from being short-circuited to cause circuit damage, thereby greatly improving the safety of the circuit. In the output circuit 7, the diode D is arranged in the output circuit 7, after the relay K of the output circuit 7 is powered off, the current of the coil of the relay K can be passed through by the diode D, so that the relay K is protected, and the relay K is prevented from being damaged. The multi-channel programmable relay can greatly improve the safety and the reliability of the circuit through the arrangement.
In the multi-channel programmable relay of the present invention, preferably, in the eight output circuits 7, the relay K of two output circuits 7 is a single-pole double-throw relay, as shown in fig. 5; the other six paths of relays K of the output circuit 7 are single-pole single-throw relays, as shown in fig. 6. The arrangement is adopted, so that different relays K can be used according to requirements to adapt to different application scenes; the multi-channel programmable relay is more flexible to use and wider in application.
The multichannel programmable relay of the invention preferably further comprises a display module 9, and the display module 9 is in communication connection with the MCU processor 1. The display module 9 is arranged so as to be manually interactive.
The multichannel programmable relay of the invention preferably further comprises a key module 10, and the key module 10 is in communication connection with the MCU processor 1. The key module 10 can facilitate the function selection by itself. The key module 10 may generally include eight keys, up, down, left, right, delete, select, confirm, and exit.
In the multi-channel programmable relay, preferably, the MCU processor 1, the memory 2, the clock chip 3, the watchdog chip 4 and the communication chip 5 are disposed on a motherboard 100; the input circuit 6, the output circuit 7 and the auxiliary machine interface circuit 8 are arranged on a control board 200; the display module 9 and the key module 10 are disposed on a key display panel 300. Each circuit can be arranged on the same PCB board, and can also be arranged on different PCB boards according to functions and reasonable partitions.
The multi-channel programmable relay further comprises a power panel 400, wherein the power panel 400 is respectively connected with the main board 100, the control panel 200 and the key display panel 300. The power supply board 400 supplies power to the main board 100, the control board 200, and the key display panel 300.
The multi-channel programmable relay is connected with the auxiliary machine through the auxiliary machine interface circuit 8, can also realize expansion, and has good expansion capability. The invention relates to a multi-channel programmable relay, wherein an auxiliary machine generally comprises an auxiliary machine control board and a state display board; an auxiliary machine input circuit and an auxiliary machine output circuit are arranged on the auxiliary machine control board, the auxiliary machine input circuit has the same structure as the input circuit 6, and the auxiliary machine output circuit has the same structure as the output circuit 7; the status display panel is typically composed of three status lights, a power status light, an operating status light and an alarm status light.
In the multi-channel programmable relay of the present invention, the position-shifting switch 61 may be an NPN or PNP position-shifting switch.
The multichannel programmable relay and the communication chip 5 are arranged, so that the product can communicate with a computer in real time and exchange data; the communication adopts standard MODBUS protocol.
The invention also provides a program running method in the MCU processor 1, as shown in FIG. 7, comprising the following steps:
s1, after the multichannel programmable relay is electrified and reset, initializing operation is carried out, wherein the initializing operation comprises the following steps:
s1.1, the MCU processor 1 initializes a system clock by reading with the clock chip 3;
s1.2, the MCU processor 1 carries out memory initialization by loading parameters into the EEPROM memory 22;
s1.3, initializing interruption; the process of interrupt initialization includes:
s1.3.1, clearing the event mark for recording the running state of the user program; the event identifier belongs to a temporary state record, and needs to be cleared once before a program is initialized or re-run, and then when an event is triggered in the running process of a user program, the event identifier immediately applies for interruption to the MCU processor 1, and executes related operations, such as changing the output state of the output circuit 7;
s1.3.2, the MCU processor 1 clears the counter in it;
s1.3.3, the MCU processor 1 carries out zero clearing processing to the timer in the MCU processor;
s1.3.4, the MCU processor 1 scans the state of the input circuit 6; before the user program runs, scanning the state of the input circuit 6, and when the state of the input circuit 6 changes, namely an interrupt is generated, the MCU processor 1 immediately responds to the interrupt and executes the related program to run;
s1.3.5, the MCU processor 1 scans the key module 10; the key scanning belongs to the interruption of user operation, when an operator performs key operation, modifies program parameters or starts/stops program operation, the interruption is generated, and the MCU processor 1 immediately responds to the key interruption to perform related operation;
s1.3.6, analyzing and processing network; when the MCU processor 1 communicates with an external device through the communication chip 5, the external device sends a command frame to the communication chip 5 through a serial port, after the communication chip 5 receives the command frame sent by the external device, the communication chip 5 immediately applies for an interrupt service to the MCU processor 1, and after the interrupt service is responded, the MCU processor 1 sends a status frame message back to the external device through the communication chip 5 to respond, so that a communication function is realized;
s1.3.7, interrupt return;
s1.4, the MCU processor 1 initializes the watchdog chip 4, namely, initializing the watchdog; the watchdog initialization is also called watchdog setting, and mainly initializes a watchdog feeding time interval and interrupt service generated after the watchdog feeding fails, specifically, the MCU processor 1 feeds the watchdog regularly through software, if the watchdog feeding succeeds, it indicates that the program is running normally, if the watchdog feeding fails, it indicates that the program enters a dead cycle or other faults, and at this time, it enters the watchdog interrupt service program, resets the system and restarts the initialization;
s2, after the initialization operation is finished, the MCU processor 1 judges whether the user program relates to the auxiliary machine according to the internal setting;
s3, the MCU processor 1 judges whether the user program relates to the auxiliary machine according to the internal setting, if not, the display module 9 is initialized; the display module 9 is initialized, including:
s3.1, opening the backlight of the display module 9;
s3.2, processing basic items of a display menu;
s3.3, processing key event;
s3.4, monitoring parameters and displaying a menu;
s3.5, returning;
s4, after the display module 9 is initialized, the communication chip 5 is initialized; wherein, the initialization step of the communication chip 5 comprises:
s4.1, obtaining data of a communication data buffer area;
s4.2, after the data of the communication data buffer area is obtained, judging whether the obtained data of the communication data buffer area is a complete data string; if the data string is complete, protocol analysis is carried out, after the protocol analysis is finished, data processing is carried out to generate a return frame, and the data processing is carried out to generate the return frame, namely, the return is carried out; if the data string is not complete, directly returning;
s5, after the communication chip 5 is initialized, equipment is initialized; wherein, the step of device initialization includes:
s5.1, initializing a functional interface of the MCU processor 1;
s5.2, initializing the input quantity of the input circuit 6 according to the configuration parameters of the user program; specifically, the MCU processor 1 initializes the input channel state (on/off) of the input circuit 6, and when a user program runs and triggers an event that the input channel state of the input circuit 6 changes, the event identifier applies for an interrupt to the MCU processor 1, and an interrupt program is executed to change the channel state of the input circuit 6;
s5.3, initializing the output quantity of the output circuit 7 according to the configuration parameters of the user program; specifically, the MCU processor 1 initializes the output channel state (on/off) of the output circuit 7, and when a user program runs and triggers an event that the output channel state of the output circuit 7 changes, an event identifier applies for an interrupt to the MCU processor 1, and an interrupt program is executed to change the channel state of the output circuit 7;
s5.4, initializing a counter in the MCU processor 1; initializing the number of counters and the counting mode which are required to be used in the MCU processor 1 according to the running program of the Flash memory 21, wherein after initialization, when the program runs subsequently, the counters in the MCU processor 1 can be changed by a user, and when the program is changed, interruption is generated, and initialization is performed again;
s5.5, initializing a timer in the MCU processor 1; initializing the number and timing duration of timers to be used in the MCU processor 1 according to the running program of the Flash memory 21, wherein after initialization, the timers in the MCU processor 1 are possibly changed by a user when the program runs subsequently, and when the program is changed, interruption is generated and initialization is performed again;
s6, key operation and menu operation processing: when any key is pressed down, triggering and opening a background light of the display module 10, entering display menu item processing, calling configuration parameters in an operation program of the Flash memory 21 by the MCU processor 1, entering a corresponding menu page, then continuously scanning related operations carried out by the key module 9, entering key event processing, carrying out corresponding processing according to different key events, monitoring and displaying parameters and menus, and refreshing the content of a state display column under the display page; the Chinese interface is realized by the MCU processor 1 performing code conversion according to a Chinese driving Chinese character library function of the display module 10, Chinese characters are presented in front of a user, and the inside of a program is realized by code conversion, and the library function of the Chinese character library is called to realize conversion;
s7, logic network analysis and processing: after the initialization of a counter in the MCU processor 1 is completed, the internal program of the MCU processor 1 analyzes the logic of an input network and an output network in real time, performs calculation processing according to real-time switching value and time count, generates a set, drives the output circuit 7 to output a corresponding logic operation result, and finally controls external equipment to start and stop according to a program flow; in the logic network analysis, the MCU processor 1 adopts a polling fixed mode to carry out analysis;
s8, communication processing: the MCU processor 1 scans the data reception of the communication chip 5 at regular time in a power-on state, judges whether the command frame is a complete data string conforming to the MODBUS protocol or not when receiving the command frame sent by the upper computer, analyzes the protocol of the command frame if the command frame conforms to the MODBUS protocol, processes and packs the data required by the command frame to generate a return frame, responds through the communication chip, and sends the return frame back to other communication peripherals;
s9, feeding the dog with the watchdog;
s10, the MCU processor 1 determines whether the user program is related to the sub-unit according to the internal settings, and if so, it goes to step S5 directly.
The multi-channel programmable relay adopts the programming of a full Chinese interface, is closer to the domestic use environment compared with the similar products which adopt a ladder diagram programming mode at home abroad and can be handed only by professional technical training, and can write the control program of the multi-channel programmable relay almost without threshold on the premise of mastering logic control.
It will be apparent to those skilled in the art that various modifications, additions, substitutions, and the like can be made without departing from the spirit of the invention and these are therefore considered to be within the scope of the invention.

Claims (10)

1. A multi-channel programmable relay, characterized by: the intelligent television receiver comprises an MCU processor, a memory, a clock chip, a watchdog chip, a communication chip, a plurality of input circuits, a plurality of output circuits and an auxiliary machine interface circuit, wherein the memory, the clock chip, the watchdog chip, the communication chip, the input circuits, the output circuits and the auxiliary machine interface circuit are respectively in communication connection with the MCU processor; the input circuit comprises a resistor, a transient diode TVS, an optical coupler U1, an input circuit input end IN and an input circuit output end GPIO1, wherein the light emitting side of the optical coupler U1 comprises diodes which are opposite IN two directions and are connected IN parallel, a resistor R1 is connected IN series between the input circuit input end IN and the anode of the light emitting side of the optical coupler U1, a resistor R2 is connected IN series between the anode and the cathode of the light emitting side of the optical coupler U1, a transient diode TVS is connected IN series between the cathode of the light emitting side of the optical coupler U1 and the input circuit input end IN, the collector of the photosensitive side of the optical coupler U1 is connected with the input circuit output end GPIO1, the input circuit output end GPIO1 is connected with the MCU processor, a resistor R3 is connected IN series between the input circuit output end 1 and a power supply VCC1, and the emitter of the photosensitive side of the optical coupler U1 is grounded; a negative electrode of a light emitting side of the optocoupler U1 is used as a common terminal COM, the common terminals COM of all the input circuits are connected with a toggle switch, and the toggle switch is connected with a power supply VDD1 and a power supply VDD 2; the output circuit consists of a resistor, a diode D, NPN triode T, an optocoupler U2, a relay K and an output circuit input end GPIO2, the input end GPIO2 of the output circuit is connected with the MCU processor, the input end GPIO2 of the output circuit is connected with the negative electrode of the light-emitting side of the optocoupler U2, a resistor R4 is connected in series between the positive electrode of the light-emitting side of the optical coupler U2 and a power supply VCC2, a resistor R5 is connected in series between the collector of the light-sensing side of the optical coupler U2 and a power supply VCC3, an emitter of a light sensing side of the optocoupler U2 is connected with a resistor R6 in series with the ground, an emitter of a light sensing side of the optocoupler U2 is also connected with a resistor R7 in series with the base of the NPN triode T, the emitting electrode of the NPN triode T is grounded, the relay K is provided with a coil, the coil of the relay K and the diode D are connected between the collecting electrode of the NPN triode T and the power supply VCC4 in parallel, and the collecting electrode of the NPN triode T at the positive electrode of the diode D is connected.
2. The multi-channel programmable relay of claim 1, wherein: the number of the input circuits and the number of the output circuits are eight respectively.
3. The multi-channel programmable relay of claim 2, wherein: in the eight output circuits, the relay K of the two output circuits is a single-pole double-throw relay; and the relays K of the other six output circuits are single-pole single-throw relays.
4. The multi-channel programmable relay of claim 1, wherein: the MCU processor is a 32-bit processor.
5. The multi-channel programmable relay of claim 1, wherein: the memory comprises a Flash memory and an EEPROM memory.
6. The multi-channel programmable relay of claim 1, wherein: the clock chip is a clock chip with the model of RTC 8010; the watchdog chip is a watchdog chip with the model of MAX 706; the communication chip is a communication chip with the model ADM 3202.
7. A multi-channel programmable relay according to claim 1, characterized in that: the display module is in communication connection with the MCU processor.
8. The multi-channel programmable relay of claim 1, wherein: the MCU processing device further comprises a key module, and the key module is in communication connection with the MCU processor.
9. The multi-channel programmable relay of claim 1, wherein: the display module and the key module are respectively in communication connection with the MCU processor; the MCU processor, the memory, the clock chip, the watchdog chip and the communication chip are arranged on a mainboard; the input circuit, the output circuit and the auxiliary machine interface circuit are arranged on a control board; the display module and the key module are arranged on a key display panel.
10. The multi-channel programmable relay of claim 9, wherein: the multi-channel programmable relay further comprises a power panel, and the power panel is connected with the main board, the control panel and the key display panel respectively.
CN202210281248.4A 2022-03-22 2022-03-22 Multi-channel programmable relay Pending CN114551154A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210281248.4A CN114551154A (en) 2022-03-22 2022-03-22 Multi-channel programmable relay

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210281248.4A CN114551154A (en) 2022-03-22 2022-03-22 Multi-channel programmable relay

Publications (1)

Publication Number Publication Date
CN114551154A true CN114551154A (en) 2022-05-27

Family

ID=81664648

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210281248.4A Pending CN114551154A (en) 2022-03-22 2022-03-22 Multi-channel programmable relay

Country Status (1)

Country Link
CN (1) CN114551154A (en)

Similar Documents

Publication Publication Date Title
CN202166887U (en) Distribution type control system based on internet of things
JPH06501376A (en) Distribution board equipment with improved control
CN105243988A (en) Embedded LED display controller
CN100499766C (en) Quick starting TV set capable of implementing standby low power dissipation
CN101083669A (en) Computer network isolated system and its control and switch method
CN101097563A (en) System and method for realizing board centralized management and controlling
CN107172304B (en) A kind of mobile terminal power consumption detection method and mobile terminal
CN102354261A (en) Remote control system for power supply switches of machine room servers
CN106444413A (en) Smart home control method and device and router
CN217114231U (en) Multichannel programmable relay
CN114551154A (en) Multi-channel programmable relay
CN206991177U (en) A kind of all-in-one
CN211670869U (en) Broken line restarting 4G router control equipment for full network access
CN102625170A (en) STB (Set Top Box) and method for realizing plug and play of tuning demodulator
CN207780714U (en) A kind of display device and electronic equipment
CN208172648U (en) A kind of intelligent interaction plate
CN113467333B (en) Startup control circuit and startup control method
CN112860047A (en) Intelligent wearable terminal device with dual-system cooperative work
CN101193241B (en) A TV set scheduled task control method and TV set
CN208890822U (en) It is a kind of with the RFID electronic wiring frame system identified safely
CN202904320U (en) Intelligent household control system
CN201114132Y (en) Computer network isolated system
CN108873746A (en) A kind of control method for showing equipment and showing equipment
CN114880035B (en) Startup and shutdown system
CN219659748U (en) SDN switch of Internet of things

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination