Weather Upgrade to ESP32

I tried to use the MKR1000 for my weather board upgrade, but it didn’t seem to be ready for prime-time.  The damn thing kept locking up.  This was before I located it remotely in my shed, too.  I ended up getting a NodeMCU ESP32 (WROOM-32) instead.  These are fabulous little boards – they actually have two cores.  There plenty of GPIO and most can be interrupts and plenty of ADCs.  It has 512K RAM too.  Like the ESP8266, it can accept updated sketches Over-The-Air.  As far as the transition to the ESP32 from my WeatherShed sketch, much of it worked out of the box, but I rewrote it anyway.  The DS3231 doesn’t seem to want to play with the other I2C sensors and/or addresses.  Not a problem though, I just used the TimeLib.h library and NTPClient.h and have the time updated through the internet.  I got the latest SwitchDoc Labs weather board with grove connectors, even though I didn’t use the connectors.

I got a new lightning board (SwitchDoc Labs) and used the Embedded Lightning AS3935.h library I had been using before.  One thing I had to do before the I2C lightning board worked properly was to force the I2C library by using: #include “driver/i2c.h”.  Then all worked as I had been used to.  I chose not to use the grove connectors because of wire reduction.  The header I used shared just 1 ground and it just seemed more efficient.

After I installed into my shed (which has the solar power and weather vane/anemometer/rain bucket) the signal connection to my weather web station dropped out after a half hour.  I have in the sketch, a routine which seeks out strongest signal access point and logs on to it.  Even with this code, I was not seeing the ESP32 on my network.  The reported signal before dropping off was -92db.  That was the culprit – not powerful enough to hold a signal lock.  I went ahead and ordered some WROOM – 32U versions for the U.FL external antenna feature, but was impatient.  So I followed this example to add a 3/4 wave antenna onto the existing trace antenna.  I soldered it on and hot glued the connection for stability.  Bingo!  That did the trick.  Now my signal feed to the web server is showing -85 – -89db, which is stable enough to keep the ESP32 online with my network.  This technique can be applied to any of my ESP8266 units I have to boost signal RSSI.

Posted under Sensors