• Home
  • Tutorials
  • What Should We Do If The RTC Clock Has An Occasional Delay Or Timeout?

    If your RTC clock isn’t giving you same results each time you use it, then there is a possibility of irregular delays or timeouts in the circuit. In a very warm working environment, RTC clocks have sporadic delays or timeouts. RTC circuit designing is simple, but it is very difficult to ensure the following while designing it:

    • Accuracy of the RTC clock
    • Quickly locate and detect the actual cause of delays or timeouts

    Let’s take a situation where RTC clock is showing unexpected results because of irregular delays and/or timeouts and how NXP’s PCF8563 RTC chip provides a solution to this issue.


    PCF8563 schematic symbols

    We will do a step-by-step analysis of the situation:

    1. The industrial control board for the RTC clock uses NXP’s PCF8563 RTC chip solution. Its output accuracy depends on whether the clock frequency of the external quartz crystal output is accurate. The output frequency of the quartz crystal itself has a certain error. At a normal temperature of 25°C, the frequency error is ±20 ppm, and the average error is up to 5 minutes/year. As time increases, slow changes in crystal circuit components can cause long-term frequency drift. Also, when the external temperature is extreme, the clock oscillation circuit may behave abnormally, affecting the normal timing of the RTC. The solution to this problem is an external 32.768kHz quartz crystal and capacitor.
    2. The power supply battery of the industrial control board RTC chip selects the lithium manganese dioxide battery of model CR2032. The theoretical operating temperature range of the battery is -30°C ~ 60° Similar to other lithium batteries, if the external temperature is extreme, it will change the internal chemical reaction. This may cause a decrease in battery life or a risk of voltage abnormality, thus affecting the normal operation of the RTC circuit.

    We should implement the following solutions to have a long-term and high-precision guarantee at extreme temperatures:

    1. Select an RTC chip with temperature compensation such as EPSON’s RX-8025T. The chip is a built-in 32.768kHz crystal with high-precision temperature compensation. Its output waveform is temperature-compensated, which can improve the stability and accuracy of the RTC. Since we have subjected the embedded crystal to high-temperature ageing treatment, it has better stability than the independent crystal. Also, the accuracy error is less than ±5ppm between -40°C to 85°
    2. Select an industrial-grade battery (for example, FANSO ER14505). In theory, it can work normally within the working temperature range of -40°C ~ 85°C. As shown in Figure 1, the RTC chip operating power comprises the system VCC_3.3 power supply and battery power. We design this power supply circuit to use the VCC_3.3 power supply converted from the external power supply via the LDO when the RTC clock is operating. When the external power supply stops supplying power, it automatically switches to the battery power supply. This will ensure that the RTC chip will work normally and extend battery life. The design of this circuit is:
    3. Power switching circuit design – According to the datasheet of the RX-8025T chip, the operating voltage range is 1.7V to 5.5V. The system power supply is 3.3V and the industrial battery ER14505 voltage is 3.6V. The forward conduction characteristic of the diode can automatically switch the system power. And the power supply status of the battery power, so that the RTC chip can maintain normal working conditions. Since the system power supply voltage is 3.3V and the battery voltage is 3.6V. If we use the system power supply, then the voltage after the system power supply passes through the diode is higher than the voltage after the battery passes through the diode so we can prioritize the system power supply. It can be seen by selecting two diodes with different tube voltage drops. The forward voltage of the diode SS14 is about 0.2V, and the forward voltage of the 1N4148 is about 0.7V. Then, connect an SS14 diode in series on the system power line, and we connect a 1N4148 diode in series on the battery power supply line; Thus, when externally supplied, the voltage value got by the system power supply after passing through SS14 is greater than the voltage value after the battery passes through 1N4148. It supplies the main power supply; When the external power supply stops supplying power, the circuit automatically switches to the battery power supply state.
    4. Voltage lag processing – The ER14505 battery is a lithium thionyl chloride battery with a supply voltage of 3.6V and a capacity of 2700mAh; Its own capacity loss is small and negligible. With a standby current of 20uA, we can power the battery for about 15 years. However, in practical applications, it is seen that after the long-term power supply of the system power supply; the voltage is insufficient when the battery is suddenly switched to the battery power supply, resulting in an abnormality of the RTC clock. The root cause is that the battery is passivated. When the RTC chip is powered by the system power supply, the lithium battery is equivalent to an open circuit. If the battery is idle for a long time, it will generate a passivation film inside the battery, and when the lithium battery is powered, if the hysteresis voltage is lower than the clock chip. The operating voltage, then the clock chip will be completely “lossless”, the system clock will return to the initial time, causing the clock to work abnormally. To eliminate the effects of this phenomenon, we can eliminate this effect by adding a storage capacitor to the power supply of the clock chip.
    5. Control passivation film generation – The passivation film of the battery is formed because the battery is left in an open state for a long time, so we can keep the battery in a small current discharge operation state, which can slow down the generation of the passivation film of the battery. By selecting the resistance value, the battery is in a discharged state. For example, it controls the discharge current at a standby current of about 20uA, so that the battery capacity suffices to support for about 15 years, and the passivation film is not too thick and the voltage lag causes it to complete RX-8025T. Power loss affects the normal operation of the RTC clock. When the system power supply, Q1 is turned on, and the battery BT1, R1 and Q1 form a loop to realize the discharge state of the battery; When the system power supply stops supplying power, Q1 ends, and the battery supplies power to the RTC chip U1 through D2. The measured self-discharge current of the clock chip and the internal resistance of the battery is about 8uA, then the resistance of the resistor R1 that we need to control is 3.6V/(20-8)uA=300kV/A.
    6. PCB design – In the PCB layout, we should note that the I2C trace of the RX-8052T and the MCU should be as short as possible, and away from the high-frequency, high-current signal lines. The bypass capacitor should also be close to the power supply end of the RX-8025T, and increase the area of the ground copper to prevent interference.


    DISQUS: 1