Rail transit control module relay multi-way expansion control device and control method thereof
By using a multi-channel extension control device for rail transit control modules and employing I2C and RS485 communication protocols, cascaded control of multiple relays is achieved, solving the problem that single-channel control cannot meet the needs of multi-channel connection, reducing costs and improving testing efficiency.
Patent Information
- Application Number
- CN202211725704.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-30
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2042-12-30
AI Technical Summary
In existing technologies, relay control is a fixed single-channel control, which cannot meet the needs of multi-channel connection and requires additional IO driver boards, increasing costs.
By designing a multi-channel extension control device for rail transit control modules, using the I2C communication protocol, RS485 and RS232 driver modules, the device achieves cascading of multiple relay modules, utilizes an MCU module and an IO driver module for control, and integrates an optocoupler acquisition module for signal acquisition.
It enables the cascading of multiple relays, reducing the procurement cost of I/O control boards and improving the ability to quickly set up the test environment and the response speed.
Smart Images

Figure CN116107246B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to a rail transit control module relay multi-way expansion control device and a control method thereof. BACKGROUND
[0002] At present, the relay control is fixed single-way control, which needs external IO drive and cannot meet the actual multi-way connection use demand.
[0003] Because the prior art needs an additional IO drive board to drive the relay board, the additional drive board greatly increases the cost, and the existing relay board cannot cascade multiple relay boards, and can only control the corresponding number of relays according to the number of IO of the board. SUMMARY
[0004] The purpose of the present application is to overcome the shortcomings of the prior art and provide a rail transit control module relay multi-way expansion control device and a control method thereof.
[0005] The purpose of the present application is achieved by the following technical solutions:
[0006] The rail transit control module relay multi-way expansion control device is characterized in that: the RX and TX signal pins of the communication interface are connected to the RX1 and TX1 signal pins of the address encoder for communication in the I2C communication protocol; the output voltage VCC of the power supply circuit is connected to the address encoder; the RX and TX signal pins of the address encoder are connected to the RX and TX signal pins of the RS485 control module and connected to the RS232 drive module; the RS485 control module is in communication connection with the MCU module; the RS232 drive module is in communication connection with the MCU module; the MCU module is connected to the IO drive module one and the IO drive module two; the IO drive module one is connected to the multi-way relay module; the IO drive module two is connected to the multi-way relay module; the multi-way relay module is connected to the input and output interface; the optocoupler collection module is connected to the MCU module; and the input and output interface is connected to the optocoupler collection module.
[0007] Further, the rail transit control module relay multi-way expansion control device, wherein the RS485 control module is an RS485 signal control module of model MAX13487EESA+.
[0008] Further, the rail transit control module relay multi-way expansion control device, wherein the RS232 drive module is an ULN2803LW high-voltage high-current IO module.
[0009] Further, the rail transit control module relay multi-way expansion control device, wherein the IO drive module one and the IO drive module two are ULN2803LW high-voltage high-current IO modules.
[0010] Further, the rail transit control module relay multiplexing control device, wherein the MCU module is a model MEGA328P program writing chip.
[0011] Further, the rail transit control module relay multiplexing control device, wherein the input and output interface is connected with the optocoupler collection module through the connector J5.
[0012] The rail transit control module relay multiplexing control method, the hardware serial port of external I2C communication is connected with the communication pins TX and RX of the communication interface; the power supply circuit is powered by the 24VDC provided by the external DC direct current process control power supply through the J6 interface, and the power supply circuit converts the 24VDC into the 5VDC power supply voltage required by the board card, and the 5VDC power supply voltage is respectively supplied to the address encoder module, the RS485 control module, the RS232 driving module, the MCU module, the IO driving module one, the IO driving module two, the multi-relay module, and the optocoupler collection module; the address encoder is started by the voltage provided by the power supply circuit, the TX1 and RX1 communication signals set the address of the external board card required for communication according to the working requirement, the TX and RX signal pins are respectively connected with the RS485 control module for communication, the RS485 control module is connected with the MCU program control module for communication; the address encoder is connected with the RS232 driving module for communication driving and receiving communication signals, and is connected with the MCU module for communication; the MCU module is connected with the RS485 control module for communication through the I2C protocol, the MCU module is respectively connected with the IO driving module one and the IO driving module two for communication connection; the IO driving module one and the IO driving module two are connected with the multi-relay module circuit through two groups of signals; the MCU module identifies the state of the tool product through the signals collected by the optocoupler collection module, when Input1 collects high level 1, the MCU VCC is started, the MCU works, when Input1 collects low level 0, the MCU VCC is not started, and the MCU does not work; the multi-relay module selects different modes for output according to the requirements of the system environment, and the output is connected with the external circuit through the 12 pins OUTPUT of the relays K1-K16 and the output modules J1 and J2 of the input and output interface, the input signal is also input through the J1 and J2 interfaces, the signal is collected through the optocoupler collection module, and the MCU module works in a cycle.
[0013] Compared with the prior art, the present application has the advantages and beneficial effects, which are embodied in the following aspects:
[0014] This invention's board has a cascading function, which can be easily used in multi-channel cascading; it realizes circuit module integration, reducing cost investment; it can greatly reduce the purchase of IO control boards, significantly reducing costs; it is easy to quickly set up a test environment and has a timely response speed, thus quickly meeting the customer's test needs.
[0015] Other features and advantages of the invention will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing specific embodiments of the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the written description. Attached Figure Description
[0016] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 : Circuit block diagram of the present invention. Detailed Implementation
[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0019] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this invention, directional and ordinal terms are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0020] like Figure 1 As shown, the rail transit control module relay multi-channel expansion control device connects the RX and TX signal pins of communication interface 1 to the RX1 (pin4 & pin6) and TX1 (pin3 & pin5) signal pins of address encoder 3 for communication via the I2C communication protocol.
[0021] The output voltage VCC of PS1 of the power supply circuit 2 is connected to R18 (pin1) and R17 (pin2) of the address encoder 3, to drive the power supply for the operation of the unit module circuit;
[0022] The RX and TX signal pins of the address encoder 3 are connected to RX (pin1) and TX (pin4) of the RS485 control module 4, and to T2IN (pin10) and R2OUT (pin9) of the RS232 drive module 5, to select and output the operation of the board card with different address requirements;
[0023] The RX / RO (pin1) and TX4 / DI (pin4) of the RS485 control module 4 are in communication connection with PD0 / RX (pin30) and PD1 / RX (pin31) of the MCU module 6, to realize the control communication and output of different board cards through the protocol;
[0024] The T2OUT / TXD (pin7) and R2IN / RXD (pin8) of the RS232 drive module 5 are in communication connection with PD1 / TX (pin31) and PD0 / RX (pin30) of the MCU module 6, to realize the control communication and output of different board cards through the protocol;
[0025] IN1-IN8 (pin32 / 1 / 2 / 9 / 10 / 11 / 23 / 24) of the MCU module 6 are connected to IN1-IN8 (pin8-1) of the U28-IO module 7, and IN9-IN12 & IN15-IN18 (pin25-28 & pin14-17) of the MCU module 6 are connected to IN1-IN8 (pin8-1) of the U31-IO module 8, to realize the communication and output required by different protocols through writing the MCU program;
[0026] OUTPUT1-OUTPUT8 (pin18-11) of the IO drive module one 7 are connected to pin12 of K1A-K8A of the multi-relay module 9, to output OUTPUT1-OUTPUT8 of different channels through the MCU reading the set address and communication protocol;
[0027] OUTPUT1-OUTPUT8 (pin18-11) of the IO drive module two 8 are connected to pin12 of K9A-K16A of the multi-relay module 9, to output OUTPUT1-OUTPUT8 of different channels through the MCU reading the set address and communication protocol;
[0028] The OUTPUT1-OUTPUT16 output signals of the multipath relay module 9 output signals to the signal board required for testing through the input-output interface 11, and output different modules according to the communication protocol requirements, and support 2-wire (16*2), 4-wire (8*4) and A / B arbitrary mode output respectively;
[0029] The U4 (pin4) U5 (pin4) of the optocoupler collection module 10 is connected with the PB0 (pin12) PB1 (pin13) of the MCU module 6, and the test requirements of the MCU module are realized through different collection signals;
[0030] The input-output interface 11 is connected with the U4&U5 (pin1-2) of the optocoupler collection module 10 through the external connector J5, and the output of the external different module requirements and the writing of the internal same protocol requirements are used.
[0031] In specific application, the hardware serial port of external I2C communication is connected with the communication pins TX and RX of the communication interface 1; the power supply circuit 2 is powered by the external DC process control power supply providing 24VDC through the J6 interface to the power supply circuit 2, and the power supply circuit 2 converts 24VDC into 5VDC power supply voltage required by the board card through the power supply conversion chip in the circuit, and the 5VDC power supply voltage is supplied to the IN13&IN14 pins of the address encoder module 3, the VCC&VDD pins of the RS485 control module 4 and the RS232 driving module 5, the VCC&AVCC pins of the MCU module 6, the COMD pins of the IO driving module one 7 and the IO driving module two 8, the VCC pin of the multi-relay module 9, and the R28&R29 pins of the optocoupler collection module 10; the address encoder 3 is started by the voltage provided by the power supply circuit 2, the TX1 and RX1 communication signals are set according to the working needs to communicate with the external board card, the TX and RX signal pins are respectively communicated with the RO and DI pins of the RS485 control module 4, the RS485 control module 4 is communicated with the MCU process control module 6; the address encoder 3 is synchronized with the T2IN and R2OUT pins of the RS232 driving module 5 for communication driving and receiving communication signals, and is communicated with the PD1 / TX and PD0 / RX of the MCU module 6; the IC1 of the MCU module 6 is communicated with the corresponding RS485 control module 4 through the I2C protocol through the PD1 / TX and PD0 / RX, realizes reading program requirements through the IN1-IN18 of the ICT of the MCU module 6, and is respectively communicated and connected with the IO driving module one 7 and the IO driving module two 8; the OUTPUT1-OUTPUT8 of the chips U28 and U31 of the IO driving module one 7 and the IO driving module two 8 are connected with the multi-relay module circuit in two groups of signals; whether the MCU module 6 works or not is identified by the signal collected by the optocoupler collection module 10, when Input1 collects high level 1, the MCU VCC is started, the MCU works, when Input1 collects low level 0, the MCU VCC is not started, and the MCU does not work; the multi-relay module 9 selects different modes according to the requirements of the system environment to output, and the 12 pins OUTPUT of the relays K1-K16 and the output modules J1 and J2 of the input-output interface 11 are connected to output to the external circuit, the input signals are also input through the J1 and J2 interfaces, the signals are collected by the optocoupler collection module 10, and the MCU module 6 is made to work in a cycle.
[0032] Power module 2, through the connector J6 connection external 24V access, power module 2 conversion output DC5V, interface JP6 two pin output voltage VCC; VCC voltage pin respectively assigned to the INPUT optocoupler acquisition module circuit 10 of R28 and R29 the second pin, to the INPUT acquisition circuit provides DC5V voltage; pin1 and Pin2 for address encoder 3 through R18 and R17 for current limiting to the chip power supply pin IN13 and IN14 provide power drive voltage; for RS232 drive circuit 5 of U3 pin2 and pin16 through C5 power filter for U3 chip to provide drive power; for R485 control module 4 through J4 interface point to the RS485 control module provides power drive voltage; for MCU module 6 of IC1 chip pin4&6&18 power supply pin provides power drive voltage; for IO drive module one 7, IO drive module two 8 of U28 and U31 pin10 provides power drive voltage; for the K1-K16 relay of multi-channel relay module 9 of pin1 foot provides power drive voltage, to realize the drive voltage required by different circuit modules work.
[0033] According to the requirements of using different environment, set the board card synchronous support RS232 drive module 5 and RS485 control module 4, realize support between board card cascade, most load can realize 32 way communication node, communication rate: 19200bps, N, 8, 1; Board card realizes RS485 control module 4, communication address setting: the default address of the board card is '4', that is, the first-4th bit of address encoder "BoardID" (red dial switch) are all in OFF position. Based on the consideration of firmware design, the product retains the first and fourth bit switch setting authority of the encoder, only opens the setting function of the second and third bit, so this kind of board card can only cascade 4 pieces of board card synchronous work in a link.
[0034] According to the working environment connection corresponding communication module, through the address encoder 3 to realize the setting of address, according to the address setting to start the corresponding address program control external board card; The specific setting method of RS485 control module 4 communication address: hardware address setting, when the 2nd and 3rd positions of the encoder are in OFF position, the board card address is: '4'; When the 2nd position of the encoder is in ON position and the 3rd position is in OFF position, the board card address is: '5'; When the 2nd position of the encoder is in OFF position and the 3rd position is in ON position, the board card address is: '6'; When the 2nd position of the encoder is in ON position and the 3rd position is in ON position, the board card address is: '7'. Address setting: this module supports address setting 1-F, among which 4, 5, 6 and 7 are reserved for hardware setting, which takes effect when the address is set to 0. Address setting instruction: (important: this instruction is a transparent instruction and does not support ID identification, so it can only be set individually on a single board), CFIDx$: X=ID address, range 0-F, note that when the address is set to 0, it is an address disable identifier, then the board card will automatically switch to the hardware address range 4, 5, 6 and 7) GBID?: board ID query instruction, used after the board card address is set, for ID confirmation.
[0035] MCU module 6 collects the input signal state through optical coupling acquisition module 10, writes the corresponding signal through the program written in MCU, and outputs 1-8 through IO drive module 1 and IO drive module 2 8, 2 groups of output signals are connected to the channel of multi-relay module 9 to realize 2-wire mode output K1-K16 relay output mode work, 4-wire mode output K1 / K9-K8 / K16 relay output mode work, A / B multiplexing mode output, A group of relays: K1-K2-K8, signal link, B group of relays K9-K10-K16, signal link, to realize control output work according to different environmental requirements.
[0036] Through the program of MUC module 6, different use requirements are met according to different use requirements. In product design, the expandability of product circuit is considered in advance, RS485 control module 4 is added, considering that users need to add an RS485 adapter in RS485 mode, so a RS232 to RS485 circuit is added on the product, which greatly improves the practicability and selection convenience of users; Through the setting of different address instructions, communication is realized, and multiple board cards are realized. Synchronous control is realized, each address controls 32-way output, and 128-way output control is realized by synchronizing 4 addresses, effectively realizing multi-way connection output use, realizing circuit integration, effectively reducing the investment of use cost, and realizing maximum multi-way output.
[0037] The board card has a cascade function, can be conveniently used in multi-cascade, realizes circuit module integration, reduces cost investment, can greatly reduce IO control board card purchase, significantly reduces cost, is easy to quickly build a test environment, timely response speed, thereby can quickly meet the test demand of customers.
[0038] The above only describes the preferred embodiments of the present application and is not used to limit the present application. For those skilled in the art, the present application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application. It should be noted that similar reference numbers and letters represent similar items in the following drawings, therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.
[0039] The above only describes the preferred embodiments of the present application and is not used to limit the present application. For those skilled in the art, the present application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application. It should be noted that similar reference numbers and letters represent similar items in the following drawings, therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.
[0040] It should be noted that, in this document, relational terms such as first and second and the like can be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises", "comprising", or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without limitation, an element preceded by "comprises... a" does not, without more constraints, foreclose the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.
Claims
1. A rail transit control module relay multiplex expansion control method, characterized in that: The RX and TX signal pins of the communication interface (1) are connected with the RX1 and TX1 signal pins of the address encoder (3) to communicate in the I2C communication protocol; the output voltage VCC of the power supply circuit (2) is connected to the address encoder (3); the RX and TX signal pins of the address encoder (3) are connected with the RX and TX signal pins of the RS485 control module (4) and connected with the RS232 driving module (5); the RS485 control module (4) is in communication connection with the MCU module (6); the RS232 driving module (5) is in communication connection with the MCU module (6); the MCU module (6) is connected with the IO driving module one (7) and the IO driving module two (8); the IO driving module one (7) is connected with the multi-channel relay module (9); the IO driving module two (8) is connected with the multi-channel relay module (9); the multi-channel relay module (9) is connected with the input and output interface (11); the optocoupler collection module (10) is connected with the MCU module (6); the input and output interface (11) is connected with the optocoupler collection module (10); The hardware serial port of external I2C communication is connected with communication pins TX and RX of the communication interface (1); the power supply circuit (2) is powered by an external DC process control power supply providing 24VDC through the J6 interface to the power supply circuit (2), which converts the 24VDC into 5VDC power supply voltage required by the board card, and the 5VDC power supply voltage is supplied to the address encoder (3), the RS485 control module (4), the RS232 drive module (5), the MCU module (6), the IO drive module one (7), the IO drive module two (8), the multi-relay module (9), and the optocoupler acquisition module (10); the address encoder (3) is started by receiving the voltage provided by the power supply circuit (2), and TX1 and RX1 communication signals set the address of the external board card required for communication according to the work requirement, and the TX and RX signal pins are respectively communicated with the RS485 control module (4), the RS485 control module (4) is communicated with the MCU module (6); the address encoder (3) is communicated with the RS232 drive module (5) for driving and receiving communication signals, and is communicated with the MCU module (6); the MCU module (6) is communicated with the RS485 control module (4) through the I2C protocol, and is respectively communicated with the IO drive module one (7) and the IO drive module two (8); the IO drive module one (7) and the IO drive module two (8) are connected with the multi-relay module circuit in two groups of signals; the MCU module (6) identifies the work state of the tool placed product by detecting the high-level signal or low-level signal input by the optocoupler acquisition module, Input1 collects high-level 1, MCU VCC is started, the MCU works, collects low-level 0, MCU VCC is not started, and the MCU does not work; the multi-relay module (9) selects different modes for output according to the requirements of the system environment, and is connected with the output module J1 and J2 of the input output interface (11) through the 12 pins OUTPUT of the relays K1-K16 and the input output interface (11) to output to the external circuit, the input signal is also input through the J1 and J2 interfaces, and the signal is collected by the optocoupler acquisition module (10) and makes the MCU module (6) work in a cycle.
2. The rail transit control module relay multi-way extension control method according to claim 1, characterized in that: The RS485 control module (4) is an RS485 signal control module of model MAX13487EESA+.
3. The rail transit control module relay multi-way extension control method according to claim 1, characterized in that: The RS232 drive module (5) is an IO module of model ULN2803LW with high voltage and high current.
4. The rail transit control module relay multi-way extension control method according to claim 1, characterized in that: The IO drive module one (7) and the IO drive module two (8) are IO modules of model ULN2803LW with high voltage and high current.
5. The rail transit control module relay multi-way extension control method according to claim 1, characterized in that: The MCU module (6) is a program writing chip of model MEGA328P.
6. The rail transit control module relay multi-way extension control method according to claim 1, characterized in that: The input output interface (11) is connected with the optocoupler acquisition module (10) through the connector J5.
Citation Information
Patent Citations
Digital heavy truck power output adjustment controller
CN102043386A
High-performance MODBUS-TI expansion module
CN108268001A
Communication interface conversion circuit
CN211319205U
Rail transit control module relay multipath expansion control device
CN219143305U