Add-ons

How to add battery to keep rtc time

39 31161
ups  
I soldered a 3V CRXXXX to a Banana yesterday (out of desperation, because I don't get a I²C-RTC working properly) and it seems to work fine.

@sylwek2k that allnet-link seems to be broken, maybe you can provide another source?

Reply 21# ups


    Check your PM

gxy_gfx  
Hi, just to add my 2 cents' worth: I'm still in the process of figuring things out with the on-board RTC, but here is what I found out so far:

First of all, the schematics from another source:
http://www.produktinfo.conrad.co ... NA_PI_BOARD_A20.pdf

Relevant to the backup battery is the power management unit part on page 6. This confirms that "BAT1" is the RTC backup battery. Digging a bit deeper, I took a look at the datasheet for the AXP209 (pages 7 and 22):
http://www.techpowerup.com/reviews/Giada/Q11/images/AXP209.pdf

Assuming that Google translate works correctly, the backup battery can be charged by the PMU when the corresponding registers are set for this function. The nominal target voltage is 3.0V, therefore, a lithium cell, such as CR2032, would do the job if charging is disabled (and you should keep away from charging a simple Li cell or you'll be in for quite some fireworks once the electrode deposits short the cell out). Rechargeable LIR2032 may not be suitable due to their higher (3.6V) nominal voltage. If charging is enabled, a "gold cap" could be used. In fact, the Banana pi schematics specify one given type here:

http://media.digikey.com/pdf/Dat ... Fs/XH414H-II06E.pdf

Note that the charging current according to the AXP209 datasheet is just some hundred microamps, so charging a large capacitor may take next to forever. It may be best to pre-charge the gold cap externally, and let the PMU take care of maintaining the charge.

What I could not yet find out is how the PMU in the Banana Pi is configured for the backup battery pin (i.e., charge or no charge). Does anyone know if/how this can be checked or set?

Adam  
Hi,
just added CR2032 battery (from PC) and my RTC working fine (on Raspbian) w/o power supply. I've found some information about AXP209 and how to set it from linux. Please check follow:
http://pcduino.com/forum/index.php?topic=4511.0
http://linux-sunxi.org/AXP209

I hope it help to add lithium accu as UPS

BR.
Adam

ups  
Reply 22# sylwek2k
Thx for that. I'll take a deeper look at that tomorrow.

Btw. I used a CR2032 (not rechargeable) and that works for six days without external power supply by now.  I don't have to modify the Raspian or any other piece of software to get that working. It may be nice to have a rechargeable battery but replacing a not rechargeable battery once a year (or so) will work for me fine.

Adam  
Post Last Edited by Adam at 2014-8-8 08:37

Post Last Edited by Adam at 2014-8-8 02:39

Hi, after adding RTC Battery just added Li-Io ACCU (based on PcDuino v3 idea) as backup battery. For tests purposes just connected spare accu from my handy - 2000mAh. Didn't set any charge parameters. Measured charge current is 350mA (accu was already 3,8V). BananaPi starts only with on board power button, but shutdown in raspbian result in reboot not power off. Only long press on POWER button result in power OFF. I'd like to add Charge-LED but that need very precise soldering on pin 36 AXP209.

Conected Li-Io accu.

Conected Li-Io accu.



OK. some new.

CHGLED is soldered:

Soldered SMD LED and resistor.

Soldered SMD LED and resistor.


In Action

Flashing when charged , still ON when full.

Flashing when charged , still ON when full.


from shell we need to activate LED and set some charge parameters:

sudo apt-get install i2c-tools
sudo i2cset -f -y 0 0x34 0x32 0x52  (flashes 1second)
sudo i2cset -f -y 0 0x34 0x33 0xD2  (500mA charge current)
sudo i2cset -f -y 0 0x34 0x34 0x14  (flashes when charging, time out 6Hours)

it's all


BR
Adam

Nice job Adam

Adam  
Post Last Edited by Adam at 2014-8-8 11:55

Back again (from work),
and I've found problem that in POWER-OFF state, USB port A are still powered. I need to check schematics diagram. May be i need another settings for AXP209.
Anyway please notify that default settings (and my from may previous post) are for 4,2V Li-Ion cell. Don't connect lower voltage cells like 4,1V or below. They can explode !!!  

BR.
Adam

Reply 28# Adam


   This might be a little off topic, but when I first got my Banana Pi, I was debating whether to put in an RTC or another method to set the time.  I wanted it to be pretty accurate for timing purposes, without having to rely on the net, and not have to worry about battery changes.  I was able to get a cheap gps dongle from Ebay for about $14.  I searched the net and found instructions at http://www.nslu2-linux.org/wiki/Optware/PlugComputers and http://blog.retep.org/2012/06/18/getting-gps-to-work-on-a-raspberry-pi/ to set up a stratum 1 server.  I've shut off the unit several times and it seems to pick up the proper time pretty fast.

Adam  
Reply 29# StrangeDan

Great idea how long your Banana see the sky. But like problem with LAN connection, this same way, if you device is mounted in the cellar and you can't put any cable outside then you got not GPS Signal. In my work, we have windows with thermoinsulating foil  with strong reduce GPS signal and from construction side we can't put GPS receiver outside.

Still problems with power on USB after Power-OFF. If some one know how to deactivate USB charging function in AXP209, please let me know. I thing USB charging  function is always active, even if Banana work from ACCU w/o connected PSU

BR
Adam

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

Points Rules