adafruit / Adafruit-Adalogger-FeatherWing-PCB

PCB files for the Adalogger FeatherWing
Other
3 stars 4 forks source link

Lost clock on power loss #1

Closed ericbaril72 closed 7 years ago

ericbaril72 commented 7 years ago

Hello Adafruit, after checking into most forums and validating a few theories on the facts at end--> When used with the Adafruit M0-Winc1500 feather board the PCF8523 RTC looses time on power loss ( either USB or Lithium Battery, not the Coin CR cell of course ).

I decided to use an external RTC mainly to avoid loosing time in case of software errors ( WDT reset, manual reset, accidental battery unplug,) Arduino SAMD21 Bootloader does not maintain RTC operation ( will create large offset over time )

--> Solution as per PCF spec sheet and validated on 10+ boards being continously resetted, re flashed, unpowered AND wearing ESD prone clothing ) Page 54 of the spec sheet --> 1k resistor +3.3uF capacitor at the inputVdd of the PCF8523.

Sould I EAGLE -- Clone / update / Pull request ? or do you beleive the PCB should stay as-is ? <0.06$ price increase including pick-and-place.

Stop "loosing time" even when unplugging power while write on SDcard

ladyada commented 7 years ago

i dont see why it wouldnt lose time on power loss? the RTC requires a coin cell. are you not including the coin cell?

ericbaril72 commented 7 years ago

Come On ! Yes the coin cell is brand new, reputable brand and voltage is measured.

The problem is with the rate of fall of Vdd. I am using the adalogger along the M0-feather Winc1500.

On power loss, vdd falls very quickly during operation ( M0, Sd card, ...) and pcf8523 doesn't switch to coin cell operation fast-enough.

It may work fine on other Feather MCU operation. The proposed HW change is based on the PCF spec sheet recommandation and would increase the reliability of the adalogger RTC for a wider usage set.

I decided to use an external RTC even if M0 has an integrated one. Way too many things can go wrong with integrated RTC clocks ( based on many years of professional HW designs) , and the Arduino Core has many ´restrictions', boot loader mode does not maintain internal RTC and pretty ´tough' to make coin-cell operation compatible.

At this point, modifying the adalogger to add CAP and resistor is a bit of a pain based on trace location.

IF not adding the extra resistor and CAP, at the very least, a footprint ready solution would be better. ( resistor footprint with cut-ready joining trace like the pin 10 SD_CS and Capacitor footprint on the VDd pin of the PCF ) of course the current 3.3v trace powering the SD +decoupling Cap would need to be adjusted.

I will need around 50 loggers first half 2017 current modding ( cut 2 places , re-route 3.3v for SD and decoupling Cap, add large cap&persist or takes too long) Thanks for considering

ladyada commented 7 years ago

ok that makes sense. we'll check it out. no ETA!

ericbaril72 commented 7 years ago

I have the files ready with added 1k + CAP ( schematic change + new pcb layout ). https://github.com/ericbaril72/Adafruit-Adalogger-FeatherWing-PCB

ericbaril72 commented 7 years ago

Hello there, I can validate the results if you like the new gerbers. I need to build 50pcs and manual rework is a pain ... https://forums.adafruit.com/search.php?st=0&sk=t&sd=d&sr=posts&keywords=adalogger

So i'll go forward with 50 of theese + 30xPCS of FEATHER M0 WINC1500 + 20PCS of FEATHER M0 micro python.

ladyada commented 7 years ago

hiya we've updated the design, the next version of the wing (when https://www.adafruit.com/product/2922 is back in stock) will have this correction!

ericbaril72 commented 7 years ago

Did I have anything to do with it or was it allready done ? I didn't/don't see commits since >1 year

Eric

On Wed, May 24, 2017 at 1:29 PM ladyada notifications@github.com wrote:

hiya we've updated the design, the next version of the wing (when https://www.adafruit.com/product/2922 is back in stock) will have this correction!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/adafruit/Adafruit-Adalogger-FeatherWing-PCB/issues/1#issuecomment-303794992, or mute the thread https://github.com/notifications/unsubscribe-auth/AMpZxvBgiDKX95GDAYsI6wevrJyb9Oh4ks5r9Gj2gaJpZM4LCL2m .

ladyada commented 7 years ago

yes! our community let us know about the bug and once we were able to verify it we updated our design :) it'll be in the shop soon (maybe a couple weeks)

sdaugherty1 commented 7 years ago

Hello there, I recently purchased 2 data loggers for a development project. Using Mega2560. I'm having a reoccurring issue with losing accurate time after power cycling. The correct time may stay for 1, 2 maybe even 3 times but eventually, the accurate time is lost by the RTC. I started by replicating the hardware on a 2nd build, had the same issue, then started dropping shields off until the only thing left is the logger itself logging a timestamp. Still have the same issue. Could the issue in this thread be related? If so, is there anything that I can do to correct it?

ericbaril72 commented 7 years ago

Which Datalogger are your refering to ? I am guessing your are using this one: https://learn.adafruit.com/assets/35519

check which board revision you have .... mainly if the RTC chip is the PCF8523.

I am using the FEATHER wing version : https://www.adafruit.com/product/2922 which uses the PCF8523 also ...

The PCB of the feather was recently modified to put an RC filter on the RTC vdd pin. If the 3.3V drops too quickly, the battery switch-over is not perfect.

You can try adding a larger Capacitor on the 3.3V rail of the RTC chip but if something runs on the 3.3V when unplugging ... it mght still be too quick of a drop. Then, the series resistor will be mandatory --> 1k resistor in series between the main 3.3V rail and the RTC vdd pin + a 10uF cap on the RTC vdd pin.

[image: image.png]

On Mon, Jun 12, 2017 at 9:13 PM sdaugherty1 notifications@github.com wrote:

Hello there, I recently purchased 2 data loggers for a development project. Using Mega2560. I'm having a reoccurring issue with losing accurate time after power cycling. The correct time may stay for 1, 2 maybe even 3 times but eventually, the accurate time is lost by the RTC. I started by replicating the hardware on a 2nd build, had the same issue, then started dropping shields off until the only thing left is the logger itself logging a timestamp. Still have the same issue. Could the issue in this thread be related? If so, is there anything that I can do to correct it?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/adafruit/Adafruit-Adalogger-FeatherWing-PCB/issues/1#issuecomment-307978130, or mute the thread https://github.com/notifications/unsubscribe-auth/AMpZxig9lPwTssw2vBUQnewvZRw7cL19ks5sDeIhgaJpZM4LCL2m .

sdaugherty1 commented 7 years ago

Hello Eric and thanks so much for your reply. Your correct, I'm using https://learn.adafruit.com/assets/35519 with RTC PCF8523. I continued to try other options and have exhausted everything I can think / has been recommended with the exception of cutting etches and trying to implement your fix. Honestly, I would have tried your option much sooner but older eyes kinda make etchwork.....iffy. Either your image didn't make it through or I'm overlooking the proper way to view it but think I understand the intent and layout of your solution. I'll advise once I have the opportunity to give the fix a shot on one of the shields.....or end up chucking it cause I've mangled it :) Thanks again!