Please select To the mobile version | Continue to access the desktop computer version

OrangePi

 Login            
 Register            
Search
Hot search: orangepi
123Next
Return to list New
View: 16420|Reply: 22

RTC battery interface

[Copy link]

17

Threads

212

Posts

1146

Credits

Gold member

Rank: 6Rank: 6

Credits
1146
Post time 2015-4-19 20:43:47 | Show all posts |Read mode
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

2

Threads

17

Posts

96

Credits

Registered member

Rank: 2

Credits
96
Post time 2015-12-30 18:30:44 | Show all posts
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.

5

Threads

29

Posts

390

Credits

Intermediate member

Rank: 3Rank: 3

Credits
390
Post time 2015-4-20 03:00:55 | Show all posts
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[7] can be set to charge the back
up battery, whose target voltage
is 3.0V by default (adjustable via REG35H[6:5]) and charge current is 200uA by default ( adjustable via
REG35H[1:0]).


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

17

Threads

212

Posts

1146

Credits

Gold member

Rank: 6Rank: 6

Credits
1146
 Author| Post time 2015-4-20 15:45:28 | Show all posts
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.

17

Threads

212

Posts

1146

Credits

Gold member

Rank: 6Rank: 6

Credits
1146
 Author| Post time 2015-6-3 15:27:54 | Show all posts
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 !

1

Threads

2

Posts

29

Credits

Novice

Rank: 1

Credits
29
Post time 2015-11-30 11:47:22 | Show all posts
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

0

Threads

3

Posts

100

Credits

Registered member

Rank: 2

Credits
100
Post time 2016-1-28 12:27:14 | Show all posts
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

1

Threads

65

Posts

234

Credits

Intermediate member

Rank: 3Rank: 3

Credits
234
Post time 2016-2-1 17:42:35 | Show all posts
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/addin ... -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 correct  RTC 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

:

1

Threads

65

Posts

234

Credits

Intermediate member

Rank: 3Rank: 3

Credits
234
Post time 2016-2-1 17:50:58 | Show all posts
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...

1

Threads

40

Posts

269

Credits

Intermediate member

Rank: 3Rank: 3

Credits
269
Post time 2016-5-16 23:03:59 | Show all posts
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
You have to log in before you can reply Login | Register

Points Rules

Archiver|Mobile edition|Darkroom|OrangePi En ( 粤ICP备14086627号-2

2019-11-13 18:21 GMT+8 , Processed in 0.038121 second(s), 24 queries .

Powered by Discuz! X3.2

© 2014-2015 orangepibbs en.

Quick Reply To Top Return to the list