gaara post at 2015-4-19 20:43:47

RTC battery interface

Hi guys,

I would like to know if there's something special to do (software or else) if we want to plug a such battery (CR032) to keep the time of the OPi (normal model).
I will maybe use it with Android.
Link: https://www.adafruit.com/products/1870

Thanks

lizi0 post at 2015-12-30 18:30:44

hello

I want to came back to RTC on Orange Pi2. I want to install Orange Pi2 with KODI and CARPC at car but i need RTC with battery to hold power and clolck settings at orange pi board. I bougth DS3231 and i don`t knew how to activate it on Raspberian and Android.

Tyrannus post at 2015-4-20 03:00:55

Edited by Tyrannus at 2015-4-19 20:24

hi gaara....

I think this bat-connectors is for the PMU(AXP209????).
9.4 Backup battery
The AXP209 supports backup battery char
ging and discharge. When no main power(BAT/ACIN/VBUS)
is available, LDO1 will choose the backup battery to support the operation of some circuits, such as the
system real-time clock, etc.
When there is a main power, REG35H can be set to charge the back
up battery, whose target voltage
is 3.0V by default (adjustable via REG35H) and charge current is 200uA by default ( adjustable via
REG35H).

pls check with an Multimeter if voltage present.
if you have on this connectors ~0,3V dont plug a simply CR032 on it.
On this way use a rechargeable VL-2020.


if you have connected the battery, you should disconnect the Inet connection from OPI and restart,
clock and date set up manually as needed and start again without inet.

If time/date correct hiphip hurra ...else.... coming soon

regards Mike

gaara post at 2015-4-20 15:45:28

Hi Tyrannus, thx so much, I was going to do a silly thing...
I will verify today with my multimeter but I think you're right.

gaara post at 2015-6-3 15:27:54

Edited by gaara at 2015-6-3 09:29

I have tried with a Sanyo UR18650A cell (from an old battery) and it works.
It keeps the hour in Android, even if the power bord is unplugged.
Thanks for your help !

nekokoneko post at 2015-11-30 11:47:22

Hi gaara, could you elaborate on how to put the cell battery on OrangePI in Android?

I've tried to connect CR032 to the exposed RTC pad and Ground PIN - but it does not work

igzero post at 2016-1-28 12:27:14

lizi0 replied at 2015-12-30 18:30
hello

I want to came back to RTC on Orange Pi2. I want to install Orange Pi2 with KODI and CARPC at ...

See this (russian text with image): http://www.itcooky.com/?p=4023

shooreg post at 2016-2-1 17:42:35

It is possible to add any ds1307 (I2C intf.) real-time clock to any 2nd generation OPi- just following the instructions from https://learn.adafruit.com/adding-a-real-time-clock-to-beaglebone-black/set-rtc-time with several exceptions:
- kernel will enumerate I2C device to /dev/rtc1 because /dev/rtc0 is occupied by built-in Allwinner's RTC (sunxi-rtc)
That means you have to modify a symlink "/dev/rtc" to point to /dev/rtc1 instead of /dev/rtc0 like this: sudo ln -f -s /dev/rtc1 /dev/rtc

After that standard hwclock will work fine, however I recommend to use an init-script to make sure time is automatically adjusted. Here is mine (/etc/init.d/rtc_ds1307)

#! /bin/sh
### BEGIN INIT INFO
# Provides:          rtc_ds1307
# Required-Start:    $remote_fs $syslog
# Required-Stop:   $remote_fs $syslog
# Default-Start:   2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: DS1307 real-time clock usage script
# Description:       This file should be used to construct scripts to be
#                  placed in /etc/init.d.
### END INIT INFO

# Author: Alexander Golenshin <shooreg@gmail.com>

# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="ds1307_rtc maintenance service"

do_start()
{
      echo "Selecting correctRTC instance "
      echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-0/new_device
      sudo ln -f -s /dev/rtc1 /dev/rtc
      echo "Syncing system time to RTC"
      sudo hwclock -s
}

do_stop()
{
      echo "Syncing RTC to system time"
      sudo hwclock -w
}

case "$1" in
start)
      do_start
      ;;
stop)
      do_stop
      ;;
status)
      echo "RTC time:"
      hwclock -r
      echo "System time:"
      date
      ;;
restart|force-reload)
      do_stop
      ;;
*)
      echo "Usage: rtc_ds1307 {start|stop|status|restart}" >&2
      exit 3
      ;;
esac

:

shooreg post at 2016-2-1 17:50:58

As to the built-in RTC, it is working, actually, but to supply power to it I tried this:
- applied 3.3v to rtc labeled pad = rtc preserves it's data, but the board denies to restart after reapplying main power
- applied 3.3v to corresponding pins on GPIO header = rtc preserves it's data and starts normally, but draining "aux" current is about 30-35mA which is too much for a rtc battery

So with TinyRTC-like modules costing less than a 1$ I think it is not worth modding the board...

didacgil9 post at 2016-5-16 23:03:59

Until I get the external RTC module and I set it up to work with the Beelink v1.1, could you let me know which are the GPIO pins that correspond to the external power source that feeds the RTC?
I have a battery that it is 3.7 2000mAH that I would like to test meanwhile.

I have been trying to use any Android software that could get the date from the GPS (which I can read via bluetooth), but I could not get any working correctly to set up the system's time.

Thanks
page: [1] 2 3
View full version: RTC battery interface