What a miracle. I replaced last year’s NodeMCU software with a latest and greatest tech version now released on the wiki, patched accordingly, started it up, and it is running. You can see it working (or not), using an MQTT client connected to broker.hivemq.com. Follow the MMD/esp8356707 topic, or MMD/# topic wildcard to follow any and all other units in development. Here was the one of the initial messages:
Temp=120.8C (0) at 5:465 F=1 I=0 G=1 S=1 E=0 T=34.5C H=17.6% M=26920 (243/1024:5857) R=70~140 W=-73.85 B=0.0 V=3.5
(Kindly refrain from sending commands to the Defender, thank you. We are testing the new board and software.)
I should mention that we are suffering from wireless connectivity issues caused by the proliferation of poorly designed wifi-6 and mesh routers and access points, however, the NodeMCU recovers fairly quickly, so a short duration MQTT “offline” message every now and then is to be expected until the router manufacturers update their products to not interfere with low band IOT devices.
We will see how long this lasts. It is amazing to me when things like this “just work.” As I was writing this as a reply on the forum, I was forced to type:
“… Well, I spoke too soon. While typing this post, the system went off line, and restarted.
Temp=124.8C (0) at 5:779 F=1 I=0 G=1 S=1 E=0 T=34.7C H=18.9% M=26920 (223/1024:5241) R=70~140 W=-72.85 B=0.0 V=3.5
Offline
Offline
Temp=118.6C (-0.2) at 1:3 F=1 I=0 G=0 S=1 E=0 T=34.9C H=19.6% M=27440 (255/1024:6242) R=70~140 W=-74.85 B=0.0 V=3.5…boot
The unit is going offline periodically for periods of ~22 and ~45 seconds. It is rebooting.”
That was the end of that post. I copied the text, canceled the post, and continued investigating.
The system would not stay running, repeatedly rebooting. Worried about the igniter failing because of too many cycles, I sent it the MQTT command to cool down with error. The error transitions the trap into an error state after the cool down. The idea was to see if a cool trap had issues with connectivity and rebooting. The previous hardware was able to function to 35°C without issue, and this was close to that. However, the ambient intake temperature is not the same as the temperature experienced by the NodeMCU, which is adjacent to the combustion chamber, nearly touching it.
After several hours, the intake (and combustion) temperature dropped to 17°C, quite a bit cooler, and I restarted the trap. It ran all night, but failed at 9AM, with last words:
Temp=124.8C (0) at 5:39647 F=1 I=0 G=1 S=1 E=0 T=38.7C H=21% M=26800 (223/1024:5241) R=70~140 W=-74.85 B=0.0 V=3.5
The ambient temperature of 38.7°C is pretty hot. This suggests that the NodeMCU was getting too hot for reliable operation. Downstairs, case off (Not difficult: I removed the screws several seasons ago and put them in a safe place, or did I?). The new NodeMCU was fairly deep inside the case, nearly touching the combustion chamber. I was thinking of inserting a fiberglass cloth, or some sort of heat shield, when I noticed the rather stiff wires to the “power” switch. “Maybe I could use these stiff wires to push the NodeMCU away from the combustion chamber” I thought. So I re-routed the wires to do exactly that. What a proud boy I was. Not only was the board further away from the chamber, there was no restriction to any air flow (what?) from a heat shield, not to mention being a low cost solution, although it does require “tuning” in the form of wire bending. It has been several minutes now, and it is still working:
Temp=120.8C (0) at 5:2476 F=1 I=0 G=1 S=1 E=0 T=29.1C H=36.3% M=26688 (243/1024:5857) R=70~140 W=-73.85 B=0.0 V=3.5
2476 seconds and still running! However, it does seem odd that the ambient temperature sensor is reading much lower than before. This Add-On is lacking certain mechanical sophistication. Perhaps the wire bends positioning the ambient temperature/humidity sensor may be a bit too imprecise.
Another issue is that the switched voltage divider scheme is giving a too-high value of 1024 for the open circuit state. The other hardware (boards) have had the open value of 1015 or so. The circuit (see the wiki) switches the ThermLo net between ground and open circuit. When grounded, the analog-digital converter (ADC), measures the voltage from +5C (connected to 3.3 volts from the NodeMCU regulator) into the divider with R5 (20k0) on the top, and the thermistor on the bottom into the ADC input (a ~330 kOhm divider). When ThermLo is open, it measures just R5 to the 330 kOhm input. This scheme allows the software to calculate the thermistor resistance by a ratio, and not depend on the imprecise 3.3 volt regulator as a voltage reference. However, the open circuit measurement must not exceed the full scale value of 1023 (or 1024), doing so will lose precision. Evidently the NodeMCU +3.3 is a bit too high, or the resistors into the ADC inaccurate, or both. Another issue to investigate.
Still, even without the added precision, the combustion chamber temperature probe does its job. Maybe I can forget about switching the bottom, and just rely on the kindness of the circuitry as it is and use the values as they are, and it will work sufficiently. This would free up a pin to use for something else, some other feature, for example, an additional indicator light for the Liberty, or some such.
Well, while I was writing this, the unit went off line again, last words:
Temp=121C (0) at 5:2674 F=1 I=0 G=1 S=1 E=0 T=29.5C H=39% M=26688 (242/1024:5825) R=70~140 W=-72.85 B=0.0 V=3.5
That was just after its triumphant report a few paragraphs above! Gotta go, see what happened, see you later!
… (Passage of time)
Back again. Mechanical iffy-ness includes the draping of the power cord from the house to the Defender across a walkway, with a loose coil at both ends. This is insufficient to handle a hose pulling the cord forcibly away from the Defender. Fortunately, the 2002 design used a connector that will release with excessive cord pull without too much damage. The new Patriot, with its screw-on connector, will be less forgiving. Anyway, the unit is back on the air, and happy times are here again, again, at least for right now:
Temp=120.3C (0) at 5:735 F=1 I=0 G=1 S=1 E=0 T=30.2C H=28.2% M=26856 (246/1024:5952) R=70~140 W=-74.85 B=0.0 V=3.5