How do I detect if I am running off the battery ?

已查看 154 次
跳至第一个未读帖子

Dave

未读,
2019年5月9日 02:02:312019/5/9
收件人 BeagleBoard
I am using and OSD3358 based PocketBeaglish Board. 

I need to figure out if the board is running from external power or the LiPo battery, 
Is there an easy means of doing so ?

Something in sysfs maybe ?

n ithinu

未读,
2019年6月6日 04:27:472019/6/6
收件人 BeagleBoard
I do not know if it is also true for PocketBeagle, but there is a tool rc_battery_monitor which shows the voltage at the power supply jack. So you may just look into the sources of the tool.

Indiaaditya Networks

未读,
2019年6月7日 09:17:582019/6/7
收件人 beagl...@googlegroups.com
I think you will need to do it by adding some hardware to detect if external power supply is present or not. If external supply is absent and you are executing some code then you are on battery. Simple comparator circuit should do it.

Kind Regards,
Aditya Ayachit

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/1c0c963c-9c84-41b4-a6cc-350e6be732a5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Indiaaditya Networks.... Embedded System development
For industries customised needs

evilwulfie

未读,
2019年6月7日 11:36:482019/6/7
收件人 beagl...@googlegroups.com
The PMIC has registers you can read to see what source you are using

Indiaaditya Networks

未读,
2019年6月7日 13:18:242019/6/7
收件人 beagl...@googlegroups.com
Don't know how one could do that....
Although the PMIC supports direct connection of a Li-ion battery (including charging), this functionality is not officially supported on any BeagleBone. Nevertheless, the terminals for this are available on an unplaced header (pins labled TP5-TP8) for experimentation.  


Kind regards,
Aditya Ayachit


For more options, visit https://groups.google.com/d/optout.

evilwulfie

未读,
2019年6月7日 14:06:312019/6/7
收件人 beagl...@googlegroups.com
I use the built in battery and it works great I Can monitor it as well

Indiaaditya Networks

未读,
2019年6月7日 14:12:232019/6/7
收件人 beagl...@googlegroups.com
Hi Evilwulfie,
Can you please explain. I am quite confused here. What internal battery are you talking about? Others also please do not hesitate to point out what I am missing here.
Thanks in advance.

Kind Regards,
Aditya


For more options, visit https://groups.google.com/d/optout.

evilwulfie

未读,
2019年6月7日 15:00:242019/6/7
收件人 beagl...@googlegroups.com
The 4 pins on the board that do not have anything soldered to them connect to the
PMIC and can supply voltage from a 3.7v li cell you also need a thermistor and a 75k resistor .

The PMIC can use the battery voltage and when on AC in can charge the battery

Indiaaditya Networks

未读,
2019年6月8日 00:26:302019/6/8
收件人 beagl...@googlegroups.com
@evilwulfie Thanks. that's valuable information.



For more options, visit https://groups.google.com/d/optout.

Dave

未读,
2019年6月8日 15:02:452019/6/8
收件人 BeagleBoard
Thank you all for the responses. 

I am using an OSD3358
Battery power is supplied to P8 R8 T8 and N7. 


Dave

未读,
2019年6月8日 15:08:422019/6/8
收件人 BeagleBoard
I found the PMIC docs and I could get the information I want from it. 
But it is I2C and owned by the kernel and I can not seem to communicate with the PMIC while the kernel driver is loaded, which does not surprise me. 

I noted from other posts that there is a patch to the tps65217.c driver that generates KEY_POWER hits on various changes that the PMIC detects. 

Unfortunately the current tps65217.c source (5.1-rc3) has significantly different interrupt handling, and patching it to incorporate the KEY_POWER functionality without breaking the other things that have been changed is on the edge of my abilities. 

Is there someone that understand threaded and nested interrupt handling in Linux that can guide me in patching the current tps65217.c driver to include the Key generation without blowing it up ?

evilwulfie

未读,
2019年6月8日 15:20:172019/6/8
收件人 beagl...@googlegroups.com
A person wrote a small program that can read all the registers from user space. so its possible
https://github.com/wphermans/Beaglebone-Web-PMIC-Register-Viewer
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
回复全部
回复作者
转发
0 个新帖子