Circuit for controlling multiple relays by using DSP (Digital Signal Processor) port

By using interface expansion circuits and drive buffer circuits, time-sharing control of multiple relays is achieved through I2C communication, which solves the problems of complex circuits and high costs in traditional control modes, realizes efficient expansion of DSP ports, and is suitable for industrial automation.

CN223815513UActive Publication Date: 2026-01-20SHENZHEN SILICON MOUNTAIN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202520619482.2
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2025-04-03
Publication Date
2026-01-20
Estimated Expiration
2035-04-03

AI Technical Summary

Technical Problem

Traditional single-port drive single-relay mode is complex, costly, and has response delay when there are many devices, making it difficult to meet the needs of large-scale systems.

Method used

An interface expansion circuit and a drive buffer circuit are used to connect multiple relays to the same control port via I2C communication to achieve time-sharing control, and the number of relays can be expanded using the DSP port.

Benefits of technology

It improves the control capacity of the DSP port and reduces the cost of expansion ports, making it suitable for dynamic expansion needs in industrial automation scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN223815513U_ABST
    Figure CN223815513U_ABST
Patent Text Reader

Abstract

The utility model discloses a circuit for controlling a plurality of relays by using a digital signal processor (DSP) port, which is characterized by comprising an interface expansion circuit, a driving buffer circuit and a relay driving circuit, the interface expansion circuit is connected with the drive buffer circuit, and the drive buffer circuit is connected with the relay drive circuit. A novel control architecture is constructed by introducing an interface expander, and a plurality of relays are connected to the same control port through a bus protocol, so that one-to-many time-sharing control is realized. According to the technology, the control capacity of a single DSP port is improved, and the number of the relays capable of being controlled by the DSP is expanded through the interface expander. According to the scheme, a large number of relays can be controlled by using limited DSP ports under the condition that the DSP is not replaced. The method is suitable for industrial automation and other scenes requiring dynamic expansion, and can reduce the cost required for port expansion.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This utility model belongs to the field of control circuit technology, and relates to a circuit that uses a DSP port to control multiple relays. Background Technology

[0002] The core challenge in relay-driven control lies in matching the number of control ports with the number of controlled devices. The traditional single-port-driven-single-relay model has a direct advantage when there are few devices: each control signal corresponds one-to-one with an execution unit, the circuit design is intuitive and easy to understand, and maintenance personnel can quickly locate fault points. However, as the system scales up, this one-to-one correspondence control model leads to complex wiring and increased costs. Firstly, there is a limitation on the number of physical ports; mainstream controllers typically have hundreds of general-purpose I / O resources, which is insufficient for large systems. Secondly, there is the cumulative effect of drive power; simultaneous operation of multiple relays can overload the power system. Finally, there is control response delay; as the number of ports increases, the scan cycle lengthens significantly, affecting system real-time performance. Summary of the Invention

[0003] To address the problems existing in the background technology, this utility model proposes a circuit that uses a DSP port to control multiple relays.

[0004] To achieve the above objectives, the technical solution adopted by this utility model is as follows: a circuit that uses a DSP port to control multiple relays, comprising: an interface expansion circuit, a drive buffer circuit, and a relay drive circuit;

[0005] The interface expansion circuit is connected to the drive buffer circuit, and the drive buffer circuit is connected to the relay drive circuit.

[0006] The interface expansion circuit includes: chip circuitry and I2C communication circuitry;

[0007] The I2C communication circuit is connected to the chip circuit.

[0008] The chip circuit includes: U20 interface expander chip, resistor R20, and resistor R27;

[0009] U20 interface expander chip The pin is connected to one end of resistor R20, and the other end of resistor R20 is connected to the input power supply +3.3V. This is the U20 interface expander chip. The pin is connected to one end of resistor R27, the other end of resistor R27 is connected to the other end of resistor R20 and the input power supply +3.3V, the A1 pin of the U20 interface expander chip is connected to ground, and the VSS pin of the U20 interface expander chip is connected to ground.

[0010] The I2C communication circuit comprises resistors R19, R64, R24, R26 and capacitor C72.

[0011] The SDA pin of the U20 interface expander chip is connected with one end of the resistor R64, the other end of the resistor R64 is connected with one end of the resistor R26, the SCL pin of the U20 interface expander chip is connected with one end of the resistor R19, the other end of the resistor R19 is connected with one end of the resistor R24, the other end of the resistor R24 is connected with the other end of the resistor R26, the VDD pin of the U20 interface expander chip, one end of the capacitor C72, and the other end of the capacitor C72 is connected with the ground and the A0 pin of the U20 interface expander chip.

[0012] The drive buffer circuit comprises U24 drive buffer, resistors R85, R86, R87, R88, R89 and resistor 118.

[0013] One end of the resistor 85 is connected with the A1 pin of the U24 drive buffer, one end of the resistor 85 is connected with the A2 pin of the U24 drive buffer, one end of the resistor 85 is connected with the A3 pin of the U24 drive buffer, one end of the resistor 85 is connected with the A4 pin of the U24 drive buffer, one end of the resistor 85 is connected with the A1 pin of the U25 drive buffer, one end of the resistor 85 is connected with the A6 pin of the U24 drive buffer, the VDD1 pin of the U24 drive buffer is connected with the input power supply +3.3V, the VDD2 pin of the U24 drive buffer is connected with the input power supply +5_BV, the GND1 pin of the U24 drive buffer is connected with the ground, and the GND2 pin of the U24 drive buffer is connected with +24_GND.

[0014] The relay drive circuit comprises resistors R211, 101, capacitor C84, double MOS tube Q18, diode D12, resistor R212, resistor 102, capacitor C85, MOS tube Q19, diode D14, DRV_KM119 port and DRV_KM120 port.

[0015] The B1 pin of the U24 drive buffer is connected with one end of the resistor R211, the other end of the resistor R211 is connected with one end of the resistor R101 and the second pin of the double MOS tube Q18, the other end of the resistor R101 is connected with +24V_GND, the first pin of the double MOS tube Q18 is connected with +24V_GND, the seventh pin of the double MOS tube Q18 is connected with the anode of the diode D12, the eighth pin of the double MOS tube Q18 and the DRV_KM119 port, and the cathode of the diode D12 is connected with the input power supply +24V_OUT.

[0016] The B2 pin of the U24 drive buffer is connected with one end of the resistor R212, the other end of the resistor R212 is connected with one end of the resistor R102 and the fourth pin of the double MOS tube Q18, the other end of the resistor R102 is connected with +24V_GND, the third pin of the double MOS tube Q18 is connected with +24V_GND, the fifth pin of the double MOS tube Q18 is connected with the anode of the diode D14, the sixth pin of the double MOS tube Q18 and the DRV_KM120 port, and the cathode of the diode D14 is connected with the input power supply +24V_OUT.

[0017] Further,

[0018] Compared with the prior art, the utility model has the following beneficial effects:

[0019] The scheme constructs a new control architecture by introducing an interface extender, and connects multiple relays to the same control port through a bus protocol, to realize one-to-many time-sharing control. This technology improves the control capacity of a single DSP port, and uses an interface extender to expand the number of relays that can be controlled by a DSP. The scheme can control a large number of relays using limited DSP ports without replacing the DSP, and is suitable for scenarios such as industrial automation that require dynamic expansion, and can reduce the required cost of expanding ports. BRIEF DESCRIPTION OF DRAWINGS

[0020] Figure 1 is a circuit block diagram for controlling multiple relays using a DSP port of the utility model;

[0021] Figure 2 is a connection diagram of the interface expansion circuit of the utility model;

[0022] Figure 3 is a connection diagram of the drive buffer circuit of the utility model;

[0023] Figure 4 is a connection diagram of the relay drive circuit of the utility model. DETAILED DESCRIPTION

[0024] The technical solutions in the embodiments of the utility model will be clearly and completely described below with reference to the drawings in the embodiments of the utility model. Obviously, the described embodiments are only a part of the embodiments of the utility model, rather than all the embodiments. Based on the embodiments in the utility model, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the utility model.

[0025] As Figures 1-4 shown, the technical solutions adopted by the utility model are as follows: a circuit for controlling multiple relays using a DSP port, comprising: an interface expansion circuit, a drive buffer circuit, and a relay drive circuit.

[0026] The interface expansion circuit is connected with a driving buffer circuit, and the driving buffer circuit is connected with a relay driving circuit.

[0027] The interface expansion circuit comprises a chip circuit and an I2C communication circuit.

[0028] The I2C communication circuit is connected with the chip circuit.

[0029] The chip circuit comprises a U20 interface expander chip, a resistor R20 and a resistor R27.

[0030] The pin of the U20 interface expander chip is connected with one end of the resistor R20, and the other end of the resistor R20 is connected with an input power supply +3.3V. The pin of the U20 interface expander chip is connected with one end of the resistor R27, and the other end of the resistor R27 is connected with the other end of the resistor R20 and the input power supply +3.3V. The A1 pin of the U20 interface expander chip is connected with the ground, and the VSS pin of the U20 interface expander chip is connected with the ground.

[0031] The I2C communication circuit comprises a resistor R19, a resistor R64, a resistor R24, a resistor R26 and a capacitor C72.

[0032] The SDA pin of the U20 interface expander chip is connected with one end of the resistor R64, and the other end of the resistor R64 is connected with one end of the resistor R26.

[0033] The core of the interface expansion circuit is the U20 interface expander chip. The U20 interface expander chip uses I2C communication to control the level conversion of the pins of the expansion chip. The resistor R24 and the resistor R26 are pull-up resistors of the I2C communication pins, and the pins SDA of the U20 interface expander chip and the pins SCL of the U20 interface expander chip are fixed to high level in the idle state. When both the communication pins are high level, the chip is in the cut-off state, which can effectively prevent the chip from being triggered by mistake. The resistor R64 and the resistor R19 are series matching resistors, which can reduce the overshoot degree of the I2C communication waveform. The resistor R27 and the resistor R20 are pull-up resistors necessary for the normal work of the U20 interface expander chip. The capacitor C72 is a chip power filter capacitor.

[0034] The U20 interface expander chip only needs to occupy two ports of the DSP, and can realize the simultaneous management and control of 16 relay drive levels through the control mode of I2C communication. The port occupation of the DSP by the relay drive control can be greatly reduced.

[0035] The VDD pin of the U20 interface expander chip is a power supply pin, the VSS pin of the U20 interface expander chip is a ground pin, the SDA pin of the U20 interface expander chip and the SCL pin of the U20 interface expander chip are responsible for communication with the U20 interface expander chip and transmission of control instructions. The pin is an interrupt output pin, which is used to feed back the state change of the chip to the DSP; the pin of the U20 interface expander chip is a reset pin, which is used to initialize the state of the chip; the VDD pin of the U20 interface expander chip is a power supply pin, the VSS pin of the U20 interface expander chip is a ground pin, the SDA pin of the U20 interface expander chip and the SCL pin of the U20 interface expander chip are responsible for communication with the U20 interface expander chip and transmission of control instructions.

[0036] The resistors R19, R64, R24, R26 and the capacitor C72 ensure that the I2C bus signal remains high in the idle state, enhance the signal stability, and meet the requirements of the I2C communication protocol.

[0037] The drive buffer circuit includes: U24 drive buffer, resistor R85, resistor R86, resistor R87, resistor R88, resistor R89, resistor 118.

[0038] One end of the resistor 85 is connected to the A1 pin of the U24 drive buffer, one end of the resistor 85 is connected to the A2 pin of the U24 drive buffer, one end of the resistor 85 is connected to the A3 pin of the U24 drive buffer, one end of the resistor 85 is connected to the A4 pin of the U24 drive buffer, one end of the resistor 85 is connected to the A1 pin of the U25 drive buffer, one end of the resistor 85 is connected to the A6 pin of the U24 drive buffer, the VDD1 pin of the U24 drive buffer is connected to the input power supply +3.3V, the VDD2 pin of the U24 drive buffer is connected to the input power supply +5_BV, the GND1 pin of the U24 drive buffer is connected to the ground, and the GND2 pin of the U24 drive buffer is connected to +24_GND.

[0039] After the IO expansion chip outputs the back end, it also needs to be processed. Through the U24 drive buffer, the high level output by the IO expansion chip can be converted from 3.3V to 5V signal output after inputting to the drive buffer, so as to ensure that the signal has enough driving force. In addition to enhancing the driving ability, the drive buffer can also isolate the reference ground of the input and output signals. The resistors R85, R86, R87, R88, R89 and R118 are all pull-down resistors, which are used to prevent interference signals from causing the drive buffer to be triggered incorrectly.

[0040] ​The A1-A6 pins of the U24 driving buffer are input pins, receiving signals in a 3.3V voltage domain, and the B1-B6 pins of the U24 driving buffer are output pins, outputting converted signals to drive a subsequent circuit.

[0041] The relay driving circuit comprises a resistor R211, a resistor 101, a capacitor C84, a double MOS tube Q18, a diode D12, a resistor R212, a resistor 102, a capacitor C85, a MOS tube Q19, a diode D14, a DRV_KM119 port, and a DRV_KM120 port.

[0042] The B1 pin of the U24 driving buffer is connected with one end of the resistor R211, the other end of the resistor R211 is connected with one end of the resistor R101 and the second pin of the double MOS tube Q18, the other end of the resistor R101 is connected with +24V_GND, the first pin of the double MOS tube Q18 is connected with +24V_GND, the seventh pin of the double MOS tube Q18 is connected with the anode of the diode D12, the eighth pin of the double MOS tube Q18, and the DRV_KM119 port, and the cathode of the diode D12 is connected with an input power supply +24V_OUT.

[0043] The B2 pin of the U24 driving buffer is connected with one end of the resistor R212, the other end of the resistor R212 is connected with one end of the resistor R102 and the fourth pin of the double MOS tube Q18, the other end of the resistor R102 is connected with +24V_GND, the third pin of the double MOS tube Q18 is connected with +24V_GND, the fifth pin of the double MOS tube Q18 is connected with the anode of the diode D14, the sixth pin of the double MOS tube Q18, and the DRV_KM120 port, and the cathode of the diode D14 is connected with the input power supply +24V_OUT.

[0044] The resistors R211 and R212 are current-limiting resistors, limiting the current flowing into the control end of the double MOS tube Q18, preventing the driving signal current from being too large to damage the double MOS tube Q18, and playing a protection role.

[0045] The resistor R101 and the capacitor C84, and the resistor R102 and the capacitor C85 respectively constitute filter units, filtering out high-frequency noise in the driving signal, ensuring that the signal input to the double MOS tube Q18 is stable, and avoiding false triggering.

[0046] The double MOS tube Q18 is a switching element, when the driving signal makes the double MOS tube Q18 conduct, the input power supply +24V_OUT supplies power to the relay through the double MOS tube Q18, when the double MOS tube Q18 is cut off, the relay power supply circuit is cut off, realizing the on-off control of the relay.

[0047] The relay control circuit uses double MOS Q18 to control. When the relay is used, the driving coil is connected between the input power +24V_OUT and the DRV_KM119 port, or between the input power +24V_OUT and the DRV_KM120 port. The front-end U24 driving buffer sends a driving signal, and the signal drives the double MOS Q18 to turn on after passing through the resistance R211, the resistance R212, the resistance R101, the resistance R102, the capacitor C84, and the capacitor C85 which are matched with the double MOS Q18. After the double MOS Q18 is turned on, one end of the relay coil is connected to 24V and the other end is connected to the ground, and the current passes through the coil to complete the closing of the relay. After the driving signal stops being sent, the double MOS Q18 is turned off. The relay coil is powered off, the relay is opened, and the residual energy on the coil is released through the diode D12 and the diode D14.

[0048] Although the utility model has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions recorded in the foregoing embodiments or make equivalent replacement to part of the technical features, and any modification, equivalent replacement, improvement, etc. within the spirit and principles of the present application shall be included in the protection scope of the utility model.

Claims

1. A circuit that uses a DSP port to control multiple relays, characterized in that, It includes: interface expansion circuit, drive buffer circuit, and relay drive circuit; The interface expansion circuit is connected to the drive buffer circuit, and the drive buffer circuit is connected to the relay drive circuit.

2. The circuit for controlling multiple relays using a DSP port according to claim 1, characterized in that, The interface expansion circuit includes: chip circuitry and I2C communication circuitry; The I2C communication circuit is connected to the chip circuit.

3. A circuit for controlling multiple relays using a DSP port according to claim 2, characterized in that, The chip circuit includes: U20 interface expander chip, resistor R20, and resistor R27; U20 interface expander chip The pin is connected to one end of resistor R20, and the other end of resistor R20 is connected to the input power supply +3.3V. This is the U20 interface expander chip. The pin is connected to one end of resistor R27, the other end of resistor R27 is connected to the other end of resistor R20 and the input power supply +3.3V, the A1 pin of the U20 interface expander chip is connected to ground, and the VSS pin of the U20 interface expander chip is connected to ground.

4. A circuit for controlling multiple relays using a DSP port according to claim 3, characterized in that, The I2C communication circuit includes: resistor R19, resistor R64, resistor R24, resistor R26, and capacitor C72; The SDA pin of the U20 interface expander chip is connected to one end of resistor R64, and the other end of resistor R64 is connected to one end of resistor R26. The SCL pin of the U20 interface expander chip is connected to one end of resistor R19, and the other end of resistor R19 is connected to one end of resistor R24. The other end of resistor R24 ​​is connected to the other end of resistor R26, the VDD pin of the U20 interface expander chip, one end of capacitor C72, the other end of capacitor C72 is connected to ground, and the A0 pin of the U20 interface expander chip.

5. A circuit for controlling multiple relays using a DSP port according to claim 1, characterized in that, The drive buffer circuit includes: U24 drive buffer, resistor R85, resistor R86, resistor R87, resistor R88, resistor R89, and resistor 118; One end of resistor 85 is connected to pin A1 of the U24 driver buffer, one end of resistor 85 is connected to pin A2 of the U24 driver buffer, one end of resistor 85 is connected to pin A3 of the U24 driver buffer, one end of resistor 85 is connected to pin A4 of the U24 driver buffer, one end of resistor 85 is connected to pin A1 of the U25 driver buffer, one end of resistor 85 is connected to pin A6 of the U24 driver buffer, pin VDD1 of the U24 driver buffer is connected to the input power supply +3.3V, pin VDD2 of the U24 driver buffer is connected to the input power supply +5_BV, pin GND1 of the U24 driver buffer is connected to ground, and pin GND2 of the U24 driver buffer is connected to +24_GND.

6. A circuit for controlling multiple relays using a DSP port according to claim 5, characterized in that, The relay drive circuit includes: resistor R211, resistor 101, capacitor C84, dual MOSFET Q18, diode D12, resistor R212, resistor 102, capacitor C85, MOSFET Q19, diode D14, DRV_KM119 port, and DRV_KM120 port. The B1 pin of the U24 drive buffer is connected to one end of resistor R211. The other end of resistor R211 is connected to one end of resistor R101 and the second pin of dual MOSFET Q18. The other end of resistor R101 is connected to +24V_GND. The first pin of dual MOSFET Q18 is connected to +24V_GND. The seventh pin of dual MOSFET Q18 is connected to the positive terminal of diode D12, the eighth pin of dual MOSFET Q18, and the DRV_KM119 port. The negative terminal of diode D12 is connected to the input power supply +24V_OUT. The B2 pin of the U24 drive buffer is connected to one end of resistor R212. The other end of resistor R212 is connected to one end of resistor R102 and the fourth pin of the dual MOSFET Q18. The other end of resistor R102 is connected to +24V_GND. The third pin of the dual MOSFET Q18 is connected to +24V_GND. The fifth pin of the dual MOSFET Q18 is connected to the positive terminal of diode D14, the sixth pin of the dual MOSFET Q18, and the DRV_KM120 port. The negative terminal of diode D14 is connected to the input power supply +24V_OUT.