Wireless Soil Moisture Sensor

by cabuu in Circuits > Sensors

28153 Views, 110 Favorites, 0 Comments

Wireless Soil Moisture Sensor

Promo3-INS.jpg

Create a wireless soil moisture sensor to remotely monitor your plants and remind you when to water. This project uses a D1 Mini micro-controller, 3D printable parts and the Blynk IoT platform.

The device can be used stand-alone or eventually integrated into a fully automated gardening system.

Here is a video summary of the sensor and all its features...

For more details of this and other similar projects see my website: http://www.cabuu.com

3D-Print Your Parts

3D Parts.png

Start by downloading and printing the 3 printable parts. The parts hold all the components neatly in place and are simple in design to facilitate printing on most 3D-printers. I used the following settings:

  • 0.2mm layer height
  • 20% Infill
  • Support

Once printed, remove the support structures from the main body to allow access to the D1 mini and charge controller.

Build Your Electronics

Moisture-Sensor-Schematic.jpg

Configure Blynk

Screenshot_20190528-150340.jpg
clone_246591837.png
Arduino Customise.png

Install the Blynk app from the Google Play or Apple app Store and create a new project using the QR code above. Make note of the authentication code for your project.

In order to upload the sketch you will first need to install the esp8266 board and two libraries, if you haven't done so already.
To install the esp8266, add the following URL to the Additional Boards Manager URLs in the Preferences window of the Arduino IDE.

http://arduino.esp8266.com/stable/package_esp8266com_index.json

Now within Boards Manager, install the esp8266 board. Using the library manager, install the FastLED and Blynk libraries.

Download the Arduino sketch and configure it for your WiFi SSID, password and Blynk authentication token. Upload it to the D1 Mini using the micro USB connector. Check that each component of the device works before moving onto the next step. If something doesn't work check your connections carefully and rule out individual device failures by replacing them in turn.

Assembly and Configuration

DSC00936.jpg
Screenshot_20190528-150350.jpg

Assemble the components within the printed housing and insert a battery. Use a glue gun to hold everything in place and to secure the battery and sensor covers. The sensor is designed to be used indoors, if you want to use it outdoors you will need to weatherproof it first!

Place the sensor, load up the Blynk app and monitor! Adjust the wet/dry thresholds within the app until you find the correct settings for your particular sensor/soil/plant. And that's it, just remember to water when notified...

A Note About Power

DSC00962.jpg

The device is designed to be powered using a single 3.7V 14650 type battery. Depending on the battery capacity, using deep sleep mode, it should last approximately 2-3 weeks. The battery can be charged using a standard 5V USB connected to the micro-usb connector located on the charge controller.

For a more permanent source of power a solar panel may be connected to the DC jack at the top of the device.

Adding a Solar Panel

DSC00953.jpg

Adding a solar panel can create a near continuous source of power for many IoT devices. See my video for the theory behind this.

The DC jack at the top of the device can be used to attach a suitable solar panel, I recommend a 6V panel of approximately 4-5W.

Simply solder a male DC cable to the solar panel, place in a sunny location and attach to the moisture sensor.