The blog of a dedicated radio amateur and electronics enthusiast

"Having fun on the air and in the workshop - communicating and creating"

24 July 2021

Sending soil moisture data to ThingSpeak

My post on 8 June mentioned how I am using Ubidots with the Soil Moisture Meter to save and display measurement data on the cloud.
ThingSpeak™ is another such platform and, like Ubidots, there is a function node available for it in Node-RED which I added to an existing flow, making sending data to ThingSpeak very easy. 
I created a ThingSpeak channel called 'Soil Moisture', to receive and display the data. I have opened the channel to the public. So anyone can view the data by visiting ThingSpeak , then 'Channels' from the navigation bar, search for User ID 'SpacerLabs', and open channel 'Soil Moisture'. I invite anyone to 'export recent data' or 'add a comment' ; a ThingSpeak account is required for the latter.

My ThingSpeak channel 'Soil Moisture' displaying moisture data
Each channel can have up to 8 fields in use to hold any kind of data related to the particular application. I am using only 'Field 1' and 'Field 2' at the moment to hold the moisture measurement numerical value, and packet number respectively.
There will be a break in the hourly updated data if I don't have Node-RED activated; also the situation when using Ubidots.
More 'SpacerLabs' channels and sensors could be added in future. 

06 July 2021

New development board for the soil moisture meter

I have been using TTGO LoRa32 V1 development boards for my soil moisture meter project based on a LoRa wireless data link, and posted images of them on 15 February and 16 March. I discovered that V2.1 boards are available. So I bought one for about $23 to compare.
TTGO LoRa board v2.1 - note the 16GB SD card
The LoRa chip is unchanged; still the same SX127x family ( newer chips do exist ), but now in a metal can. The screening could give it improved rejection of interference which can cause false data packets to be generated. I have solved this problem anyway in software by including a destination address in the packet header.
The antenna connects directly with a SMA connector on the board, so not requiring the use of the coax cable pigtail of V1 with its inherent signal attenuation. I am noticing at least a 10dB ( x10 ) improvement in received signal level with V2.1 when I use both V1 and V2.1 boards side by side. 
V2.1 has a micro SD card slot. While not very useful for my moisture meter which is connected to on-line services for data storage, it was fun to try out and does mean that I could save all soil moisture measurements even if I am not running my Node-RED server. I bought a 16GB card ( the smallest I could find ) which is enough capacity for the next 112 thousand years of soil moisture measurements !
Measurement & time-stamp saved every hour to file moisture.txt on SD card
The image above highlights two interesting features of the soil moisture meter. At the time it had been in continuous operation for 719 hours, and at night.