USB slave device and power supply quality detection method thereof

By introducing a power quality detection mechanism into the USB slave device to detect whether the current of the USB power supply device meets the specification requirements, the problem of unexpected power outages and malfunctions caused by low power supply of the USB slave device is solved, improving the user experience and reducing the need for repairs. cost.

CN118567913APending Publication Date: 2024-08-30NANNING FUGUI PRECISION IND CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310146662.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-02-21
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

USB power supply devices that are below product specification requirements or do not comply with USB specifications will cause USB slave devices to unexpectedly power off, restart, or malfunction, causing users to mistakenly believe that the device is damaged, increasing user experience problems and repair costs.

Method used

Design a USB slave device, including a controller, power quality detection circuit and peripheral modules. By detecting the current provided by the USB power supply device, it determines whether it meets the preset time threshold. If not, the user is prompted to replace the power supply device to ensure the function of the device. normal operation.

Benefits of technology

Effectively detects USB power supply capability, reduces the risk of unexpected malfunctions or power outages and restarts, improves user experience and reduces repair costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118567913A
    Figure CN118567913A
Patent Text Reader

Abstract

The invention relates to USB slave equipment and a power quality detection method thereof. The USB slave equipment presets minimum functions required for enabling power quality detection only. After the USB slave equipment is connected with the USB power supply equipment, power supply quality detection is started, and if the USB slave equipment is not restarted for a period of time, it is judged that the power supply quality detection is passed, and all functions of the USB slave equipment are enabled.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of power supply detection, in particular to a USB slave device and a power supply quality detection method thereof. Background Art

[0002] When a USB power supply device that is below the product specification requirements or does not comply with the USB specification is used to power a USB slave device, the USB slave device may experience unexpected power outages, reboots, or be unable to use specific product functions, causing the user to mistakenly believe that the USB slave device is damaged.

[0003] In order to improve user experience and reduce unnecessary repair costs, it is necessary to add a power quality detection mechanism in the USB slave device. Summary of the invention

[0004] In view of this, an object of the present invention is to provide a USB slave device and a power quality detection method thereof, which can provide power quality detection in a USB slave device powered by a USB.

[0005] An embodiment of the present invention provides a USB slave device, including a controller, a power quality detection circuit and a peripheral module, wherein the power quality detection circuit is used to detect the current provided by a USB power supply device; the peripheral module is used to control the enabling and disabling of various functions, wherein the peripheral module enables the minimum functions required for executing a power quality detection method by default and disables the remaining functions; and the controller is used to execute the power quality detection method, and the power quality detection method includes the following steps: establishing a connection relationship with the USB power supply device; enabling the power quality detection circuit; determining whether the device has not been restarted for a preset time threshold; when it is determined that the device has not been restarted for a preset time threshold, notifying the peripheral module to enable all functions; and when it is determined that the device has been restarted, prompting the user to replace the USB power supply device.

[0006] An embodiment of the present invention further provides a power quality detection method, which is applied to a USB slave device, wherein a peripheral module of the USB slave device enables the minimum functions required to execute the power quality detection method by default and disables the remaining functions. The power quality detection method includes the following steps: establishing a connection relationship with the USB power supply device; enabling a power quality detection circuit of the USB slave device; determining whether the USB slave device has not been restarted for a preset time threshold; when it is determined that the USB slave device has not been restarted for a preset time threshold, notifying the peripheral module to enable all functions; and when it is determined that the USB slave device is restarted, prompting a user to replace the USB power supply device.

[0007] Compared with the prior art, the USB slave device and the power quality detection method thereof provided by the present invention can detect the power supply capacity of the USB power supply device, thereby reducing the risk of unexpected malfunction or power failure and restart of the USB slave device. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] Figure 1 FIG. 4 is a block diagram of a USB slave device according to an embodiment of the present invention.

[0009] Figure 2 FIG. 4 is a flow chart of a method for detecting power quality of a USB slave device according to an embodiment of the present invention.

[0010] Main component symbols

[0011] USB Slave Device 100 Controller 110 Power quality detection circuit 120 Switch components 121 load 122 Peripheral modules 130 USB powered devices 200 step S201~S205

[0012] The following specific implementation manner will further illustrate the present invention in conjunction with the above-mentioned drawings. DETAILED DESCRIPTION

[0013] In order to facilitate the understanding and implementation of the present invention by those skilled in the art of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the present invention provides many applicable inventive concepts, which can be implemented in a variety of specific forms. Those skilled in the art of the present invention can use the details described in these embodiments or other embodiments and other available structural, logical and electrical changes to implement the invention without departing from the spirit and scope of the present invention.

[0014] The present invention specification provides different embodiments to illustrate the technical features of different implementations of the present invention. Among them, the configuration of each component in the embodiment is for illustrative purposes and is not intended to limit the present invention. And the partial repetition of the figure numbers in the embodiment is to simplify the description and does not mean the correlation between different embodiments. Among them, the same component numbers used in the drawings and the description represent the same or similar components. The drawings in this specification are simplified and are not drawn to exact proportions.

[0015] Furthermore, in describing some embodiments of the present invention, the specification describes the method and (or) program of the present invention in a specific order of steps. However, since the method and program are not necessarily implemented according to the specific order of steps described, they are not limited to the specific order of steps described. A person skilled in the art of the present invention will know that other orders are also possible implementation methods. Therefore, the specific order of steps described in the specification is not used to limit the scope of the patent application. Furthermore, the scope of the patent application for the method and (or) program of the present invention is not limited to the order of execution steps written therein, and a person skilled in the art of the present invention will understand that adjusting the order of execution steps does not deviate from the spirit and scope of the present invention.

[0016] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those generally understood by those skilled in the art of the present invention. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more related listed items. Some embodiments of the present invention are described in detail below in conjunction with the accompanying drawings.

[0017] See also Figure 1 , which is a block diagram of a USB slave device 100 according to an embodiment of the present invention. The USB slave device 100 is a device that must be powered by a USB power supply device 200; the USB power supply device 200 is a device having a USB port that can actively supply power to the USB slave device 100. Figure 1 As shown, the USB power supply device 200 is connected to the USB slave device 100 through a USB port. In one example, the USB power supply device 200 includes a computer, a tablet, a smart TV, and a USB charger. The USB slave device 100 includes a controller 110, a power quality detection circuit 120, and a peripheral module 130. The controller 110 includes a microcontroller unit (MCU) for executing the power quality detection method and controlling the operation of the USB slave device 100. The power quality detection circuit 120 includes a switch component 121 and a load 122 for detecting whether the USB power supply device 200 can provide the required rated current, wherein the switch component 121 includes a MOS tube or a power switch integrated circuit, and the load 122 includes a plurality of resistors. The peripheral module 130 is used to control the enabling and disabling of each function, wherein each function includes a software module and a hardware component, such as: a memory card, Bluetooth, WiFi, and a speaker.

[0018] In this embodiment, when the USB slave device 100 is in the prototype stage, the power consumption current value of the whole device, i.e., the rated current, is estimated according to the specification and software functions; when the USB slave device 100 enters trial production, the required minimum power consumption current value is measured and confirmed according to the multiple functions enabled by the software by default. The switch component that meets the regulatory requirements is selected according to the rated current of the power supply, and the appropriate load composition is selected according to the default rated current of the power supply and the minimum power consumption current value.

[0019] In one implementation, the peripheral module 130 enables only the minimum functions required to perform power quality detection by default, such as a memory for reading and writing data, and a communication interface for bidirectional communication with the USB power supply device 200. For example, when the USB slave device 100 is a smart TV box, the default enabled functions include high-definition multimedia interface, memory, and Bluetooth.

[0020] See also Figure 2 , which is a flow chart of a method for detecting power quality of a USB slave device in an embodiment of the present invention. In this embodiment, the method for detecting power quality is executed by a controller of the USB slave device.

[0021] Step S201: establishing a connection relationship with a USB power supply device.

[0022] In one embodiment, after the USB slave device establishes a connection relationship with the USB power supply device, the product identifier PID and the vendor identifier VID of the USB power supply device are obtained, and whether the USB power supply device is a designated device is determined based on the PID and the VID. When the USB power supply device is determined to be a designated device, step S204 is directly executed. In one example, when the USB slave device determines that the USB power supply device is a transformer attached to the USB slave device at the factory based on the PID and the VID, the steps related to the power quality detection can be skipped and used directly. When the USB slave device cannot obtain the PID and the VID of the USB power supply device, the steps related to the power quality detection continue to be executed.

[0023] Step S202, enabling the power quality detection circuit.

[0024] Specifically, an enable signal is sent to a switch component of the power quality detection circuit to turn on the power path and pass through the load of the power quality detection circuit.

[0025] In one embodiment, after the USB slave device is powered on, a power detection flag and a complete function flag are generated and stored in the memory. The power detection flag is used to indicate whether the power quality detection has been performed, 0 represents that the power quality detection has not been performed, and 1 represents that the power quality detection has been performed; the complete function flag is used to indicate the result of the power quality detection, 0 represents that the power quality detection has not been passed, and 1 represents that the power quality detection has been passed. In this embodiment, the flag values ​​of the two flags are both preset to 0. Each time the USB slave device 100 is restarted, the flag values ​​of the two flags need to be read to confirm the current status of the power quality detection.

[0026] Before the USB slave device sends an enable signal to the switch component of the power quality detection circuit, the flag value of the power detection flag is set to 1 and stored, indicating that the power quality detection is started.

[0027] In one embodiment, the composition of the load is based on the default power supply rated current and, for example, the current required by the USB slave device is at least 760 milliamperes (mA), that is, the USB power supply device must at least meet the 900mA required by the USB3.0 protocol. During trial production, it was calculated that the current passing through the load needs to be 600mA, so the load is connected in parallel by two 16-ohm resistors to meet the power quality detection requirements. When the switch component of the power quality detection circuit is enabled, additional current will be generated to pass through the load. At this time, if the USB power supply device is a 500mA power supply device, the USB slave device will directly restart because the current exceeds the current that the USB power supply device can provide. Otherwise, the system maintains a stable state.

[0028] Step S203, determining whether the restart has not reached a preset time threshold.

[0029] When it is determined that the USB slave device maintains a stable state for a preset time threshold and does not restart, step S204 is executed. In one example, the preset time threshold is 5 seconds. On the contrary, when the USB slave device restarts, it means that the power quality detection result is not passed. At this time, the flag value of the power detection flag read by the USB slave device is 1, and the flag value of the full function flag is 0, which means that the power quality detection has not passed, and step S205 is executed.

[0030] Step S204, enabling all functions.

[0031] When the power quality detection result is passed, it means that the connected USB power supply device can meet the operation requirements of the USB slave device, so the peripheral module is notified to enable all functions, and the flag value of the complete function flag is set to 1 and stored.

[0032] In one example, after the USB slave device is restarted, the flag value of the power detection flag is read as 0 and the flag value of the full function flag is 1. Since it is impossible to set the flag value of the full function flag to 1 without passing the power quality detection, it is judged as an abnormal operation, the flag value of the full function flag is set to 0, and the power quality detection is re-executed.

[0033] In one example, when the power quality test result is passed, but the user restarts the USB slave device by himself, the flag value of the power detection flag and the flag value of the full function flag read after the power is turned on are both 1. Considering that the user may replace the USB power supply device during the process from shutting down to restarting, in this example, the flag value of the power detection flag and the flag value of the full function flag read in real time are both 1, and the flag values ​​of the two flags still need to be set to 0 and the power quality test is performed.

[0034] Step S205, prompting the user to replace the USB power supply device.

[0035] In one embodiment, when the power quality detection of the USB slave device fails, the USB slave device prompts the user to replace a suitable USB power supply device or prompts the user that the function of the current USB slave device is limited via one or more LED indicators.

[0036] In one embodiment, when the power quality detection of the USB slave device fails, the USB slave device sends a prompt message to the USB power supply device. For example, if the USB slave device is an OTT Dongle and the USB power supply device is a TV, the USB slave device can send a prompt message to the display screen output of the USB power supply device to inform the user that a power source that does not meet the specifications is detected, and the user is prompted that the full function of the USB slave device cannot be used at present.

[0037] In summary, the USB slave device and the power quality detection method thereof of the present invention can detect whether the USB power supply device used by the user meets the specification requirements of the USB slave device, clarify the causes of unexpected restarts and malfunctions, improve user experience and reduce unnecessary product returns.

[0038] It is worth noting that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.

Claims

1. A USB slave device, comprising a controller, a power quality detection circuit and a peripheral module, It is characterized in that The power quality detection circuit is used to detect the current provided by the USB power supply device; The peripheral module is used to control the enabling and disabling of various functions, wherein the peripheral module enables the minimum functions required to execute the power quality detection method by default and disables the remaining functions; and The controller is used to execute the power quality detection method, and the power quality detection method comprises the following steps: Establishing a connection relationship with the USB power supply device; enabling the power quality detection circuit; Determine whether the restart has not reached a preset time threshold; When it is determined that the restart has not reached a preset time threshold, notifying the peripheral modules to enable all functions; and When it is determined to restart, the user is prompted to replace the USB power supply device.

2. The USB slave device according to claim 1, It is characterized in that The power quality detection circuit includes a switch component and a load, and the step of enabling the power quality detection circuit includes: An enabling signal is sent to the switch component to turn on the power path and pass the power through the load.

3. The USB slave device according to claim 1, It is characterized in that The step of prompting the user to replace the USB power supply device comprises: The user is prompted via the LED indicator light of the USB slave device.

4. The USB slave device according to claim 1, It is characterized in that The step of prompting the user to replace the USB power supply device comprises: The USB slave device transmits a prompt message to the USB power supply device; as well as The display screen of the USB power supply device outputs the prompt message.

5. The USB slave device according to claim 2, It is characterized in that The composition of the load is set according to the default power supply rated current and minimum power consumption current value.

6. A power quality detection method, applied to a USB slave device, in, The peripheral module of the USB slave device enables the minimum functions required to execute the power quality detection method by default, and disables the remaining functions, wherein the power quality detection method comprises the following steps: Establishing a connection relationship with the USB power supply device; enabling a power quality detection circuit of the USB slave device; Determining whether the USB slave device has not been restarted for a preset time threshold; When it is determined that the USB slave device has not been restarted for a preset time threshold, notifying the peripheral module to enable all functions; and When it is determined that the USB slave device is restarted, the user is prompted to replace the USB power supply device.

7. The power quality detection method according to claim 6, It is characterized in that The power quality detection circuit includes a switch component and a load, and the step of enabling the power quality detection circuit includes: An enabling signal is sent to the switch component to turn on the power path and pass the power through the load.

8. The power quality detection method according to claim 6, It is characterized in that The step of prompting the user to replace the USB power supply device comprises: The user is prompted via the LED indicator light of the USB slave device.

9. The power quality detection method according to claim 6, It is characterized in that The step of prompting the user to replace the USB power supply device comprises: The USB slave device transmits a prompt message to the USB power supply device; as well as The display screen of the USB power supply device outputs the prompt message.

10. The power quality detection method according to claim 7, It is characterized in that The composition of the load is set according to the default power supply rated current and minimum current consumption value.