Vimarsh
Published © GPL3+

Smart Irrigation

Automatic and smart care of plants by proper watering and their monitoring.

IntermediateFull instructions provided2 hours3,913
Smart Irrigation

Things used in this project

Hardware components

Wemos D1 Mini
Espressif Wemos D1 Mini
WIFI MCU
×1
CoolMOS C7 Gold SJ MOSFET
Infineon CoolMOS C7 Gold SJ MOSFET
A very good quality and efficient DC MOSFET.
×1
Adafruit Waterproof DS18B20 Digital temperature sensor
Adafruit Waterproof DS18B20 Digital temperature sensor
for measuring soil temperature.
×1
SparkFun Soil Moisture Sensor (with Screw Terminals)
SparkFun Soil Moisture Sensor (with Screw Terminals)
measuring soil moisture.
×1

Software apps and online services

Blynk
Blynk
The IOT app
Arduino IDE
Arduino IDE
Coding IDE..

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)
Well if you want to actually make it..

Story

Read more

Schematics

Schematics for the project

Just explore it

Code

Smart Gardening

Arduino
Code..
Change the values of token, ssid, pass and other pin definitions according to your requirement.
Code is very easy and self explanatory
#include <OneWire.h>
#include <DallasTemperature.h>
#define ONE_WIRE_BUS D1
OneWire oneWire(ONE_WIRE_BUS);
/********************************************************************/
// Pass our oneWire reference to Dallas Temperature.
DallasTemperature sensors(&oneWire);

#define BLYNK_PRINT Serial


#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "<enter your auth token generated>";

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "SSID";
char pass[] = "password for ssid";


BlynkTimer timer;

// This function sends Arduino's up time every second to Virtual Pin (5).
// In the app, Widget's reading frequency should be set to PUSH. This means
// that you define how often to send data to Blynk App.
void myTimerEvent()
{
  sensors.requestTemperatures();
  float t = sensors.getTempCByIndex(0);
  // You can send any value at any time.
  // Please don't send more that 10 values per second.
  Blynk.virtualWrite(V5, t);
  Blynk.virtualWrite(V7,analogRead(A0));
}

void setup()
{
  Serial.begin(9600);

  Blynk.begin(auth, ssid, pass);
  // You can also specify server:
  //Blynk.begin(auth, wifi, ssid, pass, "blynk-cloud.com", 8442);
  //Blynk.begin(auth, wifi, ssid, pass, IPAddress(192,168,1,100), 8442);
  sensors.begin();
  // Setup a function to be called every second
  timer.setInterval(5000L, myTimerEvent);
}

void loop()
{
  Blynk.run();
  timer.run(); // Initiates BlynkTimer
}

Credits

Vimarsh

Vimarsh

5 projects • 38 followers
Currently, a student studying Physics @ BITS Pilani. A maker and a learner :D

Comments