How to weatherproof an installation

rmeldo

Senior Member
Hi everyone, Happy New Year.

I am struggling to get repeatable behaviour for my project and I wonder whether it might be some dampness which causes the lack of repeatability and I might have broken the "best practice for external installations". Could someone please offer advice?


Here is a description of my problem



The hardware (see picture):

I have installed a NodeMCU board (which has an ESP 8266 on board) mounted to the outside wall of the gas meter enclosure, transmitting via WiFi across the garden. The board is mounted inside an ABS enclosure taped shut with electrical tape. I have drilled a hole at the back of the box and glued a plastic tube to it. The tube is inserted into the ventilation brick of the meter room. Cabling for sensors and power supply goes through the tube. So no water can enter the board enclosure. Ventilation is possible through the tube, but the meter room is warmer than outside.

Sensor and software.

The hall switch sensor mounted on the gas meter picks up the passing of the magnet on the meter wheel and triggers an interrupt. The resulting action is to connect to a web server (via WiFI) and upload the number of pulses since boot/reboot . There is a loop that checks for existence of a connection to the router and the NodeMCU IP address. In case of loss of IP, attempts to reconnect are made. If after a number of attempts the WiFi connection cannot be restored, then a NodeMCU reboot is performed. Pulses happen every 2-3 minutes.

The problem observed:

The board performs normally for one or two days, with very sporadic reboots. Then the problems start. the pulse uploads will stop, but no restart will happen and the pulses will still be counted. Every few hours an upload would take place (randomly) confirming that the number of pulses is correctly tracked. This suggests to me that the IP address is retained (So a reboot is not triggered ), but communication with the server is failing and no pulse can be uploaded.

My guess ...
... is that there is a deterioration is signal strength cause by some factor related to the installation (If I take the board inside and connect it to the PC to check the software all seems normal).

Could this be the case?
Should I cover the board and connectors with some waterproof substance, like silicone or similar?
Any other suggestions?

I would really appreciate some help, as I have run out of Ideas.

Many Thanks
Riccardo
 

Attachments

1968neil

Senior Member
I run an esp8266 in my garage and its cold and damp out there at this time of year, i have no issues.
However, the psu needs to be clean and spike free i added 100nf across the supply line as close to the esp as possible.

if you think it maybe a dampness issue try adding a sachet of silica gel for a day or so to see it it helps if it does id recommend adding a heater resistor in the box to keep it at a constant temperature and dry. This is the method used for outdoor security cameras.

Hope that gives you some ideas
Regards
Neil
 

rossko57

Senior Member
Bear in mind it may be difficult to distinguish a 'retained' IP address, from a clever router re-issuing the same address to the same device. Router logs might help there.

A diagnostic aid might be code to collect and report both retry and reboot counts, help you to see any pattern.

This is good stuff
http://uk.rs-online.com/web/p/conformal-coatings/0494714/
or similar coatings from other suppliers, should consider essential for outdoors.
 

Hemi345

Senior Member
Does the ESP attempt to stay connected all the time or does it connect and disconnect from the network for every upload? If it is using DHCP, you should see in your router logs the renewal or new leases for an IP address to the ESP periodically or as determined by the lease time on your router.

Maybe heat or power issues on the Node board? Doesn't look like there are any bulk caps on the PCB. With the 200+mA draw from the ESP, it might be beneficial to place a 330uF electrolytic across the 3V and ground pins.

Is there anything running under the node board on your perfboard that could cause interference?
 

rmeldo

Senior Member
Thanks everyone for the suggestions.

In answer to your questions:

I don't have the logging of the retries but I log the reboots on the server (if it is reached). From the logs i seet they are infrequent, every day or so.

I don't have access to the router as I use a kind neighbour's WiFi (it is communal heating gas meter for a block of flats and my flat is far away from the meter), so I would like to try to avoid bothering him.

The esp aims to stay connected all the time to the router, while the connection to the web server is closed after every transmission (every 2minutes or so).

After taking the picture and having issues I fitted a 220 uF capacitor to the Vin and gnd pins. The distance is the length of the unshortened capacitor's legs. I couldn't say I have seen any improvements. I power the board through the WiFi lead though. I could power directly the Vin pin if necessary....

There is nothing behind the board, just the bottom of the box. Behind the box there is the brick wall of the Meter room.

Riccardo
 

hippy

Technical Support
Staff member
It is difficult to determine what is happening when something doesn't happen as expected, especially when there are so many components in a system which could go wrong. It could be an issue with the PICAXE program, PICAXE to NodeMCU interface, NodeMCU software, NodeMCU to ESP8266 interface, ESP8266 software, an issue with network connectivity, possibly failed DNS lookup or a server not responding promptly enough or as expected. I would be inclined to believe it's probably something going wrong after things have been running for some time than an intermittent dampness problem.

One thing you could do is replicate the system, have it connected locally through your own Wi-Fi access point which you have access to and can monitor, driven by a faked meter pulsing circuit, then you can see if it exhibits the same failures in a controlled environment and you should have better access to logs to help reveal what any problems are if they appear.
 

fernando_g

Senior Member
I've had similar problems with sensitive *analog* circuitry. The solution may or may not apply, but nevertheless here it goes:

Most products nowadays are soldered with a "no-clean" flux. These leave very low board residues....but residues nonetheless.
These residues are hygroscopic, which attracts humidity which attracts microparticles of dust.

If you want to clean a board soldered with no clean flux, don't use isopropil alcohol. Rather, use warm distilled water. With a brand-new toothbrush scrub the board. Repeat a pair of times.
Immediately afterwards, thoroughly blow dry the board with a hair dryer.
 

rmeldo

Senior Member
Thanks everyone for the advice.

The unit is limping along, struggling to be consistent but still operating. I am going to try to hard code the server IP rather than relying on the DNS server to resolve it. I am quite hopeful about this as during testing I noticed sometime it had to go through some DNS failures before succeeding with the transmission. Let's see if it yields any improvements.

Failing that I think I will try the weather proofing with the recommended silicone spray http://uk.rs-online.com/web/p/confor...tings/0494714/ so that I can eliminate that from the list.

if that doesn't do it I will build a second unit and follow Hippy's advice and test it with my router to see if it behaves differently.


I wonder whether the situation could improve with a better reception. The ESP8266 comes with versions which can take an external antenna (replace the ES-12 with a Es-07) for a claimed 3dB signal improvement... I could use one of those. Any thoughts?

Thanks again
Riccardo
 
Top