2019 summer run update

The 2019 summer SDI-12 USB adapter data logging run has been relatively smoothly but there were a few issues that are worth mentioning.

1. Battery

The battery that I recommended as a backup battery for raspberry pi (see photo below) needs to be used with some consideration:

I have not tested how long the charge lasts when it is powering a raspberry pi 3B (I used a raspberry pi zero last year but had to use some USB OTG adapter and a USB hub with Ethernet dongle etc. so I decided to throw my 3B in since I have a 3B+ now). What I thought should happen is that the battery will eventually drain completely after hours of power outage but once power is back on, it should turn on the raspberry pi right away. That turned out to be not the case. The battery seems to need about half an hour of charge time after it has been drained before it can power the raspberry pi 3B with enough stability that it would run normally. Within the first half hours of initial charging after a power outage, the raspberry pi was not stable and I couldn’t log in to it. The logging script didn’t run either. I ended up unplugging the pi and let the battery charge for 30 minutes and plugged the pi back in.

In case you want to prevent this issue, which may or may not affect the integrity of the pi’s operating system, you need to buy a backup battery with proper capacity. Mine is only 3000mAh, since I have the logger in my garage, only expecting at most hours of power outage:

https://www.amazon.com/TalentCell-Rechargeable-Amplifier-Multi-led-Indicator/dp/B00MHNQIR2/

There are 6000mAh and 12000mAh versions that will definitely address longer periods of power outage. If I was only expecting up to a few hours of power outage, then how come my logger drained the battery, twice?

The issue was actually with the power outlet it was plugged in, which is protected by an upstream Ground Fault Circuit Interrupter (GFCI) outlet. When I bought the house, there was no GFCI outlet in the garage! I wonder how those previous owners never thought about installing one. So I replaced the outlet in the garage with a GFCI outlet, which protects all downstream outlets. The outlet my logger is plugged in is downstream of the GFCI outlet thus is protected against ground fault, which means shorting the hot with the ground. It was the right move but unfortunately not enough. Outside my garage there is an outdoor outlet with some “outdoorish” cover. We had some VERY heavy downpours in the past month.

As you can see on the plot below, the two high spikes on soil dielectric constant correspond to two heavy rain falls:

The vertical blue lines simply indicate how quickly the rain fall caused soil’s dielectric constant to first rise then later drop (exponentially). The two almost horizontal blue lines immediately following the spikes were periods of power loss. I didn’t check my online plots and was surprised to find that the plot stopped. I guess I could use the spikes to estimate my battery’s run time to be between 4 hours and 13 hours, probably 4 hours. The following soil temperature plot during the same period shows the power outages more clearly:

So what caused the GFCI outlet to trip? It turned out to be the outdoor outlet. I took it apart. Here is what it looks like:

The gasket on the left wasn’t doing enough to protect the outlet. You can see the outlet’s rusted top side (the outlet was mounted horizontally). This must have been caused by rain water seeping into the outlet, causing ground fault.

I do recall a couple of times after bad weather our garage lost power (circuit breaker). That must have been before I installed the GFCI outlet. So in order to address the real issue that the outdoor outlet is causing, I purchased a better cover and installed a separate GFCI outlet in the power box. To be honest, the brick veneer didn’t help. It was harder to seal against due to its rough surface but the new cover with a new gasket hopefully will work better. I’ll later apply some ready-to-use cement on the top of the cover to seal any possible leaks. With this new GFCI outlet, hopefully even when it is shorted, it would act before the upstream one acts and prevents the logger from losing power for extended time again. Here is how it looks:

Next time I will write about my experience running the logging script automatically with the latest raspbian distribution.

Leave a Reply

%d