How to add battery to keep rtc time

39 30692
Nice work Adam
" I'd like to add Charge-LED but that need very precise soldering on pin 36 AXP209"

You can remap the user define LED to this function. I did it for testing purposes and it seems to work.
I think part of what you are looking for (AXP209 settings) is in the script.fex also.

Reply 28# Adam

   Maybe this one disable power in USB ports? (bit 7)
REG 32H: Shutdown settings, battery detection and CHGLED pins controlDefault value: 46H
BitDescriptionR/WDefault Value
7Shutdown control

This bit write output closes AXP209

6Battery monitoring function set bit: 0: off; 1: OpenRW1
5-4CHGLED pin functions set

00: Hi-Z 01: 25% 1Hz blinking 10: 25% 4Hz blinking 11: output low

3CHGLED pin control set

0: control by charging function 1: REG 32H [5:4] control by the register

2Output Close timing control

0: Close 1: Contrary to start timing

1-0Shutdown delay N_OE AXP209 from low to high

Delay time 00: 128mS; 01: 1S; 10: 2S; 11: 3S


Reply 30# Adam

   I don't get gps blackouts and is in the middle of a 2 story house with stucco on metal mesh.  I never have less than 6 satellite signals.  If you have the right dongle, gps is pretty reliable and robust.  A bu-353 is pretty good.  Besides this is an easy alternative for most people.  For this application, who cares if there is power on usb after Power-OFF.  I'm not powering off a small Battery and GPS Dongle power use is pretty minimal, so the AXP209 is a non-issue for me.  Once the Banana Pi is powered and booted, satellite acquisition is pretty quick by the time of ntpd first poll.  If your gonna use the Banana Pi for some work purpose, probably should have a decent UPS for it which should last for a long time.

OK. no steps forward, but I thing POWER OFF w/o cuting power is problem with Raspian 3.0 for BananaPi and like other linux images should be fixed in version 3.1. Right now POWER OFF  don't cut and discharge ACCU Also script.bin must be edited because it overwrite always AXP209 registry with another settings. This can be dangerous for peoples with 4.1V LiIo accu.
Waiting for Raspian 3.1 I'm playing with OpenHAB and wireless power socket

Greats from Germany and Poland

Hi !
I actually have a 2-cells 3.7v 1490mAh li-ion battery extracted from an old smartphone. Is it possible to actually use it with B-Pi ?

really nice to finde some people also trying to use the BPi with a battery!
It's really sad that this feature is not official!

Some time a go I got the innards of some Verbatim powerbank from a good friend.
This stuff was flying around here for some time, I  don't really need something like this....

the battery used is a 7799130N from Amita Tech.

now it became useful...

I soldered a connector to the BPi and of course the other end to the battery...

seems like it is working fine...

now it just needs to be configured correctly for charging

I found some very useful information on this here:
looks a bit more comfortable to me...


FYI: here is photo of my version. I was used capacitor PAS414HR-VA5R. It is more-less same, only difference is, that this one is longer than original one, then it is less comfortable to solder it.

I found some very useful information on this here:
looks a bit more comfortable to me...


It seems like it is not valid, see first note: "The mainline Linux kernel makes no use of FEX / script.bin, and relies on the device tree model instead (.dtb files)."

It look like that compile of new device tree is more complicated than I expec, then I decided to configure it using i2cset. For me is relevant configuration of RTC backup capacitor charger:
  1. i2cset -f -y 0 0x34 0x35 0xA3 # bit 7=1-enable charge bit 6-5=01-3.0V;00-3.1V;10-3.6V;11-2.5V bit 4-2=reserved bit 0-1=11-400uA;10-200uA;01-100uA;00-50uA
Copy the Code
(default value is 0x22 = charge disable, 3.0V, 200uA - as described in datasheet)

Why not just add a ds3231 module, it works good for me.

Edited by Jays_NV at Apr 02, 2017 15:09
neoe replied at Apr 12, 2016 20:27
Why not just add a ds3231 module, it works good for me.

that link is very usefull,..
I try many different way to use ds3231 and I very frustated because always failed before,.. but now, I succesfully use RTC modul for my BPI M1 and the is very simple..
thanks for link that you share,..

You have to log in before you can reply Login | Sign Up

Points Rules