Ac power cord plug-in status detection circuit and electronic device
Patent Information
- Application Number
- CN202522434549.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-17
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2035-11-17
Smart Images

Figure CN224907015U_ABST
Abstract
Description
Technical Field
[0001] This utility model relates to the field of electronic product technology, and in particular to an AC power cord plug-in / plug-out status detection circuit and electronic device. Background Technology
[0002] As electronic products using AC power cords become increasingly popular, the requirements for device response speed are also increasing. However, existing electronic products have a significant status response delay problem when the power cord is quickly plugged in and unplugged.
[0003] Specifically, existing power supply detection solutions typically rely on a path where AC power input is fed into the power module to output DC voltage, which is then detected by the main control module to determine the power cord's plug-in / unplug status. This path involves multiple steps, resulting in a relatively long overall response time. Especially after the power cord is unplugged, the slow release of charge stored in the downstream filter capacitors delays the DC voltage drop, further extending the time required to determine the power cord's disconnection status. Utility Model Content
[0004] The main purpose of this application is to provide an AC power cord plugging / unplugging status detection circuit and electronic device, which effectively saves power cord detection time.
[0005] To achieve the above objectives, this application proposes an AC power cord plug-in / plug-out status detection circuit, comprising: The signal processing module and the status detection module are connected. The input of the signal processing module is connected to the AC power supply line to extract the AC voltage signal, and the output of the signal processing module is connected to the input of the status detection module. The signal processing module is used to process the AC voltage signal into a square wave signal with the same frequency as the AC voltage signal; The status detection module is used to output a status detection signal when a square wave signal with a preset period is received. The status detection signal is used to indicate that the AC power line is in the inserted state. Attached Figure Description
[0006] To more clearly illustrate the technical solutions in the embodiments of this utility model or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this utility model. For those skilled in the art, other drawings can be obtained based on the structures shown in these drawings without creative effort.
[0007] Figure 1 This is a schematic diagram of an AC power cord plug-in / unplug status detection circuit in one embodiment of the present invention. Figure 2This is a schematic diagram of the connection of each unit for AC power cord plugging / unplugging status detection in one embodiment of the present invention; Figure 3 This is a circuit diagram of an AC power cord plugging / unplugging status detection circuit in one embodiment of the present invention.
[0008] Explanation of icon numbers: 1. Signal processing module; 11. Clamping unit; 12. Switching unit; 13. Optocoupler unit; 14. Resistor unit; 3. Status detection module.
[0009] The realization of the purpose, functional features and advantages of this utility model will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0010] The technical solutions of the present utility model will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of the present utility model, and not all embodiments. Based on the embodiments of the present utility model, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present utility model.
[0011] It should be noted that if the embodiments of this utility model involve directional indicators (such as up, down, left, right, front, back, etc.), the directional indicators are only used to explain the relative positional relationship and movement of the components in a specific posture. If the specific posture changes, the directional indicators will also change accordingly.
[0012] Furthermore, if the embodiments of this utility model involve descriptions such as "first" or "second," these descriptions are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the use of "and / or" or "and / or" throughout the text includes three parallel solutions. For example, "A and / or B" includes solution A, solution B, or a solution where both A and B are satisfied simultaneously. Furthermore, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by this utility model.
[0013] Currently, existing technologies exhibit a significant delay in status response when electronic products are rapidly plugged in and unplugged. Specifically, when the power cord is inserted into or removed from the socket, the product's operating status and corresponding indicator lights do not react immediately, typically requiring several seconds or even tens of seconds to complete the status transition. This delay primarily stems from the excessively long response time of the entire chain in traditional detection mechanisms. Especially after the power cord is unplugged, the DC voltage drops slowly due to the residual charge in the large-capacity filter capacitors at the back end, further prolonging the time it takes for the main control unit to determine the power disconnection status.
[0014] This delayed response may lead to abnormal detection by the main control unit, which in turn may cause product malfunctions and impair its stability and reliability.
[0015] In one embodiment, the present invention provides an AC power cord plugging / unplugging status detection circuit, referring to... Figure 1 ,include: The signal processing module 1 and the status detection module 3 are provided. The input terminal of the signal processing module 1 is connected to the AC power supply line to extract the AC voltage signal, and the output terminal of the signal processing module 1 is connected to the input terminal of the status detection module 3. Signal processing module 1 is used to process the AC voltage signal into a square wave signal with the same frequency as the AC voltage signal; The status detection module 3 is used to output a status detection signal when it receives a square wave signal with a preset period. The status detection signal is used to indicate that the AC power line is in the inserted state.
[0016] It should be noted that signal processing module 1 refers to the functional module that directly processes AC voltage signals, as shown in the reference. Figure 1 The core function of the signal processing module 1 is to extract the AC voltage signal from the AC power line and perform processes such as step-down, clamping, and conversion to convert the AC voltage signal into a square wave signal with the same frequency and amplitude suitable for the status detection module 3, thereby realizing the safe and efficient conversion of AC high voltage signal to DC low voltage square wave.
[0017] The status detection module 3 is a functional module used to receive and identify square wave signals to determine the insertion / removal status of the AC power cord. The working principle of the status detection module 3 is to continuously detect the square wave signal output from the signal processing module 1; if it detects a preset number of consecutive square wave signals within a very short time, it outputs a status detection signal, determining that the AC signal cord is inserted, and updates the product system's operating status and indicator lights; conversely, when the square wave signal disappears, there is no status detection signal, meaning the AC signal cord is determined to be unplugged.
[0018] Additionally, it should be noted that the AC voltage signal refers to the signal obtained from the AC power line. This signal is a sine wave with a frequency of 50Hz or 60Hz and a voltage amplitude of 110V or 220V. This signal is the source input signal of the entire AC power line plug-in / unplug status detection circuit, and can directly and in real time reflect whether the AC power line is connected.
[0019] The square wave signal with the same frequency as the AC voltage signal refers to the intermediate signal output after processing by signal processing module 1. It is converted from a sine wave to a square wave, maintaining the same frequency as the original AC power signal, ensuring the real-time performance and accuracy of the insertion / removal status judgment. Furthermore, its amplitude is converted to a low level that the status detection module 3 can safely recognize. This square wave signal retains the frequency characteristics of the original signal while achieving electrical isolation, enabling the status detection module 3 to process the signal safely and efficiently.
[0020] The status detection signal refers to a logical judgment signal output by the status detection module 3 after successfully identifying a square wave signal of a preset period. This signal is used to characterize the current status of the AC power cord to the product system: when a square wave signal is detected, it indicates that the power cord is inserted; when the square wave signal disappears, it indicates that the power cord is unplugged. This signal is the final output of this application, and it is directly used to control the product's working status (such as power on / off, charging start / stop) and indicator light display. Its fast response characteristic fundamentally solves the functional abnormality problem caused by detection delay in traditional solutions.
[0021] The working process of the AC power cord plug-in / unplug status detection circuit described above is as follows: When the AC power cord is plugged into the socket, the signal processing module 1 acquires the AC voltage signal; Signal processing module 1 processes the AC voltage signal, converts it into a square wave signal with the same frequency as the AC voltage signal, and then outputs it to the status detection module 3. The status detection module 3 continuously detects the input square wave signal. When the status detection module 3 continuously identifies a preset number of square wave signals (e.g., 3) within a very short time (e.g., 50-70 milliseconds), it outputs a status detection signal, which indicates that the AC power cord has been inserted. If the status detection module 3 does not detect a square wave signal, it determines that the AC power cord has been unplugged.
[0022] In this embodiment, a signal processing module and a status detection module are set in the AC power cord insertion / removal status detection circuit. The signal processing module processes and converts the AC voltage signal, outputting a square wave signal to the status detection module. When the status detection module detects a square wave signal of a preset period, it outputs a status detection signal, determining that the AC power cord is inserted. By processing the AC voltage signal to generate a square wave signal, the status detection module only needs to detect the square wave signal of the preset period to determine whether the AC power cord is inserted or removed, completing the detection in just 50-60 milliseconds. Compared to existing methods that require several seconds or even tens of seconds to detect the insertion / removal status of AC power cords, the AC power cord insertion / removal status detection circuit of this application greatly shortens the detection time. Due to the untimely response in the prior art, the main control unit may detect abnormalities, leading to product malfunctions and compromising its stability and reliability. By detecting the insertion / removal status of the AC power cord using the AC power cord insertion / removal status detection circuit of this application, electronic products can respond quickly, preventing malfunctions due to excessively long detection times, thus improving product stability and reliability.
[0023] In one embodiment, reference is made to Figure 2 The signal processing module 1 includes: The clamping unit 11 and the switching unit 12 are configured such that the input terminal of the clamping unit 11 receives an AC voltage signal, the output terminal of the clamping unit 11 is connected to the second input terminal of the switching unit 12, the second input terminal of the switching unit 12 is connected to the input terminal of the clamping unit 11, and the output terminal of the switching unit 12 is grounded. Clamping unit 11 is used to limit the amplitude of AC voltage signal; The switching unit 12 is used to turn on the AC voltage signal during the negative half-cycle after amplitude limiting.
[0024] It should be noted that the clamping unit 11 is a key functional unit in the signal processing module 1. It limits the amplitude of the AC voltage signal received from its input terminal. Regardless of fluctuations in the input AC voltage, this unit ensures that the signal voltage output to subsequent circuits is constrained within a preset safe range, thereby preventing high-voltage spikes or abnormal voltages from damaging subsequent electronic components and providing stable front-end protection for the entire signal processing flow.
[0025] Switching unit 12 is an action execution unit in the signal processing module controlled by the output signal of the clamping unit. It is turned on during the negative half-cycle of the AC voltage signal, thereby forming a low-impedance current path; while it remains off during the positive half-cycle. This periodic "on" and "off" action is the key mechanism for converting continuous sinusoidal AC current into discrete pulse signals, laying the foundation for the final generation of square wave signals.
[0026] The working process of the AC power cord plug-in / unplug status detection circuit described above is as follows: After the clamping unit 11 limits the amplitude of the AC voltage signal, it outputs the signal to the first input terminal of the switching unit 12 through its output terminal. The second input terminal of the switching unit 12 also receives the AC voltage signal and is turned off during the positive half-cycle of the AC voltage signal; it is turned on during the negative half-cycle of the AC voltage signal, allowing current to pass through.
[0027] In this embodiment, a clamping unit and a switching unit are set in the signal processing module. The clamping unit limits the amplitude of the AC voltage signal, and the switching unit conducts during the negative half-cycle of the AC voltage signal, allowing the current output by the clamping unit to pass through. Then, the signal processing module generates a square wave signal. The status detection module only needs to detect the square wave signal of a preset period to determine whether the AC power line is inserted or removed. The detection can be completed in only 50-60 milliseconds, which is much shorter than the existing detection time of several seconds or even tens of seconds. This greatly shortens the detection time, allowing electronic products to respond quickly and preventing functional abnormalities caused by excessively long detection times, thus improving the stability and reliability of the product.
[0028] In one embodiment, reference is made to Figure 2 The signal processing module 1 also includes: Optical coupler unit 13, the first end of optical coupler unit 13 is connected to the output end of clamping unit 11, the second end of optical coupler unit 13 is connected to the input end of switching unit 12, the third end of optical coupler unit 13 is grounded, and the fourth end of optical coupler unit 13 is connected to the first power supply. The optocoupler unit 13 is used to output a square wave signal when the switching unit 12 is turned on.
[0029] It should be noted that, referring to Figure 3 Optocoupler unit 13 can be an optocoupler element, and optocoupler element U4 is composed of a light-emitting diode and a phototransistor packaged in the same chip. Its working principle is: when the light-emitting diode emits light due to the current flowing through it, the phototransistor conducts after sensing the light; when the light-emitting diode is turned off, the phototransistor is turned off.
[0030] Reference Figure 2 The voltage signal output by the first power supply is 3.3V, and a pull-up resistor R1 is also provided. One end of the pull-up resistor R1 is connected to the first power supply, and the other end is connected to the fourth terminal of the optocoupler unit 13.
[0031] The working process of the AC power cord plug-in / unplug status detection circuit described above is as follows: When the switching unit 12 is turned off during the positive half-cycle of the AC voltage signal, no current flows through the light-emitting diode in the optocoupler unit 13, and the phototransistor does not conduct. When the switching unit 12 is turned on during the negative half-cycle of the AC voltage signal, current flows through the light-emitting diode in the optocoupler unit 13, and the phototransistor is turned on. Through the first power supply and the pull-up resistor R1, the voltage at the fourth terminal of the photosensitive unit is pulled up, and a 3.3V square wave signal with the same frequency as the AC voltage signal is output.
[0032] In this embodiment, an optocoupler unit is set in the signal processing module. When the switching unit is turned on during the negative half-cycle of the AC voltage signal, the optocoupler unit also turns on, outputting a square wave signal with the same frequency as the AC voltage signal to the status detection module. The status detection module only needs to detect the square wave signal of a preset period to determine whether the AC power cord is inserted or removed. The detection can be completed in just 50-60 milliseconds. Compared with the existing AC power cord insertion / removal status detection, which takes several seconds or even tens of seconds, the AC power cord insertion / removal status detection circuit of this application greatly shortens the detection time. Due to the untimely response in the prior art, the main control unit may detect abnormalities, which may lead to product malfunction and damage its stability and reliability. By detecting the insertion / removal status of the AC power cord using the AC power cord insertion / removal status detection circuit of this application, the electronic product can respond quickly and will not cause product malfunctions due to excessive detection time, thus improving the stability and reliability of the product.
[0033] In one embodiment, reference is made to Figure 3 The clamping unit 11 includes: Clamping diode D6 receives AC voltage signals at its input terminal and its output terminal is connected to the first terminal of optocoupler unit 13.
[0034] It should be noted that the clamping diode D6 can be of model SOD1F10, which features a low forward voltage drop, reducing power loss and improving conversion efficiency; its fast reverse recovery time (10ns) is suitable for high-frequency switching circuits; its small package size saves board space and is suitable for compact circuit designs; it also supports high surge current and can operate stably under short-term overload; its Schottky structure provides low thermal resistance, enhancing reliability in high-temperature environments.
[0035] In this embodiment, a clamping diode is incorporated into the clamping unit, which reduces power loss, improves conversion efficiency, and enables stable operation under short-term overload. Its reverse recovery time is extremely short, allowing for rapid response without disrupting the AC voltage signal cycle. A square wave signal is generated after processing by the clamping diode, switching unit, and optocoupler unit. The status detection module only needs to detect the square wave signal of a preset period to determine whether the AC power cord is inserted or removed, completing the detection in just 50-60 milliseconds. Compared to existing methods that require several seconds or even tens of seconds to detect the insertion / removal status of AC power cords, the AC power cord insertion / removal status detection circuit of this application significantly shortens the detection time. The delayed response in existing technologies can lead to abnormal detection by the main control unit, resulting in product malfunctions and compromising its stability and reliability. By using the AC power cord insertion / removal status detection circuit of this application, the electronic product can respond quickly, preventing malfunctions due to excessively long detection times and improving product stability and reliability.
[0036] In one embodiment, reference is made to Figure 3 The switching unit 12 includes: The first switch Q3, the first resistor R3, the second switch Q4, and the second resistor R4 are connected together. The first terminal of the first switch Q3 is connected to the input terminal of the clamping diode D6, the second terminal of the first switch Q3 is connected to the first terminal of the second switch Q4, and the third terminal of the first switch Q3 is connected to one end of the first resistor R3. The other end of the first resistor R3 is grounded; The second terminal of the second switch Q4 is connected to the second terminal of the optocoupler unit 13, the third terminal of the second switch Q4 is connected to one end of the second resistor R4, and the other end of the second resistor R4 is grounded.
[0037] It should be noted that the first switching transistor Q3 and the second switching transistor Q4 can be MMBT8550C, with a collector-emitter breakdown voltage of 25V, a collector current of 600mA, and a power dissipation of 350mW. This type of transistor is suitable for low-voltage, medium-current switching and signal amplification applications. The first switching transistor Q3 and the second switching transistor Q4 act as switching elements to control the on / off state of the circuit.
[0038] The first resistor R3 and the second resistor R4 serve to limit current and divide voltage in the circuit. When the first switch Q3 and the second switch Q4 are turned on, the resistors limit the current flowing through them, preventing damage due to excessive current. When the first switch Q3 and the second switch Q4 are turned off, the resistors ensure complete shutdown, reducing leakage current. Since the first resistor R3 and the second resistor R4 are also grounded, they provide a stable reference potential, helping to discharge static electricity, protecting circuit components, and ensuring the stability and reliability of the circuit. The working process of the AC power cord plug-in / unplug status detection circuit described above is as follows: The first switch Q3 and the second switch Q4 remain off during the positive half-cycle of the AC voltage signal, preventing current from passing through the optocoupler unit 13. The first switch Q3 and the second switch Q4 are turned on during the negative half-cycle of the AC voltage signal, so that the current passes through the optocoupler unit 13, the first switch Q3, the first resistor R3, the second switch Q4 and the second resistor R4 and is led to the ground terminal, forming a square wave signal at the fourth terminal of the optocoupler unit 13.
[0039] In this embodiment, a first switch, a first resistor, a second switch, and a second resistor are configured in the switching unit. By controlling the first and second switches to conduct during the negative half-cycle of the AC voltage signal, the current is controlled to pass through the optocoupler unit, thereby generating a square wave signal with the same frequency as the AC voltage signal through the optocoupler unit. The status detection module only needs to detect the square wave signal of a preset period to determine whether the AC power cord is inserted or removed, and the detection can be completed in only 50-60 milliseconds. Compared with the existing AC power cord insertion / removal status detection, which takes several seconds or even tens of seconds, the AC power cord insertion / removal status detection circuit of this application greatly shortens the detection time. Due to the untimely response in the prior art, the main control unit may detect abnormalities, which may lead to product malfunction and damage its stability and reliability. By detecting the insertion / removal status of the AC power cord through the AC power cord insertion / removal status detection circuit of this application, the electronic product can respond quickly and will not cause product malfunction due to excessive detection time, thus improving the stability and reliability of the product.
[0040] In one embodiment, see Figure 3 The clamping unit 11 also includes: The first voltage divider resistor R2 and the second voltage divider resistor R42 are connected. One end of the first voltage divider resistor R2 is connected to the second power supply, and the other end of the first voltage divider resistor R2 is connected to the output terminal of the clamping diode D6 and one end of the second voltage divider resistor R42. The other end of the second voltage divider resistor R42 is connected to the first terminal of the optocoupler unit 13.
[0041] It should be noted that the voltage signal output by the second power supply is 22V. After receiving the AC voltage signal at the input terminal of the clamping diode D6, the clamping unit 11 clamps the voltage at 22V. The first voltage divider resistor R2 and the second voltage divider resistor R42 perform voltage division and current limiting, making the clamped voltage more stable and protecting the subsequent circuits from damage by high voltage.
[0042] In this embodiment, a first voltage divider resistor and a second voltage divider resistor are set in the clamping unit to perform voltage division and current limiting, protecting the subsequent circuits. Then, through the switching unit and optocoupler unit, a square wave signal with the same frequency as the AC voltage signal is formed. The status detection module only needs to detect the square wave signal of a preset period to determine whether the AC power cord is inserted or removed, completing the detection in just 50-60 milliseconds. Compared to existing methods that require several seconds or even tens of seconds to detect the insertion / removal status of AC power cords, the AC power cord insertion / removal status detection circuit of this application significantly shortens the detection time. Due to the untimely response in existing technologies, abnormal detection by the main control unit may occur, leading to product malfunction and compromising its stability and reliability. By detecting the insertion / removal status of the AC power cord using the AC power cord insertion / removal status detection circuit of this application, electronic products can respond quickly, preventing malfunctions due to excessively long detection times, thus improving product stability and reliability.
[0043] In one embodiment, see Figure 2 The signal processing module 1 also includes: Resistor unit 14, one end of resistor unit 14 is connected to AC power supply line, and the other end of resistor unit 14 is connected to input terminal of clamping unit 11; Resistor unit 14 is used to step down and limit the current of AC voltage signal.
[0044] The AC voltage signal is stepped down and current limited by the resistor unit 14 before being output to the clamping unit 11 and the switching unit 12.
[0045] In this embodiment, a resistor unit is set in the signal processing module to step down the AC voltage signal output from the AC power line, then perform current limiting, and finally output it to subsequent clamping units, etc., to protect other components of the circuit. This improves the service life of the AC power line insertion / removal status detection circuit, reduces the impact of voltage fluctuations on circuit performance, and is also low in cost. After being stepped down and current limited by the resistor unit, the signal is output to other units, ultimately forming a square wave signal. The status detection module only needs to detect the square wave signal of a preset period to determine whether the AC power line is inserted or removed, and the detection can be completed in just 50-60 milliseconds. Compared with the existing AC power line insertion / removal status detection, which takes several seconds or even tens of seconds, the AC power line insertion / removal status detection circuit of this application greatly shortens the detection time. Due to the untimely response in the prior art, the main control unit may detect abnormalities, which may lead to product malfunction and damage its stability and reliability. The AC power cord plugging / unplugging status detection circuit of this application detects the plugging / unplugging status of the AC power cord, enabling electronic products to respond quickly and preventing functional abnormalities due to excessive detection time, thereby improving the stability and reliability of the product.
[0046] In one embodiment, see Figure 3 The resistor unit 14 includes: The third resistor R43, the fourth resistor R44, and the fifth resistor R41 are connected as follows: one end of the third resistor R43 is connected to the AC power supply line, the other end of the third resistor R43 is connected to one end of the fourth resistor R44, the other end of the fourth resistor R44 is connected to one end of the fifth resistor R41 and the input terminal of the clamping unit 11, and the other end of the fifth resistor R41 is grounded.
[0047] It is understandable that a capacitor C1 is also provided in the resistor unit 14 to filter the AC voltage signal after voltage division and current limiting.
[0048] In this embodiment, a third, fourth, and fifth resistor are set in the resistor unit to step down and limit the AC voltage signal output from the AC power line, then filter it through a capacitor before outputting it to subsequent clamping units, protecting other components of the circuit and improving the lifespan of the AC power line insertion / removal status detection circuit. This also reduces the impact of voltage fluctuations on circuit performance. After being stepped down and current-limited by the resistor unit, the signal is output to other units, ultimately forming a square wave signal. The status detection module only needs to detect the square wave signal of a preset period to determine whether the AC power line is inserted or removed, completing the detection in just 50-60 milliseconds. Compared to existing methods that require several seconds or even tens of seconds to detect the insertion / removal status of AC power lines, the AC power line insertion / removal status detection circuit of this application significantly shortens the detection time. The untimely response in existing technologies can lead to abnormal detection by the main control unit, causing product malfunctions and compromising its stability and reliability. The AC power cord plugging / unplugging status detection circuit of this application detects the plugging / unplugging status of the AC power cord, enabling electronic products to respond quickly and preventing functional abnormalities due to excessive detection time, thereby improving the stability and reliability of the product.
[0049] In one embodiment, the state detection module 3 includes: The input terminal of the microcontroller is connected to the output terminal of the signal processing module 1.
[0050] It is understood that the state detection module 3 may be equipped with a microcontroller or other detection elements, as long as they can perform the function of detecting square wave signals, all of which are within the protection scope of this application.
[0051] The working process of the AC power cord plug-in / unplug status detection circuit described above is as follows: The microcontroller performs real-time detection. When it detects a square wave signal with the same frequency as the AC voltage signal and continuously detects it for a preset number of cycles, it outputs a status detection signal to determine that the AC signal line has been inserted. When no square wave signal is detected, no status detection signal is output, indicating that the AC signal line has been disconnected.
[0052] In this embodiment, a microcontroller is set in the status detection module. The input terminal of the microcontroller is connected to the signal processing module, receiving and real-time detecting a square wave signal with the same frequency as the AC voltage signal output by the signal processing module. When a square wave signal with a preset period is detected, a status detection signal is output, indicating that the AC signal line has been inserted. The detection can be completed in only 50-60 milliseconds. Compared with the existing detection of the insertion and removal status of AC power lines, which takes several seconds or even tens of seconds, the AC power line insertion and removal status detection circuit of this application greatly shortens the detection time. Due to the untimely response in the prior art, the main control unit may detect abnormalities, which may lead to product malfunction and damage its stability and reliability. By detecting the insertion and removal status of AC power lines using the AC power line insertion and removal status detection circuit of this application, electronic products can respond quickly, preventing product malfunctions due to excessive detection time, thus improving the stability and reliability of the product.
[0053] In one embodiment, an electronic device is provided, which includes a circuit board on which the aforementioned AC power cord plug-in / plug-out status detection circuit is provided.
[0054] It is understood that electronic devices can be products that connect to AC power cords, such as smart speakers, smart display devices, laptops, and portable power storage devices.
[0055] In this embodiment, an AC power cord insertion / removal status detection circuit is set in the electronic device. A signal processing module processes and converts the AC voltage signal, outputting a square wave signal to the status detection module. When the status detection module detects a square wave signal of a preset period, it outputs a status detection signal, determining that the AC power cord is inserted. By processing the AC voltage signal to generate a square wave signal, the status detection module only needs to detect the square wave signal of a preset period to determine whether the AC power cord is inserted or removed. The detection can be completed in just 50-60 milliseconds. Compared to existing methods that require several seconds or even tens of seconds to detect the insertion / removal status of AC power cords, the electronic device of this application significantly shortens the detection time. Due to the untimely response in existing technologies, the main control unit of the device may malfunction, leading to device malfunction and compromising its stability and reliability. By using the AC power cord insertion / removal status detection circuit of this application to detect the insertion / removal status of the AC power cord, the electronic device can respond quickly, preventing malfunctions due to excessively long detection times, thus improving the stability and reliability of the device.
[0056] The above description is merely an exemplary embodiment of the present utility model and does not limit the patent scope of the present utility model. Any equivalent structural transformations made based on the technical concept of the present utility model and the contents of the present utility model specification and drawings, or direct / indirect applications in other related technical fields, are included within the patent protection scope of the present utility model.
Claims
1. A circuit for detecting the plugging / unplugging status of an AC power cord, characterized in that, The AC power cord plug-in / unplug status detection circuit includes: The system includes a signal processing module and a status detection module. The input terminal of the signal processing module is connected to the AC power supply line to extract the AC voltage signal, and the output terminal of the signal processing module is connected to the input terminal of the status detection module. The signal processing module is used to process the AC voltage signal into a square wave signal with the same frequency as the AC voltage signal; The status detection module is used to output a status detection signal when it receives the square wave signal of a preset period. The status detection signal is used to indicate that the AC power line is in the inserted state.
2. The AC power cord plug-in / unplug status detection circuit as described in claim 1, characterized in that, The signal processing module includes: The clamping unit and the switching unit are provided. The input terminal of the clamping unit receives the AC voltage signal. The output terminal of the clamping unit is connected to the second input terminal of the switching unit. The second input terminal of the switching unit is connected to the input terminal of the clamping unit. The output terminal of the switching unit is grounded. The clamping unit is used to limit the amplitude of the AC voltage signal; The switching unit is used to conduct the negative half-cycle of the AC voltage signal after the amplitude is limited.
3. The AC power cord plug-in / unplug status detection circuit as described in claim 2, characterized in that, The signal processing module further includes: An optocoupler unit, wherein the first end of the optocoupler unit is connected to the output end of the clamping unit, the second end of the optocoupler unit is connected to the input end of the switching unit, the third end of the optocoupler unit is grounded, and the fourth end of the optocoupler unit is connected to the first power supply; The optocoupler unit is used to output the square wave signal when the switching unit is turned on.
4. The AC power cord plug-in / unplug status detection circuit as described in claim 3, characterized in that, The clamping unit includes: A clamping diode is provided, the input of which receives the AC voltage signal, and the output of which is connected to the first terminal of the optocoupler unit.
5. The AC power cord plugging / unplugging status detection circuit as described in claim 4, characterized in that, The switching unit includes: A first switching transistor, a first resistor, a second switching transistor, and a second resistor are provided. The first terminal of the first switching transistor is connected to the input terminal of the clamping diode, the second terminal of the first switching transistor is connected to the first terminal of the second switching transistor, and the third terminal of the first switching transistor is connected to one end of the first resistor. The other end of the first resistor is grounded; The second terminal of the second switch is connected to the second terminal of the optocoupler unit, the third terminal of the second switch is connected to one end of the second resistor, and the other end of the second resistor is grounded.
6. The AC power cord plug-in / unplug status detection circuit as described in claim 4, characterized in that, The clamping unit further includes: A first voltage divider resistor and a second voltage divider resistor, one end of the first voltage divider resistor is connected to a second power supply, the other end of the first voltage divider resistor is connected to the output terminal of the clamping diode and one end of the second voltage divider resistor, and the other end of the second voltage divider resistor is connected to the first terminal of the optocoupler unit.
7. The AC power cord plug-in / unplug status detection circuit as described in claim 2, characterized in that, The signal processing module further includes: A resistor unit, one end of which is connected to the AC power supply line, and the other end of which is connected to the input terminal of the clamping unit; The resistor unit is used to step down and limit the current of the AC voltage signal.
8. The AC power cord plug-in / unplug status detection circuit as described in claim 7, characterized in that, The resistor unit includes: The third resistor, the fourth resistor, and the fifth resistor are connected in the following manner: one end of the third resistor is connected to the AC power supply line, the other end of the third resistor is connected to one end of the fourth resistor, the other end of the fourth resistor is connected to one end of the fifth resistor and the input terminal of the clamping unit, and the other end of the fifth resistor is grounded.
9. The AC power cord plug-in / unplug status detection circuit as described in claim 1, characterized in that, The status detection module includes: A microcontroller, the input of which is connected to the output of the signal processing module.
10. An electronic device, characterized in that, The electronic device is provided with a circuit board, and the circuit board is provided with an AC power cord plugging / unplugging status detection circuit as described in any one of claims 1 to 9.