Miniature programmable logic expander

By designing a miniature programmable logic extender, using the STC8H1K08 master chip and multi-channel signal control circuit, the problem of waste of resources and insufficient flexibility in traditional PLC or control card in small occasions and expansion applications is solved, and a small, highly flexible and versatile logic control device is realized.

CN119596778APending Publication Date: 2025-03-11NINGBO JINHENG MACHINERY MFG
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411704042.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-26
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

Traditional PLC or control card has problems such as wasted resources, high costs, and insufficient flexibility in small occasions and expansion applications.

Method used

A miniature programmable logic extender is designed, using the STC8H1K08 main control chip, which protects the network and multi-channel transistor switching circuit through multi-channel digital inputs, realizes input and output control of multiple signals, and has flexible programming and expansion capabilities.

Benefits of technology

It realizes miniaturization, low cost, high flexibility and versatility, and is suitable for space-constrained and cost-sensitive application scenarios, meeting the needs of multi-point control and signal processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure HDA0005154103170000011
    Figure HDA0005154103170000011
  • Figure HDA0005154103170000021
    Figure HDA0005154103170000021
  • Figure HDA0005154103170000031
    Figure HDA0005154103170000031
Patent Text Reader

Abstract

The miniature programmable logic expander designed by the invention comprises a main control chip U3, the main control chip U3 is connected with an external programming channel and power supply voltage through a multi-channel digital input protection network, is connected with signal output through a multi-channel transistor switching circuit, and is also connected with a reference voltage unit and serial port input. The output comprises a relay signal. The invention successfully provides a logic control device which is flexible, high in cost performance, strong in expansion capability and multifunctional. The system effectively solves the problems of resource waste, insufficient flexibility and the like of a traditional PLC or a control card in small application and expansion scenes, and perfectly meets the diversified requirements of industrial automation and an intelligent control system in various environments, especially the special requirements in the aspects of input control and output control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of electronic control and signal processing, in particular to a micro programmable logic expander. Background Art

[0002] With the development of industrial automation and intelligent control systems, logic controllers (such as PLCs) have become standard configurations in many application scenarios. However, in small applications or when an existing control system needs to be expanded, traditional PLCs or control cards have the following problems:

[0003] 1. Waste of resources and high cost: In small occasions or when a small amount of logic control needs to be added, the use of PLC not only increases economic costs, but also wastes control resources.

[0004] 2. Space limitation: PLC and control cards are usually large in size and difficult to deploy in environments with limited installation space.

[0005] 3. Lack of flexibility: Traditional PLCs and control cards have certain limitations in programming and scalability, making it difficult to adapt to rapidly changing needs.

[0006] 4. Power supply range and signal compatibility: Many existing controllers have a narrow power supply range and a single input and output signal type, which limits their application in different power supply environments.

[0007] 5. Driving capability and number of output ports: The existing PLC or control card may have insufficient driving capability and a limited number of output ports, which is not enough to meet the needs of multi-point control.

[0008] 6. Analog signal and pulse signal processing: Controllers on the market usually do not have the ability to convert analog signals into digital signals or process various waveform pulse signals. Summary of the invention

[0009] In order to solve the problems of resource waste, high cost, lack of flexibility, etc. of traditional PLC or control card in small occasions and extended applications, the present invention provides a small, cost-effective, expandable and flexible micro programmable logic expander.

[0010] In order to achieve the above-mentioned purpose, the micro programmable logic expander designed by the present invention includes a main control chip U3, and the main control chip U3 is connected to an external programming channel and a power supply voltage through a multi-channel digital input protection network, and a signal output is connected through a multi-channel transistor switch circuit. The main control chip U3 is also connected to a reference voltage unit and a serial port input, and the output includes a relay signal.

[0011] Furthermore, the main control chip U3 is STC8H1K08;

[0012] Two capacitors C5 and C6 are connected in parallel between the VCC / AVCC pin and the GND / AGND pin of the main control chip U3, and the VCC / AVCC pin is connected to 3.3V, the GND / AGND pin is connected to the anode end of the reference voltage unit, and the ADC_VReF+ pin of the main control chip U3 is connected to the reference end of the reference voltage unit;

[0013] The TXD / P3.1 pin and RXD / P3.0 pin of the main control chip U3 are connected to the external communication interface;

[0014] The P1.2 pin, P1.3 pin, P1.4 pin, P1.5 pin, P1.6 / RXD_3 pin and P5.4 / nRST pin of the main control chip U3 are connected to the multi-channel transistor switch circuit;

[0015] The TxD2 / ADC1 / P1.1 pin, RXD2 / ADC0 / P1.0 pin, INT3 / RXD_2 / P3.6 pin, T1 / P3.5 pin, T0 / P3.4 pin, INT1 / P3.3 pin, and INT0 / P3.2 pin of the main control chip U3 are connected to the multi-channel digital input protection network;

[0016] INT3 / TXD_2 / P3.7 of the main control chip U3 is grounded through the resistor R20 and the light emitting diode D1.

[0017] The 5V voltage input from the expander is passed through the linear regulator U2 and then outputs 3.3V as the expander's internal 3.3V power supply, and the linear regulator U2 is AMS1117;

[0018] The 5V voltage input from the outside of the expander outputs a 5V voltage VCC after passing through the linear regulator U1, which serves as the 5V power supply inside the expander, and the linear regulator U1 is L7805.

[0019] The multi-channel digital input protection network includes 100K resistors R4-R9, 5.1K resistors R12-R17 and 50V0.33uF capacitors C8-C14, wherein a 50V 0.33uF capacitor, a 100K resistor and a 5.1K resistor are connected in series in sequence to form a first unit circuit, both ends of the first unit circuit are grounded, and the seven first unit circuits are in parallel. External programming channels X0-X5 are connected between the capacitors and resistors of the six first unit circuits, and input points IN0-IN5 are set between the two resistors; a 5V voltage VCC is connected between the capacitor and the resistor of the remaining first unit circuit, and an input point IN6 is set between the two resistors; the input points IN0-IN5 are respectively connected to the INT pin of the main control chip U3.

[0020] The multi-channel transistor switch circuit includes three second unit circuits connected in parallel. The second unit circuit is composed of a 5.1K resistor, a 1.5K resistor, a 10K resistor and an NPN transistor of model 9014. The base of the NPN transistor is connected to the main control chip U3 through the 1.5K resistor, the collector of the NPN transistor is connected to VCC through the 5.1K resistor, the emitter of the NPN transistor is grounded, the base and emitter of the NPN transistor are connected through the 10K resistor, and the collector of the NPN transistor is also connected to the signal output of the expander.

[0021] The multi-channel transistor switch circuit includes two third unit circuits connected in parallel. The third unit circuit includes an NPN transistor of model 9014, a PNP transistor of model SS8550, a 1.5K resistor and two 10K resistors. The base of the NPN transistor is connected to the main control chip U3 through the 1.5K resistor and is also connected to the emitter of the NPN transistor through a 10K resistor. The emitter of the NPN transistor is grounded, the collector of the NPN transistor is connected to the base of the PNP transistor through the 10K resistor, the emitter of the PNP transistor is connected to VCC, and the collector of the PNP transistor is connected to the signal output of the expander.

[0022] The multi-channel transistor switch circuit includes a fourth unit circuit, which includes a 1.5K resistor, a 10K resistor and an NPN transistor with a model number of 9014. The base of the NPN transistor is connected to the main control chip U3 through the 1.5K resistor, the collector of the NPN transistor is connected to the negative electrode of the controlled relay, the emitter of the NPN transistor is grounded, and the base and emitter of the NPN transistor are connected through the 10K resistor.

[0023] The controlled relay is an 8-pin relay, model HFD4 / 5, one end of the relay coil is connected to a 5V power supply, and the other end is connected to the fourth unit circuit, one normally open end of the relay is grounded, and the other normally open end is connected to VCC.

[0024] The signal output, external programmable channel, GND contact and VCC contact are all connected to the horn socket.

[0025] The micro programmable logic expander proposed in the present invention achieves its intended invention purpose through a series of innovative technical solutions and demonstrates significant technical effects in many aspects.

[0026] First, the expander has made breakthrough progress in miniaturization and cost-effectiveness. By selecting the STC8H1K08 main control chip U3 and optimizing the circuit design, the device size is reduced and the production cost is significantly reduced. This achievement enables the expander to play its unique advantages in space-constrained or cost-sensitive application scenarios.

[0027] Secondly, the present invention is excellent in versatility and expansibility. The expander not only has a wide power adaptability range (7V-36V), but is also compatible with a variety of input signal types, including analog signals, digital signals, and pulse signals. At the same time, it also provides a variety of output signal options, such as digital signals and switch signals. This design concept allows the device to be used as an independent logic control unit and as an expansion module for other systems, fully demonstrating its excellent versatility and expansibility.

[0028] In terms of input control, the present invention adopts an innovative design of a multi-channel digital input protection network. The network provides 6 external programming channels (X0-X5) and an internal input point (IN6), supporting the input of various types of signals. It is particularly worth mentioning that the first unit circuit (including 100K resistor, 5.1K resistor and 50V0.33uF capacitor) we use has achieved effective protection and isolation of the input signal, effectively preventing potential damage to the main control chip U3 caused by high-voltage signals. In addition, the wide power supply range of 7V-36V provides full protection for application requirements in different environments.

[0029] In terms of output control, the present invention also has good performance. Through a multi-channel transistor switch circuit, including three parallel second unit circuits, two parallel third unit circuits and one fourth unit circuit, the expander realizes the configuration of 7 output ports. The driving capabilities of these ports are different: 2 channels can reach a maximum of 100mA, 3 channels can reach 500mA, and the other two relay output ports can reach up to 2A. This diversified output design not only meets the needs of multi-point control, but also ensures the accuracy and reliability of the output signal.

[0030] It is worth mentioning that the present invention has also made innovations in the correlation between input and output control. The expander can convert analog signals into digital signals, supports the conversion of various waveform pulse signals, and greatly enhances the signal processing capabilities between input and output control. At the same time, through real-time monitoring and communication functions, battery power detection can be realized and power indication signals can be output in battery power occasions. Through ordinary serial port and USB-CDC virtual serial port communication, etc., the expander can interact with PC or other peripherals in real time, greatly improving its monitoring and interaction capabilities.

[0031] Finally, the online programming function of the present invention provides users with great convenience and flexibility. This function enables the expander to adapt to different needs and provides users with a higher degree of operational freedom.

[0032] In summary, the present invention successfully provides a flexible, cost-effective, scalable and multifunctional logic control device through these unique technical effects. It effectively solves the problems of resource waste and lack of flexibility of traditional PLC or control card in small applications and expansion scenarios, and perfectly meets the diverse needs of industrial automation and intelligent control systems in various environments, especially the special requirements in input control and output control. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 This is the overall principle block diagram of Example 1.

[0034] Figure 2 This is the pin diagram of the main control chip U3 in Example 1.

[0035] Figure 3 This is the circuit diagram of the multi-channel digital input protection network of Example 1.

[0036] Figure 4 This is the multi-channel transistor switch circuit of embodiment 1.

[0037] Figure 5 This is the 5V power supply circuit of Example 1.

[0038] Figure 6 This is the 3.3V power supply circuit of Example 1.

[0039] Figure 7 This is the reference voltage circuit of Example 1.

[0040] Figure 8 This is the relay circuit of Example 1.

[0041] Fig. 9 This is the horn socket pin circuit of embodiment 1. DETAILED DESCRIPTION

[0042] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.

[0043] Example 1.

[0044] This embodiment describes a micro programmable logic expander, the main structure of which is as follows Figure 1 As shown, its circuit structure is as follows Figures 2 to 9 shown.

[0045] The entire micro programmable logic expander is built based on the main control chip U3 (STC8H1K08). Capacitors C5 (10V 10uF) and C6 (10V0.1uF) are connected in parallel between the VCC / AVCC pin and the GND / AGND pin of the main control chip U3. The VCC / AVCC pin is connected to a 3.3V power supply, and the GND / AGND pin is connected to the anode end of the reference voltage unit. The ADC_VReF+ pin of the main control chip U3 is connected to the reference end of the reference voltage unit. The reference voltage unit consists of TL431 (Q9) and resistors R1 and R3 to provide a stable reference voltage. The 3.3V power supply is converted from a 5V power supply by a linear regulator U2 (AMS1117), such as Figure 6 The 5V power supply is provided by external input and regulated by linear regulator U1 (L7805). Figure 5 shown.

[0046] The TXD / P3.1 and RXD / P3.0 pins of the main control chip U3 are connected to the external communication interface J2 for receiving external control instructions.

[0047] The P1.2, P1.3, P1.4, P1.5, P1.6 / RXD_3 and P5.4 / nRST pins of the main control chip U3 correspond to connection points O0-O5 respectively, and are connected to the multi-channel transistor switch circuit.

[0048] The multi-channel transistor switch circuit consists of three parts, such as Figure 4 As shown. The first part is composed of three parallel second unit circuits, each of which is composed of NPN transistors Q1 / Q2 / Q3 (model 9014), resistors R21 / R24 / R27 (5.1K), resistors R22 / R25 / R28 (1.5K) and resistors R23 / R26 / R29 (10K), and is used to control outputs Y0-Y2. The second part is composed of two parallel third unit circuits, each of which is composed of NPN transistors Q4 / Q5 (9014), PNP transistors Q6 / Q7 (SS8550), resistors R31 / R34 (1.5K), R32 / R35 (10K) and R33 / R36 (10K), and is used to control outputs Y3 and Y4. The third part is composed of a fourth unit circuit, including NPN transistors Q8 (9014), resistors R37 (1.5K) and R38 (10K), and is used to control relays.

[0049] The TxD2 / ADC1 / P1.1, RXD2 / ADC0 / P1.0, INT3 / RXD_2 / P3.6, T1 / P3.5, T0 / P3.4, INT1 / P3.3 and INT0 / P3.2 pins of the main control chip U3 are connected to a multi-channel digital input protection network, such as Figure 3As shown. The network consists of seven first unit circuits connected in parallel, each of which consists of capacitors C8-C14 (50V0.33uF), resistors R4-R10 (100K) and resistors R12-R18 (5.1K), which are used to protect the main control chip U3 from interference from external input signals. The external programming channels X0-X5 (i.e., input) are respectively connected between the capacitors and resistors of the six first unit circuits, and the input points IN0-IN5 are set between the corresponding two resistors and connected to the INT pin of the main control chip U3. A 5V power supply is connected between the capacitor and resistor of the remaining first unit circuit, and the input point IN6 is set between the corresponding two resistors.

[0050] The INT3 / TXD_2 / P3.7 pin of the main control chip U3 is connected to the ground through a resistor R20 (10K) and a diode D1, wherein the diode D1 serves as a status indicator to indicate the working status.

[0051] Relay circuit such as Figure 8 As shown, an 8-pin relay HFD4 / 5 is used, one end of its coil is connected to a 5V power supply, and the other end is connected to the collector of transistor Q8 of the fourth unit circuit. One normally open contact of the relay is grounded, and the other normally open contact is connected to VCC. The 8-pin relay forms a control output of two relays.

[0052] Signal output Y0-Y4, external programmable channels X0-X5, GND and VCC are connected to the horn socket J3, such as Fig. 9 shown.

[0053] The multi-channel digital input protection network is designed to prevent external input signals from interfering with the main control chip U3. Each input channel X0-X5 is connected to the INT pin (INT0 / P3.2, INT1 / P3.3, T0 / P3.4, T1 / P3.5, INT2 / RXD_2 / P3.6, INT3 / TXD_2 / P3.7) of the main control chip U3 through an RC filter circuit composed of resistors R4-R9 (100K) and R12-R17 (5.1K) and capacitors C8-C13 (50V0.33uF). Resistors R4-R9 are used for current limiting, and capacitors C8-C13 are used to filter out high-frequency noise. After the input signal IN0-IN5 passes through the RC filter circuit, it is sent to the corresponding INT pin of the main control chip U3 for processing. The input point IN6 is connected to the 5V power supply through R10 (100K) and R18 (5.1K) and C14 (50V 0.33uF) to form an RC filter circuit.

[0054] The multi-channel transistor switch circuit is used to control the output signals Y0-Y4. The control signals are output by the P1.2, P1.3, P1.4, P1.5, P1.6 / RXD_3 and P5.4 / nRST pins of the main control chip U3. For output Y0-Y2, each channel uses an NPN transistor (Q1-Q3) to form a switch circuit. When the corresponding control pin outputs a high level, the transistor is turned on and the output terminals Y0-Y2 are connected to VCC; when the control pin outputs a low level, the transistor is turned off and the output terminals Y0-Y2 are disconnected from VCC. For output Y3-Y4, each channel uses a push-pull switch circuit composed of an NPN transistor (Q4-Q5) and a PNP transistor (Q6-Q7) to provide a larger drive current and faster switching speed. The relay control circuit uses an NPN transistor Q8 to drive the relay coil. When the main control chip U3 outputs a high level, the NPN transistor Q8 is turned on and the relay is closed; when the main control chip U3 outputs a low level, the NPN transistor Q8 is turned off and the relay is released. The normally closed contact of the relay is used to control external devices.

[0055] In this embodiment, the power supply part uses two linear regulators U1 (L7805) and U2 (AMS1117) to convert the external input 5V voltage into 5V and 3.3V voltages respectively to power the internal circuits of the expander. Capacitors C1, C2, C3, C4, C5, C6 and C7 are used for filtering and decoupling to ensure the stability of the circuit. The reference voltage unit uses TL431 (Q9) to provide a stable 3.3V reference voltage for ADC conversion and other circuits that require reference voltage.

[0056] Finally, all input, output and power signals are connected to the header J3, which is convenient for connecting to external circuits. The header J3 provides a convenient interface for connecting external programming channels X0-X5, output signals Y0-Y4, and power and ground wires.

[0057] In the description of the present invention, it should be noted that the terms "vertical", "up", "down", "horizontal", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.

[0058] In the description of the present invention, it is also necessary to explain that, unless otherwise clearly specified and limited, the terms "set", "install", "connect", and "connect" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0059] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A micro programmable logic expander, including a main control chip U3, characterized in that The main control chip U3 is connected to an external programming channel and a power supply voltage through a multi-channel digital input protection network, and is connected to a signal output through a multi-channel transistor switch circuit. The main control chip U3 is also connected to a reference voltage unit and a serial port input, and the output includes a relay signal.

2. The micro programmable logic expander according to claim 1, characterized in that The main control chip U3 is STC8H1K08; Two capacitors C5 and C6 are connected in parallel between the VCC / AVCC pin and the GND / AGND pin of the main control chip U3, and the VCC / AVCC pin is connected to 3.3V, the GND / AGND pin is connected to the anode end of the reference voltage unit, and the ADC_VReF+ pin of the main control chip U3 is connected to the reference end of the reference voltage unit; The TXD / P3.1 pin and RXD / P3.0 pin of the main control chip U3 are connected to the external communication interface; The P1.2 pin, P1.3 pin, P1.4 pin, P1.5 pin, P1.6 / RXD_3 pin and P5.4 / nRST pin of the main control chip U3 are connected to the multi-channel transistor switch circuit; The TxD2 / ADC1 / P1.1 pin, RXD2 / ADC0 / P1.0 pin, INT3 / RXD_2 / P3.6 pin, T1 / P3.5 pin, T0 / P3.4 pin, INT1 / P3.3 pin, and INT0 / P3.2 pin of the main control chip U3 are connected to the multi-channel digital input protection network; INT3 / TXD_2 / P3.7 of the main control chip U3 is grounded through the resistor R20 and the light emitting diode D1.

3. The micro programmable logic expander according to claim 2, characterized in that the external input 5V voltage passes through the linear regulator U2 and then outputs 3.3V as the internal 3.3V power supply of the expander, and the linear regulator U2 is AMS1117; The external input 5V voltage passes through the linear regulator U1 and outputs the 5V voltage VCC as the 5V power supply inside the expander, and the linear regulator U1 is L7805.

4. The micro programmable logic expander according to claim 3, characterized in that The multi-channel digital input protection network includes 100K resistors R4-R9, 5.1K resistors R12-R17 and 50V 0.33uF capacitors C8-C14, wherein a 50V 0.33uF capacitor, a 100K resistor and a 5.1K resistor are connected in series in sequence to form a first unit circuit, both ends of the first unit circuit are grounded, and the seven first unit circuits are in parallel. External programming channels X0-X5 are connected between the capacitors and resistors of the six first unit circuits, and input points IN0-IN5 are set between the two resistors; a 5V voltage VCC is connected between the capacitor and the resistor of the remaining first unit circuit, and an input point IN6 is set between the two resistors; the input points IN0-IN5 are respectively connected to the INT pin of the main control chip U3.

5. The micro programmable logic expander according to claim 3, characterized in that The multi-channel transistor switch circuit includes three second unit circuits connected in parallel. The second unit circuit is composed of a 5.1K resistor, a 1.5K resistor, a 10K resistor and an NPN transistor of model 9014. The base of the NPN transistor is connected to the main control chip U3 through the 1.5K resistor, the collector of the NPN transistor is connected to VCC through the 5.1K resistor, the emitter of the NPN transistor is grounded, the base and emitter of the NPN transistor are connected through the 10K resistor, and the collector of the NPN transistor is also connected to the signal output of the expander.

6. The micro programmable logic expander according to claim 3, characterized in that The multi-channel transistor switch circuit includes two third unit circuits connected in parallel. The third unit circuit includes an NPN transistor of model 9014, a PNP transistor of model SS8550, a 1.5K resistor and two 10K resistors. The base of the NPN transistor is connected to the main control chip U3 through the 1.5K resistor and is also connected to the emitter of the NPN transistor through a 10K resistor. The emitter of the NPN transistor is grounded, the collector of the NPN transistor is connected to the base of the PNP transistor through the 10K resistor, the emitter of the PNP transistor is connected to VCC, and the collector of the PNP transistor is connected to the signal output of the expander.

7. The micro programmable logic expander according to claim 3, characterized in that The multi-channel transistor switch circuit includes a fourth unit circuit, which includes a 1.5K resistor, a 10K resistor and an NPN transistor with a model number of 9014. The base of the NPN transistor is connected to the main control chip U3 through the 1.5K resistor, the collector of the NPN transistor is connected to the negative electrode of the controlled relay, the emitter of the NPN transistor is grounded, and the base and emitter of the NPN transistor are connected through the 10K resistor.

8. The micro programmable logic expander according to claim 7, characterized in that The controlled relay is an 8-pin relay, model HFD4 / 5, one end of the relay coil is connected to a 5V power supply, and the other end is connected to the fourth unit circuit, one normally open end of the relay is grounded, and the other normally open end is connected to VCC.

9. The micro programmable logic expander according to claim 2, characterized in that The signal output, external programmable channel, GND contact and VCC contact are all connected to the horn socket.