RTC I2C Reliability

Hi,

Am new to Arduino and the little DS1307/3231 RTC modules and from some posts in the forum and elsewhere seems there are some reliablity issues when using the I2C bus...? (previously programmed with Pics which allow a 32k timing crystal to run an internal rtc in Pic chip)

As my project is all hinged around 24/7 timers etc that supports livestock I want to reduce system errors to the minimum.

Wondered what the best route to ensure minimum failures ?

I currently only have the DS1307 on the I2C bus using the standard Wire library. Would adding a I2C LCD to the same bus be ok or should I software control the lcd on 2 other pins ? or even switch things around, ie the DS1307 to software control ( ie RinkyDink)

Have seen some alternative libraries suggested with error routines built in like the WSwire or even this prorgam to clear the I2C lines after a power failure etc. http://www.forward.com.au/pfod/ArduinoProgramming/I2C_ClearBus/index.html

Any help appreciated

Arduino is not a good choice for something that must run reliably 24/7. It is a toy designed for learning and experimentation.

I2C is the least of the potential problems. For reliable operation you will want to make a custom PCB to avoid loose wires, avoid buggy software packages like SoftwareSerial, have a reliable power source with battery backup etc.

Cheap ebay modules, like the DS1307 that most people buy, are also potential failure points.

jremington: For reliable operation you will want to make a custom PCB to avoid loose wires, avoid buggy software packages like SoftwareSerial, have a reliable power source with battery backup etc.

Cheap ebay modules, like the DS1307 that most people buy, are also potential failure points.

Hi,

Yes, thanks, all those points already in hand, all those plug in wires and stackable boards are a no no in my book. Intend to use an Arduino Micro soldered to a pcb with full power backup and as you suggest the ebay modules are questionable, think a pcb mounted ds chip from RS etc the better option.

Library problems a new point, though this board will not make use of SoftwareSerial intentionally , was looking to use serial comms on another similar project, will search around for an alternative library..

ricky101: Am new to Arduino and the little DS1307/3231 RTC modules and from some posts in the forum and elsewhere seems there are some reliablity issues when using the I2C bus...?

This is how to detect possible I2C problems with RTC modules:

If you see that there is printed "Tiny RTC" on the PCB, then you have detected the crap device!

Typically there are no problems with anything, but if problems arise, they arise mostly with DS1307 modules, and in nearly every case the PCB of the module is labelled "Tiny RTC", if it is a crap device.

So it is very easy to avoid I2C problems with RTC devices: - avoid "Tiny RTC"! - use "DS3231" for better accuracy!

Hi,

I am using one of those tiny boards and it seems ok while bench testing, though have disconnected the charging circuit from the CR2032 it comes with.

Am ahead of you on the ds3231, one arrivng in the morning , hopefully.

Thanks

Am ahead of you on the ds3231, one arrivng in the morning , hopefully.

The cheap ds3231 modules on ebay tend to suffer from a number of similar problems, and you may even end up with a counterfeit chip. Here is how to fix some of those problems.

jremington: The cheap ds3231 modules on ebay tend to suffer from a number of similar problems, and you may even end up with a counterfeit chip. Here is how to fix some of those problems.

I've never heard of any counterfeit DS3231's before. There is only speculation on that site. I don't think it is true. But yes, the charging circuit should be disconnected. The other mods listed there are unnecessary unless you need extremely low power consumption on the Arduino side of things. But the ZS-042 board is basically a very good board. I've never had any quality problems with them. I do prefer the JY-MCU ones now. They require no mods at all. http://www.ebay.com/itm/201456712073?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT They are also more compact.

I've never heard of any counterfeit DS3231's before.

I certainly have, and Google turns up plenty of anecdotal evidence.

What chips aren't counterfeited? Sparkfun has an interesting detective story about some fake ATMega328s they bought.

Hearsay and speculation. Regards the low cost of the ZS-042, look at the numbers that are available. It's likely the manufacturer bought a ton of them and got a good price.

The integrated crystal would make it a lot harder to fake than a normal IC.

This stuff isn't expensive. As a hobbyist and buying ones or twos of items, why bother with finding the cheapest parts available if it comes with risk of failure? Isn't your time worth more than that?

The whole chinese ebay thing is something Donald Trump will put a stop to, LOL.

jboyton: This stuff isn't expensive. As a hobbyist and buying ones or twos of items, why bother with finding the cheapest parts available if it comes with risk of failure? Isn't your time worth more than that?

The whole chinese ebay thing is something Donald Trump will put a stop to, LOL.

This is pure rhetoric. At least, if we're still talking about the ZS-042. It would pass any consumer grade QA with flying colours. Take a close up look at the board with a magnifying glass, as I have. Can you provide a pointer to a specific replacement part that you can demonstrate is significantly more reliable?

If you're building systems for a passenger jet or pacemaker or something, well, that's different.

ricky101: Hi,

Am new to Arduino and the little DS1307/3231 RTC modules and from some posts in the forum and elsewhere seems there are some reliablity issues when using the I2C bus...? (previously programmed with Pics which allow a 32k timing crystal to run an internal rtc in Pic chip)

As my project is all hinged around 24/7 timers etc that supports livestock I want to reduce system errors to the minimum.

Wondered what the best route to ensure minimum failures ?

I currently only have the DS1307 on the I2C bus using the standard Wire library. Would adding a I2C LCD to the same bus be ok or should I software control the lcd on 2 other pins ? or even switch things around, ie the DS1307 to software control ( ie RinkyDink)

Have seen some alternative libraries suggested with error routines built in like the WSwire or even this prorgam to clear the I2C lines after a power failure etc. http://www.forward.com.au/pfod/ArduinoProgramming/I2C_ClearBus/index.html

Any help appreciated

Hi Ricky,

I have built an "atomic clock" which uses an i2c connected DS3231 RTC module called a Chronodot. It's kinda expensive ($15-20), but for one-offs, its ease of use makes up for this. The clock also has an oled to display the time, and the status of the clock, on the same i2c bus. I started it in November, debugged it until December, and it's been running continuously, 24/7 since then.

No sign of any reliability problem:

|500x500

I love that clock. We're going to have to start calling you "Marty". I also like the Chronodot, but the novelty of the round PCB wears off really fast. At least, it did for me.

Thanks all, lots of interesting info to check out there, almost forgot about the pull up resistor values.

One point not covered I would appreciate any comment on, and thats running a serial lcd on the same i2c bus as the RTC, is this likely to cause conflicts ? - my codes simple lcd and rtc instructions are well separated timewise.

ChrisTenone +1 on the "Atomic Clock" :)

Well, if both the RTC and LCD have 4.7K I2C pull up resistors, the combined resistance is getting a bit too low. I haven't tried it, but I think I remember reading that 4.7 is about as low as you want to go. So you might want to disable the pull ups on one of them. The link is in reply #5.

My 3231 has arrived, its the Pi type without any eeprom, (no extra needed for this project)

Its fitted with 4.3k pull ups , often see it said 10k is more to the I2C design standard.

Also found that the 3v 10mm diameter battery is spot welded onto its metal carrier fingers.

Just tested it with my already installed RTClib from JeeLabs and seems to work fine.

Also just got the lcd serial adapter board so will give them both a try and see if they behave together.

000268.jpg

000269.jpg

aarg: This is pure rhetoric. At least, if we're still talking about the ZS-042. It would pass any consumer grade QA with flying colours. Take a close up look at the board with a magnifying glass, as I have. Can you provide a pointer to a specific replacement part that you can demonstrate is significantly more reliable?

If you're building systems for a passenger jet or pacemaker or something, well, that's different.

So you're not a Trump supporter? :-)

I wasn't talking about a specific board. But since you mentioned it, isn't the ZS-042 one of those RTCs with the poorly designed charging circuit? Or am I thinking of a different cheap RTC?

As for a more reliable board, I don't have any statistics so you can call it rhetoric if you want. But for peace of mind, as well as free replacement in the event of a problem, I'd buy something like the Chronodot from Adafruit.