Tiny RTC DS1307 + 24C32 Real Time Clock Module (HCMODU0011)

Real Time Clock modules for microcontrollers
Post Reply
rocklobster
Posts: 8
Joined: Mon Jan 20, 2014 9:21 pm

Re: Tiny RTC DS1307 + 24C32 Real Time Clock Module (HCMODU00

Post by rocklobster » Mon Jan 20, 2014 9:44 pm

Hi,

purchased one of the tiny RTC modules a while back from ebay store (item 140991415422) and finally got around to using it this weekend. While it works, I'm surprised at how much it drifts...

In 24 hours without power it seems to have lost 1 hour 15 mins! I know it's not a top notch temp compensated RTC but this is more than I expected. Probably not a major issue for the use I have but is this the norm? It's been in a house at a fairly constant temp (normal living room temp - 22deg C maybe?). When unplugged V between gnd and bat is 2.84V which I think is about expected (from reading back this thread).

Anything I can do to improve this, or is this as good as the cheap DS1307 RTC gets and I should go back to the DS3231?

Thanks

Darren

andrew
Site Admin
Posts: 1374
Joined: Sun Aug 05, 2012 4:15 pm

Re: Tiny RTC DS1307 + 24C32 Real Time Clock Module (HCMODU00

Post by andrew » Tue Jan 21, 2014 12:03 pm

That is way out of spec so there is defiantly something wrong with your module. Where are you measuring the battery voltage, across the battery itself or at the BAT pin?
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

rocklobster
Posts: 8
Joined: Mon Jan 20, 2014 9:21 pm

Re: Tiny RTC DS1307 + 24C32 Real Time Clock Module (HCMODU00

Post by rocklobster » Tue Jan 21, 2014 4:04 pm

Hi,

Thanks for the update :-)

The 2.84V was measured at the BAT pin (between BAT pin and the GND pin next to it). Not measured at the battery - will try this evening.

As I say, it's holding memory and appears to be working, it's just horrendously inaccurate at keeping time when not powered (kinda the point of a RTC :-))

andrew
Site Admin
Posts: 1374
Joined: Sun Aug 05, 2012 4:15 pm

Re: Tiny RTC DS1307 + 24C32 Real Time Clock Module (HCMODU00

Post by andrew » Tue Jan 21, 2014 4:28 pm

The battery voltage sounds fine and that's what you should have at the VBAT pin. For some reason the oscillator circuit would have to be significantly off frequency, or intermittently stalling for it to be that out. But as there is only one external components (the crystal itself) for the clock circuit there's very little to go wrong with that. Have you tried testing it with the HCRTC library and example sketch in the first post of this thread? This would help rule out and weird software interaction. If it still does the same then we are probably looking at a faulty module.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

rocklobster
Posts: 8
Joined: Mon Jan 20, 2014 9:21 pm

Re: Tiny RTC DS1307 + 24C32 Real Time Clock Module (HCMODU00

Post by rocklobster » Tue Jan 21, 2014 6:43 pm

Just check voltage at the battery - 4.08V (that's after a day being unplugged as well) so that seems fine.

Using the lib from http://www.pjrc.com/teensy/td_libs_DS1307RTC.html which I've used before - albeit not with your modules. Will try with the code you suggest when I get a chance.

Cheers

rocklobster
Posts: 8
Joined: Mon Jan 20, 2014 9:21 pm

Re: Tiny RTC DS1307 + 24C32 Real Time Clock Module (HCMODU00

Post by rocklobster » Tue Jan 21, 2014 7:29 pm

ok, just tried that sketch and the HCRTC lib and it appears to work fine. Have set the time using it, commented out the line and unplugged - will see what it thinks the time is in a bit... :)

rocklobster
Posts: 8
Joined: Mon Jan 20, 2014 9:21 pm

Re: Tiny RTC DS1307 + 24C32 Real Time Clock Module (HCMODU00

Post by rocklobster » Tue Jan 21, 2014 7:58 pm

ok, just left it unplugged for 15 mins and it's lost 2 mins (just over) using your sketch from the first post (with the set line commented out obviously :-)).

They aren't all this bad then? Sounds like I've a duff one. I've tried (after posts elsewhere from someone with similar problems) ensuring the crystal is earthed and it makes no difference (I assume the xtal isn't meant to be soldered to the pad underneath it on these modules?).

Despite having a suspect unit, I'm impressed with the support so far :-) Thanks!

hobbyfx
Posts: 2
Joined: Fri Jan 10, 2014 9:49 am

Re: Tiny RTC DS1307 + 24C32 Real Time Clock Module (HCMODU00

Post by hobbyfx » Wed Jan 22, 2014 10:38 am

/* Define the I2C addresses for the RTC and EEPROM */
#define I2CDS1307Add 0x68
#define I2C24C32Add 0x50

i just want to make sure i'm on the right track, for I2C devices, the address is defined as part of the setup?
the I2C 2004 Serial 20 x 4 LCD Module i also have, states there is a default address of 0x27, so do they come pre addressed or is it done as part of the setup or does it depend on the device???
i used to use a lot of devices on an RS485 network years ago but they were all dip switches for addressing, so this is a little different to get my head around...

andrew
Site Admin
Posts: 1374
Joined: Sun Aug 05, 2012 4:15 pm

Re: Tiny RTC DS1307 + 24C32 Real Time Clock Module (HCMODU00

Post by andrew » Wed Jan 22, 2014 11:54 am

@rocklobster

No, you shouldn't see any significant error in time over the space of a day. Thanks for checking our code, it means we can rule out the software. The unsoldered pad on the can isn't important, it's just there to mechanically hold the xtal in place.

Just one last question before consider this to be a faulty module, does it do this when powered for a 5V source? I.e. not running off a battery.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

andrew
Site Admin
Posts: 1374
Joined: Sun Aug 05, 2012 4:15 pm

Re: Tiny RTC DS1307 + 24C32 Real Time Clock Module (HCMODU00

Post by andrew » Wed Jan 22, 2014 12:07 pm

@hobbyfx

The address in these modules come fixed and are not set in software. The 24C32 device itself can have different I2C address via its address pins A0-2 but on this module they are all grounded to give a fixed address of 0x50.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

Post Reply

Return to “RTC”