RTC modules - who's is "best"?

And before you shoot me, Yes: I know that is a loaded/silly question.

I live in Sydney (OZ) so it is more directed at the "locals".

I have two initial choices: JAYCAR or Altronics.

JC sell Freetronics stuff and Altronics sell.... someone else's.

Both sell RTC modules.

Both have battery backups, NV RAM in the RTC chip.

Yes, it (maybe) depends on the project to the benefits of which, bit I would like to try and keep it as "easy as possible" to connect it to the Arduino. So I2C bus, or the other one would be nice. Though to date I have only dealt with the I2C type, but with a different IC.

Has anyone here used either and notice any "problems" with them?
Thanks in advance.

I make the ChronoDot: http://macetech.com/store/index.php?main_page=product_info&cPath=5&products_id=8

Freetronics has a similar module: Real Time Clock (RTC) Module | Freetronics

I'd recommend something with the DS3231 or DS3232. Based on the experiences of thousands of ChronoDot users, the DS323x chips have a very high level of satisfaction regarding ease of use and accuracy in a wide range of conditions. DS13xx based modules...not so much.

RTC modules are several times more expensive than building your own.

I like the PCF8563. It doesn't have RAM but it does have an alarm. If you need RAM then I would go with DS1307.

These chips should be less than $1 (even in OZ). You may need to buy 10 of them to get that price. Otherwise, you are paying a lot to ship 1 or 2 chips.

Next you will need a 32K Hz crystal. These are only about $0.10 each but you may need to buy over 25 to get that price. However, you will have spares for all there RTC chips you bought.

If you want battery backup ( you probably do ), you will need a battery holder. I think they are about $0.25 each in lot of 10 or so.

Add a little for resistors and a diode and your done.

Now for $1.50 or less you have an RTC that would cost you $5 or more as a module.

Thanks.

RandallR,

I can't find anyone who sells RTC chips near by.

Granted I was looking for the type NOT recomended by macegr, however: They are hen's teeth to get where I am.

Granted the cost, but there is the "board" to put them on as well.

I am not begrudging (spelling?) what you say, but for the time, etc.

I'll keep looking.

macegr,
Thanks. Info taken onboard.

Now I shall have to refine my search for people who have that type of RTC chip in stock.

Update:

This is a link for a supplier I found.

Far from $1/chip.

but none of them are what were mentioned.

Obviously it looks suspicious coming from someone selling an alternative, but I've built my own RTC modules over the years and haven't had good results. That's why I was excited about the DS3231 and made a breakout board, actually. It's surprising tricky to get a crystal that matches the DS1307 precisely enough to get good accuracy at room temperature. And the PPM specification of the crystal is really important...if you want a system that drifts only a minute or two per month at room temperature, you should certainly expect to pay more than 10 cents for a crystal.

And of course, once you take your nicely matched non-compensated RTC module out of doors into the heat or cold, it all falls apart. They are optimized for climate controlled environments and it will start running fast or slow immediately. The DS323x built-in crystal and temperature compensation really shines in an outdoor environment. Of course, in an indoor environment it'll just run a lot better. I have one that was last synchronized at the beginning of March 2012 and it's only drifted about 10 seconds.

The ones I got off ebay out of China. The prices included shipping to the US.

I must confess that they do seem to drift a bit (3-5 seconds a day) and I have not gotten around to looking at improving the accuracy. For the price, I can't squawk.

Something else that I am looking at. I was reading the data sheet for the ATMega328 and it talks about using one of the timer registers as a RTC. From what I can tell, you hang the 32K Hz crystal on pins 9 and 10 instead of the usual 16-20MHz crystal. You can then get an interrupt every second. You will need to write the interrupt handler and keep track of the time but you only need is the crystal.

Since you no longer have a crystal the system clock, you need to use the internal oscillator. This can be configured up to 8MHz. I have been playing with using the internal oscillator and it is not hard to do, but I have been breadboarding everything.

This is about the only other place which has the DS323x series RTC I can find.

http://www.futurlec.com.au/Mini_DS3232.jsp

Yes, I know it is a "kit" but .......

Shall look if they sell just the chip.

Or from same supplier buy the DS1307 mini board. Price is cheaper (not as many functions on board I guess) than buying one IC off from RS Components/element 14, etc.,and you get the board with it as well and crystal, etc, etc..

Lots of libs around for DS1307, easy to use, etc.

angusisthedevil

I looked at Element14/Farnell, but couldn't find that chip.

The "kit" from futurelec looks good.

Either/both look good.

macegr,
Their kits - alas - as a wee bit cheaper than "yours".
Even with "multi-buy" from you, with the postage and all.

Please don't be upset.

I am just thinking now which of the two to get.

But at that price, I guess a couple would not "kill me" as opposed to buying the discreet chips and building one looking at the price for the chips.

lost_and_confused:
Their kits - alas - as a wee bit cheaper than "yours".
Even with "multi-buy" from you, with the postage and all.

Please don't be upset.

Haha, I know what I'm charging, and what my "competitors" charge. Pretty sure I'm the next cheapest option for this type of product, at least. Also, they have the DS3232 with NVRAM, but I have the DS3231SN with the industrial temperature range. It's just a simple breakout board...I even have the design files open source, so I'm not going to be upset if someone else makes something similar and people buy it. I still get a lot of business from the USA because Futurlec typically has to ship from Thailand.

Try RS Components then.

The freight will be as much as the part though probably.

From personal experience I suggest you avoid DS1307 unless time accuracy is not important. I have one and it looses about 7.5 seconds per day. I could order different crystals in the DS1307 to try and improve accuracy but that means more hassle and cost.
I also have several DS3231 and they are a lot more accurate at less than drift 2 seconds per month. I can also tweak the drift if needed by adjusting the ageing offset register using software but 2 seconds per month is good enough for me. Plus they have a readable temperature.

The DS323x range are more expensive than DS130x but in my mind worth the extra cost. To build your own is easy enough but once you add up the cost of the individual bits (IC, Breakout board, Pins, battery holder & battery) you may as well buy the pre-built modules.

Back to the original question between Jaycar & Altronics I would personally choose the Jaycar (freetronics) module as it appears to use a DS3232. The Altronics (sparkfun) module looks to use the DS3234. The DS3232 is a 2 wire interface and the DS3234 is 3 wire so one pin saved on the arduino.

Riva:
From personal experience I suggest you avoid DS1307 unless time accuracy is not important. I have one and it looses about 7.5 seconds per day. ...
I also have several DS3231 and they are a lot more accurate at less than drift 2 seconds per month.

The DS323x range are more expensive than DS130x but in my mind worth the extra cost.

You get what you pay for. 10 times the price for 10 times the accuracy.

I haven't done it yet, but I am looking at handling the drift in software. Add or subtract a second every few hours.

I haven't done it yet, but I am looking at handling the drift in software. Add or subtract a second every few hours

That's what I had to do in the end though as the project was a word clock (tells time to nearest minute) I only bother to adjust once per day at midnight. Drift is approx 7.5 seconds per day so at midnight I read the time, add 8 seconds, wait 0.5 seconds and then write the time back.

Riva:
I only bother to adjust once per day at midnight. Drift is approx 7.5 seconds per day so at midnight I read the time, add 8 seconds, wait 0.5 seconds and then write the time back.

I was looking at adjusting as soon as it was off by a second. So in your case I would add a second every 3 hours and 12 minutes. I was also looking at having the clock track it's own error. If I need to subtract a second after a couple days I might change the interval to 3 hour 12 minute 16 seconds.
It reminds me of the old grandfather clock. Reset the time and then turn the screw under the pendulum.

I was also looking at having the clock track it's own error

How was you going to do this?

I could adjust the time hourly by reading time, waiting 312ms and writing time but will probably replace the DS1307 with one of my DS3231 chips as drift amount also varies with temperature. The 7.5 seconds was determined during winter/spring but with summer here it's drifting nearer 7.8 seconds per day.

Riva:
How was you going to do this?

I was thinking, though I haven't done so, of starting off assuming zero drift and having with zero adjustment. The clock would note the time it started. At some later point I would check the time and adjust it up or down. The clock would then take the adjustment amount and the amount of time that had elapsed and calculate a drift value. It would then apply that drift amount. At some point later if I needed to adjust the clock again the clock would use the addition adjustment to recalculate the fine tune the drift value.

I guess if I wanted to try and compensate for temperature I would need to add a DS1820 and track that as well but I think I will hold off on that.

It would be interesting to have a contest to see how accurate a clock you could make for under $5.

If power were not an issue, you could make a small oven for the clock or crystal and hold it at 40 degrees C or something. That way you would not see a drift due to temperature changes.

macegr,

I am slightly leaning your way to get one of yours.

Try and support people who develop the Arduino.

Looking at it, all looks good, but how do you set the "adderss" of it on the I2C bus?

That isn't mentioned.

I am still having trouble getting my head around that part - see my other post/s on the subject.

Still can't work out how to get the 23017 MCP working.

The address is hardcoded...actually, most of the I2C RTCs use the same address. That's why code designed for the DS1307 will work for the DS323x.

There is a library that makes using RTC modules and doing various timekeeping functions pretty easy. Here's an example I made a while back: Maker Faire Bay Area 2012 Countdown Timer | macetech.com

While I appreciate the sentiment, don't feel too obligated until you check out the relative shipping fees..USPS is killing me here.