Detect if the power cable is unplugged, even if there is no power

Is there a way to determine if the power cable is disconnected even if it is not connected to a power source? For example, I plug my phone into this power cable before plugging it into a power outlet.

I know that you can detect a change in nutritional status, but - I do not think that when this happens, a change in nutritional status will occur.

I believe this exists for the headphone jack, so I was hoping it would also be available for the power jack.

(I understand this is probably a weird request)

+4
source share
1 answer

No, there is no way to detect simple cable changes for a USB port.

You can detect power changes because they caused a change in the power state of the device, and you can detect electrical energy.

You can do this for headphone jacks because the jack itself completes a small circuit inside the device (I think I'm not an expert on audio circuits, so don't take my word for it).

+1
source

Source: https://habr.com/ru/post/1479760/


All Articles