Classic rev 5 with WiFi - been perfect for months - now losing time

More
1 year 6 months ago - 1 year 6 months ago #9264 by scalesr1
I built a clock using the Classic Rev 5 with WiFi and it has worked perfectly for many months but now I note that it is 10 seconds or so behind all the other clocks in the room.

If I power cycle the clock, all is well once more.

Has anyone else seen this kind of behaviour?

Nothing else (to the best of my knowledge) has changed.
I can connect to the clock via a browser at any time so it's connection to the network seems robust. That being said, usually, when I do get the connection, that parameters are all 'blank'. Except for this morning when I checked, less than 12 hours after power cycling, time was off but the web interface showed the correct data. The only resolution was to power cycle the clock :-(
Last edit: 1 year 6 months ago by scalesr1.

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

More
1 year 6 months ago #9272 by Ty_Eeberfest
Your recent edit made this a little less mysterious. It sounds like I2C communication between the WiFi module and the clock is failing intermittently. I think I remember you from some posts a while ago. You do have the ability to flash firmware on the ESP (WiFi module), right?

I'd suggest re-flashing the ESP with the firmware you already have from when you made the clock. Pay very close attention to the settings in the Arduino IDE. At least one of the settings can lead to a situation where everything seems okay but the I2C is unreliable.

Here's a screen shot of the settings I successfully used. Setting CPU Frequency to 160 is extremely important when dealing with I2C issues.


Look into it later when the dust is clearing off the crater.
Attachments:
The following user(s) said Thank You: Ian, scalesr1

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

More
1 year 4 months ago #9510 by scalesr1
Hello again,
Finally, I got a programmer and new ESP Modules and got it all together.
I managed to program a module with what I believe to be the right code and using your recommended settings for the programming environment.
I just put the module in to the clock and set it up for my WiFi and time zone etc.
So far So good, only time will tell.
I shall report back in due course.
Thank you for your help and advice.
Kind regards

Richard

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

More
1 year 4 months ago #9511 by BS_Jim
@ Ty, I'm not really sure of the meanings of all the settings, but 2 of the settings you show are different from what Ian currently recommends:

Flash Size: "1M (64K SPIFFS)" instead of "1M (no SPIFFS)"
I don't know what SPIFFS are, but I do see reference to them in the code.

Flash Mode: "QIO" instead of "DIO"
I'm not sure of this one, but both settings seem to work with the boards I have.

Just trying to learn a little about the programming,
Jim

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

More
1 year 4 months ago #9512 by Ty_Eeberfest
Hmm... I don't remember where I got those settings from originally but I use them for all my ESP-01 + Arduino needs.

SPIFFS is a file system that can be used by programs running on the ESP chip to open / read / write / etc files that reside in the external flash memory, Using it can in some situations simplify storing persistent data like configurations or something. "64K SPIFFS" creates a 64K file system "partition" on the 1M flash chip. As a matter of course I don't create a SPIFFS partition unless I plan to use it. Ian's clock code does not use SPIFFS, thus no SPIFFS partition.

DIO & QIO (and DOUT and QOUT) specify how the ESP chip interacts with the flash memory chip. It's not real clear to me how one determines the right one to use other than by trial and error (if it is set wrong you can't even load a program). I posted what works for me with the majority of ESP-01 modules I've encountered. Sorry I can't give you a better answer.

Look into it later when the dust is clearing off the crater.

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

More
1 year 4 months ago #9513 by BS_Jim
Thanks for the info, Ty. I've tried both ways with both those settings and for now they both seem to work with the hardware I have. I brought it up because it's a little confusing and there are a lot of settings to get right as a newbie.

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

Moderators: AccutronTy_EeberfestIan
Time to create page: 0.187 seconds

Search

Tube Suppliers

Go to top
JSN Boot template designed by JoomlaShine.com