Classic Nixie Clock ESP8266/timekeeping

More
3 years 4 months ago #7479 by Stackerlee
I use the ESP8266 module with software 1.0.3 (Arduino software 45).
I've been observing the clock after some power failures and unfortunately sometimes the time server setting is lost after power failures. The SSID and password is stored so it reconnects to router but not to time server. Then the timekeeping relying on the crystal is not that great, it loses about 30 minutes in seven hours. Have you been testing this and had better results? Could it be software or hardware related? It seems strange that the accuracy of the crystal could be off by that much.
As I wrote to you (Ian) earlier it seems that older Arduino software versions (I think v.43) works better in this regard.

A couple of times I've seen the clock freeze, mostly in displaying the date even though I haven't pushed the settings button. Sometimes I can bring it back to life by pressing the button a couple of times and sometimes only by turning the power off and on. This has happended when it's not been touched for some time (some weeks).
Any thoughts on this?

Regards, David

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

More
3 years 4 months ago #7482 by Ian
The first problem I think is that when the ESP module detects that the WiFi is no longer there is resets the internal variables (WiFi and Time Server), and this is a mistake. It should leave things as they are. There is an upcoming update to add some more configuration features to the WiFi module, and I'll also change this behaviour at the same time. Programming the ESP is tricky until you have the right set up for it, and if it is not something you can/want to do, I'll swap out the old one against a new one free.

Keeping time on the crystal should not be that bad. There was a software issue, but I'm sure that this was solved. (The issue was that the time from the WiFI module was only accurate to the nearest second, and every time an update came, we lost the fractional seconds. Now we increment by the whole number of seconds, and preserve the fractional part).

I've seen some freezes, but nothing I can put my finger on. Can you keep a log of when it happens (date and time) so I can get a feeling of if it is a counter overflow or something?

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

More
3 years 4 months ago #7484 by Stackerlee
OK!
I haven't looked deeply into the code of the ESP module, that's above my knowledge. Looking forward to an update. Yes, programming the module isn't that obvious, but as you say, once you have a working set up it's quite easy.

I think the timekeeping is a software issue but I can't help out finding the cause. I also thought this issue was solved but apparently I haven't been testing it over a longer time period until now (unintentionally). Having both ESP8266 and DS3231 on same i2c bus would be too messy? It would be very accurate at all times. Not a very minimalist approach I suppose.

I will try to be attentive to the freezes if they appear again. It might be hard to provide a helpful log since it has happened when I'm not there but I'll try to record the date and time.

Thank you!

David

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

More
3 years 3 months ago #7487 by Ian
in fact it is theoretically possible to have both the ESP and the DS3231 on the same bus, but it needs a software change on both the ESP and the clock to make this work. If the clock finds a DS3231 (it searches for it at startup), it does not go into slave mode, and therefore the communication with the ESP is interrupted. The ESP is configured to be I2C master and tries to send to the clock which is in I2C slave mode when no DS3231 is found.

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

Moderators: AccutronTy_EeberfestIan
Time to create page: 0.157 seconds

Search

Tube Suppliers

Go to top
JSN Boot template designed by JoomlaShine.com