Rymapt / ethoscope

a platform from monitoring animal behaviour in real time from a raspberry pi
http://gilestrolab.github.io/ethoscope/
GNU General Public License v3.0
0 stars 2 forks source link

Time stamp: if time server is not running, allow user to pick local time from machine and send it while starting a new experiment. #18

Open PaoloGB opened 7 years ago

PaoloGB commented 7 years ago

I have found a few options for having a RTC on the Pi. We can buy this https://www.adafruit.com/product/3386 but ultimately this is just a pcb with the chip soldered on it so we might as well buy the chip directly http://uk.rs-online.com/web/p/real-time-clocks/8652208/

or even better this http://uk.rs-online.com/web/p/real-time-clocks/0518299/ more expensive but I think the other one is being discountinued.

It uses I2C, so a bit of fuffing might be required, but on the other hand we will have to deal with I2C at some point, so we might as well start now.

Shopping list:

-RTC RS 518-299 (£2.40/each) -quartz oscillator Farnell 1278043 -battery holder

mark-grimes commented 7 years ago

The adafruit page mentions that the first one can be off by a second or two per day. I'm sure that's fine but we should check with Giorgio/James Hodge what precision they need. It's unlikely to be a problem unless they're installed and left without internet for years on end.

PaoloGB commented 7 years ago

Yes, I saw that there are more precise modules. Mind you, eventually the precision also depends on the external oscillator that you must add to the chip. I think for now, as a proof of principle, I will buy the chip option and see how it behaves.

I am more concerned about DST: I am pretty sure the chip cannot account for summer/winter time change so the risk is that at some point the time will be 1 hour off.

mark-grimes commented 7 years ago

DST can be sorted out in software, and we probably want to keep everything as UTC anyway. I assumed the oscillator was included in the chip.

PaoloGB commented 7 years ago

I thought so as well but the datasheet states that you need an external oscillator. If you look at the Adafruit board you can see she put one as well.