Universal input / output extension system
By designing a universal input and output expansion system, using the RS-485 protocol and hand-in-hand connection method, the problem of low flexibility and weak anti-interference ability of the GPIO expansion chip in the escape room game is solved, and the long-distance communication and anti-interference ability are improved. , reducing wiring complexity and cost.
Patent Information
- Application Number
- CN202420760795.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Priority Date
- 2023-12-19
- Filing Date
- 2024-04-14
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2034-04-14
AI Technical Summary
In an escape room game environment, existing GPIO expansion chips have low flexibility, cannot achieve long-distance communication, have weak anti-interference capabilities, complex wiring, occupy many pins, and have a low communication rate.
A universal input and output expansion system is designed, which uses a core board, input expansion board and output expansion board to achieve long-distance communication through the RS-485 protocol. It uses hand-in-hand connection to reduce the line layout and uses RJ45 standard network cables to connect. The core board and Only one network cable is needed between expansion boards, and the RS-485 protocol is used to improve anti-interference capabilities.
It can reduce wiring complexity and cost in a secret room environment, improve anti-interference ability, support long-distance communication, reduce line-to-line interference, reduce decoration and wire costs, and simplify the construction process.
Smart Images

Figure CN221884167U_ABST
Abstract
Description
Technical Field
[0001] The present application relates to an input / output expansion device, and in particular to a controller general input / output expansion device. Background Art
[0002] In the escape room game environment, the controller's internal general purpose input and output (GPIO) interface may not meet the demand, and more GPIOs are needed for input and output. There are dedicated external GPIO expansion chips in the prior art, but they are less flexible and cannot achieve GPIO expansion through simple hardware connections. They are complicated for developers and cannot achieve long-distance communication. Parallel IO expansion chips such as 74HC595 and 74HC165 occupy more pins, cannot achieve long-distance communication, have weak anti-interference capabilities, and have low communication rates. In addition, although a programmable logic controller (PLC) can be used to achieve long-distance communication through cable expansion, more wires are used, the wiring is complicated, interference will be introduced between wires, and the anti-interference ability is weak. Summary of the invention
[0003] The purpose of the present application is to provide a universal input and output expansion system, which has at least one of the advantages of supporting long-distance communication, strong anti-interference ability, and saving line layout in a closed room.
[0004] To this end, the universal input and output expansion system proposed in the present application includes a core board, which includes a main controller and a third RS-485 input and output unit coupled to the main controller; at least one input expansion board, which includes a first microcontroller, a first RS-485 input and output unit coupled to the first microcontroller, a first power supply unit, and an input interface unit; and at least one output expansion board, which includes a second microcontroller, a second RS-485 input and output unit coupled to the second microcontroller and a second power supply unit, and an output interface unit coupled to the second microcontroller through an isolation unit; wherein the first RS-485 input and output unit, the second RS-485 input and output unit, and the third RS-485 input and output unit are connected in a hand-in-hand manner.
[0005] In some embodiments, the first power supply unit includes a first 5V power supply module to power the first RS-485 input and output unit, and a first 3.3V power supply module to power the first microcontroller; the second power supply unit includes a second 5V power supply module to power the second RS-485 input and output unit, and a second 3.3V power supply module to power the second microcontroller.
[0006] In some embodiments, the first power supply unit includes a first current acquisition module for detecting the operating current of the first RS-485 input and output unit and the first microcontroller; the second power supply unit includes a second current acquisition module for detecting the operating current of the second RS-485 input and output unit and the second microcontroller.
[0007] In some embodiments, the input interface unit is a thirty-two-way input interface.
[0008] In some embodiments, the isolation unit is a thirty-two-way two-stage MOS isolation, and the output interface unit is a thirty-two-way output interface.
[0009] In some embodiments, a standard RJ45 network cable is used to realize the connection between the first RS-485 input and output unit, the second RS-485 input and output unit, and the third RS-485 input and output unit.
[0010] The beneficial effects of the present application are: the expansion system provided by the embodiments of the present invention can reduce the wiring in the room: the core board and each expansion board communicate through the RS-485 protocol, and each room only needs one network cable to connect directly to the main controller. The expansion system proposed in some embodiments of the present application has strong anti-interference ability, which is because the expansion board in each room only needs one network cable to connect to the core board, reducing the direct interference between the wires, and using the RS-485 protocol for transmission at the same time, improving the anti-interference ability. The expansion system of some embodiments of the present application can reduce the decoration and wire costs of the secret room, reduce the difficulties in the construction process through less wiring, and reduce the expensive wire costs. The expansion system proposed in some embodiments of the present application can be used for long-distance deployment: for example, the distance between different rooms allows the communication between the core board and the expansion board within 600 meters, which allows the expansion board and the core board to be directly distributed in different rooms and locations without space restrictions. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 is a schematic diagram of the structure of a universal input and output expansion system according to an embodiment of the present application;
[0012] Figure 2 is a structural principle diagram of an input expansion board of a universal input and output expansion system according to an embodiment of the present application;
[0013] Figure 3 is a structural principle diagram of an output expansion board of a universal input and output expansion system according to an embodiment of the present application;
[0014] Figure 4 A structural schematic diagram of a core board of a universal input / output expansion system according to an embodiment of the present application;
[0015] Figure 5 The present invention is a flow chart of the control of the core board to the input expansion board or the output expansion board in the universal input and output expansion system according to an embodiment of the present application. DETAILED DESCRIPTION
[0016] The specific implementation methods of the present application are described in detail below in conjunction with the accompanying drawings. In order to enable those skilled in the art to better understand the technical solutions in the present utility model, the technical solutions in the embodiments of the present utility model will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present utility model. Obviously, the described embodiments are only part of the embodiments of the present utility model, not all of the embodiments.
[0017] like Figure 1 As shown, the universal input and output expansion system proposed in the present application includes a core board 100, at least one input expansion board 200, and at least one output expansion board 300. The core board 100, the input expansion board 200, and the output expansion board 300 are connected in a hand-in-hand manner. There are many ways to connect the core board 100 and the input expansion board 200 and the output expansion board 300. Figure 1 As shown, the output end 1022 of the third RS-485 input / output interface 102 of the core board is connected to the input end 2021 of the first RS-485 input / output interface 202 of the input expansion board 200, and the output end 2022 of the first RS-485 input / output interface 202 is connected to the output end 3021 of the second RS-485 input / output interface 302. In other hand-in-hand connection modes, an output expansion board is first connected from the core board, and then the input expansion board corresponding to the output expansion board is connected. In other hand-in-hand connection modes, all input expansion boards are first connected one by one from the core board, and then all output expansion boards are connected one by one.
[0018] In some embodiments, the connection between the first RS-485 input / output unit, the second RS-485 input / output unit, and the third RS-485 input / output unit is realized by using an RJ45 standard network cable. The connection between the first RS-485 input / output unit, the second RS-485 input / output unit, and the third RS-485 input / output unit is called an RS-485 bus.
[0019] Core board
[0020] like Figure 4As shown, the core board 100 includes a main controller 101 and a third RS-485 input and output unit 102 coupled to the main controller; wherein the main controller may be an embedded processor GD32F470ZIT6; the third RS-485 input and output unit 102 includes an input terminal 1021 and an output terminal 1022. The core board 100 also includes a power module 103, a network module 104, a storage module 105, a display module 106, a CAN interface module 107, a sound module 108, and an alarm module 109 coupled to the main controller 101. Among them, the power module 103 can provide a variety of voltage outputs for powering each module; the network module 104 can be a WIFI network module for communicating with an external network board; the storage module 105 can be, for example, an SD card, etc., for storing the control program of the core board; the display module 106 can be, for example, based on an OLED screen to provide operating information of the core board; the CAN interface module 107 is used to realize communication between the core board and the CAN protocol device; the sound module 108 can be configured to provide foreground sound, background sound or a mixture of the two; the alarm module 109 can be based on a buzzer, used to provide a buzzer when the main controller needs an alarm.
[0021] Input expansion board
[0022] like Figure 2 As shown, the input expansion board 200 includes a first microcontroller 201, a first RS-485 input and output unit 202 coupled to the first microcontroller 201, a first power supply unit 203, and an input interface unit 204. Among them, the first microcontroller can be a GD32F103RGT6 single-chip microcomputer. The first RS-485 input and output unit 202 can include an input terminal 2021 and an output terminal 2022. The first power supply unit 203 can include a 5V power supply module for powering the first RS-485 input and output unit 202, and a 3.3V power supply module for powering the first microcontroller. A current acquisition module can also be included to monitor the current of the second microcontroller and the 5V power supply module. The input interface unit 204 can be a thirty-two-way input detection port for providing an expansion of the input interface. In addition, the input expansion board can also include a configuration port 205 coupled to the first microcontroller for configuring the first microcontroller.
[0023] Output expansion board
[0024] like Figure 3As shown, the output expansion board 300 includes a second microcontroller 301, a second RS-485 input and output unit 302 and a second power supply unit 303 coupled to the second microcontroller 301, and an output interface unit 305 coupled to the second microcontroller through an isolation unit 304. The second microcontroller may be a GD32F103RGT6 single-chip microcomputer. The second RS-485 input and output unit 302 may include an input terminal 3021 and an output terminal 3022. The second power supply unit 303 may include a 5V power supply module for powering the second RS-485 input and output unit 302, and a 3.3V power supply module for powering the second microcontroller. A current acquisition module may also be included for monitoring the current of the second microcontroller and the 5V power supply module. The isolation unit 304 may be a thirty-two-way two-stage MOS isolation, and the output interface unit 305 may be a thirty-two-way output control port for providing an expansion of the output interface. In addition, the output expansion board may further include a breathing light 306 coupled to the second microcontroller for displaying a working status, and a configuration port 307 for configuring the second microcontroller.
[0025] like Figure 5 As shown, the address writing operation of the core board to each expansion board includes the following process: on the core board side, the core board 100 first sends data to the RS-485 bus to start addressing the expansion board, step S01, and then waits for the expansion board to return the data of the type and quantity of the expansion board; taking the input expansion board 200 as an example, it is detected whether the address writing line is pulled low, step S201, if it is, the expansion board stores the local address, step S202, and then sends the local address and the expansion board type to the RS-485 bus, step S203; on the core board side, when there is data on the RS-485 bus, the expansion board type and quantity are recorded, step S202. After addressing, the core board can work with each expansion board.
[0026] Unless otherwise defined, the technical terms or scientific terms used herein shall have the usual meanings understood by persons with ordinary skills in the field to which the utility model belongs. The words "one" or "an" and the like used in the specification and claims of this application do not necessarily indicate a quantity limitation. The words "include" or "comprise" and the like mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. The words "connect" or "connected" and the like are not defined as physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right", etc. are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0027] Finally, it should be noted that the above is only a preferred embodiment of the utility model, which is only used to illustrate the technical solution of the utility model, and is not used to limit the protection scope of the utility model. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the utility model are included in the protection scope of the utility model.
Claims
1. A general purpose input and output expansion system, characterized in that: It includes a core board, at least one input expansion board and at least one output expansion board; the core board includes a main controller and a third RS-485 input and output unit coupled to the main controller; the input expansion board includes a first microcontroller, a first RS-485 input and output unit coupled to the first microcontroller, a first power supply unit, and an input interface unit; the output expansion board includes a second microcontroller, a second RS-485 input and output unit coupled to the second microcontroller and a second power supply unit, and an output interface unit coupled to the second microcontroller through an isolation unit; wherein the first RS-485 input and output unit, the second RS-485 input and output unit and the third RS-485 input and output unit are connected in a hand-in-hand manner.
2. The universal input / output expansion system according to claim 1, characterized in that: The output end of the third RS-485 input / output interface of the core board is connected to the input end of the first RS-485 input / output interface of the input expansion board, and the output end of the first RS-485 input / output interface is connected to the output end of the second RS-485 input / output interface.
3. The universal input / output expansion system according to claim 1, characterized in that: The core board is first connected to an output expansion board, and then connected to an input expansion board corresponding to the output expansion board.
4. The universal input / output expansion system according to claim 1, characterized in that: The core board is first connected to all input expansion boards one by one, and then connected to all output expansion boards one by one.
5. The universal input / output expansion system according to claim 1, characterized in that: The first power supply unit includes a first 5V power supply module to power the first RS-485 input and output unit, and a first 3.3V power supply module to power the first microcontroller; the second power supply unit includes a second 5V power supply module to power the second RS-485 input and output unit, and a second 3.3V power supply module to power the second microcontroller.
6. The universal input / output expansion system according to claim 1, characterized in that: The first power supply unit includes a first current acquisition module for detecting the operating current of the first RS-485 input and output unit and the first microcontroller; the second power supply unit includes a second current acquisition module for detecting the operating current of the second RS-485 input and output unit and the second microcontroller.
7. The universal input / output expansion system according to claim 1, characterized in that: The input interface unit is a thirty-two-way input interface.
8. The universal input / output expansion system according to claim 1, characterized in that: The isolation unit is a thirty-two-way two-stage MOS isolation, and the output interface unit is a thirty-two-way output interface.
9. The universal input / output expansion system according to claim 1, characterized in that: The first RS-485 input / output unit, the second RS-485 input / output unit and the third RS-485 input / output unit are connected by using an RJ45 standard network cable.
