gregeric
Posts: 1511
Joined: Mon Nov 28, 2011 10:08 am

Re: Install DS3231 Real Time Clock - Latest Info

Thu Feb 23, 2017 7:07 pm

The Pi Hut are wrong. There is no resistor for charging, just two redundant pullups on the I2C lines.

If the charging circuit were as simple as one resistor, the backup cell would be flattened in minutes on power-down of the 3V3 rail. Nope, no diode on board either.

W. H. Heydt
Posts: 8642
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Install DS3231 Real Time Clock - Latest Info

Thu Feb 23, 2017 8:26 pm

gregeric wrote:The Pi Hut are wrong. There is no resistor for charging, just two redundant pullups on the I2C lines.
You might point that out to them.

gregeric
Posts: 1511
Joined: Mon Nov 28, 2011 10:08 am

Re: Install DS3231 Real Time Clock - Latest Info

Wed Mar 01, 2017 12:19 am

I might also point out that I suspect these modules are using fake DS3231s. The timekeeping is not as advertised, losing seconds per hour.

I bought what I trust is a genuine Maxim part from RS/Allied. That was OK.

The packaging is close, but not identical: the $1 modules have a dimple plus # at pin 1, the trusted one just a #. The trusted one has the country of manufacture (PHIL) marked on the underside, the $1 one not. Other features are there: low-battery alert, hardware debounced reset (though 500ms not 250 as per DS) etc.... just not the accuracy.

No surprise really when Maxim sell them at ~$5 in lots of 1000, yet for the same money I can get 5x assembled modules with PCB plus header, post included, from ebay/PRC.

Conclusion: if it's accuracy you demand from an RTC, get one built by Sparkfun, Adafruit, or other trusted manufacturer. Expect to pay $15, not $1.

W. H. Heydt
Posts: 8642
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Install DS3231 Real Time Clock - Latest Info

Wed Mar 01, 2017 1:15 am

gregeric wrote: Conclusion: if it's accuracy you demand from an RTC, get one built by Sparkfun, Adafruit, or other trusted manufacturer. Expect to pay $15, not $1.
I don't object to the $15...so long as the pin pattern matches the appropriate part of the GPIO block (not true on the Adafruit DS3231 module) and a replaceable battery (true on the Adafruit module). I really only need 3 or 4 of them. I'll see what Sparkfun has.

Edit to add...the Sparkfun RTCs have the same issues as the Adafruit ones.

gregeric
Posts: 1511
Joined: Mon Nov 28, 2011 10:08 am

Re: Install DS3231 Real Time Clock - Latest Info

Wed Mar 01, 2017 10:13 am

Well I suppose you could swap out the DS3231 for one from Allied.

And, while not serving to charge them, your concept of storing them hooked up to something in the range 3-5V will at least preserve the tiny primary cell, extending the lifetime.

W. H. Heydt
Posts: 8642
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Install DS3231 Real Time Clock - Latest Info

Tue Mar 21, 2017 11:22 pm

gregeric wrote:The Pi Hut are wrong. There is no resistor for charging, just two redundant pullups on the I2C lines.

If the charging circuit were as simple as one resistor, the backup cell would be flattened in minutes on power-down of the 3V3 rail. Nope, no diode on board either.
I am now in possession of a Pi Hut RTC module. The visible marking on the component in question are "3.3v" and "0.22F". Sure looks like a capacitor to me. If you think it isn't, I suggest you get one and look for yourself.

gregeric
Posts: 1511
Joined: Mon Nov 28, 2011 10:08 am

Re: Install DS3231 Real Time Clock - Latest Info

Wed Mar 22, 2017 12:34 am

If they can fake a Maxim chip it's not too much of a stretch to stamp a lithium primary cell with marks to suggest it's otherwise for some marketing claims :lol:. How's the charging circuit looking? And the timekeeping?

Compare the picture of the PiHut module with the Adfruit module available from the same site. Adafruit's DS3231 has a semi-circular cutout for orientation, the cheap one a square notch.

It just doesn't add up - a premium precision RTC chip with an expensive supercap, all for peanuts.

Discharge the "supercap" overnight with a dead short across its terminals - I'd be interested to see how it performs the next day.

W. H. Heydt
Posts: 8642
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Install DS3231 Real Time Clock - Latest Info

Wed Mar 22, 2017 1:44 am

gregeric wrote:If they can fake a Maxim chip it's not too much of a stretch to stamp a lithium primary cell with marks to suggest it's otherwise for some marketing claims :lol:. How's the charging circuit looking? And the timekeeping?

Compare the picture of the PiHut module with the Adfruit module available from the same site. Adafruit's DS3231 has a semi-circular cutout for orientation, the cheap one a square notch.

It just doesn't add up - a premium precision RTC chip with an expensive supercap, all for peanuts.

Discharge the "supercap" overnight with a dead short across its terminals - I'd be interested to see how it performs the next day.
Buy one yourself and do the research. Or just accuse Pi Hut of false advertising (which is, effectively, what you're doing) and see what happens. I'm not making claims based on pictures. I have a Pi Hut unit in hand. Note that I have long since said why the Adafruit unit is unsuitable for my purposes, and the price isn't the issue.

FYI...the chip package on the Pi Hut unit I have has...a semi-circular alignment notch. Again...try going the *actual* *unit* rather than web site pictures.

Edit to add... Mouser sells 3.3v 0.22F supercaps for $0.648 each in lots of 1500. So much for the "expensive supercap". And they sell the Maxim chip for $3.79 each in lots of 1000.

gregeric
Posts: 1511
Joined: Mon Nov 28, 2011 10:08 am

Re: Install DS3231 Real Time Clock - Latest Info

Thu Mar 23, 2017 6:51 pm

Using the figures you have researched, the BOM is around $5. Rule of thumb, multiply that by 3 to 4 for the retail price your distributors sell at. Hence the realistic price of the Adafruit module, $14.

I have around six of these, plus three Chronodots, plus a plain chip bought from RS. Of the ridiculously cheap modules, I've identified three package styles for the DS3231, where there should only be one. Two have a semi-circular notch like the genuine Maxim part, as seen on the Adafruit module. There are subtle differences top and bottom side of the chip eg the genuine part marks pin 1 with a # at the end with the semi-circular cutout, the cheap ones throw in a dimple too.

I note that you're having problems with your module - you must be unlucky, all mine work, even the ones I deem fake. Perhaps you've been landed with a dud. See https://www.maximintegrated.com/en/app- ... vp/id/5458 "At least once a week I receive a request or inquiry from customers' QA engineers concerning the pedigree of a Maxim part that they suddenly find is not working properly."

W. H. Heydt
Posts: 8642
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Install DS3231 Real Time Clock - Latest Info

Thu Mar 23, 2017 7:08 pm

gregeric wrote:Using the figures you have researched, the BOM is around $5. Rule of thumb, multiply that by 3 to 4 for the retail price your distributors sell at. Hence the realistic price of the Adafruit module, $14.

I have around six of these, plus three Chronodots, plus a plain chip bought from RS. Of the ridiculously cheap modules, I've identified three package styles for the DS3231, where there should only be one. Two have a semi-circular notch like the genuine Maxim part, as seen on the Adafruit module. There are subtle differences top and bottom side of the chip eg the genuine part marks pin 1 with a # at the end with the semi-circular cutout, the cheap ones throw in a dimple too.

I note that you're having problems with your module - you must be unlucky, all mine work, even the ones I deem fake. Perhaps you've been landed with a dud. See https://www.maximintegrated.com/en/app- ... vp/id/5458 "At least once a week I receive a request or inquiry from customers' QA engineers concerning the pedigree of a Maxim part that they suddenly find is not working properly."
I guess we're fairly far down the rabbit hole now. Let's take it one issue at a time... Are you still disputing that the Pi Hut unit has a supercap? (Also note that the *cost* of the Adafruit unit is not an issue. What is an issue is that it won't simply fit on a Pi. Other than that, I'd be buying them up to use. So if you can point to a "genuine Maxim" RTC clock module that fits directly on the 5 pins of a Pi, give me a link to it.)

Edit to add: Replaceable battery would be a plus.

gregeric
Posts: 1511
Joined: Mon Nov 28, 2011 10:08 am

Re: Install DS3231 Real Time Clock - Latest Info

Thu Mar 23, 2017 7:18 pm

If the unit in your hands has what appears to be a supercap, but only the two i2c pullup resistors and decoupling capacitor in addition to the DS3231, then either
1. It's not a supercap.
or
2. It's not a genuine DS3231, as the genuine part is UL certified *not* to trickle charge, hence rendering it safe to use with lithium primary cells.

alphanumeric
Posts: 1515
Joined: Tue Jan 19, 2016 2:17 pm
Location: Sydney, Nova Scotia, Canada

Re: Install DS3231 Real Time Clock - Latest Info

Thu Mar 23, 2017 8:35 pm

The Adafruit one will fit on a Pi, with the purchase of some other bits. I have mine wired to my Astro Pi via a Proto Hat. It has a replicable battery. It's not ideal for all situations but worked great for me. It's between my PI and my Sense Hat, and easily unplug able removable if need be. Wiring was also easy as the GPIO pins are all brought out to solder pads and labeled on the Proto Hat.
Pictures here. https://1drv.ms/f/s!AjOYwiwlwDtpgq8_0VrdS3_H5xL_AA

gregeric
Posts: 1511
Joined: Mon Nov 28, 2011 10:08 am

Re: Install DS3231 Real Time Clock - Latest Info

Thu Mar 23, 2017 8:52 pm

That's somewhat more robust than my efforts alphanumeric, though a little bigger: https://twitter.com/gregeric/status/841005509171908610

W. H. Heydt
Posts: 8642
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Install DS3231 Real Time Clock - Latest Info

Thu Mar 23, 2017 8:54 pm

alphanumeric wrote:The Adafruit one will fit on a Pi, with the purchase of some other bits. I have mine wired to my Astro Pi via a Proto Hat. It has a replicable battery. It's not ideal for all situations but worked great for me. It's between my PI and my Sense Hat, and easily unplug able removable if need be. Wiring was also easy as the GPIO pins are all brought out to solder pads and labeled on the Proto Hat.
Pictures here. https://1drv.ms/f/s!AjOYwiwlwDtpgq8_0VrdS3_H5xL_AA
You're basically using a breadboard. That is not--at least in my estimation--plugging directly to a Pi. What's worse (from my perspective) is that it's a really large and ugly solution when the Pi it's being connected to is a Pi0. So, good features..replaceable battery, ds3231. Bad feature...board pinout is all wrong. Therefore: so far as I am concerned, it's a non-workable solution. (Note that I have made most of these points previously, so that fact that the I consider the Adafruit module unserviceable is not new. I'm *still* waiting for those making claims to have found a module that meets my criteria to provide a link, rather than pointing to the same old items that I have already said I have rejected.)

alphanumeric
Posts: 1515
Joined: Tue Jan 19, 2016 2:17 pm
Location: Sydney, Nova Scotia, Canada

Re: Install DS3231 Real Time Clock - Latest Info

Fri Mar 24, 2017 10:01 am

I did say "It's not ideal for all situations" in my post. Just giving an option is all. There is a Pi Zero sized version, https://www.adafruit.com/products/3203 . If you want a minimalist install this isn't it. If you want to add a RTC and maybe another hat, or still have access to the GPIO, it could be a good option. Other breakout boards can be installed along side the RTC, space providing.

W. H. Heydt
Posts: 8642
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Install DS3231 Real Time Clock - Latest Info

Fri Mar 24, 2017 1:27 pm

alphanumeric wrote:I did say "It's not ideal for all situations" in my post. Just giving an option is all. There is a Pi Zero sized version, https://www.adafruit.com/products/3203 . If you want a minimalist install this isn't it. If you want to add a RTC and maybe another hat, or still have access to the GPIO, it could be a good option. Other breakout boards can be installed along side the RTC, space providing.
Let me put it this way...my Pi Zero set up is so minimalist that I only install 5 header pins.

alphanumeric
Posts: 1515
Joined: Tue Jan 19, 2016 2:17 pm
Location: Sydney, Nova Scotia, Canada

Re: Install DS3231 Real Time Clock - Latest Info

Fri Mar 24, 2017 1:37 pm

W. H. Heydt wrote:
alphanumeric wrote:I did say "It's not ideal for all situations" in my post. Just giving an option is all. There is a Pi Zero sized version, https://www.adafruit.com/products/3203 . If you want a minimalist install this isn't it. If you want to add a RTC and maybe another hat, or still have access to the GPIO, it could be a good option. Other breakout boards can be installed along side the RTC, space providing.
Let me put it this way...my Pi Zero set up is so minimalist that I only install 5 header pins.
You could have just used a couple of short wires and skipped using any header pins and used the Adafruit RTC breakout board. A lot lower profile. Just put one of those double sided sticky 3M pads between the Pi and RTC board. I'm not saying that's any better than what you have planed, just throwing it out there as an option.

W. H. Heydt
Posts: 8642
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Install DS3231 Real Time Clock - Latest Info

Tue Apr 04, 2017 11:43 pm

gregeric wrote:I might also point out that I suspect these modules are using fake DS3231s. The timekeeping is not as advertised, losing seconds per hour.
...
Conclusion: if it's accuracy you demand from an RTC, get one built by Sparkfun, Adafruit, or other trusted manufacturer. Expect to pay $15, not $1.
RTC module from Pi Hut. Price is 5GBP. Test run for accuracy:

Code: Select all

[email protected]:~ $ uptime ; date ; sudo hwclock -r
 16:42:06 up 10 days, 9 min,  3 users,  load average: 0.00, 0.01, 0.00
Tue Apr  4 16:42:06 PDT 2017
Tue 04 Apr 2017 04:42:06 PM PDT  -0.323534 seconds
Next up will be some tests to see of the module will keep running long enough for my purposes when there is no external power.

User avatar
rpdom
Posts: 12648
Joined: Sun May 06, 2012 5:17 am
Location: Ankh-Morpork

Re: Install DS3231 Real Time Clock - Latest Info

Sat Jun 24, 2017 10:21 am

gregeric wrote:Are you still thinking that yellow thing is a supercap? It cannot be - those things require a charging circuit, and there plain isn't one on the module, and certainly not one inside the DS3231. It's a CR1025 lithium primary (no-rechargable) cell, the best for long backup time according to the app note I linked up above. If you want longer backup cell life, fit a bigger cell.
I know this is an oldish thread, but I just bought a few of the Chinese modules and checking the markings on the "yellow banded" object, it is a CR927 lithium cell. Other versions may vary, of course

RPRPRPRPRP
Posts: 3
Joined: Fri Jun 30, 2017 6:48 am

Re: Install DS3231 Real Time Clock - Latest Info

Fri Jun 30, 2017 6:54 am

I have a similar set of requirements as W. H. Heydt did, and was hoping for any follow-up information on this topic.

W. H. Heydt, were you able to perform a discharge test with your supercap units? I also have units that may be unused for months at a time...

rpdom, can you point me to the supplier that sold you the units with lithium batteries?

User avatar
rpdom
Posts: 12648
Joined: Sun May 06, 2012 5:17 am
Location: Ankh-Morpork

Re: Install DS3231 Real Time Clock - Latest Info

Fri Jun 30, 2017 3:46 pm

RPRPRPRPRP wrote:rpdom, can you point me to the supplier that sold you the units with lithium batteries?
It was just a random Chinese ebay seller. I bout three of them for under a quid each. I'll see if I can find the details when I get home.
[edit]
Home now. This was the item: http://www.ebay.co.uk/itm/232270602471

W. H. Heydt
Posts: 8642
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Install DS3231 Real Time Clock - Latest Info

Fri Jun 30, 2017 5:22 pm

RPRPRPRPRP wrote:I have a similar set of requirements as W. H. Heydt did, and was hoping for any follow-up information on this topic.

W. H. Heydt, were you able to perform a discharge test with your supercap units? I also have units that may be unused for months at a time...
The "hold time" for the supercap is between 2 and 3 days. so setting it aside for months at a time and expecting time to be correct is not going to work with this particular unit. It will work for me because I can (at worst) fire it up with an internet connection for a day or so, then take it down and transport it to where it is going to be used without a net connection and have it powered up within a few hours. What I don't know at this point (though I asked Pi Hut and haven't gotten an answer beyond, "We're checking and will get back to you in a days"...a couple of months ago) is how long it takes to recharge the supercap. Less than overwhelmingly convenient, but workable.

And to give an update on accuracy of the Pi Hut supercap RTC:

Code: Select all

[email protected]:~ $ uptime; date; sudo hwclock -r
 10:11:57 up 54 days, 12:34,  3 users,  load average: 0.21, 0.12, 0.03
Fri Jun 30 10:11:57 PDT 2017
Fri 30 Jun 2017 10:11:58 AM PDT  -0.208818 seconds
And a side note... I should have noted a point earlier in the thread that, since my source for prices on supercaps and DS3231 chips is wholesaler/retailer (that is, they'll sell anywhere from one to whatever you want), they are obviously marking up prices from the OEM. If someone were making a lot of RTC modules, they'd go to the OEMs and get a better deal. As a result, I don't see the prices I found to actually bar being able to make a $5 RTC with what another poster disputed being genuine parts.

RPRPRPRPRP
Posts: 3
Joined: Fri Jun 30, 2017 6:48 am

Re: Install DS3231 Real Time Clock - Latest Info

Sun Jul 02, 2017 2:36 am

rpdom wrote:
RPRPRPRPRP wrote:rpdom, can you point me to the supplier that sold you the units with lithium batteries?
It was just a random Chinese ebay seller. I bout three of them for under a quid each. I'll see if I can find the details when I get home.
[edit]
Home now. This was the item: http://www.ebay.co.uk/itm/232270602471
Thanks very much. It's funny, there are many of these modules for sale from China that all look identical, but some appear to be made with supercapacitors and others with lithium batteries...

yjl
Posts: 21
Joined: Sun Aug 06, 2017 7:53 pm

Re: Install DS3231 Real Time Clock - Latest Info

Sun Aug 13, 2017 10:18 am

Some posts have recommended de-installing the fake-hwclock package, or the ntp package - there's no need to do that - just do the above.
Thank you. After having hard time with ds1307, it finally works with ds3231 as charm. I used same model above.

May I ask one question? I wonder why others recommend to remove fake-hwcock ...etc though I already uninstalled those while I messed up with ds1307

alphanumeric
Posts: 1515
Joined: Tue Jan 19, 2016 2:17 pm
Location: Sydney, Nova Scotia, Canada

Re: Install DS3231 Real Time Clock - Latest Info

Sun Aug 13, 2017 11:19 am

The tutorial I follow, https://learn.adafruit.com/adding-a-rea ... pberry-pi Says to " Disable the "fake hwclock" which interferes with the 'real' hwclock" so I do it. It may not be needed but it hasn't caused me any issues doing it. My DS3231 works just fine. Same deal for my DS1307 following that tutorial. Both RTC breakout boards were bought from Adafruit so that's the tutorial I just naturally tried first.

Return to “General discussion”

Who is online

Users browsing this forum: Douglas6, HawaiianPi, procount, RedSnowDonkey, steinerlein and 57 guests