Home        Kenley Weather     Guestbook

Section   Top  ThingSpeak  Senor Plan   TFT Display   ESP8266   DS18B20   Vero Board  Schematic   Display  Current Cost

 

 

Arduino Soil Moisture & Temperature IOT Monitor using ThingSpeak

 

arduino soil moisture

Functions

Can handle multiple combinations of sensors soil moisture, temperature and humidity

Setup for 2x Soil Moisture and 2 x Temperature sensors

Uploads to ThingSpeak to allow online monitoring via the web or the ThingSpeak app.

ThingSpeak will send alerts to you mobile if sensors reach preset levels.

Display of sensor readings on a TFT display along with highs and lows for the day.

The TFT also shows ThingSpeak connection Stats.

PIR controlled display blanking to save power.

Uses an Arduino Nano for processing and an ESP3266 v01 to send data to ThingSpeak.

ThingSpeak

ThingSpeak is an IoT analytics platform service that allows you to aggregate, visualize, and analyze live data streams in the cloud.

You can send data to ThingSpeak from your devices, create instant visualization of live data, and send alerts.

The ThingSpeak Android app/widget also lets you view your data on the go and will allow preset alerts to be set.

ThingSpeak App

App Showing Graphs

ThingSpeak Android Widget Showing Live Data from my various sensors.

Called by clicking on a sensor reading on the widget - there are many graph options.

 

Soil Sensor Layout

I have 3 sensors positioned in a Dahlia bed in my front garden. Dahlias are frost and drought sensitive and are left in the ground over the winter with a mound of soil covering the tubers.

Most of my garden water comes from water butts so I need to keep watering to a minimum in the growing season. The temperature sensors allow me to keep an eye on ground level/deep level frosts.

I never water my lawn but I have 1 moisture sensor set down at root level will help me predict when my lawn will be under stress.

 

Sensor 1
This contains 2 temperature and 1 soil moisture sensor- air temperature at ground level
soil temperature at Dahia Tuber level (in winter dahlia Tubers are mounded over with an extra 150mm soil)
and a soil moisture sensor at Dahlia Tuber level.


Sensor 2
This contains a soil moisture sensor at around 150mm deep.

 

below live ThingSpeak  graphs embedded in this page

   
   


 

 

 

TFT

2.2" LCD  IL19341 240 x 320 resolution

 

 

 

ESP8266 01s

 

 

 

Capacitive Soil Moisture Detector

 

 

 

Waterproof junction box IP68

 

 

 

 

Soil Moisture and Temperature Sensor Construction

 

 

 

 

ESP8266 Module Holder

The holder spaces the pins from the ESP8266 to allow easy mounting on Vero Boards.

 

 

 

ESP8266 01s Mounted in holder

 

 

 

 

DS18B20

DESCRIPTION
The DS18B20 digital thermometer provides 9-bit to 12-bit Celsius temperature measurements and
has an alarm function with nonvolatile userprogrammable upper and lower trigger points.
The DS18B20 communicates over a 1-Wire bus that by definition requires only one data line (and
ground) for communication with a central microprocessor. It has an operating temperature
range of -55°C to +125°C and is accurate to ±0.5°C over the range of -10°C to +85°C. In
addition, the DS18B20 can derive power directly from the data line (“parasite power”), eliminating
the need for an external power supply. Each DS18B20 has a unique 64-bit serial code,
which allows multiple DS18B20s to function on the same 1-Wire bus. Thus, it is simple to use one
microprocessor to control many DS18B20s distributed over a large area.


FEATURES
Unique 1-Wire® Interface Requires Only One Port Pin for Communication
Each Device has a Unique 64-Bit Serial Code Stored in an On-Board ROM
Multidrop Capability Simplifies Distributed Temperature-Sensing Applications
Requires No External Components Can Be Powered from Data Line;

Power Supply
Range is 3.0V to 5.5V


Measures Temperatures from -55°C to +125°C
(-67°F to +257°F)


 ±0.5°C Accuracy from -10°C to +85°C


 Thermometer Resolution is User Selectable
from 9 to 12 Bits


 Converts Temperature to 12-Bit Digital Word in
750ms (Max).

 

 

DS18B20 Temperature Compensation

The  two DS18B20 were taped together and allowed to equalize to the same temperature.

Readings were compared  and compensation added in code to ensure the probes read the same temperatures.

 

Temperature compensation applied at 100mins to equalize the two DS18B20

 

Perspex Dust Cover

 

 

 

 

 

 

Top TFT Display Vero Board

 

 

 

Top TFT Display Vero Board with Current Cost Analogue Development Boards & DAC Boards Fitted

These boards are not used in this project but I have wired connectors and pins in case I use them in the future.

 

 

Top TFT Display Vero Board

 

Top TFT Display Vero Board Rear View

 

 

Lower Vero Board Showing Nano and Voltage Regulator Boards Fitted

 

 

Lower Vero Board Showing without Nano and Voltage Regulator Boards Fitted

 

 

 

 

 

 

 

 

 

 

 

 

 

Warnings & Alerts

The display will show warnings if the soil is too dry or too cold.

 

 

 

 

Frost Warning

The soil temperature sensors are in my Dahlia Bed at ground level and Dahlia Tuber level.

The words "FROST WARNING" is displayed if the temperature falls below 1°C.

 

 

Soil Dry Warning

Soil Moisture Sensors are in the Lawn and the Dahlia Bed at Tuber level.

The words " SOIL DRY" are displayed if the soil moisture goes below 60%.

 

 

 

 

 

Animation showing failed send to Thingspeak

Line 5 shows the commands sent and if OK or Fail.

Line 4 shows the results OK or Fail.

If any commands fail the word FAIL remains on to show the last send failed.

 

Startup Animation

 

 

 

 

 

 

Current Cost Analogue Development Boards

These are included for future use.

These boards have analogue inputs and talk to my Meteohub Weather Station over a wireless link to a Current Cost Display see below.

The Current Cost Display is connected by USB to my Meteohub Server.

 

 

Current Cost Analogue Development Board Side

 

 

 

 

 

Current Cost Analogue Development Board Top

 

 

 

 

Current Cost Analogue Development Board Rear

 

 

Pairing Current Cost Analogue Development Board to a Current Cost display



Power up the Current Cost Analogue Development Board

Press the red button and hold approx 9 seconds.

LED1 on the rear of the board will flash while the board is in pairing mode.


Go to your monitor and press the UP button () until the device number on the screen shows the device Chanel you want to pair.

Press and hold the DOWN button () until the LED on
the monitor flashes.


Release the button and you will see the tuning process begin. After a few seconds you should then see energy now showing “0 Watts”

Connect an analogue output from your Arduino to the pad marked OUTPUT on the pictures above. This must not exceed 3.3v.

 


To add  other Current Cost Analogue Development Board  please repeat the process.

 When you get to the screen with the appliance 1 data you just need to press the UP () button once to take you to appliance 2.

You now need to pair this second appliance by pressing and holding the DOWN () button until the LED flashes.

 

Note the display will show a value in Watts but the data sent to my Weather Station is just a number. This means any device can be connected to one of these boards and the date will show in my weather station.

Conversion formulas can be applied via the Meteohub interface to change the data to suit your needs.

 

MCP4725 DAC

I have included sockets for a couple of these boards in case I need to send readings from a digital sensor via my Analogue Current Cost Board.