Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor I
1,551 Views

checking active power source of edison

Hi,

How to check whether edison is running from USB OTG power or backup battery power on mini breakout board inside yocto?

Regards

Srikanth

6 Replies
Highlighted
New Contributor I
4 Views

Hi,

dmsg

USB ID line with OTG if USB, none else.

Sincerly

Highlighted
New Contributor I
4 Views

Hi sylyca,

The issue is, I have a 3 port usb hub on mini breakout board's USB OTG. Hence USB will be always active irrespective of any power source. So, I won't be able to detect the power source type by verifying like that.

Regards

Srikanth

0 Kudos
Highlighted
Employee
4 Views

Hi Blackhole,

Is there any way to know what USB devices you have connected to the USB HUB? This way you could detect if the USB power source is connected to the USB HUB.

On the other hand, where are you connecting the battery, in which header?

Regards,

Diego

0 Kudos
Highlighted
New Contributor I
4 Views

Hi,

Since there is no ADC on mini breakout board, I want to shutdown the device if it is on battery for a fixed amount of time and would like to know how to implement it.

The LiPo battery will be connected to J2.

Regards

Srikanth

0 Kudos
Highlighted
Employee
4 Views

Hi Blackhole,

You could use the command battery-voltage. It'll show you the current status of the battery; however, it works only if the Edison is powered only by the battery. If you have the USB power source connected at the same time, then the battery-voltage command won't give you the real battery status.

If this method doesn't work for you, I'm afraid there is no way to know the battery status while the USB power source is connected at the same time, at least from the software side. You would have to add external hardware, like an ADC.

Regards,

Diego

0 Kudos
Highlighted
New Contributor I
4 Views

Hi,

If I don't connect battery to J2 and run the command by powering through USB OTG & J21, the voltage reading is around 4400mV. I will get back after testing with 3.7V LiPo battery on J2.

Regards

Srikanth

0 Kudos