IO expansion circuit, LED lamp expansion circuit and IO equipment

By designing the IO expansion circuit, using the microcontroller and current limiting and anti-reverse module, the high and low level states and switching control of the controlled equipment are realized, solving the high cost and layout problems when the IO chip is not enough, and improving signal stability and equipment control capabilities.

CN223182128UActive Publication Date: 2025-08-01XIAMEN LEELEN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202421683684.5
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2024-07-16
Publication Date
2025-08-01
Estimated Expiration
2034-07-16

AI Technical Summary

Technical Problem

In the prior art, when the IO chip is not enough, it is costly to increase the IO expansion chip and pulse width modulation signal to control the state of multiple controlled devices, and the layout is difficult, which cannot meet the signal allocation needs of complex devices.

Method used

Design an IO expansion circuit, including a microcontroller, a driver module, a current limiting and anti-reverse module and an output port, replaces the IO chip function, controls the switching and state switching of controlled devices, reduces costs and improves signal stability.

Benefits of technology

Multi-state control of controlled devices is realized, cost reduction, circuit layout simplifies and signal stability and reliability are improved. It is suitable for a variety of controlled devices such as LED lights, buttons and relays.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN223182128U_ABST
    Figure CN223182128U_ABST
Patent Text Reader

Abstract

The utility model relates to the field of IO equipment, and discloses an IO expansion circuit, an LED lamp expansion circuit and IO equipment, and the IO expansion circuit comprises a microcontroller, a driving module, a current-limiting anti-reverse module and an output port. The power supply end of the driving module is connected with a power supply, the state control end of the driving module is connected with the microcontroller, and the signal output end of the driving module is connected with the current-limiting anti-reverse module; the current-limiting anti-reverse module is connected with an output port, and the output port is connected with controlled equipment; and the microcontroller is used for outputting a state control signal to the driving module and outputting a switch control signal to the output port so as to perform state switching on the controlled equipment. According to the IO expansion circuit, the state switching of a plurality of controlled devices can be realized, the requirements of different states of the controlled devices are met, and the IO expansion circuit solves the problems that the product cost is reduced, and the change of various states of a product can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of IO devices, and particularly to an IO expansion circuit, an LED lamp expansion circuit, and an IO device. Background Art

[0002] In circuit design, it is often encountered that the IO (input / output port) chips are insufficient, especially for controlled devices with many IO requirements such as indicator lights and buttons. With the diversification of device types, in addition to the large number of IO requirements, the traditional IO chips for controlling the on and off of controlled devices no longer meet the market demand, and it is also required that the IO chips can control multiple states of the controlled devices. For example, the states of the indicator lights: high brightness, low brightness, off. Currently, for the situation of insufficient IO numbers, usually IO expansion chips, microcontrollers, etc. are added. For special requirements, usually IO with pulse width modulation signals is added. However, the current solutions have the following drawbacks: The expansion IO chips and IO chips control the states of multiple controlled devices through pulse width modulation signals, resulting in too high costs, increasing the layout difficulty of the printed circuit board, and for complex controlled devices, there are more signals and insufficient IO resources for allocation, thus unable to meet the required demands. Summary of the Utility Model

[0003] In view of this, the embodiments of this application provide an IO expansion circuit, an LED lamp expansion circuit, and an IO device, which can not only control the on / off and states of controlled devices, but also save application costs.

[0004] In a first aspect, the embodiments of this application provide an IO expansion circuit, including: a microcontroller, a driving module, a current limiting and reverse protection module, and an output port;

[0005] The power supply end of the driving module is connected to a power supply, the state control end of the driving module is connected to the microcontroller, and the signal output end of the driving module is connected to the current limiting and reverse protection module;

[0006] The current limiting and reverse protection module is connected to the output port, and the output port is connected to a controlled device;

[0007] The microcontroller is configured to output a state control signal to the driving module and an on / off control signal to the output port to switch the state of the controlled device.

[0008] In the first possible implementation manner of the first aspect, the number of the current limiting and reverse protection modules is one, and the number of the output ports is multiple;

[0009] The first end of each output port is connected to the current limiting and reverse protection module, and the second end of each output port is respectively connected to each controlled device.

[0010] In the second possible implementation manner of the first aspect, the number of the current-limiting and reverse-preventing modules is multiple and equal to the number of the output ports;

[0011] The first end of each output port is respectively connected to each current-limiting and reverse-preventing module, and the second end of each output port is respectively connected to each controlled device.

[0012] In the third possible implementation manner of the first aspect, the current-limiting and reverse-preventing module includes a first current-limiting resistor, a second current-limiting resistor and a diode;

[0013] The first end of the first current-limiting resistor is used to connect to the power supply, the second end of the first current-limiting resistor is connected to the anode of the diode, the cathode of the diode is connected to the first end of the second current-limiting resistor, the second end of the second current-limiting resistor is used to connect to the power supply, and the series node of the diode and the second current-limiting resistor is connected to the output port.

[0014] In the fourth possible implementation manner of the first aspect, the driving module includes a triode and a biasing unit;

[0015] The biasing unit is used to provide forward and reverse bias voltages for the triode so that the triode enters the linear amplification region during operation;

[0016] The collector of the triode is connected to the series node of the first current-limiting resistor and the diode, the emitter of the triode is grounded, and the base of the triode is used to connect to the microcontroller.

[0017] In the fifth possible implementation manner of the first aspect, the biasing unit includes a first biasing resistor and a second biasing resistor;

[0018] The first end of the first biasing resistor and the first end of the second biasing resistor are connected to the base of the triode, the second end of the second biasing resistor is connected to the emitter of the triode, and the second end of the first biasing resistor is used to connect to the microcontroller.

[0019] In the sixth possible implementation manner of the first aspect, the controlled device includes one of an LED lamp, a key and a relay.

[0020] In a second aspect, an embodiment of the present application provides an LED lamp expansion circuit, including the IO expansion circuit, and each output interface is used to connect an LED lamp.

[0021] In the first possible implementation of the second aspect, the LED lamp expansion circuit further includes at least one photosensitive sensor; the photosensitive sensor is used to connect to the LED lamp to switch various states of the LED lamp according to the ambient brightness where the LED lamp is located.

[0022] In a second aspect, an embodiment of the present application provides an IO device including the IO expansion circuit described above.

[0023] The embodiments of the present application have the following beneficial effects:

[0024] An IO expansion circuit according to an embodiment of the present application includes: a microcontroller, a driving module, a current limiting and reverse protection module, and an output port; a power supply terminal of the driving module is connected to a power supply, a state control terminal of the driving module is connected to the microcontroller, and a signal output terminal of the driving module is connected to the current limiting and reverse protection module; the current limiting and reverse protection module is connected to the output port, and the output port is connected to a controlled device; the microcontroller is configured to output a state control signal to the driving module and an output switch control signal to the output port to switch the state of the controlled device. Based on the above solution, the present application can implement an IO chip to output high and low level state control signals and a switch module, meet the requirements of different states of the controlled device, and has a very low cost, high circuit robustness, and rich expandability. This IO expansion circuit solves the product pain points of both reducing costs and having multiple functions. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the technical solutions of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present application and should not be regarded as limiting the protection scope of the present application. In each drawing, similar components are numbered similarly.

[0026] Figure 1 FIG. 1 shows a first structural schematic diagram of the IO expansion circuit according to an embodiment of the present application;

[0027] Figure 2 FIG. 2 shows a first circuit schematic diagram of the IO expansion circuit according to an embodiment of the present application;

[0028] Figure 3 FIG. 3 shows a second circuit schematic diagram of the IO expansion circuit according to an embodiment of the present application;

[0029] Figure 4 FIG. 4 shows a circuit schematic diagram of the LED lamp expansion circuit according to an embodiment of the present application.

[0030] MAIN ELEMENT SYMBOL DESCRIPTION:

[0031] 100 - IO expansion circuit; 110 - microcontroller; 120 - driving module; 130 - current - limiting and reverse - protection module; 140 - output port. Detailed implementation manners

[0032] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments.

[0033] Generally, the components of the embodiments of the present application described and illustrated herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the present application to be protected, but merely represents the selected embodiments of the present application. All other embodiments obtained by those skilled in the art based on the embodiments of the present application without creative efforts belong to the scope of protection of the present application.

[0034] Hereinafter, the terms "including", "having" and their cognates that can be used in various embodiments of the present application are only intended to represent specific features, numbers, steps, operations, elements, components or combinations of the foregoing items, and should not be construed as first excluding the existence of one or more other features, numbers, steps, operations, elements, components or combinations of the foregoing items or increasing the possibility of one or more features, numbers, steps, operations, elements, components or combinations of the foregoing items.

[0035] In addition, the terms "first", "second", "third", etc. are only used for distinguishing descriptions and cannot be understood as indicating or implying relative importance.

[0036] Unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meaning as commonly understood by those of ordinary skill in the art to which the various embodiments of the present application belong. The terms (such as those defined in a general - use dictionary) will be interpreted as having the same meaning as the contextual meaning in the relevant technical field and will not be interpreted as having an idealized meaning or being overly formal, unless clearly defined in the various embodiments of the present application.

[0037] In the embodiments of the present application, the IO expansion circuit controls the switches and states of the controlled devices connected to the IO chip in the same circuit, and the IO chip and the controlled devices are interconnected through the IO expansion circuit. It should be noted that, to reduce costs, the IO expansion circuit can output switch control signals and state control signals with high and low level states, without PWM function. The IO expansion circuit controls the corresponding actions of the controlled devices according to the level states of the switch control signals and state control signals. In addition, the IO expansion circuit can, to a certain extent, replace the functions of the IO chip. Through the combination of peripheral components, the control of the controlled devices is realized. Compared with using multiple IO chips, the design and manufacture of the IO expansion circuit are relatively simple, which can save costs and is also conducive to reducing the size of the circuit board and power consumption. And during the use of traditional IO expansion chips, problems such as electromagnetic interference, temperature fluctuations, and power supply noise may occur, resulting in unstable signal transmission. By using the IO expansion circuit, the signal stability and reliability can be improved through optimizing the circuit design and component selection.

[0038] Please refer to Figure 1 , which is a schematic structural diagram of an IO expansion circuit 100 proposed in the embodiments of the present application. Exemplarily, the IO expansion circuit 100 is used to switch the states of multiple controlled devices. The IO expansion circuit 100 is the input and output interface circuit of the IO chip and is located at the outermost periphery of the IO chip layout. The IO expansion circuit 100 includes a microcontroller 110, a driving module 120, a current limiting and reverse protection module 130, and an output port 140; wherein, the output end of the microcontroller 110 serves as the input end of the IO expansion circuit 100 to output state control signals and switch control signals; the output port 140 serves as the output end of the IO expansion circuit 100 and is used to connect multiple different controlled devices to correspondingly control the states of the controlled devices.

[0039] In this embodiment, the power supply end of the driving module 120 is connected to the power supply, the state control end of the driving module 120 is connected to the microcontroller 110, and the signal output end of the driving module 120 is connected to the current limiting and reverse protection module 130; the current limiting and reverse protection module 130 is connected to the output port 140, and the output port 140 is connected to the controlled device. The microcontroller 110 is used to output state control signals to the driving module 120 and output switch control signals to the output port 140 to switch the switch state and working state of the controlled device.

[0040] Exemplarily, the switch control signal output by the microcontroller 110 can directly act on the controlled device through the output port 140 to control the corresponding controlled device to turn on or off. The microcontroller 110 can be used to output multiple switch control signals to respectively control different controlled devices. The microcontroller 110 is also used to output switch control signals with different level states to switch the on and off states of the corresponding controlled devices. The driving module 120 is used to conduct or cut off according to the level state of the state control signal output by the microcontroller 110, so as to switch the working state when the external device is turned on. Among them, the level states of the switch control signal and the state control signal include high level and low level. Taking the switch control signal as an example, when the switch control signal is at a high level, it can represent that the switch is on, and there will be current passing through the corresponding controlled device; when the switch control signal is at a low level, it can represent that the switch is off, and there will be no current passing through the corresponding controlled device.

[0041] It can be understood that the IO expansion circuit 100 is used to perform switch control on multiple different controlled devices through the state control signal and the switch control signal output by the microcontroller 110, and respectively control the working state when the external device is turned on. On the one hand, the switch control signal can be used to wake up the controlled device, so that the controlled device can enter the on state from the off state; on the other hand, the state control signal can be used to perform corresponding state transformation on the controlled device when the controlled device enters the on state.

[0042] To better understand the IO expansion circuit 100, the following will detail each component in the IO expansion circuit 100.

[0043] As Figure 2 shown, in one implementation, the number of the current limiting and reverse protection modules 130 is one, and the number of the output ports 140 is multiple; the first end of each output port 140 is connected to the current limiting and reverse protection module 130, and the second end of each output port 140 is respectively connected to each controlled device.

[0044] In one implementation, the current limiting and reverse protection module 130 includes a first current limiting resistor R1, a second current limiting resistor R2 and a diode D1; wherein, the first end of the first current limiting resistor R1 is used to connect to the power supply VCC, the second end of the first current limiting resistor R1 is connected to the anode of the diode D1, the cathode of the diode D1 is connected to the first end of the second current limiting resistor R2, the second end of the second current limiting resistor R2 is used to connect to the power supply VCC, and the series node of the diode D1 and the second current limiting resistor R2 is connected to the output port 140.

[0045] In one embodiment, the driving module 120 includes a triode Q1 and a biasing unit; wherein, the biasing unit is configured to provide forward and reverse biasing voltages for the triode Q1, so that the triode Q1 enters the linear amplification region during operation; the collector of the triode Q1 is connected to the series node of the first current-limiting resistor R1 and the diode D1, the emitter of the triode Q1 is grounded, and the base of the triode Q1 is used to connect to the microcontroller 110.

[0046] In this embodiment, the triode Q1 is configured to conduct or cut off when the high and low levels of the state control signal change. For example, when the state control signal input is at a low level, the triode Q1 is in a cut-off state. At this time, there is no current flow between the collector and the emitter of the triode Q1, and the load in the circuit is not affected by the control signal; when the state control signal input is at a high level, the triode Q1 is in a saturation or amplification state. In the saturation state, there is a large current flow between the collector and the emitter of the triode Q1, and at this time, the load in the circuit can be controlled to be in a conducting state. The first current-limiting resistor R1 is used to limit the current of the triode Q1 in the IO expansion circuit, prevent damage to external devices due to excessive current, and make the triode Q1 work more stably.

[0047] In this embodiment, the diode D1 is configured to conduct or cut off correspondingly according to the conduction or cut-off of the triode Q1, so as to switch the working state of the external device. The diode D1 is in a conducting state when the triode Q1 is cut off, and the diode D1 is also in a cut-off state when the triode Q1 is conducting, and at the same time, it prevents the power supply VCC from flowing to the ground after the triode Q1 conducts. Among them, the diode D1 can be a Schottky diode with a low voltage drop, which is used to further reduce the voltage loss and power consumption when the triode Q1 is turned on. For example, the value of the second current-limiting resistor R2 is 1K, the value of the power supply VCC is 5V, the voltage drop of the controlled device and the diode D1 is 2.5V, the value of the first current-limiting resistor R1 is 500Ω, and the path 1 includes the power supply VCC → the second current-limiting resistor R2 → the controlled device; the path 2 includes the power supply VCC → the first current-limiting resistor R1 → the diode D1 → the controlled device. When the state control signal is at a low level, then in the path 1, the current and voltage of the second current-limiting resistor R2 are calculated as I1=(V VCC -Vf1) / R2 = 2.5mA; U1 = R2*I1 = 2.5V, where I1 represents the current of the second current-limiting resistor R2, V VCC represents the power supply VCC voltage, R4 represents the resistance value of the second current-limiting resistor R2, Vf1 is the voltage drop of the controlled device; when the switch control signal is at a low level, the triode Q1 is cut off, then in the path 2, the current and voltage of the first current-limiting resistor R1 are calculated as: I2=(V CCC(-Vf1 - Vf2) / R1 = 4 mA; U2 = R1 * I2 = 2.5 V, where I2 represents the current of the first current-limiting resistor R1, U2 represents the voltage of the first current-limiting resistor R1, Vf2 represents the voltage drop of the diode D1, and R2 represents the resistance value of the first current-limiting resistor R1; thus, it can be known that the voltage of the first current-limiting resistor R1 is greater than the voltage of the second current-limiting resistor R2, and the diode D1 can be effectively turned on when the triode Q1 is cut off.

[0048] In an embodiment, the biasing unit includes a first biasing resistor R3 and a second biasing resistor R4; wherein, the first end of the first biasing resistor R3 and the first end of the second biasing resistor R4 are connected to the base of the triode Q1, the second end of the second biasing resistor R4 is connected to the emitter of the triode Q1, and the second end of the first biasing resistor R3 is used to connect to the microcontroller 110.

[0049] In this embodiment, the first biasing resistor R3 and the second biasing resistor R4 are used to make the triode Q1 operate in the saturation region to minimize the switching time and switching loss of the triode Q1. The resistance value of the first biasing resistor R3 is used to affect the magnitude of the input biasing current of the triode Q1 so that the triode Q1 operates in the saturation region. The output current of the triode Q1 satisfies: I c <β * I b where I c represents the output current of the triode Q1, β is a constant representing the amplification factor of the output current of the triode Q1, and I b represents the input current of the triode Q1. The second biasing resistor R4 is used to ensure that the triode Q1 can be reliably cut off when its input is floating.

[0050] As Figure 3 shown, in another embodiment, the number of the current-limiting and reverse-preventing modules 130 is multiple and equal to the number of the output ports 140; the first end of each output port 140 is respectively connected to each current-limiting and reverse-preventing module 130, and the second end of each output port 140 is respectively connected to each controlled device.

[0051] Exemplarily, each output port 140 is connected to each current-limiting and reverse-preventing module 130 to be respectively connected to each controlled device, so as to respectively control the switching states of each controlled device, and when the switching states of each controlled device are switched, it will not affect the working states of other controlled devices. Specifically, each output port 140 is connected to the series node of the diode D1 and the second current-limiting resistor R2.

[0052] In one embodiment, the controlled device includes one of an LED lamp, a button, a relay, etc. Exemplarily, taking the control of an LED lamp as an example, the IO expansion circuit drives by outputting a switch control signal and a state control signal in a high-level state, so as to turn on or off the LED lamp in the circuit; for the button, the IO expansion circuit can receive the input signal of the button, thereby judging the state of the button, and further controlling the switch of other devices; for the relay, the on and off of the relay driving transistor in its driving circuit can be controlled to achieve switch control.

[0053] In one embodiment, as Figure 4 shown, the present application also provides an LED lamp expansion circuit, which includes an IO expansion circuit, and each output interface is used to connect an LED lamp.

[0054] It can be understood that the LED lamp expansion circuit can meet the three-state requirements of the LED lamp according to the state control signal and the switch control signal of different level states. For example, when the state control signal is high level, the triode Q1 conducts, the emitter level of the triode Q1 is pulled to the ground, the diode D1 is cut off, and the path 2 is not connected. At this time, when the switch control signal is high level, the state of the LED lamp is off; when the switch control signal is low level, the path 1 is connected, and the state of the LED lamp is low brightness. When the state control signal is low level, the triode Q1 is cut off, the emitter level of the triode Q1 is pulled to high level, the diode D1 conducts, and the path 2 can be connected. At this time, when the switch control signal is high level, the state of the LED lamp is off; when the switch control signal is low level, the path 1 is connected, and the state of the LED lamp is high brightness. It can be seen from this that the switch control signal controls the on and off of the LED lamp, and the state control signal controls the state of the LED lamp.

[0055] In one embodiment, the LED lamp expansion circuit further includes at least one photosensitive sensor R7; the photosensitive sensor R7 is used to connect to the LED lamp to switch various states of the LED lamp according to the ambient brightness where the LED lamp is located.

[0056] Exemplarily, a photosensitive sensor R7 can be connected to each LED lamp in the LED lamp expansion circuit, so as to achieve the effect that the state of the LED lamp corresponds to the ambient brightness. Specifically, the photosensitive sensor R7 is used to be electrically connected to each LED lamp, so as to sense the ambient brightness where the current LED lamp is located and transmit the corresponding photosensitive signal to the microcontroller 110; according to the usage requirements of the LED lamp, different brightness thresholds are set in this application. For example, when the photosensitive sensor senses weak ambient light brightness, the microcontroller is used to generate a state control signal with a high level state according to the photosensitive signal, so that the LED lamp can be switched to a lower brightness state; and when the photosensitive sensor senses strong ambient light brightness, the microcontroller 110 is also used to generate a state control signal with a low level state according to the photosensitive signal, so that the LED lamp can be switched to a higher brightness state.

[0057] It can be understood that the LED lamp expansion circuit realizes the automatic adjustment and switching function between the photosensitive sensor R7 and the LED lamp. When the photosensitive sensor R7 senses the change of ambient light brightness, the control circuit adjusts the brightness and state of the LED lamp to meet specific usage requirements. Through the above method, the LED lamp expansion circuit can realize the function of automatically adjusting and switching the LED lamp based on the photosensitive sensor R7, realizing the automatic control and energy efficiency optimization of the LED lamp. This design idea is especially suitable for occasions that require lighting control according to ambient light brightness, such as indoor lighting, lighting landscapes, etc.

[0058] In one implementation manner, this application also provides an IO device, and the IO device includes an IO expansion circuit. Specifically, the IO device can be an intelligent panel, an intelligent door lock, a smart screen and other intelligent products.

[0059] Exemplarily, the IO device further includes a power module. The power module is used to supply power to the IO expansion circuit, and the power module is also used to ensure a stable power supply for the IO expansion circuit in the IO device and meet various complex power requirements. Other components and peripheral devices are also included in the IO device. For example, some IO devices require a human-machine interface and a communication interface. At this time, the design and selection of components such as a liquid crystal screen, a button, a buzzer, and a network port are also involved.

[0060] The above is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art within the technical scope disclosed in this application can easily think of changes or substitutions, which should all be covered within the protection scope of this application.

Claims

1. An IO expansion circuit, characterized in that, Comprising: A microcontroller, a driving module, a current-limiting and reverse-preventing module, and an output port; The power supply terminal of the driving module is connected to a power supply, the state control terminal of the driving module is connected to the microcontroller, and the signal output terminal of the driving module is connected to the current-limiting and reverse-preventing module; The current-limiting and reverse-preventing module is connected to the output port, and the output port is connected to a controlled device; The microcontroller is configured to output a state control signal to the driving module and an output switch control signal to the output port to perform state switching on the controlled device.

2. The IO expansion circuit according to claim 1, wherein The number of the current-limiting and reverse-preventing modules is one, and the number of the output ports is multiple; The first end of each output port is connected to the current-limiting and reverse-preventing module, and the second end of each output port is respectively connected to each controlled device.

3. The IO expansion circuit according to claim 1, wherein The number of the current-limiting and reverse-preventing modules is multiple and equal to the number of the output ports; The first end of each output port is respectively connected to each current-limiting and reverse-preventing module, and the second end of each output port is respectively connected to each controlled device.

4. The IO expansion circuit according to claim 1, wherein The current-limiting and reverse-preventing module includes a first current-limiting resistor, a second current-limiting resistor, and a diode; The first end of the first current-limiting resistor is used to connect to the power supply, the second end of the first current-limiting resistor is connected to the anode of the diode, the cathode of the diode is connected to the first end of the second current-limiting resistor, the second end of the second current-limiting resistor is used to connect to the power supply, and the series node of the diode and the second current-limiting resistor is connected to the output port.

5. The IO expansion circuit according to claim 4, wherein The driving module includes a triode and a biasing unit; The biasing unit is configured to provide forward and reverse biasing voltages for the triode to enable the triode to enter the linear amplification region during operation; The collector of the triode is connected to the series node of the first current-limiting resistor and the diode, the emitter of the triode is grounded, and the base of the triode is used to connect to the microcontroller.

6. The IO expansion circuit according to claim 5, wherein The biasing unit includes a first biasing resistor and a second biasing resistor; The first end of the first biasing resistor and the first end of the second biasing resistor are connected to the base of the triode, the second end of the second biasing resistor is connected to the emitter of the triode, and the second end of the first biasing resistor is used to connect to the microcontroller.

7. The IO expansion circuit according to claim 1, characterized in that The controlled device includes one of an LED lamp, a key, and a relay.

8. An LED lamp expansion circuit, characterized in that, Comprising the IO expansion circuit according to any one of claims 1 to 6, and each output interface is used to connect an LED lamp.

9. The LED lamp expansion circuit according to claim 8, characterized in that, Further comprising at least one photosensitive sensor; The photosensitive sensor is used to connect to the LED lamp to perform switching of multiple states of the LED lamp according to the ambient brightness where the LED lamp is located.

10. An IO device, characterized in that, Comprising the IO expansion circuit according to any one of claims 1 to 7.