RTC Not Starting RTC PCF8523 (68)

I have built 2 Iotawatts using the Gerbers for V5 and both have the same issue of the log showing “Real Time Clock not starting”.

The log shows as follows:

SD initialized.
Real Time Clock not running.
Reset reason: Power On
Trace: 246:54[240], 67:161[166], 10:235[141], 27:56[165], 159:189[235], 253:88[187], 36:185[30], 102:78[65], 169:149[121], 221:130[243], 110:207[242], 182:105[64], 73:29[159], 41:254[14], 187:183[255], 94:8[253], 53:191[253], 225:88[169], 172:21[167], 55:158[180], 48:83[209], 87:76[132], 236:252[90], 108:228[249], 25:10[29], 179:96[60], 83:26[12], 111:50[18], 20:24[227], 21:177[138], 65:243[219], 120:165[87]
ESP8266 ID: 1625747, RTC PCF8523 (68)
IoTaWatt 4.x, Firmware version 02_07_05
SPIFFS mounted.
Local time zone: +0:00
device name: IotaWatt
Connecting with WiFiManager.
HTTP server started

Faultfinding:
RTC battery is new and measures correctly
Red light is glowing faintly and no fault codes displaying
Continuity checks have been made for all paths and are OK
I am located in Australia and I see there have been NTP issues here, but I don’t think this issue is related as the RTC has not started.

When I built the units, I inadvertently had the crystals the wrong way due to the weird markings which means that the oscillator inputs to the RTC chip were S/C. I have reversed the crystals, but there has been no change, so have I wrecked the RTC’s by this error?

Further question: The log above shows as IoTaWatt V4.0, whereas the boards are V5.0 but I can’t see that this should make any difference as the circuitry is identical in this area on both V5 and V4 boards - is my assumption correct?

Any assistance is appreciated.

Regards,
Dave

The RTC will show as not running until it is set, which won’t happen until the NTP time is acquired. So, it may well be simply an inability to get to time.google.com. I don’t see in the log where you connected to the internet. You should be getting RGG upon power up indicating that WiFi manager is active and waiting for you to connect as per the docs for a new IoTaWatt. Since the webserver subsequently starts, I’m assuming you are doing that and entering WiFi credentials.

There is no subsequent connect message, so there is something stopping the WiFi task from starting:

Do you have an AC reference connected?

Don’t know what happens if the crystal is installed backwards. I doubt it would damage the clock but I really don’t know.

Bob,
Thanks for your prompt response. I am getting RGG on startup and then changing to dull red.
No, I didn’t have an AC reference connected, as I was just progressing step by step in setting things up, but I now have one connected, and waiting to see if things change.
How can I prove whether there is an internet connection - I have a connection to an internet-connected router and an IP address via DHCP?
It is good to have an understanding of the basic requirements to get the unit/s operating, and appreciate your assistance.

Regards,
Dave
My thoughts were that an s/c on the oscillator would have no permanent effect, but didn’t know for sure.

You will see a message in the serial output, and you should be able to access it at IoTaWatt.local.

Not sure where I find serial output, and Iotawatt.local has never worked, soI have been accessing it via the IP address

Ok, if it has an IP it has connected, yet there was no message. Do you have the AC one Ted and what is the led status, please post the message log now.

@DaveC
Maybe this will help. I had to solder resistance between GND and D8 in my units.

1 Like

Production IoTaWatt since that first pilot batch of 50 have all used ESP12S nodeMCU. They are hard to find and I have them custom made in China. This boot problem has been reported by several users with non-ESP12s. The posts explain how to measure the resistance and anyone trying to DIY should be able to figure out how to make it 6K.

How about a pic of your project?

Ugly but it helped to boot. :slight_smile:

Looks like I am off and running! Did the 10K pulldown mod on the CS line for the SD Card, powered up the unit and no (immediate) joy. Left the unit powered up for a few hours and this is the log result:

SD initialized.
Real Time Clock not running.
Reset reason: External System
Trace: 1:3, 1:1, 1:2, 9:0, 9:0, 8:2, 8:2, 1:2, 1:3, 1:3, 1:1, 1:2, 9:0, 9:0, 8:2, 8:2, 1:2, 1:3, 1:3, 1:1, 1:2, 9:0, 9:0, 8:2, 8:2, 1:2, 1:3, 1:3, 1:1, 1:2, 9:0, 9:0
ESP8266 ID: 1625747, RTC PCF8523 (68)
IoTaWatt 4.x, Firmware version 02_07_05
SPIFFS mounted.
Local time zone: +10:00
device name: IotaWatt
Connecting with WiFiManager.
HTTP server started
WiFi connected. SSID=(MY_SSID), IP=(MY_IP_ADDRESS), channel=10, RSSI -51db
MDNS responder started for hostname IotaWatt
LLMNR responder started for hostname IotaWatt
timeSync: service started.
statService: started.
Updater: service started. Auto-update class is NONE
11/17/22 14:37:20 timeSync: RTC initalized to NTP time
11/17/22 14:37:20 Real Time Clock battery is low.
11/17/22 14:37:21 dataLog: service started.
11/17/22 14:37:21 dataLog: New current log created.
11/17/22 14:38:29 historyLog: service started.
11/17/22 14:38:29 historyLog: first entry 11/17/22 14:38:00
11/17/22 14:47:40 dataLog: datalog WDT - restarting

** Restart **

SD initialized.
11/17/22 04:47:25z Real Time Clock is running. Unix time 1668660445
11/17/22 04:47:25z Reset reason: Software/System restart
11/17/22 04:47:25z Trace: 9:0, 9:0, 8:2, 8:2, 1:2, 1:3, 1:3, 1:1, 1:2, 9:0, 9:0, 8:2, 8:2, 1:2, 1:3, 1:3, 1:1, 1:2, 9:0, 9:0, 8:2, 8:2, 1:2, 1:3, 1:3, 1:1, 1:2, 9:0, 9:0, 8:2, 8:2, 1:2
11/17/22 04:47:25z ESP8266 ID: 1625747, RTC PCF8523 (68)
11/17/22 04:47:25z IoTaWatt 4.x, Firmware version 02_07_05
11/17/22 04:47:25z SPIFFS mounted.
11/17/22 14:47:25 Local time zone: +10:00
11/17/22 14:47:25 device name: IotaWatt
11/17/22 14:47:25 HTTP server started
11/17/22 15:58:59 WiFi connected. SSID=(MY_SSID), IP=(MY_IP_ADDRESS), channel=10, RSSI -54db
11/17/22 15:58:59 MDNS responder started for hostname IotaWatt
11/17/22 15:58:59 LLMNR responder started for hostname IotaWatt

Looks like all is OK now - is this correct?

(Bit surprised that the RTC battery is showing low as it is fresh, so will keep an eye on it).

Thanks to Bob and WWK (Waldemar) for their help.

Regards,
Dave

You need to initialize the EEPROM and enter version v5 info there. You need to uncomment the following snippet, build, upload and run, then comment, build and upload again. The v5 info will stay in the EEPROM and will not be overwritten on every reboot.

1 Like