Ice Tube Clock - ee memory & brownout settings

For RTC breakouts, etc., use the Other Products from Adafruit forum

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
wbp
 
Posts: 260
Joined: Mon Mar 07, 2011 1:18 pm

Ice Tube Clock - ee memory & brownout settings

Post by wbp »

I've been trying to debug an Ice Tube Clock. The symptoms were that one (and sometimes 2) of the configuration settings would not "stick" - the setting would always revert to a 1. Oddly, the same chip with the same firmware installed in my Ice Tube clock works fine.

After days of poking at this, I think I have finally found the cause. The fuse settings are such that the Brownout Detection threshold is 1.8V. There are many reports in AVR discussion threads about this causing EE memory corruption, in particular byte 0, when the chip looses power.

The next higher setting is 2.7V - and using this does indeed solve the ee corruption problem, but it also causes the clock to not keep time during a power outage since the 3V button cell is connected via a schottky diode, and depending on the particular diode and the cell's condition there may not be (will probably not be) enough voltage to get the chip to run.

The cell in this clock measured 2.7v with no load, so it's probably pretty much gone.

Funny, I noticed quite a while back that the first byte of EE memory was unreliable for some reason and stopped using it in my firmware - now I know why.

William

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Ice Tube Clock - ee memory & brownout settings

Post by adafruit_support_rick »

Thanks for the tip - good to know

User avatar
jarchie
 
Posts: 615
Joined: Sun Jun 24, 2012 2:16 pm

Re: Ice Tube Clock - ee memory & brownout settings

Post by jarchie »

The next higher [BOD] setting is 2.7V... and depending on the particular diode and the cell's condition there may not be (will probably not be) enough voltage to get the chip to run.
That explanation is perfectly reasonable, but I believe a 2.7v BOD threshold might work in practice. My Ice Tube Clock uses a temperature controlled quartz oscillator which requires at least 2.7v. So the BOD-level is configured for 2.7v, and that has been working well on the same battery for the past several months. Although the power in my area is surprisingly reliable for California, I do unplug the clock regularly to flash new firmware...and often leave it unplugged for hours...so the battery gets a fair bit of use. I know of two other clocks configured this way, and sleep works on all of them...certainly not proof, but it is suggestive.

User avatar
wbp
 
Posts: 260
Joined: Mon Mar 07, 2011 1:18 pm

Re: Ice Tube Clock - ee memory & brownout settings

Post by wbp »

Interesting - are you running a 168P or 328p processor? My Ice Tube is running a 328p, and with BOD set to 2.7, it stops keeping time when I unplug it. I don't really care since it now has a GPS module with RTC and battery, so it gets the correct time within a few seconds of powering it back up...

User avatar
jarchie
 
Posts: 615
Joined: Sun Jun 24, 2012 2:16 pm

Re: Ice Tube Clock - ee memory & brownout settings

Post by jarchie »

My Ice Tube is running a 328p, and with BOD set to 2.7
Same here.

The difference might be due to current consumption during sleep. My clock only consumes ~7 uA, so the voltage drop across the battery protection diode is probably less. The voltage from the battery might also be a bit higher, given the light load.

Regardless, it looks like my suspicion was wrong, and a BOD setting of 2.7 will not work on all clocks.

Locked
Please be positive and constructive with your questions and comments.

Return to “Clock Kits (discontinued)”