Go Down

Topic: DS1307 reading time (Read 1 time) previous topic - next topic

pfriedel



I use this https://github.com/davidhbrown/RealTimeClockDS1307 library and am very happy with it, though I'm not so happy with the accuracy of the DS1307 (mine looses 7.6 seconds per day but have found a clunk way to improve it).


Yeah, I've mucked around with a bunch of them, and that's the one I eventually settled on as well.  The DS1307 library that Adafruit uses (forked from JeeLabs) is a decent start, but I seem to remember running into limitations fairly quickly.  IIRC the time setting code was weird?  It's been a while.

The DS3231 is nice and relatively straightforward plugin replacement for the 1307, but depending on your budget, the 1307 and supporting crystal/battery/etc can be had for under $2.  If you're designing a new PCB, swapping a TH 1307 for a SMD 3231 is no big deal, but if you need to adapt it to protoboard and have to buy a $15 Chronodot or similar, the price differential starts to add up.  The 1307 is accurate enough for most applications.  Within reason.

funkyguy4000

Hmmm, good to know.  I'm looking at making a watch so it kinda needs to be pretty accurate
Accelerate to 88 miles per hour.

GoForSmoke



By the time you buy that hardware and get the code to set/reset it it is cheaper to do a GPS... the time signal only needs 1 or 2 sats... works for me...

I would love to have GPS accuracy in my clocks but they don't pick-up a signal in the house. I even have a problem picking up MSF radio time signal in some places.


If you have electric service inside the house then you have a bedrock-solid pulse source that a Hall sensor should be able to pick up.
I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

funkyguy4000

I've never done anything with hall effect sensors. I don't understand them.  What do they do?
Accelerate to 88 miles per hour.

WizenedEE


I've never done anything with hall effect sensors. I don't understand them.  What do they do?


Sense magnets. You supply power and ground, they provide a signal. Some of them are just high/low when they see any magnetic field, some are pole specific, others are one pole on until it sees the other pole.

Go Up