Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : Witch RTC..?
Page 1 of 2 | |||||
Author | Message | ||||
Zonker Guru Joined: 18/08/2012 Location: United StatesPosts: 761 |
Simple Question... The uMite manual has the PCF8563 RTC which draws 0.25ua on standby power... The DS1307 draws 500na... quite a bit better... I am planning to use an ELNA 1 Farad 5.5v Super-cap (DBJ5R5D106) for backup power instead of a battery... Is the DS1307 a useable device instead of the PCF8563..? If so, backup runtime would be close to 3x longer... (I think)... Wait... Maybe not... The PCF8563 will keep going on backup till 1 volt... The DS1307 only runs till 2 volts... Hummm, might be a wash... Any insights out there..? |
||||
BobD Guru Joined: 07/12/2011 Location: AustraliaPosts: 935 |
John The Micromite support for the PCF8563 will not work on a DS1307. You will have to do your own. Not impossible. There are plenty of examples around this forum. The only RTC I Have experience with is the D3231 and if accuracy is required then it is very good. I had one running for several months and at the end it was within 1 second. If it is still not good enough then there is a fine tuning capability. The DS3231 has basic compatibility with the DS1307. Bob edit: The DS3231 typical battery standby power is 830 nano amps. The PCF is a clear winner there. |
||||
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 3817 |
0.25ua = 250na so conclusion looks odd! John |
||||
Zonker Guru Joined: 18/08/2012 Location: United StatesPosts: 761 |
Sorry John... My screw-up... I guess I can't add... |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3196 |
Some time ago I did some research on this and came to a surprising (for me) conclusion. If you use a standard battery such as the CR2032 it will last for about 50 years with a drain on 500nA. This is way beyond the shelf life of the battery (about 10 years). Smaller batteries have less capacity but in most cases it is still the shelf life that you need to worry about. With a SuperCaps the internal self discharge is roughly equivalent to 1uA (sometimes more) and that is the significant limiting factor. So, the current drain of the RTC chip is not that critical. EDIT: SuperCaps also have a limited operating lifetime which (if taken literally) is only a few years. See this reference. Geoff Geoff Graham - http://geoffg.net |
||||
Zonker Guru Joined: 18/08/2012 Location: United StatesPosts: 761 |
Humm... Probably good advice... I can't see your reference (link isn't working) but I was hoping to avoid the battery and just have something that would not have to be replaced. I didn't know about the short life span of the device... It was in 2006 that Elcom Industries folded because Tom (the boss) got cancer and passed away... The ELNA super-caps had been in parts inventory probably about 2 years and Lou ended up getting a lot of the leftover stock parts from the company.. He took one and charged it up to 5 volts and let it sit for a week and would check the voltage every now and then.. the voltage had fallen off a bit but after sitting around in the pole barn, exposed to winter cold, and summer heat for 10+ years, I figured that they weren't in the best shape anyway... So, maybe I should use a battery instead... Ok, then we need maybe a battery that can be surface mounted to the board and you would not worry about ever changing it because it would last the life cycle of the board.. Sweet.. I will try locating the right type we need... A CR2032 it is... I will look into it... Thanks Geoff.. EDIT: How about this one...? 2014-05-16_021457_CR2032-SMT.pdf |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 6103 |
This link to the supercaps might work better: http://www.industrial.panasonic.com/jp/i/29880/TGC_E/TGC_E.p df The CR2032 is probably the best choice. It is the most common size and usually at the cheap end of the scale. Jim VK7JH MMedit  MMBasic Help |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3196 |
The CR2032 is a little large but if you have the space it is the cheapest and best option. The part that you linked looks excellent. Another factor is that you can use the battery as the permanent power source for the RTC, even when your gadget is powered up. Most gadgets are only powered for a short time compared to their power off time so it is not worth using diodes or some other circuit to switch from the battery to the main power bus - you will save very little in battery life and most batteries have excess capacity anyway. Geoff Geoff Graham - http://geoffg.net |
||||
vasi Guru Joined: 23/03/2007 Location: RomaniaPosts: 1697 |
I would chose a socket against a battery anytime but that's me. I hate sealed phones without access to the battery. It looks like "one time use" product. And if anything goes wrong, your client will have to resort to an iron solder instead of just changing the battery. But probably you have good reasons for that. Hobbit name: Togo Toadfoot of Frogmorton Elvish name: Mablung Miriel Beyound Arduino Lang |
||||
crez Senior Member Joined: 24/10/2012 Location: AustraliaPosts: 152 |
While we are on the topic of RTC's, I noticed the PCF8563 has an interrupt output pin that can be set to change at a particular date and time. This could be used to wake the micromite from sleep but there seems to be no software support for this. Has anyone looked at doing this in a roundabout way? David |
||||
BobD Guru Joined: 07/12/2011 Location: AustraliaPosts: 935 |
This may be what you want. See page 13 of the MicroMite Manual. The pins referred to are 16 and 43. See pages 6 & 7. [quote]The CPU SLEEP command will put the processor to sleep. During sleep the current drain is about 80µA. This command will automatically configure the WAKEUP pin as a digital input. During sleep this pin will be monitored and the CPU woken up when its input changes state (ie, goes from high to low or low to high). The program will then continue with the command following the CPU SLEEP command. The wakeup signal could be a button press, an incoming signal or some other external interrupt. [/quote] |
||||
Zonker Guru Joined: 18/08/2012 Location: United StatesPosts: 761 |
Humm... Just trying to keep the cost down... The socket probably cost more that the battery... I will look into it... If the shelf life of the battery is (lets say 10 to 15 years) isn't that about the life of the board...? I will try and find a good combo socket and put it on if everyone thinks they want one... |
||||
crez Senior Member Joined: 24/10/2012 Location: AustraliaPosts: 152 |
Yes, that is the function, but I am talking about tying it to an alarm function in the PCF8563 RTC chip. It should be possible to wire pin 3 of the RTC chip to the wakeup pin of the micromite and then instruct the RTC chip by i2c commands to bring the micromite out of sleep mode at a specific date and time. A pullup resistor ( 1 Meg? ) would be needed on the wakeup pin. David |
||||
Zonker Guru Joined: 18/08/2012 Location: United StatesPosts: 761 |
Ok... I could wire it to the wake-up pin, no problem... The board was also going to use the IR Tx-Rx stuff as well... I don't have the RTC chips in yet, so will be testing later... Does anyone have the code worked out for this..? Humm.. does anyone think they need to use the clock out pin for anything..? I was going to bring it out to a test point but could put in a jumper to an INT pin if wanted... I will be putting in a trimmer cap to adjust the OSC freq (Digi-Key PN 490-2004-1-ND) Does anyone know what the proper way to get the OSC set perfectly..? I don't have a freq counter... Maybe just keep adjusting it and checking... Oh boy... That will take awhile.. Any code to help check all the functions of the RTC would be helpful... It has a timer function inside also.. nice... |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3196 |
Make that the wakeup pin, then you could wake the Micromite from sleep. On second thought, that would interfere with the use of the pin for decoding IR commands. Maybe another jumper for the IR receiver output? Geoff Geoff Graham - http://geoffg.net |
||||
crez Senior Member Joined: 24/10/2012 Location: AustraliaPosts: 152 |
Ive just been reading the datasheet.there are alarm registers for minutes ,hours, days. each register has an enable bit. If only the enable bit for minutes is set for example, an alarm (wakeup in our case) will happen when the minutes hits the specified number. If all three enable bits are set, then the day, hour and minutes must match before a wakeup happens. Alternatively, there is also a timer function which can generate a wakeup after up to 255 seconds or minutes. Maybe this would be easier to get going with fewer registers to write to. David |
||||
vasi Guru Joined: 23/03/2007 Location: RomaniaPosts: 1697 |
I'm working with PCF8583 (I guess is a little better) and now I'm exactly at Alarm functions. Hopefully, I'll get them working (daily alarms and "weekdays" alarms only)... The INT pin is active on low and needs a pull-up resistor (or a microcontroller pin with weak pull-up activated - at least, this is what I'm trying now, as I forgot to include a pull-up on my board). Hobbit name: Togo Toadfoot of Frogmorton Elvish name: Mablung Miriel Beyound Arduino Lang |
||||
Zonker Guru Joined: 18/08/2012 Location: United StatesPosts: 761 |
Good afternoon Gents... Ok.. After some looking around, I think I have made a decision... Since we want to use a socket for the battery, I think I will go with a 10mm cell instead of 20 mm... Also, I have picked out a socket (Digi-Key PN BH401-ND) that is unique in the fact that it has a .1 inch stand off height above the board.. This space can be used to tuck the RTC chip and x-tal underneath the socket, saving space on the board... (sweet)... 2014-05-18_180526_CR1025_10mm_Battery_Holder_BH401-datasheet .pdf Let me know if you guys think something is wrong with the thinking here.. |
||||
vasi Guru Joined: 23/03/2007 Location: RomaniaPosts: 1697 |
Also a real photo helps... Hobbit name: Togo Toadfoot of Frogmorton Elvish name: Mablung Miriel Beyound Arduino Lang |
||||
vasi Guru Joined: 23/03/2007 Location: RomaniaPosts: 1697 |
As it is, it is in permanent short circuit without battery... you have to take care at the design... Hobbit name: Togo Toadfoot of Frogmorton Elvish name: Mablung Miriel Beyound Arduino Lang |
||||
Page 1 of 2 |
Print this page |