The case of the mysterious CR2032 RTC-less(?) Chinese alarm clock - Page 1
Forum section: electronics / beginners

author: John_doe
author_rank: Regular Contributor
timestamp: February 23, 2021, 08:39:07 am
content: Howdy.The story in a nutshell: Almost two years ago I bought an LED alarm clock from Aliexpress. Specifically, this one:https://www.aliexpress.com/item/32849971727.htmlThe item is unavailable but there are many similar clocks:https://www.aliexpress.com/item/1005001774978676.htmlhttps://www.aliexpress.com/item/1005001895297759.htmlhttps://www.aliexpress.com/item/32966124956.htmlWhen I got it, I connected it to power (USB wall wart) and briefly saw that it's working and then put it in storage.Fast forward to a few days ago, I took it out of storage and as a quick way to check the CR2032 battery which is supposed to keep the time set when there is no power, I connected it to a USB charger, but it was reset (boot animation and then 12:00) so then I checked the battery voltage, it was 2.88V which seemed OK to me, but nevertheless I put in a new 3.3v CR2032 and still the clock was reset upon disconnection from power (but otherwise works).I honestly don't remember if it worked like this 2 years ago or not. Sorry.So I opened it, hoping maybe the problem was as simple as the CR2032 cell holder disconnected from the RTC chip. Alas, There is no separate RTC chip, and I really don't understand how it's supposed to keep the time when unpowered.(Click to open link to larger image)(Click to open link to larger image)Only ICs are the 6 BJTs (three S8550 and three S8050) and the SSOP24 which is either an MCU or a specialized clock IC (my money is on MCU).From the CR2032 positive it goes to D1 (the schottky marked S4) and then to VDD (pin 24). The USB Vbus goes through 2 diodes (D2 and D3) and then to VDD as well.So... The MCU is supposed to go into sleep/standby when VDD is under, E.G. 3.3v but keep the set time? Because it doesn't do that...Any thoughts on what's wrong?[Edit 20210223 12:48UTC]I forgot to upload the instruction booklet that came with the clock:(Click to open link to larger image)

author: ledtester
author_rank: Super Contributor
timestamp: February 23, 2021, 08:46:09 am
content: QuoteThe microcontroller can run off of the CR2032 and keep time when there is no power.

author: ledtester
author_rank: Super Contributor
timestamp: February 23, 2021, 09:02:02 am
content: I would check to see if the "S4" diode is good. If it is open circuit the big chip (presumably the mcu) wouldn't get any power from the battery.Also check if Vbatt(-) is connected to GND. If it isn't that could also prevent the mcu from getting battery power.I'd also reflow that Vbatt(+) solder pad.

author: John_doe
author_rank: Regular Contributor
timestamp: February 23, 2021, 12:57:13 pm
content: Thank you ledtester, and I'm sorry I wasn't clear enough (I was trying to keep the OP short), but all diodes and solder connections were checked and I made sure to measure VDD to GNDof the ICwhen the battery was connected - It was around 2.5V.Sorry, it's not going to be this easy (if it would, I wouldn't have called it a mystery)

author: amyk
author_rank: Super Contributor
timestamp: February 23, 2021, 02:32:55 pm
content: The MCU does the timekeeping. There's probably a 32K crystal (other side of board) connected to pins 2 and 3; and with pin 4 being VPP, that makes it likely the MCU is ahttp://ixapps.ixys.com/DataSheet/S3F8S28_S3F8S24-Datasheet.pdf.

author: John_doe
author_rank: Regular Contributor
timestamp: February 23, 2021, 03:57:24 pm
content: Yes, there is a crystal on the other side (marked x1 in the photo), also an electrolytic cap (above the link marked D4), a thermistor (TH1 in reverse), an electret mic (under R26), and a piezo speaker (BUZZ! in reverse), but all of these are unrelated to the problem...It seems like I really haven't been able to explain the problem here... I can understand how the clock works - That's easy. What I don't understand is:Ifthe time save function is implemented in software rather than hardware (as I speculated in my OP), than why doesn't it work? That is the mystery.P.S. Zilog are still alive? Wow, I remember them from their infamous Z80. At one point this thing was EVERYWHERE.

author: 0xdeadbeef
author_rank: Super Contributor
timestamp: February 23, 2021, 04:15:27 pm
content: Probably I'm saying something obvious, but many MCUs (e.g. NXP LPC15xx) have a separate battery supply pin that is used to keep only the RTC domain alive which uses a 32kHz XTAL compared to the main oscillator with much higher frequency. Of course without a proper datasheet it will be hard to tell if the used MCU has a functionality like this and what voltage supply it needs etc.Maybe the voltage drop on the diode is too high to deliver the minimum voltage for the RTC to work. Like Chinese manufacturers tend to change components on a daily basis if something is cheaper or the availability is better. There's also a certain chance that this design could never work. I faintly recall that ten years (or so) ago Siglent built a function generator with a front USB connector that wasn't functional at all.

author: ledtester
author_rank: Super Contributor
timestamp: February 23, 2021, 04:39:19 pm
content: Just to rule out your CR2032 I would try two fresh AA batteries in place of the CR2032.QuoteIn sleep mode the MCU should be drawing microamps or even nanoamps. I would therefore expect Vdd of the MCU to be very close to Vbatt+ because the diode drop at those low currents should be extremely small.

author: alsetalokin4017
author_rank: Super Contributor
timestamp: February 23, 2021, 05:07:05 pm
content: It may be wrong to say so definitely that the crystal is unrelated to the problem. It may be, but since it is part of the MCU's RTC functionality, don't rule it out until you... actually rule it out.

author: alsetalokin4017
author_rank: Super Contributor
timestamp: February 23, 2021, 05:12:28 pm
content: Curiously... I am having the same or similar problem with my ScopeClock. It also has a backup clock battery that tests good, and yet it does not keep time when the unit is powered down and always starts up needing to be set. It has a discrete RTC chip NXP8563P, which I have replaced just in case, but it still does the same thing.

author: John_doe
author_rank: Regular Contributor
timestamp: February 23, 2021, 10:10:41 pm
content: Well, "mystery" solved (wasn't much of a mystery).TL;DR: The problem was a bad battery + poor design (IMHO).I provided 3.1v from an adjustable buck converter (XL4015E1 based) to the CR2032 pins as per ledtester's suggestion and the problem was not present, then I obtained and put in an even newer 3.37V battery and that one did work.In my defense, what threw me off were 2 things: First, I measured the 3.3v battery in circuit and got 2.8v (that is, under load, meaning USB unconnected) and IMHO a 2.8v CR2032 is not dead. Not even close. I'm sorry, but that's just poor design, not to mention the high current that makes the voltage drop in the first place (a dedicated RTC would draw a fraction of that).The second thing that threw me off, is that I actually wanted to eliminate the battery and test in the first place but I was too lazy to solder wires to the battery pins, so instead I connected the USB lead to the adjustable buck converter (it has a USB output) and lowered the voltage until the LEDs turned off, then raised it and observed that the clock was reset. My thinking was that if both USB-in and battery voltage are connected to VDD (USB is minus the diode Vdrop) than is should be the same. Alas, I missed the track going from USB-in through R2 to pin4 of the MCU (which probably tells it when power is connected). So that one was my bad.alsetalokin4017, is your scope clock a commercial product, like the Dutchtronix clock? If so, maybe it's worth googling the problem (I couldn't do that because Chinese no-name product).

author: alsetalokin4017
author_rank: Super Contributor
timestamp: February 24, 2021, 12:48:56 am
content: It is exactly the Dutchtronix product. I purchased the PCB and the programmed mcu from him and assembled it. I just recently brought it out of storage to build it into a wooden case and discovered it wasn't keeping time when powered down. I'm pretty sure it did, when I first built it. Like yours, the battery was down to 2.8 V but that is supposed to be plenty to keep the rtc running. I have not yet tried subbing in a fresh battery but based on your experience it sounds like it is time to do so.

author: John_doe
author_rank: Regular Contributor
timestamp: February 24, 2021, 08:19:41 pm
content: As evidenced by this thread, I am by no means an expert, but still, I'd highly doubt that your battery is the culprit if it measures 2.8v when the PCB is not powered. ThePCF8563claims 1v operation, and the guy that designed your clock didn't have to cut every possible corner in order to survive in a viciously competitive market.And, to repeat myself, a 2.8v CR2032 IS NOT DEAD:See attached image (source)If you find the time to troubleshoot and solve the problem, please do keep us posted. I'm curious.