Mobile phone and method for transferring battery power of the mobile phone

In a method for transferring battery power of a mobile phone, the mobile phone includes a discharge circuit, a charge circuit, a switch circuit and a universal serial bus (USB) interface. The switch circuit includes an exclusive-OR (XOR) chip and a switch chip. The USB interface connects to the discharge circuit when an input terminal and an enabling terminal of the switch chip are set at high level. The discharge circuit controls a battery of the mobile phone to be discharged for charging a mobile device via a USB cable and the USB interface. The USB interface connects to the charge circuit when the input terminal and the enabling terminal of the switch chip are set at low level. The charge circuit controls the battery to be charged using the mobile device via the USB cable and the USB interface.

BACKGROUND

1. Technical Field

Embodiments of the present disclosure relate generally to mobile phone charging, and more particularly, to a mobile phone and method for transferring battery power of the mobile phone.

2. Description of Related Art

Battery capacity of a mobile phone is limited, causing users to often miss some important phone calls when the battery of the mobile phone runs low of power. Usually, users can charge the battery of the mobile phone using a charger that electronically connects to a fixed power source. However, the method is inconvenient if the users cannot find the fixed power source nearby for charging the battery.

DETAILED DESCRIPTION

FIG. 1is a block diagram of one embodiment of a mobile phone1including a power transfer system100. In the embodiment, the mobile phone1further includes universal serial bus (USB) interface2, a storage system10, a voltage detection circuit11, a battery12, at least one processor13, a switch circuit14, a discharge circuit15, and a charge circuit16. The mobile phone1electronically connects to a mobile device4(referring toFIG. 2) that includes the same USB interface5as the USB interface2via a USB cable3.FIG. 1is just one example of the mobile phone1, and in other embodiments, the mobile phone1may include more or fewer components than shown, and in different configurations.

In the embodiment, the mobile device4is regarded as a target mobile phone, and has the same configuration or substantially the same configuration as the mobile phone1. The power transfer system100is configured to transfer battery power between the mobile phone1and the mobile device4. That is to say, the power transfer system100charges the mobile phone1by transferring the battery power of the mobile device4to the mobile phone1, or charges the mobile device4by transferring the battery power of the mobile phone1to the mobile device4.

The power transfer system100may be in the form of one or more programs stored in the storage system10and executed by the at least one processor13. In one embodiment, the storage system10may be random access memory (RAM) for temporary storage of information, and/or a read only memory (ROM) for permanent storage of information. In other embodiments, the storage system10may also be an external storage device, such as a storage card, or a data storage medium. The at least one processor13executes computerized operations of the mobile phone1and other applications, to provide functions of the mobile phone1.

The USB interface2includes a first control pin and a second control pin. Referring toFIG. 3, the pin7is regarded as the first control pin, and the pin8is regarded as the second control pin. The USB interface5of the mobile device4also includes a first control pin and a second control pin correspondingly. The first control pin of the USB interface2electronically connects to the second control pin of the USB interface5, and the second control pin of the USB interface2electronically connects to the first control pin of the USB interface5via the USB cable3.

The voltage detection circuit11electronically connects to the battery12for detection voltage of the battery12. The battery12is configured with a protection circuit for protecting the battery12from over-charging or over-discharging by limiting the voltage of the battery12to be no more than a maximum charge voltage and no less than a cutoff voltage. The maximum charge voltage may be 4.2 volts, and the cutoff voltage may be 3.6 volts for a lithium-ion battery, for example.

The discharge circuit15and the charge circuit16respectively connect to the battery12. The switch circuit14electronically connects to the USB interface2and the at least one processor13. The switch circuit14switches on a channel that electronically connects to the discharge circuit15or the charge circuit16. The discharge circuit15can control the battery12to be discharged when the discharge circuit15connects to the switch circuit14. The charge circuit16can control the battery12to be charged when the charge circuit16connects to the switch circuit14.

FIG. 4is a schematic diagram of one embodiment of a circuit of a USB interface2and a switch circuit14included in the mobile phone1ofFIG. 1. In the embodiment, the switch circuit14includes an exclusive-OR (XOR) chip151and a switch chip152. The XOR chip151includes two input terminals and an output terminal The switch chip152includes an input terminal and an enabling terminal. The first input terminal of the XOR chip151electronically connects to the first control pin of the USB interface2, and the second input terminal of the XOR chip151electronically connects to the at least one processor13. The at least one processor13further electronically connects to the input terminal of the switch chip152. The output terminal of the XOR chip151electronically connects to the enabling terminal of the switch chip152.

The switch chip152is enabled when the voltage of the enabling terminal of the switch chip152is set at a high level, such as two volts. After the switch chip152is enabled, the voltage of the input terminal of the switch chip152can determine whether the channel electronically connects to the discharge circuit15or the charge circuit16. The switch chip152switches on the channel to connect to the discharge circuit15when the voltage of the input terminal of the switch chip152is at a high level, or switches the channel to connect to the charge circuit16when the voltage of the input terminal of the switch chip152is at a low level, such as zero volts. The switch chip152is disabled when the voltage of the enabling terminal of the switch chip152is set at a low level.

FIG. 4is a block diagram of one embodiment of functional modules of the power transfer system100included in the mobile phone1ofFIG. 1. In the embodiment, the power transfer system100may include a plurality of functional modules each comprising one or more programs or computerized codes that can be accessed and executed by the at least one processor13. The power transfer system100includes a detection module101, an acquisition module102, a determination module103, and a control module104. A detailed description of each module will be given in the following paragraphs.

FIG. 5is a flowchart of one embodiment of a method for transferring battery power of the mobile phone1ofFIG. 1. Using the method, the mobile phone1can be charged by transferring the battery power of the mobile device4to the mobile phone1, and the mobile device4can be charged by transferring the battery power of the mobile phone1to the mobile device4.

In block S10, the detection module101detects a connection signal generated by the USB interface2when the mobile device4connects to the USB interface2using the USB cable3.

In block S11, the acquisition module102acquires a voltage of the battery12detected from the voltage detection circuit11, and displays the voltage of the battery12on a display screen of the mobile phone1for observation of the user.

In block S12, the acquisition module102acquires a selection of the mobile phone1as a master device or a slave device. If the mobile phone1is set as the master device, the mobile device4can be charged using the mobile phone1, and block S13is implemented. If the mobile phone1is set as the slave device, the mobile phone1can be charged using the mobile device4, and block S16is implemented.

In block S13, the determination module103determines whether the mobile phone1is suitable to be the master device according to the voltage of the battery12. In the embodiment, the mobile phone1is suitable to be the master device if the voltage of the battery12is more than the cutoff voltage and no more than the maximum charge voltage. If the mobile phone1is suitable to be the master device, block S14is implemented. If the mobile phone1is not suitable to be the master device, the procedure ends.

In block S14, the control module104sets the voltage of the second input terminal of the XOR chip151, the input terminal of the switch chip152, and the second control pin of the USB interface2as high level. The switch circuit14connects to the discharge circuit15if the mobile device4is set as the slave device. The discharge circuit15controls the battery12to be discharged for charging the mobile device4via the USB cable3, and block S15is implemented. If the mobile device4is set as the master device, neither the discharge circuit15nor the charge circuit16connects to the switch circuit14, and the procedure ends.

In block S15, the determination module103determines whether the voltage of the battery12reaches the cutoff voltage. If the voltage of the battery12reaches the cutoff voltage, the control module104sets the voltage of the second input terminal of the XOR chip151as a low level. The switch circuit14disconnects to the discharge circuit15, the discharge circuit15stops discharging the battery12and the procedure ends.

In block S16, the determination module103determines whether the mobile phone1is suitable to be the slave device according to the voltage of the battery12. In the embodiment, the mobile phone1is suitable to be the slave device if the voltage of the battery12is less than the maximum charge voltage and no less than the cutoff voltage. If the mobile phone1is suitable to be the slave device, block S17is implemented. If the mobile phone1is not suitable to be the slave device, the procedure ends.

In block S17, the control module104sets the voltage of the second input terminal of the XOR chip151, the input terminal of the switch chip152, and the second control pin of the USB interface2as low level. The switch circuit14connects to the charge circuit16if the mobile device4is set as the master device. The charge circuit16controls the battery12to be charged using the mobile device4via the USB cable3, and block S18is implemented. If the mobile device4is also set as the slave device, neither the discharge circuit15nor the charge circuit16connects to the switch circuit14, and the procedure ends.

In block S18, the determination module103determines whether the voltage of the battery12reaches the maximum charge voltage. If the voltage of the battery12reaches the maximum charge voltage, the control module104sets the voltage of the second input terminal of the XOR chip151as a high level. The switch circuit14disconnects to the charge circuit16, the charge circuit16stops charging the battery12, and the procedure ends.

All of the processes described above may be embodied in, and fully automated via, functional code modules executed by one or more general purpose processors of the computing devices. The code modules may be stored in any type of non-transitory computer-readable medium or other storage device. Some or all of the methods may alternatively be embodied in specialized hardware. Depending on the embodiment, the non-transitory computer-readable medium may be a hard disk drive, a compact disc, a digital video disc, a tape drive or other suitable storage medium.