In a very warm working environment, the RTC clock occasionally experiences delays or timeouts. A mature RTC circuit design may seem simple, but how can we ensure the accuracy of the RTC clock? When occasional anomalies occur, how can we quickly locate and resolve the issues? This article will share a case study.
The industrial control board uses the NXP PCF8563 RTC chip solution. During the environmental temperature baseline testing in R&D, the RTC clock experienced occasional delays or advances, prompting a series of problem localization efforts.
1. The industrial control board uses the NXP PCF8563 RTC chip solution, which includes an external 32.768kHz quartz crystal and capacitors. The output accuracy of this RTC chip depends on whether the external quartz crystal outputs the clock frequency accurately.
The quartz crystal itself has a certain frequency error. At room temperature (25°C), the frequency error is ±20ppm, with an average error of up to 5 minutes per year. Additionally, over time, the slow changes in the crystal circuit components can cause long-term frequency drift. Furthermore, under extreme external temperatures, the clock oscillation loop may behave abnormally, affecting the normal timing of the RTC.
2. The power supply battery for the RTC chip on the industrial control board is a CR2032 lithium manganese dioxide battery, with a theoretical operating temperature range of -30°C to 60°C.
Like other lithium batteries, extreme external temperatures can alter its internal chemical reactions, leading to reduced battery life or risks of abnormal voltage, thus affecting the normal operation of the RTC circuit.
Figure 1: PCF8563 Reference Circuit Diagram
For long-term high precision assurance at extreme temperatures, the following solutions are available:
1. Choose RTC chips with temperature compensation, such as EPSON’s RX-8025T.This chip has a built-in 32.768kHz crystal and possesses high precision temperature compensation functions. The output waveforms are calibrated for temperature compensation, which enhances the stability and accuracy of the RTC. Since the embedded crystal has undergone high-temperature aging treatment, it has better stability than independent crystals, with accuracy errors of less than ±5ppm in the range of -40°C to 85°C.
2. Choose industrial-grade batteries (e.g., FANSO ER14505). In theory, it can operate normally within a working temperature range of -40°C to 85°C. The reference circuit diagram is shown in Figure 2:
Figure 2: RX-8025T Reference Circuit Diagram
As shown in Figure 2, the power supply for the RTC chip is composed of the system VCC_3.3 power supply and the battery power supply. The design of this power supply circuit is to use the external power supply through LDO to convert to VCC_3.3 when the external power is supplied, and automatically switch to battery power when the external power supply stops. This ensures that the RTC chip can continue to operate normally while extending the battery life.
The design of this circuit is described as follows:
According to the RX-8025T chip’s datasheet:
-
Its operating voltage range is from 1.7V to 5.5V;
-
The system power supply is 3.3V, and the industrial-grade battery ER14505 voltage is 3.6V;
-
It can automatically switch the power supply state between the system power and battery power using the forward conduction characteristics of diodes, ensuring that the RTC chip can maintain normal operation.
Since the system power voltage is 3.3V and the battery voltage is 3.6V; to prioritize the use of the system power, the voltage after the system power passes through the diode must be higher than the voltage after the battery passes through the diode to ensure the system power works first.
This can be achieved by choosing two diodes with different forward voltage drops. The forward conduction voltage of diode SS14 is about 0.2V, while that of 1N4148 is about 0.7V. Therefore, a SS14 diode can be connected in series on the system power line, while a 1N4148 diode can be connected in series on the battery power line; thus, when external power is supplied, the voltage obtained by the system power after SS14 will be greater than the voltage obtained by the battery after 1N4148, and the main power supply will provide power. When the external power supply stops, the circuit automatically switches to battery power supply mode.
Figure 3: Power Switching Circuit
The ER14505 battery is a lithium thionyl chloride battery with a supply voltage of 3.6V and a capacity of 2700mAh; its self-discharge capacity is extremely low and can be ignored. Calculating with a standby current of 20uA, the battery can supply power for about 15 years.
However, in practical applications, it has been found that after long-term power supply from the system power, switching suddenly to battery power can result in insufficient voltage, leading to abnormal RTC clock behavior. The fundamental reason is the passivation of the battery.
When the RTC chip is powered by the system power, the lithium battery is essentially idle and open circuit. If the battery is idle for too long, a passivation film will form inside the battery, and when it switches to lithium battery power, if the lag voltage is lower than the operating voltage of the clock chip, the clock chip will completely “lose power,” and the system clock will revert to the initial time, causing abnormal clock operation. To eliminate the impact of this phenomenon, we can add a storage capacitor to the power supply of the clock chip to mitigate this effect.
Figure 4: Voltage Hysteresis Processing Circuit Diagram
The passivation film of the battery forms due to the battery being in an idle open circuit state for an extended period, so we can keep the battery in a small current discharge working state, which can slow down the formation of the passivation film. By selecting an appropriate resistor value, we can keep the battery in discharge mode, for example, controlling the discharge current at around 20uA for standby, allowing the battery capacity to support about 15 years while preventing excessive thickness of the passivation film that could result in voltage hysteresis, leading to complete power loss of the RX-8025T and affecting the normal operation of the RTC clock.
-
When the system power is supplied, Q1 conducts, forming a loop with the battery BT1, R1, and Q1, achieving a battery discharge state;
-
When the system power stops supplying power, Q1 cuts off, and the battery powers the RTC chip U1 through D2.
The measured self-discharge current of the clock chip and battery is about 8uA, so the resistance value R1 we need to control is 3.6V/(20-8)uA=300k.
Figure 5: Control Passivation Film Circuit Diagram
During PCB layout, it is important to keep the I2C traces between the RX-8052T and MCU as short as possible and away from high-frequency and high-current signal lines. Additionally, bypass capacitors should be placed close to the power supply end of the RX-8025T, and the area of the ground plane should be increased to prevent interference.
ZLG Zhiyuan Electronics has accumulated nearly twenty years of design experience in embedded products, ensuring product stability in various aspects such as RTC clocks, power management, ESD protection circuits, and various communication interfaces. Since 2001, ZLG has gradually mastered the application technologies of ARM7, ARM9, Cortex-A7, A8, A9, M7, and the cutting-edge A53 ARM architecture, offering a full range of industrial-grade ARM core boards and industrial control computers.
At the same time, based on our understanding and accumulation of embedded technology, we have independently developed the next-generation software development platform—AWorks real-time operating system, helping users quickly achieve product development based on a stable hardware and software platform. Products developed based on ZLG industrial-grade core boards/industrial control boards have been widely used in power, rail transportation, industrial sites, medical fields, and other scenarios with stringent reliability requirements, continuously providing comprehensive industry application solutions for various sectors.
For any inquiries, please add ZLG official customer service WeChat: zlgmcu-888.
ZLG Zhiyuan Electronics Introduction
Guangzhou ZLG Electronics Co., Ltd. was established in 2001 and is a nationally recognized high-tech enterprise and the Engineering Technology Research and Development Center for High-end Industrial Control Measurement Instruments in Guangdong Province.
Vision: To become a leading enterprise in the industrial internet ecosystem
We design high value-added modules, boards, and high-end measuring instruments using “chip + AWorks software platform,” connecting to the ZWS IoT cloud through wired and wireless interfaces for big data processing, forming an industrial internet ecosystem.
Mission: To advance the process of China’s industrial internet with leading technology
Values: Professionalism and focus to achieve dreams
Leave a Comment
Your email address will not be published. Required fields are marked *