Port multiplexing circuit and electric equipment

By designing a port multiplexing circuit, the controller's multiplexed ports are used to receive and output signals in a time-division manner, which solves the problem of insufficient controller ports, improves resource utilization, reduces costs, and ensures the reliability and stability of the load.

CN223553316UActive Publication Date: 2025-11-14GREE ELECTRIC APPLIANCE INC OF ZHUHAI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202422690343.7
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2024-11-05
Publication Date
2025-11-14
Estimated Expiration
2034-11-05

AI Technical Summary

Technical Problem

In electrical equipment, insufficient controller chip ports necessitate the replacement of a larger number of chips, increasing costs and wasting resources.

Method used

Design a port multiplexing circuit that receives input signals or outputs control signals in a time-division manner through the multiplexing port of the controller, and uses the load control switch module to turn off when an input signal is received, thereby realizing the control of the load.

Benefits of technology

It improves the utilization rate of controller port resources, reduces hardware costs, ensures the reliability and stability of the load, and avoids the need to upgrade chips due to insufficient ports.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN223553316U_ABST
    Figure CN223553316U_ABST
Patent Text Reader

Abstract

The utility model relates to a port multiplexing circuit and electric equipment, the port multiplexing circuit comprises a controller and load control switch modules, the controller is provided with at least one multiplexing port, and the number of the load control switch modules is the same as that of the multiplexing ports. Each multiplexing port is used for connecting a signal input module and a load control switch module, and the load control switch module is also used for connecting a load. The multiplexing port is used for receiving an input signal or outputting a control signal in a time-sharing manner, the input signal is a signal transmitted by the signal input module, the control signal is used for being transmitted to the load control switch module to control a load, and the load control switch module is switched off when receiving the input signal. Therefore, the multiplexing port of the controller performs input and output in a time-sharing manner, so that the utilization rate of port resources of the controller is remarkably improved. Therefore, the condition that the controller chip needs to be upgraded due to insufficient number of ports is effectively improved, and the hardware cost is further reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of circuit technology, and in particular to a port multiplexing circuit and electrical equipment. Background Technology

[0002] In electrical equipment, controllers are often used for data acquisition and load control. For example, a controller can receive temperature signals transmitted by a temperature detection module and control loads such as buzzers and fans. This process requires the use of two ports on the controller: one port is dedicated to receiving the acquired data, and the other port is used to output load control signals.

[0003] However, when faced with an insufficient number of controller chip ports, it is necessary to replace it with a chip that has more ports, which leads to increased costs and wasted resources. Utility Model Content

[0004] Therefore, it is necessary to provide a port multiplexing circuit and power supply that can reduce the number of controller ports occupied, in order to address the above problems.

[0005] A port multiplexing circuit includes: a controller and a load control switch module, wherein the controller has at least one multiplexing port, and the number of load control switch modules is the same as the number of multiplexing ports; each multiplexing port is used to connect a signal input module and a load control switch module, and the load control switch module is also used to connect a load;

[0006] The multiplexed port is used to receive input signals or output control signals in a time-division manner; the input signal is the signal output by the signal input module; the control signal is used to transmit to the load control switch module to control the load, and the load control switch module turns off when it receives the input signal.

[0007] In one embodiment, the load control switch module includes a switching control switch unit and a load control switch unit. The controlled terminal of the switching control switch unit is connected to the multiplexing port, and the output terminal of the switching control switch unit is connected to the controlled terminal of the load control switch unit. The output terminal of the load control switch unit is used to connect to the load.

[0008] The switching control switch unit is used to control the load control switch unit to turn off according to the input signal; it is also used to control the load control switch unit to turn on or off according to the received control signal, so as to control the working state of the load.

[0009] In one embodiment, the switching control switch unit includes a reference voltage generation unit and a switch signal generation unit, wherein the switch signal generation unit is connected to the reference voltage generation unit, the multiplexing port, and the load control switch unit, respectively.

[0010] The reference voltage generation unit is used to generate a reference voltage signal;

[0011] The switching signal generation unit is used to generate and output a turn-off signal based on the input signal and the reference voltage signal; it is also used to generate and output a turn-off signal or a turn-on signal based on the control signal and the reference voltage signal, wherein the turn-off signal is used to control the load control switching unit to turn off, and the turn-on signal is used to control the load control switching unit to turn on.

[0012] In one embodiment, the reference voltage generation unit includes a first voltage divider resistor and a second voltage divider resistor; a first terminal of the first voltage divider resistor is connected to a power supply, and a second terminal of the first voltage divider resistor is grounded through the second voltage divider resistor; the common terminal connecting the first voltage divider resistor and the second voltage divider resistor serves as the output terminal of the reference voltage generation unit, used to output the reference voltage signal.

[0013] In one embodiment, the switch signal generation unit includes a first switch transistor; the controlled terminal of the first switch transistor is connected to the multiplexing port and the signal input module, the first terminal of the first switch transistor is connected to the reference voltage generation unit, and the second terminal of the first switch transistor is connected to the load control switch unit.

[0014] In one embodiment, the first switching transistor is a PNP transistor; the emitter of the PNP transistor serves as the first terminal of the first switching transistor, the collector of the PNP transistor serves as the second terminal of the first switching transistor, and the base of the PNP transistor serves as the controlled terminal of the first switching transistor.

[0015] In one embodiment, the load control switch unit includes a second switch transistor and a pull-down resistor. The controlled terminal of the second switch transistor is connected to the switching control switch unit. The first terminal of the second switch transistor is used to connect to the load, and the second terminal of the second switch transistor is connected to the controlled terminal of the second switch transistor through the pull-down resistor.

[0016] An electrical device includes a signal input module, a load, and a port multiplexing circuit as described above.

[0017] In one embodiment, the signal input module includes a temperature sensing resistor and a third voltage divider resistor. The first end of the temperature sensing resistor is connected to a power supply, and the second end of the temperature sensing resistor is grounded through the third voltage divider resistor. The common terminal of the temperature sensing resistor and the third voltage divider resistor is connected to the multiplexing port.

[0018] In one embodiment, the signal input module further includes a capacitor, and the common terminal of the temperature sensing resistor and the third voltage divider resistor is grounded through the capacitor.

[0019] In one embodiment, the load includes a buzzer connected to the load control switch module.

[0020] The aforementioned port multiplexing circuit and electrical equipment include a controller and load control switch modules. The controller has at least one multiplexing port, and the number of load control switch modules is the same as the number of multiplexing ports. Each multiplexing port is used to connect a signal input module and a load control switch module, and the load control switch module is also used to connect a load. The multiplexing port is used to receive input signals or output control signals in a time-division multiplexing manner. The input signal is the signal transmitted by the signal input module, and the control signal is used to transmit to the load control switch module to control the load. The load control switch module turns off when it receives an input signal. Therefore, by enabling the controller's multiplexing ports to perform input and output in a time-division multiplexing manner, the utilization rate of the controller's port resources is significantly improved. This effectively alleviates the situation where the controller chip needs to be upgraded due to insufficient port quantity, thereby reducing hardware costs. Attached Figure Description

[0021] Figure 1 This is a block diagram of a port multiplexing circuit in one embodiment;

[0022] Figure 2 This is a block diagram of the port multiplexing circuit in another embodiment;

[0023] Figure 3 This is a block diagram of a port multiplexing circuit in another embodiment;

[0024] Figure 4 This is a schematic diagram of a port multiplexing circuit in one embodiment. Detailed Implementation

[0025] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0026] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application.

[0027] It is understood that the terms “first,” “second,” etc., used in this application may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another.

[0028] Spatial relation terms such as “below,” “under,” “below,” “under,” “above,” “above,” etc., are used herein to describe the relationship between one element or feature shown in the figure and other elements or features. It should be understood that, in addition to the orientation shown in the figure, spatial relation terms also include different orientations of the device in use and operation. For example, if the device in the figure is flipped, the element or feature described as “below,” “under,” or “below” will be oriented “above” the other element or feature. Therefore, the exemplary terms “below” and “under” can include both above and below orientations. Furthermore, the device may also include other orientations (e.g., rotated 90 degrees or other orientations), and the spatial descriptive terms used herein will be interpreted accordingly.

[0029] It should be noted that when one element is considered to be "connected" to another element, it can be directly connected to the other element or connected to the other element through an intermediary element. Furthermore, in the following embodiments, "connection" should be understood as "electrical connection," "communication connection," etc., if there is transmission of electrical signals or data between the connected objects.

[0030] When used herein, the singular forms of “a,” “an,” and “the” may also include the plural forms unless the context clearly indicates otherwise. It should also be understood that the terms “comprising,” “including,” or “having,” etc., specify the presence of the stated feature, whole, step, operation, component, part, or combination thereof, but do not preclude the possibility of the presence or addition of one or more other features, wholes, steps, operations, components, parts, or combinations thereof.

[0031] In one embodiment, a port multiplexing circuit is provided. For example... Figure 1 As shown, the port multiplexing circuit 100 includes a controller 110 and a load control switch module 120, and the controller 110 has at least one multiplexing port 111.

[0032] The controller 110 can be selected according to the actual situation, such as an MCU (Microcontroller Unit) chip, a programmable logic device (PLD), etc. The multiplexed port 111 can be the I / O (Input / Output) port of the controller 110.

[0033] The number of load control switch modules 120 is equal to the number of multiplexed ports 111. Each multiplexed port 111 is used to connect a signal input module 200 and a load control switch module 120, and the load control switch module is also used to connect a load 300.

[0034] The input signal is the signal output by the signal input module 200. The structure and type of the signal input module 200 are not limited and can be configured according to actual usage needs. For example, the signal input module 200 can be a temperature detection module, humidity acquisition module, or other module capable of sampling signals, or it can be an input module capable of receiving external signals, such as a button or control panel.

[0035] The structure and type of load 300 are not limited and can be set according to actual usage needs. For example, load 300 can be a buzzer, fan, relay, etc.

[0036] Specifically, the multiplexed port 111 is used for time-division multiplexing to receive input signals or output control signals. It is understood that I / O port configuration is typically implemented through programming, during which the operating mode of the I / O port (such as input mode, output mode, etc.) can be specified. In this embodiment, the I / O port can receive input signals when in input mode and output control signals when in output mode. The timing of multiplexed port 111 receiving input signals and outputting control signals is not limited; those skilled in the art can program and set it according to actual usage needs.

[0037] The control signal is transmitted to the load control switch module 120 to control the load 300. Specifically, the load control switch module 120 turns off or on upon receiving the control signal. When the load control switch module 120 is on, the load 300 is in a first state; when the load control switch module 120 is off, the load 300 is in a second state. One of the first and second operating states can be an on-running state and the other a off-running state. Taking a buzzer as an example, the first state can be a buzzer-on state, and the second state can be a buzzer-off state.

[0038] The load control switch module 120 turns off when it receives an input signal, so that the state of the load 300 is not affected by the signal input module 200.

[0039] Understandable. Figure 1 The illustrated embodiment uses one multiplexed port 111 of the controller 110 and one load control switch module 120 as an example. In actual implementation, the controller 110 has multiple multiplexed ports 111. Each multiplexed port 111 can be used as an input port only, an output port only, or a time-division multiplexed port. When used as a time-division multiplexed port, each time-division multiplexed port 111 needs to be connected to a corresponding load control switch module 120. Each multiplexed port 111 can be connected to the same signal input module 200 or different signal input modules 200. Each load control switch module 120 can be connected to the same load or different loads.

[0040] The aforementioned port multiplexing circuit 100 includes a controller 110 and a load control switch module 120. The controller 110 has at least one multiplexed port 111, and the number of load control switch modules 120 is the same as the number of multiplexed ports 111. Each multiplexed port 111 is used to connect a signal input module 200 and a load control switch module 120, and the load control switch module 120 is also used to connect a load 300. The multiplexed port 111 is used to receive input signals or output control signals in a time-division multiplexing manner. The input signal is the signal transmitted by the signal input module 200, and the control signal is used to transmit to the load control switch module 120 to control the load 300. The load control switch module 120 is turned off or on when it receives an input signal. Thus, by enabling the multiplexed ports 111 of the controller 110 to perform input and output in a time-division multiplexing manner, the utilization rate of the controller 110's port resources is significantly improved. This effectively improves the situation where the controller chip needs to be upgraded due to insufficient port quantity, thereby reducing hardware costs.

[0041] In one embodiment, such as Figure 2 As shown, the load control switch module 100 includes a switching control switch unit 121 and a load control switch unit 122.

[0042] The controlled terminal of the switching control switch unit 121 is connected to the multiplexing port 111 to receive the control signal output from the multiplexing port 111 and the input signal from the signal input module 200. The output terminal of the switching control switch unit 121 is connected to the controlled terminal of the load control switch unit 122, and the output terminal of the load control switch unit 122 is used to connect the load 300.

[0043] The switching control switch unit 121 is used to control the load control switch unit 122 to turn off according to the input signal; it is also used to control the load control switch unit 122 to turn on or off according to the received control signal, so as to control the working state of the load 300.

[0044] In this embodiment, the load control switch unit 122 serves as the control switch for the load 300. When it is turned on, the load 300 is in a first state; when it is turned off, the load 300 is in a second state.

[0045] The switching control switch unit 121 acts as the control switch for the load control switch unit 122. When the multiplexing port 111 is in input mode, the switching control switch unit 121 turns off according to the input signal of the signal input module 200, thereby disconnecting the load control switch unit 122 from the signal input module 200. This ensures that the switching state of the load control switch unit 122 is not affected by the signal input module 200, thus guaranteeing the reliability of the load 300's state.

[0046] When the multiplexing port 111 is in output mode, the control signal output by the multiplexing port 111 can control the switching control switch unit 121 to turn on, so that the load control switch unit 122 can turn on, thereby controlling the load 300.

[0047] Thus, the switching control unit 121 and the load control switch unit 122 work together to achieve reliable and precise control of the load 300. This design not only ensures the multiplexing function of the multiplexing port 111, but also ensures the stability and reliability of the load 300 under different conditions.

[0048] In one embodiment, such as Figure 3 As shown, the switching control switch unit 121 includes a reference voltage generation unit 1211 and a switch signal generation unit 1212. The switch signal generation unit 1212 is connected to the reference voltage generation unit 1211, the multiplexing port 111 and the load control switch unit 122 respectively.

[0049] The reference voltage generation unit 1211 is used to generate a reference voltage signal Vref. The magnitude of the reference voltage signal Vref can be set according to specific circumstances and is not limited here.

[0050] The switch signal generation unit 1212 generates and outputs a turn-off signal based on the input signal and the reference voltage signal Vref. The turn-off signal is used to control the load control switch unit 122 to turn off.

[0051] The switching signal generation unit 1212 is also used to generate and output a turn-off signal or a turn-on signal based on the control signal and the reference voltage signal Vref. The turn-on signal is used to control the load to turn on the switching unit 122.

[0052] In this embodiment, when the multiplexing port 111 is in input mode, the switch signal generation unit 1212 generates and outputs a shutdown signal based on the input signal and the reference voltage signal Vref. The shutdown signal controls the load control switch unit 122 to shut down, thereby ensuring that the load 300 is not interfered with by the input signal.

[0053] When the multiplexed port 111 is in output mode, the switch signal generation unit 1212 generates an on or off signal based on the control signal and the reference voltage signal Vref. Specifically, if the control signal meets the preset on condition, an on signal is generated and output; if the control signal meets the preset off condition, an off signal is generated and output. The on and off signals control the on or off state of the load control switch unit 122, thereby achieving precise control of the load 300 in the case of port multiplexing. The preset on condition can be a high level for the control signal, and the preset off condition can be a low level for the control signal.

[0054] Therefore, the reference voltage generation unit 1211 and the switch signal generation unit 1212 can flexibly and reliably control the state of the load 300 in different operating modes of the multiplexing port 111.

[0055] In one embodiment, such as Figure 4 As shown, the reference voltage generation unit 1211 includes a first voltage divider resistor R1 and a second voltage divider resistor R2. The first terminal of the first voltage divider resistor R1 is connected to the power supply VCC, and the second terminal of the first voltage divider resistor R1 is grounded through the second voltage divider resistor R2. The common terminal connecting the first voltage divider resistor R1 and the second voltage divider resistor R2 serves as the output terminal of the reference voltage generation unit 1211, used to output the reference voltage signal Vref.

[0056] The common connection point of the first voltage divider resistor R1 and the second voltage divider resistor R2 is used as the output terminal of the reference voltage generation unit 1211, providing a stable reference voltage signal Vref to the switch signal generation unit 1212.

[0057] Specifically, when the power supply VCC provides voltage, current flows to ground through the first voltage divider resistor R1 and the second voltage divider resistor R2, and the power supply voltage is divided according to the resistance ratio of the first voltage divider resistor R1 and the second voltage divider resistor R2. The result of this voltage division is the output voltage of the reference voltage generation unit 1211, i.e., the reference voltage signal Vref. The first voltage divider resistor R1 and the second voltage divider resistor R2 can be implemented using resistive elements or equivalent circuits, and their resistance values ​​can be set according to actual conditions.

[0058] In this embodiment, the reference voltage generation unit 1211 is implemented using two voltage divider resistors to generate a reference voltage signal Vref that meets the requirements based on the power supply voltage. Since resistive elements have good stability, the reference voltage signal Vref obtained by the voltage division of the first voltage divider resistor R1 and the second voltage divider resistor R2 is stable and reliable. This makes the control based on the reference voltage signal Vref more reliable, thus making the on / off state of the switch signal generation unit 122 more reliable, and consequently, the control of the load 300 more reliable.

[0059] Understandable, Figure 4 In the illustrated embodiment, the controller 110 employs an MCU chip, which has multiple multiplexed ports 111. Figure 4 In this embodiment, only one port, I / O pin 11, is used as an example of a time-division multiplexed port.

[0060] In one embodiment, the switch signal generation unit 1212 may include a first switch transistor Q1. The controlled terminal of the first switch transistor Q1 is connected to the multiplexing port 111 ( Figure 4 Pin 11) and signal input module 200 are connected to the first terminal of the first switch Q1, which is connected to the reference voltage generation unit 1211, and the second terminal of the first switch Q1 is connected to the load control switch unit 122.

[0061] When the multiplexing port 111 is in input mode, it receives an input signal from the signal input module 200. At this time, the controlled terminal of the first switch Q1 receives the input signal, and the first terminal receives the reference voltage signal Vref. Under the action of the reference voltage signal Vref and the input signal, the first switch Q1 is turned off, thereby disconnecting the connection between the load control switch unit 122 and the signal input module 200 (or multiplexing port 111), thus helping to prevent the input signal from directly interfering with the state of the load 300.

[0062] When the multiplexing port 111 is in output mode, its output control signal directly controls the switching state of the first switch Q1. At this time, under the action of the first control signal and the reference voltage signal Vref, the first switch Q1 is turned on or off. In some embodiments, when the first control signal is high, the first switch Q1 is turned on, thereby turning on the load control switch unit 122, thus allowing current to flow through the load 300. Conversely, when the first control signal is low, the first switch Q1 is turned off, thereby disconnecting the power supply to the load 300.

[0063] In actual implementation, the voltage magnitude of the input signal is different from that of the first control signal, so that when the multiplexing port 111 is in output mode, the input signal does not affect the control of the first control signal on the state of the first switch Q1.

[0064] In this embodiment, the first switch Q1 can control the switching state of the load control switch unit 122 according to the input signal and the control signal, thereby achieving precise control of the load 300. The structure is simple and the reliability is high.

[0065] The type of the first switching transistor Q1 can be selected according to the actual situation, such as a transistor or a MOSFET. The controlled terminal, the first terminal, and the second terminal of the first switching transistor Q1 need to be determined according to the type of the first switching transistor Q1.

[0066] In one embodiment, the first switching transistor Q1 is a PNP transistor. The base of the PNP transistor serves as the controlled terminal of the first switching transistor Q1, the emitter of the PNP transistor serves as the first terminal of the first switching transistor Q1, and the collector of the PNP transistor serves as the second terminal of the first switching transistor Q1.

[0067] The reference voltage signal Vref is lower than the input signal, so when the multiplexing port 111 is in input mode, the first switch Q1 is turned off under the action of the input signal.

[0068] In this embodiment, the first switching transistor Q1 is a PNP type transistor, which has a simple structure and low cost.

[0069] In one embodiment, the load control switching unit 122 includes a second switch Q2 and a pull-down resistor R3. The controlled terminal of the second switch Q2 is connected to the switching control switching unit 121, the first terminal of the second switch Q2 is used to connect to the load 300, and the second terminal of the second switch Q2 is connected to the controlled terminal of the second switch Q2 through the pull-down resistor R3.

[0070] The type of the second switch Q2 can be selected according to the actual situation, such as a transistor or a MOSFET. The controlled terminal, the first terminal, and the second terminal of the second switch Q2 need to be determined according to the type of the second switch Q2. In one embodiment, the second switch Q2 is an NPN transistor. The base of the NPN transistor serves as the controlled terminal of the second switch Q2, the collector of the NPN transistor serves as the first terminal of the second switch Q2, and the emitter of the NPN transistor serves as the second terminal of the second switch Q2.

[0071] When the switching control unit 121 is turned on and supplies current to the controlled terminal of the second switch Q2, the second switch Q2 is turned on, allowing current to flow from the first terminal to the second terminal, thereby driving the load 300 to work. When the switching control unit 121 is turned off and stops supplying current to the controlled terminal of the second switch Q2, due to the presence of the pull-down resistor R3, the controlled terminal is pulled to a low level, the second switch Q2 is turned off, and current cannot flow through the switch Q2 to the load 300, so the load 300 stops working.

[0072] The pull-down resistor R3 provides a stable low level to the controlled terminal of the second switch Q2 when it is not turned on, which helps to prevent uncertain states from occurring at the controlled terminal of the second switch Q2, thereby improving the reliability of the circuit.

[0073] In this embodiment, the load control switch unit 122 achieves effective control of the load 300 through the cooperation of the second switch Q2 and the pull-down resistor R3. This circuit is simple, reliable, and highly flexible.

[0074] To better understand the above embodiments, the following is combined with... Figure 4 The following is a detailed explanation of the embodiment. In this embodiment, the signal input module 200 is a temperature detection module, and the load 300 is a buzzer. The temperature detection module and the buzzer time-division multiplex one I / O port of the MCU chip (i.e., multiplexed port 111). This I / O port is set by software to either input mode or output mode. When it is in input mode, it can be used as an AD (Analog-to-Digital) detection port.

[0075] When this I / O port is configured as an AD detection port, the voltage range of the temperature signal (i.e., the "input signal") output by the signal input module 200 is 2.2V-4.1V, and the reference voltage signal Vref is 2V. At this time, the first switch Q1 is turned off, and normal AD detection function can be performed. At the same time, since the first switch Q1 is turned off, the second switch Q2 is also turned off, and the buzzer will not sound.

[0076] When the buzzer is needed, this I / O port changes from an AD detection port to an output port, outputting a PWM signal of a certain frequency as a control signal. When the PWM signal is high (e.g., 5V), the first switch Q1 is off; when the PWM signal is low (0V), the first switch Q1 is on. The 5V voltage forms a loop through the first voltage divider resistor R1, the first switch Q1, and the pull-down resistor R3 to ground, which in turn turns on the second switch Q2, causing the buzzer to sound. After the buzzing stops, the I / O port can be changed back to an AD detection port.

[0077] This circuit can be used for ambient temperature detection and buzzer operation. Ambient temperature typically changes slowly, and the buzzer's duration is usually only 1-2 seconds. During the buzzer, the MCU can remember the temperature before the buzzer and assume the ambient temperature remains the same. Immediately after the buzzer ends, AD detection is performed, thus successfully implementing the required ambient temperature detection and buzzer functions. This design allows AD detection and buzzer driving to share a single I / O port, saving one I / O port on the MCU and providing greater flexibility and cost-effectiveness in circuit design.

[0078] Based on the same concept, this application also provides an electrical device, which can be referred to... Figure 1 The electrical equipment includes a signal input module 200, a load 300, and a port multiplexing circuit 100.

[0079] Since the electrical device includes the port multiplexing circuit 100 provided in the above embodiments, it also has the beneficial effects of the port multiplexing circuit 100 in the above embodiments. The similarities can be understood by referring to the explanation of the port multiplexing circuit 100 above, and will not be repeated below.

[0080] In one embodiment, the signal input module 200 is a temperature detection module, which may specifically include a temperature detection resistor R4 and a third voltage divider resistor R5. The first end of the temperature detection resistor R4 is connected to the power supply VCC, the second end of the temperature detection resistor R4 is grounded through the third voltage divider resistor R5, and the common terminal connecting the temperature detection resistor R4 and the third voltage divider resistor R5 is connected to the multiplexing port 111.

[0081] Among them, the temperature sensing resistor R4 is a thermistor or other type of temperature-sensitive resistor, and its resistance value changes with temperature. The third voltage divider resistor R5 and the temperature sensing resistor R4 form a voltage divider circuit, which is used to adjust the voltage range of its output signal (i.e., input signal).

[0082] In this embodiment, the resistance value of the temperature sensing resistor R4 changes accordingly when the ambient temperature changes. Since the third voltage divider resistor R5 and the temperature sensing resistor R4 form a voltage divider circuit, the change in the resistance value of the temperature sensing resistor R4 will cause a change in the voltage at the common terminal (i.e., multiplexed port 111). At this time, the multiplexed port 111 is an AD detection port, which can convert the current voltage signal of its port into a digital signal, thereby realizing accurate temperature measurement.

[0083] In actual implementation, the signal input module may also include a capacitor C, and the common terminal of the temperature sensing resistor R4 and the third voltage divider resistor R5 is grounded through the capacitor C.

[0084] When temperature changes cause a change in the resistance value of the temperature sensing resistor R4, capacitor C can absorb or release charge, thereby mitigating transient voltage changes and making the voltage at the multiplexed port 111 more stable. Furthermore, in some cases, the temperature sensing module may be subject to interference from other circuits or power supplies. Capacitor C can act as a decoupling capacitor, preventing these interference signals from entering the temperature sensing circuit through the common terminal, thus improving the circuit's anti-interference capability.

[0085] In one embodiment, the load 300 includes a buzzer BUZ, which is connected to the load control switch module 120. This enables a circuit design where AD detection and buzzer BUZ driving share a single I / O port, thereby saving one chip I / O port resource of the MCU.

[0086] In practical implementation, a resistor R6 can be connected in parallel with the buzzer. This is because the impedance of a piezoelectric passive buzzer is very low, making it easily susceptible to external interference. By connecting the resistor R6 in parallel across the buzzer, current and voltage are limited, and the amplitude is stabilized, resulting in better and more stable sound quality. Furthermore, a suitable parallel resistor R6 can control the volume of the buzzer. According to Ohm's law, current and resistance are inversely proportional; the smaller the current, the smaller the amplitude of the sound, and the lower the volume. By adjusting the value of the parallel resistor R6, the current through the buzzer can be controlled, thereby adjusting the volume.

[0087] In one specific embodiment, when it is necessary to detect a temperature of 0℃-40℃, the resistance value of the temperature sensing resistor R4 is in the range of 325KΩ-53KΩ, and the voltage range it generates is 2.2V-4.1V.

[0088] When this I / O port is configured as an AD detection port, the voltage range of the temperature signal output by the signal input module 200 is 2.2V-4.1V, and the reference voltage signal Vref is 2V. At this time, the first switch Q1 is turned off, and normal AD detection function can be performed. At the same time, since the first switch Q1 is turned off, the second switch Q2 is also turned off, and the buzzer will not sound.

[0089] When the buzzer is needed, this I / O port changes from an AD detection port to an output port, outputting a PWM signal of a certain frequency as a control signal. When the PWM signal is high (e.g., 5V), the first switch Q1 is off; when the PWM signal is low (0V), the first switch Q1 is on. The 5V voltage forms a loop through the first voltage divider resistor R1, the first switch Q1, and the pull-down resistor R3 to ground, which in turn turns on the second switch Q2, causing the buzzer to sound. After the buzzing stops, the I / O port can be changed back to an AD detection port.

[0090] This electrical device can be used for ambient temperature detection and buzzer operation. Ambient temperature changes relatively slowly, and the buzzer's duration is typically only 1-2 seconds. During the buzzer, the MCU can memorize the temperature before the buzzer and assume the ambient temperature remains the same. Immediately after the buzzer ends, AD detection is performed, thus successfully implementing the required ambient temperature detection and buzzer functions. This design allows AD detection and buzzer driving to share a single I / O port, saving one I / O port on the MCU chip and increasing the design flexibility and cost-effectiveness of the electrical device.

[0091] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0092] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the utility model patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A port multiplexing circuit, characterized in that, include: The controller and load control switch modules are provided, wherein the controller has at least one multiplexed port, and the number of load control switch modules is the same as the number of multiplexed ports; each multiplexed port is used to connect a signal input module and a load control switch module, and the load control switch module is also used to connect a load; The multiplexed port is used to receive input signals or output control signals in a time-division manner; the input signal is the signal output by the signal input module; the control signal is used to transmit to the load control switch module to control the load, and the load control switch module turns off when it receives the input signal.

2. The port multiplexing circuit according to claim 1, characterized in that, The load control switch module includes a switching control switch unit and a load control switch unit; the controlled terminal of the switching control switch unit is connected to the multiplexing port, the output terminal of the switching control switch unit is connected to the controlled terminal of the load control switch unit, and the output terminal of the load control switch unit is used to connect to the load. The switching control switch unit is used to control the load control switch unit to turn off according to the input signal; it is also used to control the load control switch unit to turn on or off according to the received control signal, so as to control the working state of the load.

3. The port multiplexing circuit according to claim 2, characterized in that, The switching control unit includes a reference voltage generation unit and a switching signal generation unit; the switching signal generation unit is connected to the reference voltage generation unit, the multiplexing port, and the load control switch unit, respectively. The reference voltage generation unit is used to generate a reference voltage signal; The switching signal generation unit is used to generate and output a turn-off signal based on the input signal and the reference voltage signal; It is also used to generate and output a turn-off signal or a turn-on signal based on the control signal and the reference voltage signal, wherein the turn-off signal is used to control the load control switch unit to turn off, and the turn-on signal is used to control the load control switch unit to turn on.

4. The port multiplexing circuit according to claim 3, characterized in that, The reference voltage generation unit includes a first voltage divider resistor and a second voltage divider resistor; the first end of the first voltage divider resistor is connected to a power supply, and the second end of the first voltage divider resistor is grounded through the second voltage divider resistor; the common terminal connecting the first voltage divider resistor and the second voltage divider resistor serves as the output terminal of the reference voltage generation unit, used to output the reference voltage signal.

5. The port multiplexing circuit according to claim 3, characterized in that, The switching signal generation unit includes a first switching transistor; the controlled terminal of the first switching transistor is connected to the multiplexing port and the signal input module, the first terminal of the first switching transistor is connected to the reference voltage generation unit, and the second terminal of the first switching transistor is connected to the load control switching unit.

6. The port multiplexing circuit according to claim 5, characterized in that, The first switching transistor is a PNP transistor; the emitter of the PNP transistor serves as the first terminal of the first switching transistor, the collector of the PNP transistor serves as the second terminal of the first switching transistor, and the base of the PNP transistor serves as the controlled terminal of the first switching transistor.

7. The port multiplexing circuit according to claim 2, characterized in that, The load control switch unit includes a second switch transistor and a pull-down resistor; the controlled terminal of the second switch transistor is connected to the switching control switch unit, the first terminal of the second switch transistor is used to connect to the load, and the second terminal of the second switch transistor is connected to the controlled terminal of the second switch transistor through the pull-down resistor.

8. An electrical appliance, characterized in that, It includes a signal input module, a load, and a port multiplexing circuit as described in any one of claims 1-7.

9. The electrical equipment according to claim 8, characterized in that, The signal input module includes a temperature sensing resistor and a third voltage divider resistor. The first end of the temperature sensing resistor is connected to the power supply, and the second end of the temperature sensing resistor is grounded through the third voltage divider resistor. The common terminal of the temperature sensing resistor and the third voltage divider resistor is connected to the multiplexing port.

10. The electrical equipment according to claim 9, characterized in that, The signal input module also includes a capacitor, and the common terminal of the temperature detection resistor and the third voltage divider resistor is grounded through the capacitor.

11. The electrical equipment according to claim 8, characterized in that, The load includes a buzzer, which is connected to the load control switch module.