Power supply device and power supply control method of power supply device
A power supply device powered by a battery of a vehicle according to various embodiments may comprise: a first interface configured to communicate with an external device; a power supply switch connected to a charging adapter configured to transform power supplied from the battery to control power output; and a processor operatively connected to the first interface and the power supply switch, wherein the first interface includes a USB Type-C interface for configuration channel (CC) communication between the external device and an electronic device; and the processor may be configured to: detect connection of the external device through the first interface, detect a first interrupt or a second interrupt related to vehicle power on/off from the vehicle, control power supply to the external device through the power supply switch, and control the power supply device to transmit a first signal or a second signal for controlling the power on/off of the external device to the external device through the first interface in response to the first interrupt or the second interrupt.
1 . A power supply device powered by a battery of a vehicle comprising:
a first interface configured to communicate with an external device;
a power supply switch connected to a charging adapter configured to transform power supplied from the battery to control power output; and
a processor operatively connected to the first interface and the power supply switch, wherein the first interface includes a USB Type-C interface for configuration channel (CC) communication between the external device and the power supply device; and
the processor is configured to:
detect connection of the external device through the first interface,
control power supply to the external device through the power supply switch,
based on detecting a first interrupt related to vehicle power off from the vehicle, control the power supply device to transmit a first signal for controlling the external device to switch to a stand-by state for power off through the first interface, and cut off power supply to the external device by opening the power supply switch after a predetermined period elapses since transmitting the first signal, and
based on detecting a second interrupt related to vehicle power on from the vehicle, supply power to the external device by closing the power supply switch and control, when a predetermined period of time elapses after closing the power supply switch, the power supply device to transmit a second signal for controlling the external device to switch to a power-on state to the external device through the first interface.
2 . The power supply device of claim 1 , wherein the first interrupt comprises a signal according to the power off of the vehicle.
3 . The power supply device of claim 2 , wherein the processor is configured to control the power supply device to transmit the first signal to the external device through the first interface based on the first interrupt being received.
4 . The power supply device of claim 3 , wherein the first signal comprises a power off Vendor ID (VID)/Product ID (PID) signal.
5 . The power supply device of claim 4 , wherein the processor is configured to control the external device to switch to a power off or a stand by state for power off through the first signal.
6 . The power supply device of claim 5 , wherein the processor is configured to cut off power supply to the external device by opening the power supply switch based on a specified period elapsing since transmitting the first signal.
7 . The power supply device of claim 1 , wherein the second interrupt comprises a signal according to a power on of the vehicle.
8 . The power supply device of claim 7 , wherein the processor is configured to supply power to the external device by closing the power supply switch based on the second interrupt being received.
9 . The power supply device of claim 1 , wherein the second signal comprises a power on Vendor ID (VID)/Product ID (PID) signal.
10 . The power supply device of claim 9 , wherein the processor is configured to control the external device to switch to a power on state through the second signal.
11 . The power supply device of claim 1 , wherein the processor is configured to: control the external device to recognize existence of the power supply device through a unique Vendor ID (VID) and/or Product ID (PID) and control the power supply of an external device through VID and/or PID.
12 . The power supply device of claim 1 , wherein the first interface comprises a configuration channel integrated circuit (CCIC) for CC communication.
13 . A method of controlling a power supply device installed on a vehicle and powered by a vehicle, the power supply device comprising a first interface configured to communicate with an external device, and a power supply switch connected to a charging adapter configured to transform power supplied from a battery to control power output, the method comprising:
detecting connection of an external device;
controlling power supply to the external device through the power supply switch
based on detecting a first interrupt related to vehicle power off from the vehicle, transmitting a first signal for controlling the external device to switch to a stand-by state for power off to the external device through the first interface, and cutting off power supply to the external device by opening the power supply switch after a predetermined period elapses since transmitting the first signal; and
based on detecting a second interrupt related to vehicle power on from the vehicle, supplying power to the external device by closing the power supply switch and transmitting, when a predetermined period elapses after closing the power supply switch, a second signal for controlling the external device to switch to a power-on state to the external device through the first interface.
14 . The method of claim 13 , wherein the detecting the connection of an external device comprises: transmitting unique Vendor ID and Product ID (VID/PID) of the power supply device and receiving a response from the external device with respect to the Vendor ID and Product ID (VID/PID).
15 . The method of claim 13 , wherein the first interrupt includes a signal according to the power off of the vehicle.
16 . The method of claim 13 , wherein the second interrupt includes a signal according to power on of the vehicle.
17 . The method of claim 13 , wherein the first signal includes Vendor ID (VID)/Product ID (PID) signal related to the power off that controls the external device to switch to a power off state or a stand by state for power off; and
the second signal includes Vendor ID (VID)/Product ID (PID) signal related to the power on that controls the external device to switch to a power on state.
18 . The method of claim 13 , wherein the first signal is transmitted in response to power off of the vehicle; and
power to the external device is cut off based on a specified period elapsing since transmitting the first signal.
19 . The power supply device of claim 1 , wherein the period of time is preset to 30 seconds.
20 . The power supply device of claim 1 , wherein the first signal and the second signal are transmitted through a CC pin of the USB Type-C interface.