The accompanying drawings are included to provide a further understanding of the invention, and are incorporated in and constitute a part of this specification. The drawings illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention.
Reference will now be made in detail to the present preferred embodiments of the invention, examples of which are illustrated in the accompanying drawings. Wherever possible, the same reference numbers are used in the drawings and the description to refer to the same or like parts.
USB hub controller 230 controls an upstream USB socket consisting of the terminals VDD, DP0, DM0 and GND. The upstream USB socket is for connecting an upstream USB device providing the voltage source VDD. For example, the upstream USB device may be a host computer. USB hub controller 230 also controls the downstream USB sockets 232-238. The downstream USB sockets are used for connecting downstream USB devices powered by voltage source VDD. For example, the downstream USB devices may be peripherals of the host computer, such as keyboard, mouse and portable storage devices.
Amplifier stage 222 drives speaker 204 according to audio input signal Ain. Amplifier stage 222 is also powered by voltage source VDD. In this embodiment, amplifier stage 222 is a class-D audio power amplifier.
The volume controller (210 and 226) provides volume signal V22 to control the gain of amplifier stage 222. Volume signal V22 changes in response to the total current output by voltage source VDD when the total current is larger than a predetermined value (0.5 A in this embodiment). The total current is the sum of the current consumption of amplifier stage 222, USB hub controller 230 and the downstream USB devices connected to downstream USB sockets 232-238. In this embodiment, the gain of amplifier stage 222 is an increasing function of the signal level of volume signal V22. To prevent overload when the total current is larger than the predetermined value, the power consumption of amplifier stage 222 has to be reduced in order to maintain the power supplied to the downstream USB devices. That means the signal level of volume signal V22 has to be a decreasing function of the total current.
The volume controller comprises voltage divider 226 and current limit circuit 210. Voltage divider 226 comprises resistors 227 and 228. Resistor 227 is coupled to reference voltage V21. Resistor 228 is coupled between resistor 227 and the ground. Volume signal V22 is provided at the connection point (CP) of resistors 227 and 228. In this embodiment, reference voltage V21 is provided by amplifier stage 222, and resistor 228 is a variable resistor. The voltage level of volume signal V22 can be controlled by adjusting the resistance of resistor 228, thus controlling the gain and volume output level of amplifier stage 222.
Current limit circuit 210 is coupled between connection point CP and the ground. Current limit circuit 210 is equivalent to an open circuit when the total current is smaller than the predetermined value. On the other hand, current limit circuit 210 has a finite equivalent resistance when the total current is larger than the predetermined value, and the equivalent resistance changes in response to the total current. In this embodiment, the equivalent resistance is a decreasing function of the total current.
To implement the equivalent open circuit and the equivalent resistance, current limit circuit 210 comprises current sensor 220, operational amplifier 216 and N-channel metal oxide semiconductor field effect transistor (MOSFET) 218. Current sensor 220 provides sensor signal SS according to the total current. Operational amplifier 216 receives sensor signal SS and reference voltage Vref as input. MOSFET 218 is coupled between connection point CP and the ground. The gate terminal of MOSFET 218 is driven by operational amplifier 216.
Current sensor 220 comprises operational amplifier 214 and resistor 212. Operational amplifier 214 provides sensor signal SS. Resistor 212 is coupled to voltage source VDD and is also coupled between the two input terminals of operational amplifier 214. As can be seen in
The combinational apparatus 200 further comprises capacitor 206. The major purpose of capacitor 206 is noise filtering.
If the total current is less than the predetermined value (0.5 A in this embodiment), then operational amplifier 216 outputs a low voltage signal. MOSFET 218 is kept in an off-state. Current limit circuit 210 is equivalent to an open circuit. The gain and the power consumption of amplifier stage 222 are not affected by the total current.
On the other hand, if the total current consumption of amplifier stage 222 and the other connected USB peripherals begins to exceed the predetermined value, then the output of operational amplifier 216 begins to rise accordingly. This eventually turns on MOSFET 218, making it a low resistance path in parallel with resistor 228. Since the resistance of resistor 227 is fixed, the low resistance of MOSFET 218 reduces the signal level of volume signal V22. This in turn rolls back the gain and the power consumption of amplifier stage 222.
The more tendencies the total current is to exceed the predetermined value, the higher the voltage which operational amplifier 216 will provide to MOSFET 218, thus the lower the resistance of MOSFET 218 appears to voltage divider 226. In such cases, the gain and power consumption of amplifier stage 222 roll back to counter the increase of the total current.
If the loop gain is sufficiently large, the close-loop current limiting scheme of current limit circuit 210 will reach an equilibrium point where the total current is regulated at exactly the predetermined value. In other words, the other USB peripherals can together draw up to a current of 0.5 A. If there is any left-over, the remainder is automatically made available to amplifier stage 222 of the USB-powered speaker.
In the case the total current drops below the predetermined value, MOSFET 218 will be turned off and return to its high-impedance state. Amplifier stage 222 will resume its original volume control setting and power consumption accordingly.
Please note that the focus of the present invention is the closed-loop control mechanism which reduces the power consumption of amplifier stage 222 to counter the increase of the total current when the total current consumption exceeds the predetermined limit. Although the closed-loop control mechanism of the above embodiment is implemented through the change of the equivalent resistance of current limit circuit 210, the present invention is not limited to such an implementation. For example, the closed-loop control mechanism can be implemented by digital circuit design as well.
It will be apparent to those skilled in the art that various modifications and variations can be made to the structure of the present invention without departing from the scope or spirit of the invention. In view of the foregoing, it is intended that the present invention cover modifications and variations of this invention provided they fall within the scope of the following claims and their equivalents.