I have two of these RTCs, when connected to a MEGA.
Both devices worked correctly, but after some experimentation with the MEGA and adding other sensors, both devices have become faulty.
The fault is manifest in that they are not being detected by I2C scanner sketches, and will not work in a example RTC sketch.
Is there a known issue with these devices? Can they be repaired? The capacitor and the actual oscillator chip are the most likely culprits, are they known to have a failure rate?
These devices normally work as described, but are relatively expensive enough to not continue to be replaced.
Sorry to hear that you are having issues, can you send some photos of your setup? What other sensor did you add to your project? These boards are designed for 3.3V logic, what libraries were you using to set the time initially?
The RTC library is: RV3028C7, and using example libraries for all the other sensors.
Attached are the photos of the wiring.
The other sensors attached were: BME280, GY-SGP30, GY521, INA219, INA260, TCA9548, AS7331, SOS30, TSL2591, MLX90939
The issue is that in this wiring setup the RTC worked, I could set time, date, day-of-the-week, and the complete sketch would work. Eventually the RTC would fail and it would not be detected by the I2C scan, even though all the other sensors were being detected. Replacing the RTC with a new one worked, but again after some use it failed.
Thanks for the photos! I’ll have a look through them to see if I notice anything strange.
Replacing the RTC with a new one worked, but again after some use it failed.
Do you have a more exact time frame/use amount? If these chips are consistently failing for you around a certain time, we can “stress test” them in-house to isolate the issue.
Due to the complexity of this project, I was also hoping to get some clarification on the exact physical connections to the RTC. It seems the only connections are the 4-pin PiicoDev Connector feeding into the I2C multiplexer. If you could give us an exact explanation of your code and connections (for the aforementioned RTC connection), as well as a close-up image, that would be awesome!
Attached is a version of the sketch I have been using that includes the RTC.
Also the photos you requested.
There is no specific time for the failure. I started the sketch and the wiring with the BME280, and added the INA devices, and then the RTC. As I added other sensors, including powering off and on as I did so, the RTC continued to work.
At some point I tried connecting the RTC to one of the other sensors via the PiiCoDev cable, instead of via the TCA9548. At some random time during this testing the RTC failed to be detected by the I2C scanner code, and other testing showed it had failed.
I am not sure if this change to a different wiring caused the failure, as I have done similar changes and the RTC worked correctly.
Attached is a version of the sketch I have been using that includes the RTC, also the photos you requested.
There is no specific time for the failure. I started the sketch and the wiring with the BME280, and added the INA devices, and then the RTC. As I added other sensors, including powering off and on as I did so, the RTC continued to work.
At some point I tried connecting the RTC to one of the other sensors via the PiiCoDev cable, instead of via the TCA9548. At some random time during this testing the RTC failed to be detected by the I2C scanner code, and other testing showed it had failed.
I am not sure if this change to a different wiring caused the failure, as I have done similar changes and the RTC worked correctly.
@Geoff69810 If something electronic works then fails over time it means it is being stressed outside its design parameters. In your case the RTC is the least tolerant so it is failing first. The other devices are probably more robust or they may not fail at all.
This stress can be over/under voltage, noise on the lines connected to the device, high voltage spikes, and other stuff like pullups or pulldowns etc; often very hard to detect with using basic test equipment.
I doubt the RTC’s are faulty manufacture there are very few components on them. I have a number of them running and they have not failed. At $20 a pop you don’t want to loose anymore, I’d be looking at the data and supply lines with an oscilloscope or some other piece of fancy test equipment. Or careful analysis of the circuit and how it has been constructed.
Probably you already know all this, just felt the need to say something as remote fault finding is very difficult.
As James mentioned, it’s quite unlikely that both chips you’ve been given are faulty provided that these don’t have a history of faults. That being said, I’m not quite sure what could be causing the boards to fail. Your wiring seems sound from the images.
Checking the RTC’s output while it is functioning could yield some useful information, alternatively programming some sort of diagnostic feedback to a computer may reveal the issue as well.
Can I confirm the supply voltages you’re using from the Mega to the RTC?
At this stage, I am considering doing some tests on these chips later this week, or at least notifying production about this issue. I do find it unlikely that there are any real ongoing issues with these given their track record, but we’ll need to confirm that’s the case before writing it off.
Not too concerned really about losing the money, it is more the delay in getting a new one.
Your testing indicates no issues with the RTC itself, so I consider that technical assistance completed. That is what I was initially concerned about.
I will only use it on the 3.3 volt rail via the PiiCoDev cable. It could be that even though it works on 5 volts, the ongoing powering down and back up, while testing the various sensors may have caused damage.
I’ve read suggestions that these devices should be run via a level shifter. Can you suggest any turorials, or web links that explain how to correctly use a level shifter, and how to wire it to an Arduino device?
Thanks again for the assistance, it has helped a lot.
@Geoff69810 This level shifter I have used in a number of projects successfully.
Connect 5V to 5V, 3.3V to 3.3V, GND to GND. HV to 5V logic signal, LV to 3.3V logic signal.
It is bidirectional does not matter which way signal is going, perfect for the I2C data. Each board has 4 lines. I have one in my weather station on the roof doing its thing nicely at the moment.
Cheers
Jim
EDIT: the RTC is powered of 3.3V have not tried them at 5V, Pico lines are 3.3V only.
I’ve standardised on 3.3 V and PiicoDev / Stemma QT / Qwiic connector with my I2C devices and if I have a 5 V I2C device I use a JST-XH connector for it to distinguish from 3.3 V devices because the 2.5 mm pitch is close enough to 0.1 inch to connect to the 4 pin header such boards often have and matches a UNO breakout board I have with the old LinkSprite Linker format (if the pin pattern doesn’t match I make a custom cable using pre-crimped wires bought online).
I recently broke an I2C 0.96 inch OLED display which turned out to have a different pin out than an apparently identical one I previously bought; I avoid I2C devices that aren’t 3.3 V with one of the JST-SH style connectrors with the standardised PiicoDev / Stemma QT / Qwiic pinout.