Pijuice RTC not remembering the time

Hi everyone
Thanks for looking at this post. I have a Raspberry Pi with the Pijuice hat. The problem is the Pijuice seems to be forgetting the time when the raspberry pi shuts down. This has happened a few times in the past but it has happened consistently over the last few days. I needed to wake up the pi by starting it up manually using the PiJuice on button, and when I looked at the clock on the desktop, it was showing the time from when it shutdown the previous night. My guess is that the Real Time Clock is failing and/or has failed.

Any help is appreciated.

Thanks

Hey David,

Thanks for making a post!!

I found some more details over on the PiSupply website here.
The RTC remains powered from the LiPo battery onboard and to keep the time the LiPo has to be powered.
PS: I don’t think there is a coin cell underneath the HAT that acts as a backup.

To double-check that the RTC is still working run the following command:

sudo hwclock -r

This will report the time kept in the RTC module, if its around the year 2000 you will have to set the time and re-configure the PiJuice. (Ton covers this process very well over on Git).

Let us know how you go getting this one running!

Liam.

2 Likes

Hi David,

Another thing that you might try to see if the RTC is alive is to run i2cdetect -y 1 and see if you get something like this:

pi@rpi-stretch-full:~ $ i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- 14 -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --                         
pi@rpi-stretch-full:~ $

This is just cursory info I pulled from The PiJuice setup guide. Good idea on the clock check Liam!

1 Like

Thanks Liam,
This is what I got, but don’t know what it means.

pi@raspberrypi:~ $ i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: – – – – – – – – – – – – –
10: – – – – 14 – – – – – – – – – – –
20: – – – – – – – – – – – – – – – –
30: – – – – – – – – – – – – – – – –
40: – – – – – – – – – – – – – – – –
50: – – – – – – – – – – – – – – – –
60: – – – – – – – – 68 – – – – – – –
70: – – – – – – – –
pi@raspberrypi:~ $

Hi Liam,
Thanks for your help. It looks like the RTC is not working. Here is my result.

pi@raspberrypi:~ sudo hwclock -r hwclock: Cannot access the Hardware Clock via any known method. hwclock: Use the --verbose option to see the details of our search for an access method. pi@raspberrypi:~

Hi Liam,
I found a thread that may have helped.

I found a section with the following advice which seems to have worked.

  1. Force loading the module by adding the following line to /boot/config.txt:
    dtoverlay=i2c-rtc,ds1339
    and reboot

I will let the Pi run, shut itself down today and see if it starts up again tomorrow.

2 Likes

The Raspberry Pi did not wake up today. I had to do it manually. I think it is probably a hardware issue as it is a new problem.

.if you are running the unit via an ups system for powering the board…remove it as well before fitting the r.t.c module…then fit up the ups to the board…

with the internet connected it is reading the ntp service via the web. hwclock -r should work …

it the r.t.c is incorrect pls set it manually…next run the below commands…
hwclock -s
hwclock -w
add line to /etc/rc.local file sudo hwclock-s
reboot...
if its not seeing the unit it may be faulty if you cannot write or read to it…

reboot

I reset and re-applied the wake up alarm.That seemed to fix it.

image