Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® 3 > RTC with PSOC3

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



RTC with PSOC3
Moderator:
RKRM

Post Reply
Follow this topic



RTC with PSOC3

sivananda posted on 07 Nov 2012 12:57 AM PST
Top Contributor
58 Forum Posts

 hi 

      I would like to use RTC component of PSOC3 to implement the time and date.... i am using CY8CKIT-030,in which a 32.768KHZ ECO already exists..............now i am using USB connector to power on my kit....but, after completion of my design i am planning to use 9V/12V power adaptor to give power supply to my kit.....

 From a few  documents i red that there are four different power modes are available (ACTIVE, ALTERNATE ACTIVE, SLEEP and HIBERNATE) but, all the four power modes requires a continuous power supply and depending on the mode the amount of power consumption may vary......

If i give powersupply  from AC 220V, mains supply (with the help of 9V/12V DC adaptor)....i could give it whenever i am in need to utilize the device......i could'nt give the power continuously (many of the interrupts may expect from Indian electricity board)........then how my RTC clock internally run, and how it will give the correct time when i turned it On after some time.....

do i need to use additional battery back up for RTC?

previously, when i was working with PSOC1, i did the same..... i interfaced DS1307, to which i have given 3.3v  backup power from LI cell......and i have drawn 5V DC supply from 220 AC (with the help of regulators) and utilized these 5V supply to run the entire designed system..

 

can any one help me how to run  RTC continuously, even after the system turned off.




Re: RTC with PSOC3

hli posted on 07 Nov 2012 01:58 AM PST
Top Contributor
675 Forum Posts

When you use the PSOC-internal RTC for keeping time, you need to ensure that the PSoC runs continously. You can do this by adding a backup battery - but then you should make sure the PSoC runs in sleep mode to ensure long battery life.

Another option is to use an external RTC, and back this up with a battery (or maybe only a large capacitor). For example the PCF2129A from NXP draw only 650nA in backup mode, and is internally temperature-compensated. It should last several weeks from a 1000µF capacitor. This might be a better option since it is more accurate, and doesnÄt need power management in the PSoC.



Re: RTC with PSOC3

danaaknight posted on 07 Nov 2012 03:39 AM PST
Top Contributor
1773 Forum Posts

Use a super capacitor -

 

http://en.wikipedia.org/wiki/Electric_double-layer_capacitor

 

http://en.wikipedia.org/wiki/Electric_double-layer_capacitor

 

Regards, Dana.



Re: RTC with PSOC3

Bob Marlowe posted on 07 Nov 2012 03:43 AM PST
Top Contributor
1768 Forum Posts

Obviously two capacitors are better than one (broad smile)

 

Bob



Re: RTC with PSOC3

danaaknight posted on 07 Nov 2012 03:48 AM PST
Top Contributor
1773 Forum Posts

Application info -

 

http://www.edn.com/file/18347-268379.pdf

 

Regards, Dana.



Re: RTC with PSOC3

PSoC Rocks posted on 08 Nov 2012 01:07 AM PST
Top Contributor
128 Forum Posts

sivananda

http://www.cypress.com/?id=4&rID=51941 -> Refer to this KB article. If you want to calculate the value of Capacitor you want to use to run RTC even when the power supply if OFF, you need to know the following parameters:

1. What is the duration of time for which main power supply will be OFF?

2. What is the power consumption of the device during active & during sleep modes?

3. How much time does it take for you to detect the failure of main supply and move onto low power mode?

4. Based on the above points, you can calculate the average current you need to provide the device for continuous operation. Also find out the peak current required. Calculate the value of Capacitor which can provide this peak current and has the enough amount of energy stored in it.



Re: RTC with PSOC3

hli posted on 08 Nov 2012 03:04 AM PST
Top Contributor
675 Forum Posts

But be aware that when using a super cap, its leakage current might be higher that the current needed by the RTC (several microamps are not uncommon for larger caps). Also, there caps often have a rather high impedance and can be used only with small currents (I have one at home which is rated only for 10 microamps and has an internal resistance of 1k).



Re: RTC with PSOC3

danaaknight posted on 08 Nov 2012 05:05 AM PST
Top Contributor
1773 Forum Posts

There are super caps with mOhm ESR, and low uA self discharge.

 

Some reference material -

 

http://www.glyn.co.nz/downloads/documents/Maxwell/ultracap_product_guide.pdf

 

A calculator

 

http://www.maximintegrated.com/design/tools/calculators/product-design/supercap.cfm

 

So in short Q = CV, I = C * dV/dT, use this equation to get a size of C needed. I is sum

of PSOC sleep and capacitor self discharge. Hot values generally worst case. dT is how long

you want cap to sustain PSOC in sleep. C is a f(V) and a f(T), so use min value in your

calculations as worst case on the bacvkup side. Max value for when you are charging C.

dV is fully charged - PSOC min operating V in sleep.

 

The other issue is calculating how long it will take in your circuit to charge the super cap.

 

Panasonic, NEC-Tokin, Cooper, Maxwell vendors.

 

Regards, Dana.

 



Re: RTC with PSOC3

hli posted on 08 Nov 2012 11:45 AM PST
Top Contributor
675 Forum Posts

Oh, I know that they exist. It's just something you need to check beforehand.

But OTOH, it might be simpler to just connect a CR2032 or so to the battery input of the RTC - no hassle with charging and it will last several years.






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Spec No: None; Sunset Owner: GRAA; Secondary Owner: RAIK; Sunset Date: 01/01/20