A device and method for monitoring the insertion of an external accessory to an electronic device
By monitoring the insertion of accessories through capacitive sensing and signal detection components, and using a microcontroller to control the power supply voltage, the problems of high IO resource consumption and high power consumption in electronic devices are solved, and the durability of the interface is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANGHAI NAXI MICROELECTRONICS CO LTD
- Filing Date
- 2024-08-02
- Publication Date
- 2026-04-28
AI Technical Summary
In existing technologies, electronic devices suffer from problems such as high I/O resource consumption, high power consumption, and easy corrosion of interfaces when monitoring the insertion or removal of external accessories.
The capacitor sensing component and signal detection component are used to monitor the capacitance change signal. The microcontroller controls the conduction and cutoff of the interface power supply voltage, and provides voltage only when the accessory is inserted, thereby reducing power consumption and preventing interface corrosion.
It effectively reduces power consumption, reduces IO resource usage, prevents interface metal corrosion, and improves interface durability.
Smart Images

Figure CN119003417B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic equipment technology, and in particular to a device and method for monitoring the insertion of external accessories into electronic equipment. Background Technology
[0002] In the field of electronic products, there is an increasing emphasis on modular design. A host device may connect to accessories through various interfaces, and the host device's detection of the insertion or removal of accessories is the basis for subsequent communication and control.
[0003] Currently, the host monitors the insertion or removal of accessories by periodically querying the interface via the I2C or SPI bus using software within the host. If an accessory is inserted, its information can be read; if removed, an error is detected. However, this process requires the host to continuously send monitoring signals to the interface until the accessory is inserted, resulting in significant power consumption and excessive I / O resources. Furthermore, since the external interface is continuously powered during periodic monitoring, and the current draw is substantial, moisture can easily corrode the internal metal, causing damage. Summary of the Invention
[0004] This application provides a device and method for monitoring the insertion of external accessories into electronic devices, aiming to effectively solve the technical problems of high IO resource consumption, high power consumption, and easy corrosion of interfaces in the monitoring process of the aforementioned accessories.
[0005] According to a first aspect of this application, this application provides a device for monitoring the insertion of external accessories of electronic devices. The device includes an electronic device and a capacitive switch. The electronic device includes a microcontroller and an interface. The capacitive switch includes a capacitive sensing component and a signal detection component.
[0006] The capacitive sensing component has a first electrode and a second electrode arranged opposite to each other, the first electrode and the second electrode being respectively disposed on both sides of the interface. The capacitive sensing component is used to sense the capacitance change signal after the accessory is inserted into or removed from the interface, and transmit the capacitance change signal to the signal detection component.
[0007] The signal detection component is electrically connected to the capacitance sensing component and is used to detect the capacitance change signal and output an interrupt signal according to a preset signal threshold.
[0008] The microcontroller is electrically connected to the signal detection component to receive the interrupt signal and control the power supply voltage of the interface to be turned on or off based on the interrupt signal.
[0009] Furthermore, the signal detection component includes a comparator, a digital-to-analog converter, and an interrupt switch;
[0010] The comparator has its positive input terminal connected to the first electrode and its negative input terminal connected to the second electrode. It is used to compare the capacitance change signal with the signal threshold and generate a trigger signal when the capacitance change signal is greater than or equal to the signal threshold.
[0011] The digital-to-analog converter is connected to the comparator and is used to convert the trigger signal from digital to analog signal.
[0012] The interrupt switch is connected to the digital-to-analog converter and is used to generate an interrupt signal when the analog signal is received.
[0013] Furthermore, the electronic device also includes a first power supply module, which is disposed at the interface;
[0014] When the microcontroller determines that the electronic device is in a sleep state and receives the interrupt signal, it controls the first power supply module to turn on in order to provide power supply voltage to the accessory.
[0015] Furthermore, when the microcontroller determines that the electronic device is not in a sleep state and receives the interrupt signal, it controls the first power supply module to shut down.
[0016] Furthermore, the electronic device also includes a communication module, which is disposed at the interface;
[0017] After controlling the first power supply module to turn on, the microcontroller also controls the communication module to turn on.
[0018] After controlling the first power supply module to shut down, the microcontroller also controls the communication module to shut down.
[0019] Furthermore, the signal detection component also includes a second power supply module for supplying power to the signal detection component.
[0020] Furthermore, the signal detection component is an ASIC chip.
[0021] According to a second aspect of this application, this application also provides a method for monitoring the insertion of external accessories into an electronic device, the method being implemented based on the aforementioned apparatus for monitoring the insertion of external accessories into an electronic device, the method comprising:
[0022] Acquire capacitance change signal;
[0023] The capacitance change signal is compared with a preset signal threshold, and an interrupt signal is generated if the capacitance change signal is greater than or equal to the signal threshold.
[0024] The interrupt signal controls the switching on or off of the power supply voltage to the interface.
[0025] Furthermore, the step of controlling the switching on or off of the power supply voltage of the interface based on the interrupt signal includes:
[0026] Real-time monitoring of whether the electronic device is in sleep mode;
[0027] When the electronic device is in sleep mode and receives an interrupt signal, the power supply voltage to the interface of the electronic device is turned on.
[0028] When the electronic device is not in sleep mode and receives an interrupt signal, the power supply voltage to the interface of the electronic device is turned off.
[0029] Furthermore, after controlling the switching on or off of the power supply voltage of the interface based on the interrupt signal, the method further includes:
[0030] After the power supply voltage of the interface of the electronic device is turned on, the electronic device is controlled to communicate with the accessory.
[0031] After the power supply voltage to the interface of the electronic device is turned off, the communication between the electronic device and the accessory is disconnected.
[0032] Through one or more embodiments of the above-described embodiments in this application, at least the following technical effects can be achieved: Determining the insertion or removal of accessories using a capacitive sensing component and a signal detection component requires only one I / O port in the microcontroller to receive the interrupt signal output by the signal detection component, thus minimizing resource consumption. Furthermore, the power supply voltage at the interface is switched on and off by the microcontroller based on the interrupt signal; it does not continuously supply voltage to the interface when the accessory is not inserted, thereby reducing power consumption. Simultaneously, when the accessory is not inserted into the interface, only the current generated by the capacitive sensing component is present at the interface; this current is extremely small and will not cause metal corrosion of the interface, improving its durability. Attached Figure Description
[0033] The technical solution and other beneficial effects of this application will become apparent from the following detailed description of specific embodiments in conjunction with the accompanying drawings.
[0034] Figure 1 The diagram shown is a structural schematic of the device for inserting external accessories into the monitoring electronic device provided in this application embodiment;
[0035] Figure 2 The diagram shown is a structural schematic of the signal detection component provided in an embodiment of this application;
[0036] Figure 3 The diagram shown is one of the flowcharts illustrating the method for inserting external accessories into a monitoring electronic device according to an embodiment of this application.
[0037] Figure 4 The diagram shown is a second schematic flowchart of the method for inserting external accessories into a monitoring electronic device according to an embodiment of this application.
[0038] Figure 5 This is the third flowchart illustrating the method for inserting external accessories into the monitoring electronic device provided in this application embodiment.
[0039] Reference numerals: 100 - Electronic device; 200 - Capacitor switch; 110 - Microcontroller; 120 - Interface; 130 - Communication module; 140 - First power supply module; 210 - Capacitor sensing component; 211 - First electrode; 212 - Second electrode; 220 - Signal detection component; 221 - Comparator; 222 - Digital-to-analog converter; 223 - Interrupt switch; 224 - Second power supply module. Detailed Implementation
[0040] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0041] In the description of this application, it should be noted that, unless otherwise expressly specified and limited, the term "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Furthermore, the character " / " in this document, unless otherwise specified, generally indicates that the preceding and following related objects have an "or" relationship.
[0042] The following description, in conjunction with the accompanying drawings, introduces a device and method for inserting external accessories into monitoring electronic devices, as provided in this application.
[0043] In one embodiment, such as Figure 1 As shown, a device for monitoring the insertion of external accessories into an electronic device includes an electronic device 100 and a capacitive switch 200.
[0044] The electronic device 100 includes a microcontroller 110 and an interface 120, and the capacitive switch 200 includes a capacitive sensing component 210 and a signal detection component 220.
[0045] The interface 120 of the electronic device 100 is an access interface 120 provided for auxiliary accessories. The capacitance sensing component 210 is disposed around the interface 120 and monitors the capacitance change signal at the interface 120 in real time.
[0046] The signal detection component 220 is installed in the electronic device 100. It is connected to the capacitance sensing component 210 and the microcontroller 110 respectively. It is used to detect the capacitance change signal in real time and generate an interrupt signal according to the preset signal threshold.
[0047] After receiving an interrupt signal, the microcontroller 110 controls the switching on and off of the power supply voltage at the interface 120. When no interrupt signal is received, the microcontroller 110 does not provide power supply voltage to the interface 120.
[0048] The device for monitoring the insertion of external accessories into electronic devices provided in this application determines the insertion or removal of accessories through a capacitive sensing component 210 and a signal detection component 220. It only requires one I / O port in the microcontroller 110 to receive the interrupt signal output by the signal detection component 220, thus minimizing resource consumption. Furthermore, the power supply voltage at interface 120 is switched on and off by the microcontroller 110 based on the interrupt signal; it does not continuously supply voltage to interface 120 when the accessory is not inserted, thereby reducing power consumption. Simultaneously, when the accessory is not inserted into interface 120, only the current generated by the capacitive sensing component 210 flows through interface 120. This current is extremely small and will not cause metal corrosion of interface 120, thus improving the durability of interface 120.
[0049] In addition, the aforementioned capacitance detection component is installed at interface 120, and the signal detection component 220 is located inside electronic device 100. Neither of these requires any modification to the accessories, making installation convenient.
[0050] In some embodiments of this application, the capacitive sensing component 210 has a first electrode 211 and a second electrode 212 disposed opposite to each other. The first electrode 211 and the second electrode 212 are disposed on both sides of the interface 120, and the sensing area between the first electrode 211 and the second electrode 212 can cover the interface 120 area.
[0051] When the accessory is inserted into or removed from the interface 120, the accessory can significantly change the capacitance value between the first electrode 211 and the second electrode 212, causing the capacitance sensing component 210 to sense a large capacitance change. When the accessory is not inserted into the interface 120, the capacitance value between the first electrode 211 and the second electrode 212 remains essentially unchanged, and the capacitance sensing component 210 can only sense a capacitance change close to zero. Similarly, when the accessory is inserted into the interface 120 and held in place, the capacitance value between the first electrode 211 and the second electrode 212 also remains essentially unchanged, and at this time, the capacitance sensing component 210 senses a capacitance change close to zero.
[0052] In some embodiments of this application, such as Figure 2 As shown, the signal detection component 220 includes a comparator 221, a digital-to-analog converter 222, and an interrupt switch 223.
[0053] The positive input terminal (i.e., CINP terminal, Capacitive INput Positive) of the comparator 221 is connected to the first electrode 211, and the negative input terminal (i.e., CINN terminal, Capacitive INput Node) is connected to the second electrode 212.
[0054] After receiving the capacitance change signal sensed in real time by the capacitance sensing component 210, the comparator 221 compares the capacitance change with a preset signal threshold. When the capacitance change is greater than or equal to the signal threshold, it determines whether the accessory is inserted or removed and outputs the trigger signal of the interrupt switch 223.
[0055] Schematic, when the capacitance change is greater than or equal to the signal threshold, the output represents a level higher than or equal to the signal threshold; when the capacitance change is less than the signal threshold, the output represents a level lower than the signal threshold. The interrupt signal of interrupt switch 223 is triggered according to the level that represents a level higher than or equal to the signal threshold.
[0056] The input terminal of the digital-to-analog converter 222 is connected to the output terminal of the comparator 221, and the trigger signal output by the comparator 221 is converted from digital to analog to obtain an analog signal, more specifically, an analog voltage signal.
[0057] The input terminal of the interrupt switch 223 is connected to the output terminal of the digital-to-analog converter 222, and an interrupt signal is generated after receiving an analog voltage signal.
[0058] The input terminal of the microcontroller 110 is connected to the output terminal of the interrupt switch 223. After receiving an interrupt signal, the microcontroller 110 controls the power supply voltage of the interface 120 to be turned on or off. Specifically, when an accessory is inserted, the power supply voltage at the interface 120 is turned on, and when the accessory is removed, the power supply voltage at the interface 120 is turned off.
[0059] In addition, the signal detection component 220 also includes a second power supply module 224, which supplies power to the entire signal detection component 220. Preferably, the signal detection component 220 is an ASIC chip, and the microcontroller 110 is an MCU chip.
[0060] In other embodiments of this application, the electronic device 100 further includes a first power supply module 140, which is disposed at the interface 120 and is used to supply power to the accessory when the accessory is inserted into the interface 120.
[0061] Specifically, the microcontroller 110 monitors the electronic device 100 in real time to determine whether its interaction with accessories is in a sleep state.
[0062] If the microcontroller 110 determines that the electronic device 100 is in sleep mode and receives an interrupt signal, it indicates that the insertion of an accessory has been detected. At this time, the power supply module 140 is turned on to supply power to the inserted accessory.
[0063] If the microcontroller 110 determines that the electronic device 100 is not in sleep mode (that is, the interaction function between the electronic device 100 and the accessory is in normal use) and receives an interrupt signal, it indicates that the accessory has been removed, and at this time the power supply to the first power supply module 140 is turned off.
[0064] When the microcontroller 110 does not receive an interrupt signal but detects that the electronic device 100 is working normally, it continuously supplies power to the auxiliary accessories through the first power supply module 140.
[0065] When the microcontroller 110 does not receive an interrupt signal but detects that the electronic device 100 is in a sleep state, the first power supply module 140 remains in a powered-off state.
[0066] The device for monitoring the insertion of external accessories into electronic devices provided in this application embodiment provides voltage from the first power supply module 140 only during the time the accessory is inserted into the interface 120, and does not provide voltage at other times, greatly reducing power consumption. In addition, during the time when the accessory insertion into the interface 120 is not detected, only a very small current is generated at the interface 120 by the capacitive sensing component 210, which will not corrode the interface 120 and improve the durability of the interface 120.
[0067] In some other embodiments of this application, the electronic device 100 further includes a communication module 130 disposed at the interface 120.
[0068] After controlling the first power supply module 140 to turn on, the microcontroller 110 also controls the communication module 130 to turn on, thereby enabling communication between the electronic device 100 and its accessories.
[0069] After controlling the first power supply module 140 to shut down, the microcontroller 110 also controls the communication module 130 to shut down.
[0070] Based on the aforementioned device for monitoring the insertion of external accessories into electronic devices, this application also provides a method for monitoring the insertion of external accessories into electronic devices, such as... Figure 3 As shown, the method includes the following steps:
[0071] S301, acquires the capacitance change signal.
[0072] S302, compare the capacitance change signal with a preset signal threshold, and generate an interrupt signal if the capacitance change signal is greater than or equal to the signal threshold.
[0073] The signal threshold is set based on experience, parameters of the capacitive sensing component 210, etc.
[0074] The system compares the capacitance change with a set signal threshold, and generates an interrupt signal when the current capacitance change is greater than or equal to the threshold. If the current capacitance change is less than the threshold, the system acquires the capacitance change signal for the next moment and compares it to the threshold, repeating this process continuously.
[0075] S303, based on the interrupt signal, controls the on or off of the power supply voltage of the interface 120.
[0076] In this step, the auxiliary accessory is inserted into or removed from the interface 120 based on the current state of the electronic device 100 and the interrupt signal. When inserted into the interface 120, the auxiliary accessory is powered on. When removed from the interface 120, the power supply voltage at the interface 120 is turned off.
[0077] The method for monitoring the insertion of external accessories into electronic devices provided in this application acquires the capacitance change signal at interface 120 in real time. By comparing the capacitance change signal with a signal threshold, it determines whether the accessory has been inserted into or removed from interface 120. When the capacitance change signal is greater than or equal to the signal threshold, an interrupt signal is generated, and the power supply voltage at interface 120 is switched on and off based on the interrupt signal. The method provided in this application controls the electronic device 100 to be powered only during the time the accessory is inserted, and powered off at other times, thereby significantly reducing power consumption. The detection process for the insertion or removal of the accessory is also relatively simple.
[0078] In some embodiments of this application, S303 includes the following sub-steps:
[0079] S3031, Real-time monitoring of whether the electronic device 100 is in sleep mode.
[0080] S3032, when the electronic device 100 is in a sleep state and an interrupt signal is received, the power supply voltage of the interface 120 of the electronic device 100 is controlled to be turned on.
[0081] S3033, when the electronic device 100 is not in sleep mode and an interrupt signal is received, the power supply voltage of the interface 120 of the electronic device 100 is turned off.
[0082] S3034, after the power supply voltage of the interface 120 controlling the electronic device 100 is turned on, the electronic device 100 is controlled to communicate with the accessory.
[0083] S3035, after the power supply voltage to the interface 120 controlling the electronic device 100 is turned off, the communication between the electronic device 100 and the accessory is disconnected.
[0084] In another embodiment of this application, such as Figure 4 As shown, the method for monitoring the insertion of external accessories into electronic devices includes the following steps:
[0085] S401, determine that electronic device 100 is in sleep mode.
[0086] S402 determines whether an interrupt signal has been generated. If an interrupt signal is generated, the process proceeds to S403; otherwise, S401 is repeated. The interrupt signal is generated by a capacitor switch.
[0087] S403, power supply at interface 120 is enabled, and the accessories are working normally.
[0088] In another embodiment of this application, such as Figure 5As shown, the method for monitoring the insertion of external accessories into electronic devices includes the following steps:
[0089] S501, confirming that electronic device 100 and its accessories are functioning normally.
[0090] In step S502, it determines whether an interrupt signal has been generated. If an interrupt signal is generated, it proceeds to step S503; otherwise, it repeats step S501. The interrupt signal is generated by a capacitor switch.
[0091] S503, power supply to interface 120 is turned off, and electronic device 100 enters sleep mode.
[0092] The method for inserting external accessories into the monitoring electronic device provided in this application embodiment supplies power to the interface 120 only during the time period when the accessory is inserted into the interface 120, thereby greatly reducing power consumption.
[0093] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0094] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0095] In summary, although the present application has disclosed the preferred embodiments as described above, the above preferred embodiments are not intended to limit the present application. Those skilled in the art can make various modifications and refinements without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be determined by the scope defined in the claims.
Claims
1. A device for monitoring the insertion of external accessories into electronic devices, characterized in that, The device includes an electronic device and a capacitive switch. The electronic device includes a microcontroller and an interface. The capacitive switch includes a capacitive sensing component and a signal detection component. The capacitive sensing component has a first electrode and a second electrode arranged opposite to each other, the first electrode and the second electrode being respectively disposed on both sides of the interface. The capacitive sensing component is used to sense the capacitance change signal after the accessory is inserted into or removed from the interface, and transmit the capacitance change signal to the signal detection component. The signal detection component is electrically connected to the capacitance sensing component and is used to detect the capacitance change signal and output an interrupt signal according to a preset signal threshold. The microcontroller is electrically connected to the signal detection component to receive the interrupt signal and control the power supply voltage of the interface to be turned on or off based on the interrupt signal. The electronic device further includes a first power supply module, which is disposed at the interface. When the microcontroller determines that the interaction function between the electronic device and the accessory is in a sleep state and receives the interrupt signal, it controls the first power supply module to be turned on to provide power supply voltage to the accessory. When the microcontroller determines that the interaction function between the electronic device and the accessory is not in a sleep state and receives the interrupt signal, it controls the first power supply module to shut down.
2. The apparatus as claimed in claim 1, characterized in that, The signal detection component includes a comparator, a digital-to-analog converter, and an interrupt switch; The comparator has its positive input terminal connected to the first electrode and its negative input terminal connected to the second electrode. It is used to compare the capacitance change signal with the signal threshold and generate a trigger signal when the capacitance change signal is greater than or equal to the signal threshold. The digital-to-analog converter is connected to the comparator and is used to convert the trigger signal from digital to analog signal. The interrupt switch is connected to the digital-to-analog converter and is used to generate an interrupt signal when the analog signal is received.
3. The apparatus as described in claim 1, characterized in that, The electronic device also includes a communication module, which is disposed at the interface; After controlling the first power supply module to turn on, the microcontroller also controls the communication module to turn on. After controlling the first power supply module to shut down, the microcontroller also controls the communication module to shut down.
4. The apparatus as claimed in claim 2, characterized in that, The signal detection component also includes a second power supply module for supplying power to the signal detection component.
5. The apparatus as claimed in claim 1, characterized in that, The signal detection component is an ASIC chip.
6. A method for monitoring the insertion of external accessories into electronic devices, characterized in that, The method is implemented based on the device for inserting external accessories into monitoring electronic devices as described in claims 1 to 5, and the method includes: Acquire capacitance change signal; The capacitance change signal is compared with a preset signal threshold, and an interrupt signal is generated if the capacitance change signal is greater than or equal to the signal threshold. The interrupt signal controls the switching on or off of the power supply voltage to the interface.
7. The method as described in claim 6, characterized in that, The step of controlling the power supply voltage of the interface to be turned on or off based on the interrupt signal includes: The function of real-time monitoring of the interaction between the electronic device and the accessory is in a sleep state. When the function of interaction between the electronic device and the accessory is in sleep mode and an interrupt signal is received, the power supply voltage of the interface of the electronic device is turned on. When the function of interaction between the electronic device and the accessory is not in sleep mode and an interrupt signal is received, the power supply voltage of the interface of the electronic device is turned off.
8. The method as described in claim 7, characterized in that, The method further includes: After the power supply voltage of the interface of the electronic device is turned on, the electronic device is controlled to communicate with the accessories. After the power supply voltage to the interface of the electronic device is turned off, the communication between the electronic device and the accessory is disconnected.
Citation Information
Patent Citations
Interface power supply circuit
CN106033239A
Control method of electronic equipment
CN112148104A