RTC on UPS PICO

Need some help with your shiny new breakout board, or something not working right? Let us help you here!
clemvigne
n00b
Posts: 10
Joined: Fri Jan 08, 2016 10:28 am

RTC on UPS PICO

Post by clemvigne » Fri Jan 08, 2016 2:44 pm

Hi

I recently bought the ups pico, and I'm confused by the instructions to set up the RTC (I quote: "Integrated Software Simulated Real Time Clock (RTC) with Battery Back-Up").
There is no mechanical clock on the board it seems, so how is this ups clock different from the fake-hwclock on the pi, and how does it need to be setup?
I have tried following your documents and other instructions I could find on the web, but still not getting it (I don't see any difference with the Pi default clock).

Could you kindly indicate what is the role of this RTC and how it needs to be set up?
Regards,
Clementine

PS: I would also like to mention that until I found that miracle instruction at https://github.com/mattwire/upspico, my UPS (with 3000 mAh battery) was invariably shutting down after 30s:
Set on battery runtime to maximum

Code: Select all

i2cset -y 1 0x6b 0x09 0xff
someone else might find this useful.

User avatar
Jake
ModMyPi
Posts: 1464
Joined: Thu Aug 27, 2015 3:57 pm

Re: RTC on UPS PICO

Post by Jake » Mon Jan 11, 2016 12:23 pm

Hi Clementine,

It's just a software simulated RTC. It's simply a piece of software running on the PiCo's microcontroller. Not much difference to the Pi's hwclock, but it can be access via i2c & you can change various values e.g. the "tick" rate, which might be useful for some users.
RTC.png
RTC.png (49.04 KiB) Viewed 1659 times
Check page 13 of the manual:

http://www.pimodules.com/_pdf/UPS_PIco_Manual.pdf

Setting-up the I2C interface and RTC

This goes through the steps required to set up the RTC.

Let me know if you need help with any of the steps

-- Jake
Forum Administrator & Technical Support

clemvigne
n00b
Posts: 10
Joined: Fri Jan 08, 2016 10:28 am

Re: RTC on UPS PICO

Post by clemvigne » Wed Jan 13, 2016 10:35 pm

hi Jake,

Thanks you for your reply.

I need a RTC for my pi, that works when the ups battery is dead.

I tried to fit one with the ds1307 module.

I tested without the ups and it works fine..
But it doesn't work with the UPS.

I deactivated i2c addresses 68 and 6a (as indicated in your manual), but it still won't work.

it seems something weird happens at shutdown that perturbs the communication of the pi with the hardware clock.

I was wondering if you could help with this.
Have you encountered this problem before?

thanks
Clementine

User avatar
Jake
ModMyPi
Posts: 1464
Joined: Thu Aug 27, 2015 3:57 pm

Re: RTC on UPS PICO

Post by Jake » Thu Jan 14, 2016 11:47 am

Hi,

I haven't come across this problem before, but I suspect they're trying to use the same i2c addresses.

Can you run this command:

sudo i2cdetect -y 1

with just the RTC installed, and post the results

Then swap the RTC for the PiCo and run the command again, and post the results

-- Jake
Forum Administrator & Technical Support

clemvigne
n00b
Posts: 10
Joined: Fri Jan 08, 2016 10:28 am

Re: RTC on UPS PICO

Post by clemvigne » Fri Jan 15, 2016 5:19 pm

Hi Jake,

They do use the same address, meaning 68.

That's why I mentioned I deactivated these addresses on the UPS PICO (I followed instructions on p. 18 of full manual):
Releases the 0x68 and 0x6A of the internal RTC and give it for other additional RTC devices:
sudo i2cset -y 1 0x6b 0 0xa2
But is this enough in order to avoid interference between RTC and UPS?

clemvigne
n00b
Posts: 10
Joined: Fri Jan 08, 2016 10:28 am

Re: RTC on UPS PICO

Post by clemvigne » Wed Jan 20, 2016 12:22 am

Hi Jake,

I still haven't solved the problem.

The clock and the UPS work perfectly well separately on my rpi2 but when together the clock can't do its job.

I did the following:
Releases the 0x68 and 0x6A of the internal RTC and give it for other additional RTC devices:
sudo i2cset -y 1 0x6b 0 0xa2
and 68 and 6A disappeared on

Code: Select all

sudo i2cdetect -y 1 
But it hasn't solved the problem of the UPS interfering with the clock.

I get the following error message:
hwclock: Cannot access the Hardware Clock via any known method.
Do you have any idea of how this could be solved?

Thanks for your help, I've really been tearing my hair out on this problem!

PS: I've tried the setup and faced the same problem with both raspbian jessie 2015-11-21 and 2015-09-24

User avatar
Jake
ModMyPi
Posts: 1464
Joined: Thu Aug 27, 2015 3:57 pm

Re: RTC on UPS PICO

Post by Jake » Wed Jan 27, 2016 3:06 pm

Hi,

Apologies for the delay on this, I wanted to get my head around a few PiCo related bits before trying to assist.

Could you please update your firmware to the latest version 59.

I have thoroughly updated the set up guide and firmware area of the guide, so please follow this carefully.

http://www.modmypi.com/download/Simple_ ... _PIco.docx

Please ensure that your use picofu3.py for the update, as this will ensure the PiCo is set back to correct factory defaults.

Please let me know if that fixes your issue. If not, I will look into this more

-- Jake
Forum Administrator & Technical Support

clemvigne
n00b
Posts: 10
Joined: Fri Jan 08, 2016 10:28 am

Re: RTC on UPS PICO

Post by clemvigne » Tue Feb 09, 2016 8:56 pm

Hi Jake,

thanks a lot for this. The new document is really good.

I can confirm that the pi and the clock now work fine together.

best,

clem

User avatar
Jake
ModMyPi
Posts: 1464
Joined: Thu Aug 27, 2015 3:57 pm

Re: RTC on UPS PICO

Post by Jake » Wed Feb 10, 2016 9:51 am

Hi,

Perfect, I'm glad it's all working now!

-- Jake
Forum Administrator & Technical Support

DragonMaster
n00b
Posts: 8
Joined: Sun Feb 07, 2016 3:54 pm

Re: RTC on UPS PICO

Post by DragonMaster » Tue Mar 15, 2016 1:29 pm

Hi All, I notice that at the start of this post you mention that the RTC is emulated in the micro controller. Does this mean then that when the RPi is shut down, with no supply connected, that the RTC will no longer update? The reason for asking is that when I power my Pi back up, the clock is very wrong...

Cheers,

DM.

Post Reply