Older board, 4.x. Got around to getting everything together and building. I have one fully assembled, one with only voltage input complete.
The fully assembled unit has a lot of issues with voltage sensing. Almost always 0, but occasionally picks it up for a while.
Trying to see if I could get one to work, I built up a second PCB without the current inputs. The PCB is from before the two extra voltage inputs. This unit usually works, but dips to zero here and there. After running for about an hour, it’s staying at zero now. Power cycling the USB brought it up briefly.
I have now tried 3 NodeMCU boards and 2 transformer bricks and 2 PCBs. Using a voltmeter, I can detect the voltage signal coming in while the unit reports zero. The voltage at the AC input is about 10.5 VAC. After the divider, it drops down to about 0.3V. So the transformers appear to be good. The Vref shunt appears to be ok as well, based on the very solid 2.5V on it.
My best guess is something in the bias circuits is not right. But the intermittent result is leaving me confused. I don’t see any circuit diagnosis info on the wiki, so hopefully someone has some ideas. I can get readings with a multimeter, oscilloscope, and logic analyzer. I’m just not sure what I’m looking for. My hope was to get one good one to get measurements from to compare. Sadly I have no good example now. Visual inspection on a microscope the joints look clean. I tried reflowing anyway with a hot air station. No change.
Or perhaps these older boards have a fault I haven’t read about yet. I’d prefer not to have to order new PCBs, but that might be the best option. A quick look over the schematic looks like I’m just missing a couple inputs, but I didn’t get into detail with it.
The divider should be 12K/1K and you should see 0.81V across the 1K and 9.69 across the 12K.
Depending on the firmware that you are running, the value of the voltage reference shunt may be incorrect. Manufactured units have the values of the reference shunt and burden resistors recorded in the EEPROM, but you can also specify in the config.txt file. You will need to look at the firmware code for more details.
You should check that the nodeMCU is providing 3.3VDC and that the output of the LM358 OPamp is half that or ~1.65V.
Thanks for the tips! I’ll check those.
Hmm… No joy. The voltages measure properly. I went ahead and set up to compile the code and enabled the EEPROM write, flashed and booted up, then removed it and flashed again. It still logs that it is a 5.x (I should probably adjust that in case it matters), so it did write something. I’ll add the log below for the latest start in case it helps.
Interesting thing that might not matter, when I start the calibration screen for voltage, I see a decent looking voltage ~120 briefly before it goes to zero.
I do see some records in the serial monitor “Low sample count 181” … different numbers. After a while, I get a lot of those… I found the code for it in the sampling loop. Looks like I might have an issue with ADC communication. I’ll start searching for this, but if that gives new tips to look for, I’d be happy to have some help with ideas.
SD initialized.
3/19/25 16:20:47z Real Time Clock is running. Unix time 1742401247
3/19/25 16:20:47z Reset reason: External System
3/19/25 16:20:47z Trace: 1:3, 1:3, 1:3, 1:3, 1:3, 1:3, 1:3, 1:3, 1:3, 1:3, 1:3, 1:3, 1:3, 1:3, 1:3, 1:3, 1:3, 1:3, 1:3, 1:3, 1:3, 1:3, 1:3, 1:3, 1:3, 1:3, 1:3, 1:3, 1:3, 1:3, 1:3, 1:3
3/19/25 16:20:47z ESP8266 ID: 14167007, RTC PCF8523 (68)
3/19/25 16:20:47z IoTaWatt 5.0, Firmware version 02_08_03
3/19/25 16:20:47z SPIFFS mounted.
3/19/25 10:20:47 Local time zone: -7:00, using DST/BST when in effect.
3/19/25 10:20:47 device name: IotaWatt
3/19/25 10:20:47 HTTP server started
3/19/25 10:20:47 timeSync: service started.
3/19/25 10:20:47 statService: started.
3/19/25 10:20:47 dataLog: service started.
3/19/25 10:20:47 dataLog: Last log entry 03/19/25 10:20:30
3/19/25 10:20:47 historyLog: service started.
3/19/25 10:20:47 historyLog: Last log entry 03/19/25 10:20:00
3/19/25 10:20:52 WiFi connected. SSID=TABBAL_WLAN, IP=10.0.2.46, channel=11, RSSI -63db
3/19/25 10:20:52 Updater: service started. Auto-update class is NONE