Slave based on bus-type control system and bus-type control system
By using double-knife double-throw relays and matching resistors on the slave machine of the bus type control system, the problem of signal distortion is solved, signal quality and system stability are improved, and equipment failures do not affect communication.
Patent Information
- Application Number
- CN202420077850.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-12
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2034-01-12
AI Technical Summary
In bus-type control systems, traditional automatic address allocation technology causes signal distortion due to excessive distance, which may lead to communication failure, and may affect communication of other devices when the terminal device fails.
The slave machine uses a double-knife double-throw relay and a matching resistor to control the on-off of the relay through the control circuit to ensure that there is always matching resistor on the bus, improving signal quality and system stability.
It effectively improves signal transmission distance and system stability, ensuring that even if the slave equipment fails or power failure does not affect the communication of other equipment.
Smart Images

Figure CN222029941U_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of communication technology, and in particular, relates to a slave based on a bus type control system and a bus type control system. Background Art
[0002] In a bus control system, there is usually a host and several slaves connected to a bus. Each slave needs to be equipped with a unique address to distinguish it from other devices on the bus. The traditional automatic addressing technology will cause signal distortion or even communication failure due to the long distance. In addition, when a terminal device fails, the relay in the slave may be continuously disconnected, thus affecting the communication of other devices. Utility Model Content
[0003] This article aims to provide a slave and bus control system based on a bus control system. A double-pole double-throw switch is used on the slave to switch the bus, so that there is always a matching resistor on the bus, which improves the signal quality, ensures the signal transmission distance, and improves the system stability.
[0004] The technical solutions adopted in this paper to solve the above technical problems are as follows:
[0005] According to one aspect of the present invention, a slave based on a bus-type control system is provided, wherein a double-pole double-throw relay, a matching resistor and a control circuit are provided in the slave, wherein the common terminal of the double-pole double-throw relay is connected to the input terminal of the slave, the normally closed terminal of the double-pole double-throw relay is connected to the output terminal of the slave, and the normally open terminal of the double-pole double-throw relay is connected to the matching resistor; the control circuit is used to control the on and off of the double-pole double-throw relay, and when the double-pole double-throw relay is disconnected, the normally open terminal connects the input terminal to the matching resistor.
[0006] Optionally, the control circuit includes: an MCU, a transistor Q1, a diode D1, a diode D2, a capacitor C1, a capacitor C2 and a resistor R1, the MCU is connected to one end of the capacitor C1, the other end of the capacitor C1 is connected to the cathode of the diode D1 and the anode of the diode D2, the cathode of the diode D2 is connected to one end of the capacitor C2 and one end of the resistor R1, the other end of the resistor R1 is connected to the base of the transistor Q1, the emitter of the transistor Q1 is grounded together with the other end of the resistor C2 and the anode of the diode D1; the collector of the transistor Q1 is connected to one end of the coil of the double-pole double-throw relay, and the other end of the coil of the double-pole double-throw relay is connected to the power supply terminal VCC.
[0007] Optionally, the transistor Q1 is an NPN transistor; and the diode D1 and the diode D2 are switch diodes.
[0008] Optionally, absorption diodes are connected in parallel at both ends of the coil of the double-pole double-throw relay.
[0009] Optionally, the double-pole double-throw relay is driven in a capacitor charging mode.
[0010] Optionally, when the slave device fails, the control circuit starts discharging, and when the discharging ends, the double-pole double-throw relay returns to a closed state.
[0011] Optionally, when the slave device needs to be equipped with an address, the MCU drives the double-pole double-throw relay to disconnect.
[0012] Optionally, when the MCU outputs continuous 10k square wave pulses, the double-pole double-throw relay is energized.
[0013] According to another aspect of the present invention, a bus-type control system is provided, comprising the slave machine described above, and also comprising a host machine, wherein the host machine is connected in series with a plurality of the slave machines.
[0014] Optionally, the plurality of slaves are connected to the host in sequence and address allocation is performed.
[0015] The utility model embodiment is a slave machine and a bus-type control system based on a bus-type control system, wherein a double-pole double-throw relay, a matching resistor and a control circuit are arranged in the slave machine, the common end of the double-pole double-throw relay is connected to the input end of the slave machine, the normally closed end of the double-pole double-throw relay is connected to the output end of the slave machine, and the normally open end of the double-pole double-throw relay is connected to the matching resistor; the control circuit is used to control the on and off of the double-pole double-throw relay, and when the double-pole double-throw relay is disconnected, the normally open end connects the input end with the matching resistor; a double-pole double-throw switch is used on the slave machine to perform bus switching, so that there is always a matching resistor on the bus, which improves the signal quality, ensures the transmission distance of the signal, and improves the system stability. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 A functional structure diagram of a slave based on a bus-type control system provided in the first embodiment of the utility model;
[0017] Figure 2 A schematic diagram of a control circuit of a slave based on a bus-type control system provided in the first embodiment of the utility model;
[0018] Figure 3 This is a system block diagram of a bus-type control system provided in Embodiment 1 of the present utility model.
[0019] The realization of the purpose, functional features and advantages of this article will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0020] In order to make the technical problems, technical solutions and beneficial effects to be solved by this article clearer and more understandable, this article is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain this article and are not used to limit this article.
[0021] In the subsequent description, the suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of the present invention, and have no specific meanings. Therefore, "module", "component" or "unit" can be used in a mixed manner.
[0022] Embodiment 1
[0023] like Figure 1 As shown, in this embodiment, a slave based on a bus-type control system is provided in the slave, wherein a double-pole double-throw relay, a matching resistor and a control circuit are provided, wherein the common terminal of the double-pole double-throw relay is connected to the input terminal of the slave, the normally closed terminal of the double-pole double-throw relay is connected to the output terminal of the slave, and the normally open terminal of the double-pole double-throw relay is connected to the matching resistor; the control circuit is used to control the on and off of the double-pole double-throw relay, and when the double-pole double-throw relay is disconnected, the normally open terminal connects the input terminal to the matching resistor.
[0024] In this embodiment, a double-pole double-throw switch is used on the slave to switch the bus, and a matching resistor is added so that there is always a matching resistor on the bus, thereby improving signal quality, ensuring the transmission distance of the signal, and improving system stability.
[0025] In this embodiment, the bus is unblocked during normal communication, and even if the slave is damaged or powered off, it will not affect the operation of other devices in the entire system. The relay is controlled by the MCU inside the slave, and the relay is driven to disconnect only when the address is assigned. When disconnected, the normally open end of the relay is switched to the matching resistor, ensuring that there is still a normal matching resistor during long-distance transmission.
[0026] In this embodiment, if Figure 2 As shown, the control circuit includes: an MCU, a transistor Q1, a diode D1, a diode D2, a capacitor C1, a capacitor C2 and a resistor R1, the MCU is connected to one end of the capacitor C1, the other end of the capacitor C1 is connected to the cathode of the diode D1 and the anode of the diode D2, the cathode of the diode D2 is connected to one end of the capacitor C2 and one end of the resistor R1, the other end of the resistor R1 is connected to the base of the transistor Q1, the emitter of the transistor Q1 is grounded together with the other end of the resistor C2 and the anode of the diode D1; the collector of the transistor Q1 is connected to one end of the coil of the double-pole double-throw relay, and the other end of the coil of the double-pole double-throw relay is connected to the power supply terminal VCC.
[0027] In this embodiment, the transistor Q1 is an NPN transistor; the diode D1 and the diode D2 are switch diodes.
[0028] In this embodiment, the transistor Q1 is of type S8050; the diodes D1 and D2 are both of type 1N4148; the resistance value of the resistor R1 is 1 kΩ; and the capacitance values of the capacitors C1 and C2 are both 0.1 μF.
[0029] In this embodiment, the resistance value of the matching resistor is 120Ω.
[0030] In this embodiment, two ends of the coil of the double-pole double-throw relay are connected in parallel with absorption diodes for absorbing the self-inductance voltage on the relay.
[0031] In this embodiment, the double-pole double-throw relay is driven in a capacitor charging mode, which can effectively avoid failure of the slave device and mistakenly switching the relay to the disconnected state. The relay is driven in a capacitor charging mode. When the software crashes or other abnormal conditions occur, the capacitor controlling the relay is in the discharge state. After the discharge, the relay automatically returns to the closed state.
[0032] In this embodiment, when the slave device needs to be equipped with an address, the MCU drives the double-pole double-throw relay to disconnect.
[0033] In this embodiment, when the MCU outputs continuous 10k square wave pulses, the relay is energized. If the MCU software stops, the hardware fails, or even loses power, the relay will return to the released state to ensure normal communication of other devices on the bus.
[0034] Embodiment 2
[0035] like Figure 3 As shown, in this embodiment, a bus type control system includes the slaves mentioned above and a host, and the host is connected in series with the plurality of slaves.
[0036] In this embodiment, the plurality of slaves are connected to the host in sequence to allocate addresses.
[0037] In this embodiment, when the system is connected, or a device needs to be re-addressed after replacement, the host sends a broadcast message to tell all slaves to prepare to assign addresses, and all slaves switch their relays to the normally open state. At this time, only the device closest to the host is connected to the host by circuit, and all other slaves are disconnected. Then the host sets the first device to address 1 through a broadcast command. Although the host sends a broadcast command, only this device can actually receive it. After receiving the setting command, the device remembers the address 1 set by the host, resets the relay to the closed state, and then replies to the host that the above action has been completed, and no longer responds to the subsequent addressing command. At this time, the second device has established a connection with the host. After the host receives the reply from the first device, it starts to set the address of the second device, that is, sets the second device to address 2 through the broadcast command. At this time, only the first and second devices can receive the broadcast command sent by the host, but no longer responds to the first device that has been assigned an address, so only the second device has action, and remembers the address 2 set by the host for itself, resets the relay to the closed state, and then replies to the host that the above action has been completed, and no longer responds to the subsequent addressing command. By analogy, the third device and so on, until finally, no device responds to the host's address setting command. After the address configuration of all devices is completed, normal data communication can be carried out.
[0038] In this embodiment, taking the DMX512 host device as an example, all command formats are the protocols agreed upon by the software between the master and the slave, and the automatic addressing process of the slave is as follows:
[0039] 1. The host sends a broadcast command for address allocation preparation to notify all slaves to enter the address allocation state;
[0040] 2. After receiving the address assignment command, the slave disconnects all relays (the output signal of the control relay sends continuous pulses). At this time, only the slave closest to the host can communicate with the host;
[0041] 3. The host sets the initial address N internally, usually N = 1;
[0042] 4. The host sends a broadcast command for address setting, instructing the slave receiving the command to set its own address to N;
[0043] 5. After the slave sets its own address to N, it closes the relay so that the next slave can connect to the master. Its own status changes to address configuration success and it replies to the master, and then it no longer responds to subsequent address setting commands.
[0044] 6. After the host receives a successful configuration response, it adds 1 to N, and then repeats the above steps 4 and 5 until the host waits for the agreed time (2 seconds, the normal response time of the slave is much less than 2 seconds) and no longer receives a reply message, indicating that all slave addresses have been configured.
[0045] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the present invention is not limited by this. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention shall be within the scope of the present invention.
Claims
1. A slave based on a bus type control system, characterized in that: The slave is provided with a double-pole double-throw relay, a matching resistor and a control circuit, wherein the common terminal of the double-pole double-throw relay is connected to the input terminal of the slave, the normally closed terminal of the double-pole double-throw relay is connected to the output terminal of the slave, and the normally open terminal of the double-pole double-throw relay is connected to the matching resistor; the control circuit is used to control the on and off of the double-pole double-throw relay, and when the double-pole double-throw relay is disconnected, the normally open terminal connects the input terminal to the matching resistor.
2. A slave based on a bus type control system according to claim 1, characterized in that: The control circuit includes: an MCU, a transistor Q1, a diode D1, a diode D2, a capacitor C1, a capacitor C2 and a resistor R1, wherein the MCU is connected to one end of the capacitor C1, the other end of the capacitor C1 is connected to the cathode of the diode D1 and the anode of the diode D2, the cathode of the diode D2 is connected to one end of the capacitor C2 and one end of the resistor R1, the other end of the resistor R1 is connected to the base of the transistor Q1, the emitter of the transistor Q1 is grounded together with the other end of the resistor C2 and the anode of the diode D1; the collector of the transistor Q1 is connected to one end of the coil of the double-pole double-throw relay, and the other end of the coil of the double-pole double-throw relay is connected to a power supply terminal VCC.
3. A slave based on a bus type control system according to claim 2, characterized in that: The transistor Q1 is an NPN transistor; the diode D1 and the diode D2 are switch diodes.
4. A slave based on a bus type control system according to claim 1, characterized in that: Absorption diodes are connected in parallel at both ends of the coil of the double-pole double-throw relay.
5. A slave based on a bus type control system according to claim 2, characterized in that: The double-pole double-throw relay is driven in a capacitor charging mode.
6. A slave based on a bus type control system according to claim 5, characterized in that: When the slave device fails, the control circuit starts to discharge, and when the discharge ends, the double-pole double-throw relay returns to the closed state.
7. A slave device based on a bus type control system according to claim 6, characterized in that: When the slave device needs to be equipped with an address, the MCU drives the double-pole double-throw relay to disconnect.
8. A slave based on a bus type control system according to claim 7, characterized in that: When the MCU outputs continuous 10k square wave pulses, the double-pole double-throw relay is energized.
9. A bus type control system, characterized in that: The invention comprises the slave device according to any one of claims 1 to 8, and further comprises a host device, wherein the host device is connected in series with a plurality of the slave devices.
10. A bus type control system according to claim 9, characterized in that: The plurality of slaves are connected to the host in sequence and address allocation is performed.
