13 Replies Latest reply on May 2, 2011 9:56 AM by udayan.umapathi

    RTC_Battery backup

    vijay.subramanian

      hi,

         

      In PSOC3 RTC, what kind of battery should be used for retaining the time and date, and to free run the RTC insided PSOC3,,

         

      I have seen in other comany SoC chips,, they have seapate pins for connecting batteries for RTC, which is inbuilt inside the SoC... pls give a solution for this....

        • 1. Re: RTC_Battery backup
          udayan.umapathi
                
                
          • For RTC is an independent block inside PSoC device. For RTC to be functional the chip needs to be powered the usual way(via the supply pins, Vddd, Vdda). However to have the RTC functioning continuosuly and reduce powere consumption, the device can be put to sleep.
          •     
          • The example project available here demonstrates the same, http://www.cypress.com/?rID=38727
          •     
          • With properly designed board to reduce leakages etc, it is possible to have the RTC functioning in sleep mode with 1uA current consumption.
          •    
             
             

           

             
          • 2. Re: RTC_Battery backup
            vijay.subramanian

            thanks for the suggestions uday,, actually i want to know if the main supply goes off how can i still make function the RTC, whether shall i use a coin size battery .. or anyother battery can  be used.. in the development kit, a 9v battery provision is there,,, in real time field conditions, which battery can be suggested,, please tell me...

            • 3. Re: RTC_Battery backup
              udayan.umapathi

              The RTC in sleep mode consumes about 1 uA, that means PSoC3 with RTC can operate on a coin cell in sleep mode. However when the device comes out of sleep mode, a coin cell may not be able to provide sufficient current. So you may have to switch the power source to have PSoC operational in active mode.

              • 4. Re: RTC_Battery backup
                vijay.subramanian

                actually i am not getting any idea with the earlier responses,, my requirement is like this, external power source will be regularly supplying the power to VDDD and VDDIO pins,, with that  RTC will run continously, if suddenly the power goes off,  the firmware will not run and the RTC will not work,, so i need to use the main power supply and if power goes off i should have some battery power to run atleast the RTC, and if the power comes again the RTC and the firmware should run...

                • 5. Re: RTC_Battery backup
                  udayan.umapathi
                      

                  In PSoC3/PSoC5 there are no dedicated pins to supply the RTC. The RTC is an independent hardware block, it does not need any firmware involvement other than the initialisation code for it to operate. If the chip is powered down, the entire chip operation including the RTC stops. Hence a possible implementation might be to have dual supply, one from the main supply and another from a battery that can drive the RTC. When the main power goes of the dual supply should be able to switch to the battery and PSoC3 can enter sleep mode to reduce power requirement and run on the battery.

                      

                  -U2

                     
                  • 6. Re: RTC_Battery backup
                    vijay.subramanian

                    I was trying to implement my application with both external and battery power supply, for retaining the RTC parameters. i am not able to implement the BOOST CONVERTER LOGIC,, SO CAN U GIVE me SOME application notes for  implementing the boost converter logic, and if available please give me some code examples or design documents. i am working with the CY8CKIT-009 development kit....

                       


                     

                    • 7. Re: RTC_Battery backup
                      udayan.umapathi

                      Hi,

                         

                      We are working an Application Note that details the Boost Converter configuration, Component selection etc. At the moment TRM is the reference manual you can use to learn about the Boost Converter. However following are the steps that you normally need to do to get your Boost converter working:

                         
                            
                      1. Place a Boost converter component on your TopDesign, configure the component for appropriate input voltage(voltage from your battery), output voltage desirable from Boost and switching frequency.
                      2.     
                      3. Hardware changes needed on CY8C38 Family processor module(CY8CKIT-009):
                      4.    
                         
                            
                      • Place R6,R7,R14,R15,R16,R17,R38. All the resistors are zero ohm resistors(it can be a simple solder bubble as well).
                      •     
                      • The inductor and necessary bypass capacitors are already placed on the processor module.
                      •     
                      • Make sure that R37 and R43 are in place. Refer to the Processor module schematic that shows the same.
                      •     
                      • Connect the battery to between Vbat and VSSD terminal
                      •    
                         

                      Your Boost should work with these changes.

                      • 8. Re: RTC_Battery backup
                        vijay.subramanian

                        according to your suggestions i have tried, the boost converter logic is working fine..now please suggest some circuitry for the switching the powersupply from primary(main) to the battery... actually i have searched some ICs which have voltage monitor and back battery options.. but the battery is of 5V.. which is not available and costly also... and we planned to use 1.8v battery to keep the psoc is sleep mode with the help of boost converter.... we need to switch the main powersupply to battery very fastly.. so please suggest some circuitry for switching the powersupply to battery when main power supply is off...

                        • 9. Re: RTC_Battery backup
                          kannan.sadasivam

                          Based on my understanding of the question here, might I suggest some scenarios that might help.

                             

                          1) You can use both the mains supply and battery supply isolated using schotky diodes. Of course you would lose some of the voltage dropping on the diodes but you can always desing your supplies accordingly

                             

                          2) If you want the boost to be used to boost up the battery voltage, you might as well use the boost for a battery input while connecting the boost output to Vdds through a diode. the Vdds can also have a direct connection to the mains supply. The diode would ensure the mains doesnot back power the boost output.

                             

                          3) There is also something interesting that can be done. You would use bigger bulk capacitors from the main supply side. This would delay the voltage dropping quickly when the voltage fails. then you can use the low voltage detecet to enable the boost convertor from the battery side. But even here the isolation using diodes is required.

                          • 10. Re: RTC_Battery backup
                            vijay.subramanian

                            Thanks for ur suggestions, i understood ur suggestions and to implement that, please provide me the information for the threshold voltage used for detecting the low voltage in psoc3, for changing the main power supply to battery supply. please suggest me a voltage supervisor IC, which will suite to our requirement.  we are giving 5V and 3.3V for the I/O  and the psoc3 device operation...

                               

                            waiting for ur reply soon....

                            • 11. Re: RTC_Battery backup
                              udayan.umapathi

                              Hi viji,

                                 

                              What you could do is keep the Boost converter circuit operational as you had done earlier. Now there are two things that you could do,

                                 
                                    
                              1. Connect the battery via a schottky diode to the VBAT terminal. Also connect the main supply to the VBAT terminal via another schottky diode. This was the Boost is always functional and the supplies are isolated. When the main supply goes down, the battery will conduct through the diode and supply the Boost circuit.
                              2.     
                              3. Connect the battery to VBAT terminal. Connect VBOOST to all VDDs(VDDA,VDDD,VDDIOs) via a schottky diode and connect the main supply to the VDDs via another schottky diode. Once the main supply powers down, Boost that is powered by the battery will power the chip.
                              4.    
                                 

                              All you need is two schottky diodes of low drop out and of good carrying current capability.

                              • 12. Re: RTC_Battery backup
                                vijay.subramanian

                                hi u2,

                                   

                                I have tried by connecting both the main powersupply and battery output to the vdda, vddd, vddio, that is working fine.. when power goes off the battery provides the power with the boost converter. and here the problem is i am connecting both the powersupplies, which is a wastage of power..

                                   

                                i need a switching circuitry which will detect the low voltage in main supply and switchs to battery supply and keep the device in active state. so i need the thereshold voltage level for the psoc3, to select the voltage supervisor, and also it would be helpful for us if u suggest some circuit  for fast switching. .. we are in our final stage to finsish our schematic, so give us a perfect solution for this problem....

                                   

                                waiting for ur reply...

                                • 13. Re: RTC_Battery backup
                                  udayan.umapathi

                                  Hi Viji,

                                     

                                  There is one simple solution what could be solve this.

                                     
                                        
                                  • You can connect the main supply to the chip as you have done. And connect this main supply to a resistor divider network. Design the divider network such that the divided voltage is a known voltage(say 1.024 Volt, approx 1 Volt). Connect this to negative input terminal of a comparator on PSoC as shown in picture below. Do not start the Boost converter yet.
                                  •     
                                  • Connect the positive input terminal to VREF component and configure it to have known voltage(1.8 Volts).
                                  •     
                                  • Connect an ISR component at the Comparator output and set it to be rising edge triggered.
                                  •     
                                  • Once the main battery fails, the output of the comparator goes from Zero to One, triggering the interrupt. In the interrupt you can start the Boost operation by calling the API, "BoostConv_Start()".
                                  •     
                                  • Note that you need to put a bulk capacitor(like 470uF) to hold enough charge until the Boost converter starts operating. 
                                  •     
                                  • This way your battery is not drained when the main supply is powering the chip.
                                  •    
                                     

                                  Please try it this if this soultion is fine. Else i can suggest you another method which requires an external component.