RTC modules - who's is "best"?

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.

Yeah, thanks,

I posted a bit more in the other thread.

So, the 1307 is "hard coded" - as I just learned.

That is one of two chips.

How do I get to know the EEPROM's address?

Again, I've looked though the code, but can't resolve where/how it is set/read/defined.

Be it hard coded, or what ever: Somewhere in the code it should indicate what address it (the program/sketch) expectst the EEPROM to be at.

So then I would put the MCP at the next available address.

To read/write to the DS1307 chip you use the Wire library see Wire - Arduino Reference The DS1307 memory is not mapped to the MCU memory space so you cannot just read a MCU memory location to get a value from the DS1307. Using the Wire library you tell the DS1307 what memory location you want to read/write on that device (not MCU memory) and how many bytes to read/write and then read/write them.
A poor analogy would be a office filing cabinet. Your sitting at home and and want to access some file from the cabinet in the office at work. You cannot directly access the cabinet but you can phone someone at the office and tell them what file you want to alter and then they read the file to you or you dictate the changes to them.

Hi Riva.

I have the "Cenetipede" library.
(Argh! I don't mind this autospelling, but when the brain can't get the spelling right, or it is a ..... anyway.)

So I have been told the pins nearly "directly translate" depending on the address pins on the MCP.

lost_and_confused:
I have the "Cenetipede" library.
(Argh! I don't mind this autospelling, but when the brain can't get the spelling right, or it is a ..... anyway.)

So I have been told the pins nearly "directly translate" depending on the address pins on the MCP.

This sounds like an question for macegr as to whether other devices can co-exist using the I2C interface on the Centipede shield.

The MCP23017 doesn't collide with the DSxxxx RTC modules no matter what the address pins are, they only control the last three bits of the address.

If the MCP23017 address pins are 000, then the Centipede library assigns pins 0 through 15 to that chip (using the library's own .digitalWrite() function).

The documentation page shows everything, there are no hidden tricks to get it to work :slight_smile: centipede_shield [macetech documentation]

Macegr,

Thanks. I have the docs but shall have to read them again.
Just now I am working on my next sketch or potted plant watering system.

So the RTC's fixed address is outside the scope of the MCP's scope of addresses.

Good.

But then I wonder what happened when I had the library active and ran the example script and I got alternating black/white lines on the LCD.

I want to stop looking soon, but just found this one too:

Our PCF8583 Real-Time Clock Mini Board is the ideal solution to add a real-time clock or counter to your project. The board comes complete with the PCF8583 Real-Time Clock IC from Philips Semiconductor, which can also be used as a counter.

But don't know how good the chip is.

It is I2C bus connected.

Just a clock but I have been super happy with it - the Chronodot from Macetech. It uses the I2C bus and the DS3231. Highly recommended.

I use the Chronodot from MaceTech too.

couldn't be easier. couldn't be better.

Thanks Macegr for your efforts.

Where can I get a nice discount on a bulk order - 250 units.