Shop OBEX P1 Docs P2 Docs Learn Events
QS W5200 RTC drift — Parallax Forums

QS W5200 RTC drift

Hello,

I'm using the w5200 for QS and my RTC is experiencing some significant time drifts, is it possible to calibrate the rtc on the w5200? The rtc is running fast up to about 15 seconds per day at room temperature ~20 Deg C. From looking at the seiko S-35390A datasheet if anything temperature effects should have a slowing down effect on the rtc , but in my case it speeding up.

"Caution 1. The oscillation frequency varies depending on the ambient temperature and power supply
voltage. Refer to " Characteristics (Typical Data)".
2. The 32.768 kHz crystal oscillator operates more slowly at an operating temperature higher or
lower than +20°C to +25°C. Therefore, it is recommended to set the oscillator to operate
slightly faster at normal temperature


Do i need to adjust the capacitor values on the board , which would involve desoldering and soldering to correct this as its quite a drift?

Comments

  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2015-09-07 09:29
    That's why I use the DS3231 modules as most RTCs really need to be trimmed and there are some that can be trimmed in software. The Sieko part is a strange chip, it's not even proper I2C but you could measure the drift against the Prop and do a correction once a day etc. Alternatively here is a simple method you can employ which I will demonstrate from a terminal. From the listing you can see that without any complicated protocol and if you are not worried about milliseconds then this method that just reads the GMT time from a simple HTTP GET response should work fine. Just parse for the line that starts with "Date:".
    peter@peter-L702X-LM17 ~ $ telnet google.com 80
    Trying 216.58.220.110...
    Connected to google.com.
    Escape character is '^]'.
    get /
    HTTP/1.0 400 Bad Request
    Content-Type: text/html; charset=UTF-8
    Content-Length: 1504
    Date: Mon, 07 Sep 2015 09:31:39 GMT
    Server: GFE/2.0
    
    <!DOCTYPE html>
    <html lang=en>
      <meta charset=utf-8>
      <meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
      <title>Error 400 (Bad Request)!!1</title>
      <style>
        *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/logos/errorpage/error_logo-150x54.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/logos/errorpage/error_logo-150x54-2x.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/logos/errorpage/error_logo-150x54-2x.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/logos/errorpage/error_logo-150x54-2x.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}
      </style>
      <a href=//www.google.com/><span id=logo aria-label=Google></span></a>
      <p><b>400.</b> <ins>That’s an error.</ins>
      <p>Your client has issued a malformed or illegal request.  <ins>That’s all we know.</ins>
    Connection closed by foreign host.
    
  • Peter ,

    Thanks for the reply , yeah the daily correction might be my only viable option for this project as i won't have an Internet connection so syncing via Http is not an option. The QS W5200 is connected directly to a smart camera and the time is for Display and logging purposes so I will look at first option for now.
    Thanks for the heads up on the DS3231 modules also

  • jmgjmg Posts: 15,155
    oodes wrote: »
    I'm using the w5200 for QS and my RTC is experiencing some significant time drifts, is it possible to calibrate the rtc on the w5200? The rtc is running fast up to about 15 seconds per day at room temperature ~20 Deg C. From looking at the seiko S-35390A datasheet if anything temperature effects should have a slowing down effect on the rtc , but in my case it speeding up.

    Do i need to adjust the capacitor values on the board , which would involve desoldering and soldering to correct this as its quite a drift?

    That's around 174ppm, which sounds high.
    How many units have you checked, and did the original designer properly select the capacitors for the xtal used ?

  • Yes I know its high , that's why i noticed it . I have tried 2 units now, I thought it might have been a faulty Unit at first but after running the second Unit for the last week the same outcome is happening.
    and did the original designer properly select the capacitors for the xtal used ?

    That's a question for Parallax as its their board :D

    I'm just looking now at the clock correction function for the S-35390A, I should be able to use that to correct the clock?
    1178 x 512 - 51K
  • jmgjmg Posts: 15,155
    edited 2015-09-07 23:02
    oodes wrote: »
    That's a question for Parallax as its their board :D

    Certainly someone in Parallax should check this, if all units are skewed one way, do you have accurate numbers on all units tested ?

    Even the cheapest Crystals should be ±20ppm at room temp, but they do have to be correctly load-cap matched.

    The recommended crystal characteristic values are, C L value (load capacitance) = 6 pF, R 1 value (equivalent serial resistance) = 50 k Ω max.
    oodes wrote: »
    I'm just looking now at the clock correction function for the S-35390A, I should be able to use that to correct the clock?

    Yes, but the skew you quote is pushed to almost the trim limit.
  • Yes I have 5 of these Units and everyone of them is running at around 1.000192Hz when I output a 1Hz signal from the INT1 pin which does indeed push the trim limit to the maximum.
    I'm just testing them again with adjusted clock correction value which appears to be working so far but yes I do agree its an excessive amount of drift.
    I know with the provided code available for download with the W5200 units the real-time clocks are synced via SNTP which is fine if your using an Internet connection and this is why I probably didnt notice it before.
  • I recently purchased a Propeller Professional Development board also and noticed that they are using a DS1302 rtc on this and not the Sieko S-35390A one, maybe this is why.
Sign In or Register to comment.