Seconds ticking, but minutes not updating

More
3 months 2 weeks ago #12031 by Duane
OK, this one has me a little puzzled.

I am building 3 more of the Wemos IN12 clocks as presents. I finished the main boards last night, including programming the Wemos processors (version 8 of the firmware). I am using the display board from my original clock to test the 3 new clocks as I don't have the 3 new display boards done yet.

2 of the boards check out fine, but one of the boards has a problem which is a head scratcher. I powered up the board, connected to it over WiFi and setup my access point. On restarting, that board connects to the Wifi fine, and downloads the proper time from an NTP server (I have not installed the RTC battery on any of the boards at this point, so I know it is getting the current time from the NTP server).

The odd behavior is that this board will count the seconds up to 59 seconds, but then the clock seems to pause slightly (the colon blinking pauses) and does not increment the minute. At this point, the seconds do not reset to zero, but some value around 30 seconds, and starts counting from there. This cycle repeats with the clock never updating the minutes. In case you are wondering, I am watching the seconds by pressing the pushbutton which switches the 4 digit display from hh:mm to mm:ss.

I thought it was a glitch programming the Wemos board, but I swapped the Wemos processor out of one of the other modules and the 'bad board' still does the same thing. I also swapped out the socketted K155id1, 74HC595, and DS1307 RTC chips and the board still does the same thing.

I would appreciate any hints about what might be going on, and how to debug the problem. I plan on scrubbing the solder side of the board with a toothbrush and some acetone to make sure there are no microscopic solder bridges.

Also, it is possible to get the schematic for the clock? That might help my poking around.

- Bill

Please Log in or Create an account to join the conversation.

More
3 months 2 weeks ago #12032 by Ian
This is definitely something to do with the RTC. The reason I say that is this part of the code:
// ************************************************************
// Called once per minute
// ************************************************************
void performOncePerMinuteProcessing() {
  debugMsg("---> OncePerMinuteProcessing");

  debugMsg("nu: " + String(ntpAsync.getNextUpdate(nowMillis)));

  // Set the internal time to the time from the RTC even if we are still in
  // NTP valid time. This is more accurate than using the internal time source
  getRTCTime(true);

  // Usage stats
  uptimeMins++;

  if (!blankTubes) {
    tubeOnTimeMins++;
  }
}

So on the top of every minute we're going to get the time from the RTC, and if that read goes wrong, who knows what is going to come back.

Try checking the resistors R6 and R7 (I2C pullups) and the crystal.

Here's the schematic:

www.nixieclock.biz/Downloads/4-Digit-Main-Schematic.pdf

If it doesn't get solved, we can also make a little program to test the RTC via the serial port...

Please Log in or Create an account to join the conversation.

More
3 months 2 weeks ago #12034 by Duane
Ian, you're good!

It looks like it was a bad crystal. Had a little trouble clearing the holes with the solder sucker because everything is tight in that area, but once I cleared it out and put a new crystal in, everything started working fine.

I have a number of these crystals left over from when I was a designer working on time-based authentication tokens. These were excess units sent to us from manufacturers to test for use in the tokens. It looks like maybe some are bad. I will have to make a small test jig for sorting them into good and bad units.

Thanks for the quick response. On to making the display boards, and soldering 144 pins for the nixies on the 3 clocks. Now where is that plasma ball nixie test gear...

- Bill

Please Log in or Create an account to join the conversation.

More
2 months 1 week ago #12164 by Duane
A minor update on this issue. I had the problem happen again on one of the 3 clock kits I was building as a gift. This time, replacing the crystal did not help.

I think the problem was the flux from soldering the connections to the crystal or RTC chip. It is possible that the flux is changing the capacitance of the chip-crystal connection enough that the crystal would not start.

I recommend that people be sure to scrub the RTC area and crystal area with flux cleaner after soldering, to help avoid this problem.

- Bill

Please Log in or Create an account to join the conversation.

More
2 months 1 week ago #12165 by Ty_Eeberfest
Yep, I don't doubt for a moment that residual flux can alter the load capacitance on the crystal badly enough to cause problems. I'm constantly telling people to scrub boards with IPA or, better yet if you can get it, real flux remover. Just because the solder says it contains "no clean" flux doesn't mean you shouldn't clean the board anyway. No such thing as "no clean" flux in my rather pedantic opinion.

Look into it later when the dust is clearing off the crater.

Please Log in or Create an account to join the conversation.

Time to create page: 0.102 seconds
Go to top
JSN Boot template designed by JoomlaShine.com