Electronic device, detection circuit and voltage control method

A voltage control method includes producing an error signal based on a difference between a reference signal and an adaptor voltage and an adaptor current corresponding to the adaptor voltage, regulating, based on the error signal, the adaptor voltage, comparing a reference voltage to a voltage proportional to a potential corresponding to an identifying voltage corresponding to the adaptor voltage, detecting, based on the comparison result, whether or not a couplable external power source is suitable, and setting based, on the detection result, a potential corresponding to the identifying voltage.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is based upon and claims the benefit of priority of the prior Japanese Patent Application No. 2008-091405, filed on Mar. 31, 2008 and the prior Japanese Patent Application No. 2009-026519, filed on Feb. 6, 2009, the entire contents of which are incorporated herein by reference.

FIELD

The embodiments discussed herein are related to an electronic device, a detection circuit, and a voltage control method.

BACKGROUND

Typical electronic devices are provided with a secondary battery as a drive power source. Such electronic devices include a charging circuit for charging the secondary battery using a charging current supplied from an external power source.

It is desirable that the main unit of an electronic device be able to control an AC adaptor to regulate the output voltage supplied from the AC adaptor to the main device. In this case, the AC adaptor includes a voltage regulating circuit, and a detection circuit included in the main device detects a voltage or the like to produce a control signal for controlling the voltage regulating circuit. Furthermore, since the main device needs to detect whether or not the coupled AC adaptor is suitable for the device, the AC adaptor outputs information identifying the AC adaptor to the main device. For example, the detection circuit of the main device monitors a voltage of the coupling terminal and determines whether or not the coupled AC adaptor is suitable for the device. The main device may not control an AC adaptor which is not suitable for the device, so the main device turns off a switch disposed in the power supply path to protect system circuits and the like of the main device.

In the above electronic device, the AC adaptor is coupled to the main device via, for example, a DC plug90illustrated inFIG. 1. In the DC plug90, a cylindrical power terminal92is formed in the outer circumference surface of a cylindrical insulator91; a cylindrical ground terminal93is formed in the inner circumference surface of the insulator91; and a rod-like control terminal94is arranged at the axial center of the insulator91. The length of the control terminal94is set shorter than the lengths of power terminal92and ground terminal93in a direction of inserting the DC plug90. That is, the tip ends of the power terminal92and ground terminal93protrude further relative to the tip end of the control terminal94. The AC adaptor outputs an identification signal via the control terminal94to the main device; and the main device outputs a control signal via the control terminal94to the AC adaptor.

As depicted inFIG. 1, the ground terminal93and power terminal92, and then the control terminal94are electrically coupled in order to terminals of the main device. With this configuration, the signal (information) is supplied to the detection circuit of the main device after supplying the power supply voltage. Thus, in case the DC plug90coupled to the AC adaptor after the AC plug has been inserted in an AC outlet is coupled to the main device, the main device is prevented from being damaged. Such configuration in which coupling of the control terminal94is done after coupling of the power terminal92and ground terminal93is used not only by the DC plug90having this shape but also by a DC plug having another shape.

As further depicted inFIG. 1, in the above electronic device, during a period from coupling of the power terminal92and ground terminal93of the DC plug90to coupling of the control terminal94, the terminal of the main device to be coupled to the control terminal is still not coupled. As a result, the potential of the terminal of the main device may become unstable, causing a malfunction.

SUMMARY

According to an aspect of the embodiments, a voltage control method includes producing an error signal based on a difference between a reference signal and an adaptor voltage and an adaptor current corresponding to the adaptor voltage, regulating, based on the error signal, the adaptor voltage, comparing a reference voltage to a voltage proportional to a potential corresponding to an identifying voltage corresponding to the adaptor voltage, detecting, based on the comparison result, whether or not a couplable external power source is suitable, and setting based, on the detection result, a potential corresponding to the identifying voltage.

DESCRIPTION OF EMBODIMENTS

An embodiment will be described below with reference toFIGS. 2 to 7.

As shown inFIG. 2, an AC adaptor21acting as an external power source is coupled to a main device31. The AC adaptor21is coupled to an AC power source, and commercial AC voltage supplied from the AC power source is input to a voltage conversion circuit22of the AC adaptor21. The voltage conversion circuit22converts an AC voltage into a DC voltage and outputs the DC voltage. A voltage control circuit23, which receives control current Isc, has a function of producing, based on the control current Isc, a regulated adaptor voltage VAC from the DC voltage. The AC adaptor21is coupled to the main device31via, for example, the DC plug90illustrated inFIG. 1, and supplies the produced adaptor voltage VAC to the main device31. The voltage control circuit23further has a function of outputting, as an identifying voltage, a power limiting signal PWRM having a voltage value dependent on power information of the AC adaptor21.

As further shown inFIG. 2, the adaptor voltage VAC is supplied via a resistor R1to a system DC/DC converter32. Coupled via a resistor R2to the system DC/DC converter32is a secondary battery (“battery” for short) BT. The system DC/DC converter32produces, based on the adaptor voltage VAC and a battery voltage supplied from the battery, a system voltage VS obtained by voltage conversion of an input voltage and supplies the system voltage VS to a system circuit33. Consequently, a power dependent on at least one of the power supplied from the AC adaptor21and the power supplied from the battery BT is supplied to the system circuit33. The system circuit33is a circuit that provides various types of functions of the main device31.

As further shown inFIG. 2, the battery detection circuit34of the main device31includes one or more semiconductor devices. The semiconductor device includes a chip and/or a package including the chip. The battery detection circuit34is coupled to both terminals of the resistor R1and coupled between the resistor R2and battery BT. The battery detection circuit34detects based on a voltage across the resistor R1, current (adaptor current) lout flowing in the resistor R1. Also, the battery detection circuit34detects, based on a voltage across the resistor R2, current (battery current) Ichg flowing in the resistor R2. Furthermore, the battery detection circuit34detects a voltage (or an adaptor voltage VAC) supplied to the system DC/DC converter32and detects a terminal voltage of the battery BT. The battery detection circuit34produces a control current Isc based on the detected voltage and current, and on a power limiting signal PWRM supplied from the AC adaptor21. The control current Isc is supplied to the voltage control circuit23of the AC adaptor21. Consequently, the voltage control circuit23of the AC adaptor21regulates adaptor voltage VAC according to the control current Isc output from the battery detection circuit34.

As further shown inFIG. 2, the battery detection circuit34determines, based on a voltage of the control terminal to which power limiting signal PWRM is supplied, whether or not an AC adaptor is suitable for supplying power to the main device31. An appropriate AC adaptor has a control terminal and has a function of regulating its output voltage in response to control current Isc output from the battery detection circuit34, whereas an inappropriate AC adaptor does not regulate its output voltage. Determining that the AC adaptor coupled is appropriate, the battery detection circuit34supplies power supplied from the AC adaptor to the system DC/DC converter32and also charges the battery BT using the power. Meanwhile, when the battery detection circuit34determines that the AC adaptor coupled is inappropriate, the battery detection circuit34does not supply power supplied from the AC adaptor to the system DC/DC converter32and the battery BT.

An exemplary configuration of the AC adaptor21will be described with reference toFIG. 3.

As illustrated inFIG. 3, an output terminal of the voltage conversion circuit22is coupled to a first terminal (for example, source) of a first transistor T11; a second terminal (for example, drain) of the first transistor T11is coupled to a first terminal of a choke coil L1; and a second terminal of the choke coil L1is coupled to a first terminal P1acting as a power source terminal. The second terminal of the first transistor T11is also coupled to a first terminal (for example, drain) of a second transistor T12; a second terminal (for example, source) of the second transistor T12is coupled to the ground. A control terminal (gate) of the first transistor T11and a control terminal (gate) of the second transistor T12are coupled to a pulse width modulator (PWM)24. According to the present embodiment, the first transistor T11is a p-channel MOS transistor; and the second transistor T12is an n-channel MOS transistor.FIG. 3also illustrates body diodes of the transistors T11and T12.

A first terminal of the choke coil L1is coupled to the cathode of the diode D1; and the anode of the diode D1is coupled to the ground. The first terminal P1is coupled to a first terminal of a smoothing capacitor C1; and a second terminal of the capacitor C1is coupled to the ground. A second terminal P2acting as a power source terminal is coupled to the ground; and a third terminal P3acting as a control terminal is coupled to the pulse width modulator (PWM)24. Input via the third terminal P3to the pulse width modulator24is control current Isc. According to the present embodiment, the pulse width modulator24outputs, via the third terminal P3, a power limiting signal PWRM having a voltage dependent on power information of the AC adaptor21.

As further illustrated inFIG. 3, the pulse width modulator (PWM)24performs on/off control of the first transistor T11and second transistor T12alternately using a given duty cycle. The output current of the transistor T11is smoothed by the choke coil L1and capacitor C1due to the switching operation of the first transistor T11. In this case, when the first transistor T11is in an ON state, the output voltage of the voltage conversion circuit22is supplied via the transistor T11to an LC circuit (smoothing circuit including the choke coil L1and capacitor C1). When the first transistor T11is turned OFF and the second transistor T12is turned ON, a current path is formed. Then, energy accumulated in the choke coil L1when the first transistor T11is in an ON state is discharged to the first terminal P1side.

Furthermore, the pulse width modulator24modifies the duty cycle in response to control current Isc. For example, the pulse width modulator24modifies the duty cycle to vary the ON period of the first transistor T11according to the value of control current Isc. An adaptor voltage VAC output from the AC adaptor21corresponds to the ON period of the first transistor T11. As the ON period of the first transistor T11increases, the energy accumulated in the choke coil L1becomes larger, so a higher adaptor voltage VAC is output. As the ON period of the first transistor T11decreases, the energy accumulated in the choke coil L1becomes smaller, so a lower adaptor voltage VAC is output.

The first terminal P1and second terminal P2are coupled to a first terminal P11and second terminal P12, respectively, illustrated inFIG. 4; and the third terminal P3is coupled to a third terminal P13illustrated inFIG. 4.

A configuration of the main device31will be described with reference toFIG. 4.

As illustrated inFIG. 4, the first terminal P11acting as a power source terminal is coupled to the battery detection circuit34and a first terminal of a switch SW1. The second terminal P12acting as a power source terminal is coupled to the ground. The third terminal P13acting as a control terminal is coupled to the battery detection circuit34.

As further illustrated inFIG. 4, a second terminal of the switch SW1is coupled to the battery detection circuit34and a first terminal of a switch SW2. A second terminal of the switch SW2is coupled to a first terminal of the resistor R1, and a second terminal of the resistor R1is coupled to the system DC/DC converter32(refer toFIG. 2) and a first terminal of the resistor R2. A second terminal of the resistor R2is coupled to a first terminal of a switch SW3, a second terminal of the switch SW3is coupled to a positive terminal of the battery BT, and a negative terminal of the battery BT is coupled to the ground.

The switches SW1to SW3are each an analog switch including a p-channel MOS transistor, for example, and their control terminals are coupled to the battery detection circuit34. The switches SW1to SW3turn ON or OFF in response to control signals SC1to SC3supplied from the battery detection circuit34. Some of the circuits included in the battery detection circuit34operate on power supply from the battery BT to turn ON/OFF switches SW1to SW3when a given adaptor voltage VAC is not supplied via the first terminal P11, that is, when the AC adaptor21is not coupled. In the present embodiment, some circuits included in the battery detection circuit34at least control the ON/OFF of the third switch SW3. Consequently, the system circuit33illustrated inFIG. 2may operate using the system voltage VS supplied via the system DC/DC converter32from the battery BT.

However, when the adaptor voltage VAC produced by the AC adaptor21illustrated inFIG. 3is supplied via the first terminal P11, some circuits included in the battery detection circuit34operate using the adaptor voltage VAC. When the adaptor voltage VAC of a given value or more is supplied, the operating circuits turn ON the first switch SW1. As a result, the adaptor voltage VAC is supplied as drive voltage VDC via the first switch SW1to the battery detection circuit34. Many circuits included in the battery detection circuit34operate using the drive voltage VDC to regulate adaptor voltage VAC, charge the battery BT, and perform other operations.

As further illustrated inFIG. 4, both terminals of the resistor R1are coupled to input terminals of a current amplifier41of the battery detection circuit34; and both terminals of the resistor R2are coupled to input terminals of a current amplifier42. The current amplifier41detects current Iout flowing in the resistor R1, that is, an output current of the AC adaptor21, and outputs a current detection signal S1corresponding to the detection result to an error amplifier43acting as a differential amplifier. The current amplifier42detects current Ichg flowing in the resistor R2, that is, charge current Ichg flowing to the battery BT, and outputs charging current detection signal S2corresponding to the detected current to the error amplifier43.

As further illustrated inFIG. 4, the error amplifier43includes two inverted input terminals and one non-inverted input terminal. In the error amplifier43, the current detection signal S1is input to the first inverted input terminal, and charging current detection signal S2is input to the second inverted input terminal. Input to the non-inverted input terminal of the error amplifier43is a reference signal based on current reference signal IOUTM and limiting current signal IDAC. The current reference signal IOUTM is set according to the total amount of current used in the main device31; and the limiting current signal IDAC is set to a voltage set according to the charging current of the battery BT. The error amplifier43compares the reference signal with the larger of the current detection signal S1and charging current detection signal S2, and produces an error voltage dependent on the comparison result.

As further illustrated inFIG. 4, a coupling point between the resistor R2and the battery BT is coupled to an inverted input terminal of an error amplifier44. A voltage limiting signal VDAC is input to a non-inverted input terminal of the error amplifier44. The error amplifier44amplifies a difference between a terminal voltage of the battery BT and voltage limiting signal VDAC to produce an error voltage.

As further illustrated inFIG. 4, both terminals of the resistor R1are coupled to a multiplier45. The multiplier45detects the terminal voltage across the resistor R1, that is, the drive voltage VDC, and also detects the total amount of current from the voltage across the resistor R1. Then, the multiplier45multiplies the drive voltage VDC by the total amount of current to obtain a power detection signal PWRO, and outputs the power detection signal PWRO to an error amplifier46. In the error amplifier46, the power detection signal PWRO is input to an inverted input terminal of the error amplifier46, and a power limiting signal PWRM is input to the non-inverted input terminal the error amplifier46. The power limiting signal PWRM is supplied to the error amplifier46via an input/output terminal P21coupled to the third terminal P13of the main device31. The error amplifier46amplifies a difference between the power detection signal PWRO and the power limiting signal PWRM to produce an error voltage.

In the battery detection circuit34according to the present embodiment, the error voltages corresponding to the four detected signals are produced by the three error amplifiers43,44, and46. Typically, error amplifiers are arranged corresponding to each detected signal. According to the present embodiment, however, the error voltage with respect to the current Iout flowing in the resistor R1and the error voltage with respect to the charging current Ichg corresponding to the battery BT are both produced by the error amplifier43. Thus, the number of external components for the chip is reduced, that is, the number of external terminals is reduced, so the size of the chip and the size of a package in which the chip is sealed may be reduced.

As further shown inFIG. 4, the cathodes of diodes D11, D12, and D13are coupled to the output terminals of the error amplifiers43,44, and46, respectively. The anodes of the diodes D11to D13are coupled to each other and also coupled to a current-voltage conversion circuit47. The diodes D11to D13transmit to the current-voltage conversion circuit47a current (error current) corresponding to the highest error voltage of the error voltages output from the error amplifiers43,44, and46. This is one of the detected values which corresponds to the largest error.

As further illustrated inFIG. 4, a control terminal (gate) of a transistor T21included in a constant current source (current control circuit) is coupled to an output terminal of the current-voltage conversion circuit47. The current-voltage conversion circuit47supplies a signal of a voltage proportional to the amount of current to the gate of the transistor T21. According to the present embodiment, the transistor T21is a p-channel MOS transistor. The drive voltage VDC is supplied to the source of the transistor T21, and the drain is coupled via the input/output terminal P21of the package including the battery detection circuit34to the third terminal P13of the main device31.

As further illustrated inFIG. 4, the transistor T21works as a resistor having a resistance value dependent on a voltage supplied to the gate thereof, and produces control current Isc dependent on the resistance value. The transistor T21, formed of a p-channel MOS transistor, exhibits a large resistance value for a high gate voltage, but exhibits a small resistance value for a low gate voltage. Consequently, as the output voltage of the current-voltage conversion circuit47increases, that is, the error that is the detection result increases, the transistor T21reduces control current Isc; but as the output voltage of the current-voltage conversion circuit47decreases, that is, the error being the detection result decreases, the transistor T21increases control current Isc.

As further illustrated inFIG. 4, when the battery BT is not mounted in the main device31, the battery terminal voltage VBATT input to the error amplifier44is zero. Furthermore, the charging current detected by the error amplifier43is also zero. Consequently, the error is large, so the input current of the current-voltage conversion circuit47is large. In this case, the control current Isc flowing in the transistor T21is small, so the voltage control circuit23of the AC adaptor21outputs a lower adaptor voltage VAC. In this state, when the battery BT is mounted, the difference between the terminal voltage of the battery BT and adaptor voltage VAC supplied from the AC adaptor21is small, so inrush current to the battery BT is suppressed.

As further illustrated inFIG. 4, a monitoring circuit48is coupled to the input/output terminal P21of the battery detection circuit34. A power limiting signal PWRM output from the AC adaptor21illustrated inFIG. 3is supplied via the input/output terminal P21from the third terminal P13of the main device31to the input/output terminal P21. The monitoring circuit48monitors a voltage of the terminal P13, monitors a voltage of the input/output terminal P21, and produces an adaptor detection signal S3corresponding to the monitoring result.

As further illustrated inFIG. 4, the monitoring circuit48includes an operational amplifier49, voltage divider circuit50, comparators51and52, and a NAND circuit53. A non-inverted input terminal of the operational amplifier49is coupled to the input/output terminal P21, and an output signal of the operational amplifier49is fed back to an inverted input terminal thereof. The voltage divider circuit50is coupled to an output terminal of the operational amplifier49. The voltage divider circuit50includes resistors R11and R12coupled in series, and produces a voltage obtained by dividing the output voltage of the operational amplifier49according to the resistance values of the resistors R11and R12. This divided voltage is supplied to an inverted input terminal of the comparator51and a non-inverted input terminal of the comparator52.

A reference voltage (comparison reference voltage) E1is input to a non-inverted input terminal of the comparator51., and a reference voltage (comparison reference voltage) E2is input to an inverted input terminal of the comparator52. The comparators51and52are both a Schmitt Trigger comparator. The comparators51and52compare the divided voltage with reference voltages E1and E2, respectively, and output a signal of a level corresponding to the comparison result.

As further illustrated inFIG. 4, the NAND circuit53calculates a negative AND of the output signals of the comparators51and52, and thereby produces an adaptor detection signal S3.

As further illustrated inFIG. 4, the monitoring circuit48monitors whether or not the voltage of the power limiting signal PWRM is in a given range, and outputs the adaptor detection signal S3corresponding to the monitoring result. The range set in the monitoring circuit48is used to determine whether or not an AC adaptor coupled is suitable for the main device31including the monitoring circuit48. That is, reference voltages E1and E2are set correspondingly to an AC adaptor suitable for the main device31. The monitoring circuit48produces, upon the coupling of an AC adaptor suitable for the main device31, the adaptor detection signal S3of L level but produces, upon coupling of an AC adaptor unsuitable for the main device31, the adaptor detection signal S3of H level.

As further illustrated inFIG. 4, a switch control circuit54receives the above described current detection signal S1and charging current detection signal S2, and also receives adaptor detection signal S3and battery voltage detection signal. The battery voltage detection signal is a signal produced by a comparator44based on a battery terminal voltage VBATT. The comparator44compares a voltage obtained by dividing the battery terminal voltage VBATT with a reference voltage, and produces a battery voltage detection signal corresponding to the comparison result. The reference voltage is set according to battery terminal voltage VBATT when the battery BT is fully charged, for example.

The first to third switches SW1to SW3are coupled to the switch control circuit54. The switch control circuit54produces control signals SC1to SC3in response to the signals S1to S4. By way of example, after the battery BT has been fully charged, the switch control circuit54produces a control signal SC3based on the battery voltage detection signal S4, and turns OFF the third switch SW3. As a result, the battery BT is protected from overcharge. By way of example, when an unsuitable AC adaptor is coupled to the main device31, the switch control circuit54produces the control signal SC1based on the adaptor detection signal S3, and turns OFF the first switch SW1. As a result, the main device31is prevented from being damaged by coupling of the unsuitable AC adaptor.

As further illustrated inFIG. 4, the battery detection circuit34includes a setting circuit55that limits a current (clamps the current value to a given value) applied to the input/output terminal P21. According to the present embodiment, the setting circuit55is coupled to the input/output terminal P21, that is, the drain terminal of the transistor T21that outputs the control current Isc.

As illustrated inFIG. 5, the current-voltage conversion circuit47inFIG. 4includes transistors T31and T32, and a resistor R21. The transistor T31is a p-channel MOS transistor. The transistor T31is coupled in current mirror form to an output transistor T21. The drive voltage VDC is supplied to the source of the transistor T31. The gate and drain of the transistor T31are coupled to each other and also coupled to the gate of the transistor T21. Furthermore, the drain of the transistor T31is coupled to a transistor T32. The transistor T32is an n-channel MOS transistor. The drain of the transistor T32is coupled to the transistor T31. The gate of the transistor T32is coupled to the anodes of the diodes D11to D13. The source of the transistor T32is coupled to a first terminal of a resistor R21, and a second terminal of the resistor R21is coupled to a ground. The gate of the transistor T21is coupled to a first terminal of a switch SW5that turns ON or OFF in response to an adaptor detection signal S3, and a second terminal of the switch SW5is coupled to a ground.

As further illustrated inFIG. 5, the transistor T32works as a resistor having a resistance value dependent on a current (error current) flowing in the diodes D11to D13, and produces, at a node between the transistor T31and transistor T32, a voltage proportional to the error current. This node voltage is supplied to the gate of the transistor T21. Consequently, in the current-voltage conversion circuit47, a signal of a voltage value proportional to the amount of current is supplied to the gate of the transistor T21. Then, the transistor T21produces the control current Isc corresponding to the voltage supplied to the gate thereof.

As further illustrated inFIG. 5, the setting circuit55includes transistors T41and T42, and a constant current source61. The drive voltage VDC is supplied to the source of the transistor T41; the drain of the transistor T41is coupled to the input/output terminal P21; and the gate of the transistor T41is coupled to the gate of the transistor T42. The drive voltage VDC is supplied to the source of the transistor T42; the gate and drain of the transistor T42are coupled to each other. Consequently, the transistors T41and T42constitute a current mirror circuit. The drain of the transistor T42is coupled to the constant current source61.

The setting circuit55sends a current value equal to the value of the current flowing in the constant current source61. That is, a current is supplied from the setting circuit55to the input/output terminal P21at all times. The amount of current from the setting circuit55is set to a value (for example, 1 μA) which does not affect the current value of control current Isc or the voltage value of power limiting signal PWRM.

Consequently, the potential of the input/output terminal P21when the transistor T21coupled parallel to the setting circuit55is in an OFF state, is the level of the drive voltage VDC. The potential of the input/output terminal P21stabilizes the operation of the battery detection circuit34. The operation mechanism will be described in detail.

As further illustrated inFIG. 5, in the battery detection circuit34, the transistor T21is controlled so that control current Isc flows according to the output voltages of the error amplifiers43,44, and46, that is, according to the detected objects (the output current Iout, the charging current Ichg, the terminal voltage of the battery BT, and the voltage across the resistor R1). In a battery detection circuit not including the setting circuit55, when the DC plug90(refer toFIG. 1) is inserted, during a period from the time the power source terminals P1and P2of the DC plug90are coupled to the power source terminals P11and P12of the main device31to the time the control terminals P3and P13of the two devices are coupled, the control terminal P13(input/output terminal P21) is in a floating state. Consequently, the potential of the input/output terminal P21is the level of the drive voltage VDC.

The monitoring circuit48determines that an unsuitable AC adaptor has been coupled and outputs the adaptor detection signal S3corresponding to the determination result, so the switch control circuit54turns OFF the switches SW2and SW3in response to the adaptor detection signal S3. Furthermore, the switch SW5turns ON in response to the adaptor detection signal S3. Then, the transistor T32of the current-voltage conversion circuit47turns OFF and current does not flow to the transistor T31. As a result, current does not flow to the transistor T21, that is, the transistor T21turns OFF. Then, the potential of the input/output terminal P21lowers due to leak current. When the potential of the input/output terminal P21becomes lower than a threshold voltage of the monitoring circuit48, the monitoring circuit48may determine that a suitable AC adaptor has been coupled, that is, may make an erroneous determination, and may output the adaptor detection signal S3corresponding to the determination result, so the switch control circuit54may turn ON the switches SW2and SW3in response to the adaptor detection signal S3. Furthermore, the switch SW5turns OFF in response to the adaptor detection signal S3. Then, in the battery detection circuit34, the transistor T21is controlled so that control current Isc flows according to the output voltages of the error amplifiers43,44, and46.

As shown inFIG. 7, the potential of the input/output terminal P21rises and falls in a repeating manner. The monitoring circuit48erroneously determines, based on the potential of the input/output terminal P21, that a suitable AC adaptor has not been coupled. In the battery detection circuit34, the transistor T21turns ON and OFF in a repeating manner, and the switches SW2and SW3also turn ON and OFF in a repeating manner. Such repeating operation continues until the control terminals P3and P13are coupled. That is, the potential of the input/output terminal P21becomes unstable.

According to the present embodiment, in the battery detection circuit34, the switch SW5is turned ON in response to the adaptor detection signal S3, and thus the transistor T21turns OFF. In this case, the potential of the input/output terminal P21becomes the level of the drive voltage VDC due to the current produced by the setting circuit55. Since the setting circuit55sends the current, the potential of the input/output terminal P21is kept at the level of the drive voltage VDC. The monitoring circuit48determines that an unsuitable AC adaptor has been coupled, and continuously outputs adaptor detection signal S3corresponding to the determination result, and the switch control circuit54turns OFF the switches SW2and SW3in response to the adaptor detection signal S3. As a result, system voltage VS supplied from the AC adaptor to the converter32illustrated inFIG. 2changes to zero.

When the control terminals P3and P13are coupled to each other with a suitable AC adaptor21, the potential of the terminal P21falls due to a load provided in the AC adaptor21, and the voltage level of the power limiting signal PWRM supplied from the AC adaptor21is provided. Then, since the potential of the terminal P21becomes lower than a reference voltage E2, the monitoring circuit48outputs the adaptor detection signal S3of level H. Then, the switch SW5turns OFF, and the transistor T21sends the control current Isc in response to the output voltages of the error amplifiers43,44, and46. The switch control circuit54turns ON the switches SW1and SW2in response to the adaptor detection signal S3. As a result, voltage regulated by the AC adaptor21is supplied to the main device31.

When an unsuitable AC adaptor is coupled to the main device31, the battery detection circuit34similarly repeats the operation. In this case, in the battery detection circuit34, the switch SW1may be turned OFF after the time to fully insert the DC plug, or a longer time, has elapsed, for example.

As described above, the present embodiment has the following advantageous effects.

(1) The AC adaptor21produces a direct-current adaptor voltage VAC, and varies the adaptor voltage VAC in response to the control current Isc and outputs the power limiting signal PWRM. The main device31includes the power source terminals P11and P12, through which the adaptor voltage VAC produced by the AC adaptor21is input to the main device31, and the control terminal P13, through which the power limiting signal PWRM is input to the main device31. The main device31includes the system circuit33that operates based on adaptor voltage VAC input via the power source terminals P11and P12, and the battery detection circuit34that detects the adaptor voltage VAC and the current Iout corresponding to the adaptor voltage VAC by use of the resistor R1coupled between the power source terminal and system circuit. The battery detection circuit34produces an error signal corresponding to a difference between the adaptor voltage VAC as well as the current Iout and the comparison reference voltage; controls the transistor T21based on the error signal; and supplies the control current Isc via the control terminal P13(input/output terminal P21) to the AC adaptor21. The monitoring circuit48compares a voltage proportional to the potential of the control terminal P13(input/output terminal P21) to a reference voltage, and produces, based on the comparison result, the adaptor detection signal S3indicating whether or not the adaptor coupled to the main device31is suitable for the main device31. The switch control circuit54turns ON/OFF, based on the adaptor detection signal S3, the switch SW2coupled between the power source terminal P11and resistor R1. The setting circuit55sets the potential of the control terminal P13(input/output terminal P21) to a given level.

The battery detection circuit34of the electronic device produces an error signal dependent on a difference between the detected adaptor voltage VAC as well as the detected current Iout and a comparison reference voltage, and supplies the control current Isc, which is produced based on the error signal, via the control terminal P13(input/output terminal P21) to the AC adaptor21. Also, the battery detection circuit34monitors a potential of the control terminal P13(input/output terminal P21), and determines, based on the potential of the control terminal P13(input/output terminal P21), whether or not an AC adaptor21suitable for the main device has been coupled to the main device. If the AC adaptor21is not suitable, the switch SW2is turned OFF. The potential of the control terminal P13(input/output terminal P21) is set to a given level by the setting circuit55, so that in case the adaptor voltage VAC is supplied from the AC adaptor21and the control terminal is still not coupled, the potential of the control terminal P13(input/output terminal P21) is suppressed from varying in response to the control current Isc, thus stabilizing the operation of the AC adaptor21when the AC adaptor21is being coupled to the main device31.

(2) The setting circuit55, coupled to the input/output terminal P21, is a constant current circuit which supplies constant current to the input/output terminal P21. Consequently, the potential of the input/output terminal P21, that is, the control terminal P13is clamped to a given level with a simple configuration.

The above described embodiment may be implemented according to the following aspect.

According to the present embodiment, the setting circuit55is coupled to the input/output terminal P21, that is, to the drain terminal of the transistor T21outputting the control current Isc. However, the coupling points of the current control circuit and the circuit configuration are not limited to those of the above embodiment.

By way of example, as shown inFIG. 8, a setting circuit55aof a battery detection circuit34amay be coupled to the input side of the current-voltage conversion circuit47, that is, coupled between the current-voltage conversion circuit47and the diodes D1to D3. The setting circuit55aincludes a switch SW11and a capacitor C11. A first terminal of the switch SW11is coupled to the anodes of the diodes D11to D13; a second terminal of the switch SW11is coupled to the gate of a transistor T32included in the current-voltage conversion circuit47and a first terminal of the capacitor C11; and a second terminal of the capacitor C11is coupled to the ground.

The adaptor detection signal S3is supplied to the control terminal of the switch SW11. The switch SW11turns OFF in response to the adaptor detection signal S3(of level L in the circuit configuration illustrated inFIG. 4) when the coupling of an AC adaptor unsuitable for the main device31has been detected. The capacitor C11holds a gate voltage of the transistor T32when the switch SW11turns OFF. Accordingly, the transistor T21sends a current dependent on the voltage held by the capacitor C11.

As further shown inFIG. 8, when the monitoring circuit48detects that an AC adaptor suitable for the main device31has been coupled to the main device31, the setting circuit55aturns ON the switch SW11in response to the adaptor detection signal S3. As a result, an error current flowing in the diodes D11to D13is transmitted to the gate of the transistor T32included in the current-voltage conversion circuit47. Accordingly, he transistor T21sends a control current Isc corresponding to the error current.

Meanwhile, when the monitoring circuit48detects that an AC adaptor suitable for the main device31has been coupled to the main device31, the setting circuit55aturns off the switch SW11in response to the adaptor detection signal S3. As a result, since the capacitor C11holds a voltage just before the switch SW11turns OFF, the transistor T21sends the control current Isc corresponding to the error current. Accordingly, the potential of the input/output terminal P21is equal to the level of the drive voltage VDC.

As shown inFIG. 9, by way of example, a setting circuit55bof a battery detection circuit34bmay coupled to the input side of the current-voltage conversion circuit47, that is, coupled between the current-voltage conversion circuit47and the diodes D11to D13. The setting circuit55bincludes two switches SW21and SW22, and an inverter circuit62. A first terminal of the switch SW21is coupled to the anode of the diodes D11to D13; and a second terminal of the switch SW21is coupled to the gate of a transistor T32included in the current-voltage conversion circuit47. The drive voltage VDC is supplied to a first terminal of the switch SW22; a second terminal of the switch SW22is coupled to the gate of the transistor T32included in the current-voltage conversion circuit47. The adaptor detection signal S3is supplied to a control terminal of the first switch SW21. An output signal of the inverter circuit62which receives adaptor detection signal S3is supplied to a control terminal of the switch SW22. Consequently, the first switch SW21and second switch SW22turn ON/OFF alternately in response to the adaptor detection signal S3.

As further shown inFIG. 9, in the setting circuit55b, when the monitoring circuit48detects that an AC adaptor suitable for the main device31has been coupled to the main device31, the first switch SW21turns ON and the second switch SW22turns OFF in response to the adaptor detection signal S3. As a result, the setting circuit55btransmits an error current flowing in the diodes D11to D13to the gate of the transistor T32included in the current-voltage conversion circuit47. Accordingly, the transistor T21sends a control current Isc corresponding to the error current.

Meanwhile, in the setting circuit55b, when the monitoring circuit48detects that an AC adaptor suitable for the main device31has been coupled to the main device31, the first switch SW21turns OFF and the second switch SW22turns ON in response to the adaptor detection signal S3. As a result, the drive voltage VDC is supplied to the gate of the transistor T32. Accordingly, the transistor T21turns ON, so the potential of the input/output terminal P21is substantially equal to the level of the drive voltage VDC.

As illustrated inFIG. 10, as another example, a setting circuit55cof the battery detection circuit34bmay be coupled to the input side of the current-voltage conversion circuit47, that is, coupled between the current-voltage conversion circuit47and the diodes D1to D3. The setting circuit55cincludes two switches SW31and SW32, an inverter circuit62, a transistor T51, and a constant current source71. A first terminal of the switch SW31is coupled to anodes of diodes D11to D13, and a second terminal of the switch SW31is coupled to the gate of a transistor T32included in the current-voltage conversion circuit47. A first terminal of the switch SW32is coupled to the gate of a transistor T51, and a second terminal of the switch SW32is coupled to the gate of a transistor T32included in the current-voltage conversion circuit47. The transistor T51is the similar channel-type MOS transistor as the transistor T32. The source of the transistor T51is coupled to the ground and the drain is coupled to the constant current source71. Further, the gate of the transistor T51is coupled to the drain. Thus, the transistors T32and T51constitute a current mirror circuit when the switch SW32turns ON, and the current proportional to the current value of the constant current source71flows to the transistor T32.

As further depicted inFIG. 10, the adaptor detection signal S3is supplied to a control terminal of the first switch SW31. An output signal of the inverter circuit62, to which the adaptor detection signal S3is input, is supplied to a control terminal of the second switch SW32. Thus, the first switch SW31and the second switch SW32alternately turn ON/OFF in response to the adaptor detection signal53.

In the setting circuit55cofFIG. 10, when the monitoring circuit48detects that an AC adaptor suitable for the main device31has been coupled to the main device31, in response to the adaptor detection signal S3, the first switch SW31turns ON and the second switch SW32turns OFF. As a result, the setting circuit55ctransmits the error current which flows to the diodes D11to D13to the gate of the transistor T32included in the current-voltage conversion circuit47. Accordingly, the transistor T21sends control current Isc corresponding to the error current.

Meanwhile, in the setting circuit55c, when the monitoring circuit48detects that an AC adaptor unsuitable for the main device31has been coupled to the main device31, in response to the adaptor detection signal S3, the first switch SW31turns OFF and the second switch SW32turns ON. As a result, the setting circuit55csupplies a gate voltage of the transistor T51to the gate of the transistor T32. The transistor T32sends current proportional to the current sent by the constant current source71.

Accordingly, constant current flows into the transistor T21, and the potential of the input/output terminal P21becomes the level of the drive voltage VDC.

The above described embodiment is implemented by using the error amplifier43which compares two input signals with a reference voltage and outputs an error voltage. However, the embodiment may be implemented by using an error amplifier which compares three or more input signals with a reference voltage and outputs an error voltage. Furthermore, the terminal inversion/non-inversion may be varied appropriately.According to the above described embodiments, in the battery detection circuit34illustrated inFIG. 4, a voltage (output voltage) at the output side terminal of the resistor R1is detected, but this may be omitted. For example, the embodiments may be implemented by using a battery detection circuit in which the multiplier45, the error amplifier46, and the diode D13are omitted.According to the above described embodiments, the adaptor voltage VAC is regulated in proportion to the control current Isc. However, the relationship between the control current Isc and the adaptor voltage VAC may be varied appropriately.According to the above described embodiments, the power limiting signal PWRM is output from the pulse width modulator24. However, the power limiting signal PWRM may be output from a circuit other than the pulse width modulator24. For example, a circuit such as a register which outputs the power limiting signal PWRM may be coupled to the third terminal P3acting as the control terminal.

The battery detection circuit of the electronic device produces an error signal corresponding to a difference between a detected adaptor voltage as well as an adaptor current and a comparison reference voltage, and supplies a control current produced based on the error signal via the control terminal to the external power source. Also, the battery detection circuit monitors a potential of the control terminal, and determines, based on the potential of the control terminal, whether or not an external power source suitable for the main device has been coupled to the main device, and if not, turns OFF the switch. The potential of the control terminal is set to a given level by the setting circuit. Thus, when an adaptor voltage is supplied from the external power source and the control terminal is still not coupled, the potential of the control terminal is suppressed from varying in response to the control current, so the operation is stabilized when the external power source is coupled.

According to the above described embodiments, the operation is stabilized when an external power source is coupled.

Numbers applied to the embodiments (first, second or third etc.) do not show priorities of the embodiments. Many variations and modifications will be apparent to those skilled in the art.