Ice Tube firmware - Drift correction with Auto DST, Dimmer

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.
User avatar
jpkelly
 
Posts: 47
Joined: Sun Sep 20, 2009 4:09 am

Re: Ice Tube firmware - Drift correction with Auto DST, Dimm

Post by jpkelly »

Auto DST seems to work backwards from how it should using "Ice-Tube-Clock-wbphelps-328" code.
Any ideas how to fix this?

Edit:
It seems I may have fixed it by pulling the battery and power to reset the dst rules.

User avatar
jpkelly
 
Posts: 47
Joined: Sun Sep 20, 2009 4:09 am

Re: Ice Tube firmware - Drift correction with Auto DST, Dimm

Post by jpkelly »

OK so while I thought my DST problem was fixed (reversed DST/non DST) by removing battery and power. It seems the clock loses an hour every night at midnight. It turns over to 12:00 then goes to 11:00.
Any ideas on how to fix this or what may cause it?

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

Re: Ice Tube firmware - Drift correction with Auto DST, Dimm

Post by wbp »

what version are you running? are you using a GPS receiver?

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

Re: Ice Tube firmware - Drift correction with Auto DST, Dimm

Post by wbp »

The newest version of my firmware for the Ice-Tube clock v130406wm is on Github:
https://github.com/wbphelps/Ice-Tube-Clock

User avatar
jpkelly
 
Posts: 47
Joined: Sun Sep 20, 2009 4:09 am

Re: Ice Tube firmware - Drift correction with Auto DST, Dimm

Post by jpkelly »

wbp wrote:what version are you running? are you using a GPS receiver?
I believe I am using the latest version. I will check when I get home. (How can I check?)
I am using a GPS receiver.

Since I installed the GPS unit the behavior was as if the DST settings were reversed. Setting it to Auto caused it to be 1 hour off regardless of what time of year it was. Then after looking at the code it seemed as if the data was somehow stored in eprom? So I thought about restarting with the battery removed and that seemed to work. But now each day it goes one hour off. Last night I watched it turn over from 11:59 - 12:00. When it changed to 12:00 it jumped back to 11:00 after approximately 1 second after the change. If I unplug/replug and change the time to a random value, the GPS will set it to the correct time.

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

Re: Ice Tube firmware - Drift correction with Auto DST, Dimm

Post by wbp »

Something doesn't make sense. I have one here and it works as expected. Auto DST worked perfectly last Saturday, jumping ahead at 2 am.
Have you checked to see what your settings are for DST and time zone offset?
When it boots it should display the firmware version.
If you like we can chat on the phone and go over the settings.

William

User avatar
jpkelly
 
Posts: 47
Joined: Sun Sep 20, 2009 4:09 am

Re: Ice Tube firmware - Drift correction with Auto DST, Dimm

Post by jpkelly »

wbp wrote:Something doesn't make sense. I have one here and it works as expected. Auto DST worked perfectly last Saturday, jumping ahead at 2 am.
Have you checked to see what your settings are for DST and time zone offset?
When it boots it should display the firmware version.
If you like we can chat on the phone and go over the settings.

William
I do have the latest firmware. Looks like my date was not set. (Does it get the date from GPS?) Will see what happens tomorrow.
I do have the correct UTC offset.
There is one thing I am not clear on . There is a menu item called "set rule". What is that for?

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

Re: Ice Tube firmware - Drift correction with Auto DST, Dimm

Post by wbp »

"set rule" is for changing the DST rules. This is in case the rules for DST start/end date & time change (or you are in Australia or some place like that) and you don't can't recompile and reflash the firmware. Be careful that you don't change the rules, or Auto DST won't work properly.
The clock should get both the date and time from the GPS if it is working correctly. You can check this by changing the date and/or time and then waiting one minute. The clock is set from the GPS only once a minute (if memory serves) and only if the date & time do not match.
If you need the values for the DST rules I can post them. From what you describe is happening it sounds like something might have gotten changed.
What value do you have for time zone offset?

User avatar
jpkelly
 
Posts: 47
Joined: Sun Sep 20, 2009 4:09 am

Re: Ice Tube firmware - Drift correction with Auto DST, Dimm

Post by jpkelly »

wbp wrote:"set rule" is for changing the DST rules. This is in case the rules for DST start/end date & time change (or you are in Australia or some place like that) and you don't can't recompile and reflash the firmware. Be careful that you don't change the rules, or Auto DST won't work properly.
The clock should get both the date and time from the GPS if it is working correctly. You can check this by changing the date and/or time and then waiting one minute. The clock is set from the GPS only once a minute (if memory serves) and only if the date & time do not match.
If you need the values for the DST rules I can post them. From what you describe is happening it sounds like something might have gotten changed.
What value do you have for time zone offset?
I am in UTC -8

User avatar
jpkelly
 
Posts: 47
Joined: Sun Sep 20, 2009 4:09 am

Re: Ice Tube firmware - Drift correction with Auto DST, Dimm

Post by jpkelly »

wbp wrote:"set rule" is for changing the DST rules.
What value do you have for time zone offset?
"zone" is set to: -08.00 utc
"rule" is set to: rule 0,03
I was hoping it was working after setting the date but today it lost 1 hr again.

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

Re: Ice Tube firmware - Drift correction with Auto DST, Dimm

Post by wbp »

The DST rules are a set of 9 numbers: (3, 1, 2, 2, 11, 1, 1, 2, 1)
You have to cycle thru them to see all the values.

That it happens at midnight tells us it's the Auto DST calculation that's doing this, it runs once a day when the date changes.

What happens if you set DST of Off or On instead of Auto?

User avatar
jpkelly
 
Posts: 47
Joined: Sun Sep 20, 2009 4:09 am

Re: Ice Tube firmware - Drift correction with Auto DST, Dimm

Post by jpkelly »

wbp wrote:The DST rules are a set of 9 numbers: (3, 1, 2, 2, 11, 1, 1, 2, 1)
You have to cycle thru them to see all the values.

That it happens at midnight tells us it's the Auto DST calculation that's doing this, it runs once a day when the date changes.

What happens if you set DST of Off or On instead of Auto?
Actually the change does not seem to happen only at midnight. I watched it at midnight and it was correct. Then somewhere between midnight and 9am it lost an hour.

With DST On or Off it remains correct (depending on the time of year). Currently I have DST set to on and it is correct.

Can you explain the rules? They are a bit cryptic.

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

Re: Ice Tube firmware - Drift correction with Auto DST, Dimm

Post by wbp »

ah, so maybe it's happening when it should, which is 2 am.
the rules are as described in the code. this is why it's open source, so you can look at the code...

Code: Select all

///uint8_t dst_rules[9]={3,1,2,2,11,1,1,2,1};   // initial values from US DST rules as of 2011
// DST Rules: Start(month, dotw, n, hour), End(month, dotw, n, hour), Offset
// DOTW is Day of the Week, 1=Sunday, 7=Saturday
// N is which occurrence of DOTW
// Current US Rules:  March, Sunday, 2nd, 2am, November, Sunday, 1st, 2 am, 1 hour

User avatar
jpkelly
 
Posts: 47
Joined: Sun Sep 20, 2009 4:09 am

Re: Ice Tube firmware - Drift correction with Auto DST, Dimm

Post by jpkelly »

wbp wrote:ah, so maybe it's happening when it should, which is 2 am.
the rules are as described in the code. this is why it's open source, so you can look at the code...

Code: Select all

///uint8_t dst_rules[9]={3,1,2,2,11,1,1,2,1};   // initial values from US DST rules as of 2011
// DST Rules: Start(month, dotw, n, hour), End(month, dotw, n, hour), Offset
// DOTW is Day of the Week, 1=Sunday, 7=Saturday
// N is which occurrence of DOTW
// Current US Rules:  March, Sunday, 2nd, 2am, November, Sunday, 1st, 2 am, 1 hour
Ah ok Mine was set to 3. I will try rule 9.
Thanks!

User avatar
jpkelly
 
Posts: 47
Joined: Sun Sep 20, 2009 4:09 am

Re: Ice Tube firmware - Drift correction with Auto DST, Dimm

Post by jpkelly »

jpkelly wrote: Ah ok Mine was set to 3. I will try rule 9.
Thanks!
OK that didn't work. It lost an hour somewhere between 12noon and 9pm.

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

Return to “Clock Kits (discontinued)”