Skip to content

Soil Moisture Monitoring using NodeMCU ESP8266, Soil Moisture Sensor, 0.96 OLED Display and Buzzer

License

Notifications You must be signed in to change notification settings

blitz-cmd/Soil_Moisture_Monitoring_using_IoT_Sensors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Soil Moisture Monitoring using NodeMCU ESP8266, Soil Moisture Sensor, 0.96 OLED Display, and Buzzer

Table of Contents

  1. Hardware Requirements
  2. Arduino Libraries
  3. Libraries Installation Steps
  4. Connections
  5. Procedure
  6. Convert Image to Adafruit GFX Bitmap Code
  7. Images

Images:

1) Architecture Diagram



2) Connection Picture



3) Website



Hardware Requirements:

1) NodeMCU ESP8266
2) Soil Moisture Sensor
3) 0.96 OLED Display
4) Buzzer
5) BreadBoard
6) Jumper Wires
7) USB Cable

Arduino Libraries:

1) SSD1306 by Adafruit version 1.2.9
2) GFX by Adafruit version 1.4.13
3) ESPAsyncWebServer 
4) ESPAsyncTCP
5) Dallasremperature by Miles Burton version 3.8.0
6) OneWire by Paul Stoffregen version 2.3.5
7) Blynk by Volodymyr Shymanskyy version 0.6.1

Libraries Installation Steps:

You can install it from library.zip by:
1) Unzip the `libraries.zip`
2) Copy the folder to default location "C:\Users\<username>\Documents\Arduino\"
3) Paste there
4) If you have used a custom folder for your project then copy the library folder there

Connections:

1) NodeMCU ESP8266 -> Soil Moisture

3V -> VCC
A0 -> AOUT
G -> GND

2) NodeMCU ESP8266 -> OLED

G -> GND
3V -> VCC
D1 -> SCL
D2 -> VDA

3) NodeMCU ESP8266 -> Buzzer

D5 -> +ve
G -> -ve 

Procedure:

Steps:

  1. Connect all the IoT devices according to the pin connection mentioned above.
  2. then install all the Arduino libraries from the library.zip folder as mentioned above.
  3. Copy the code to Arduino IDE.
  4. Connect the NodeMCU ESP8266 with the laptop.
  5. Then click on Tools from the Arduino IDE navbar and make sure the NodeMCU board is selected.
  6. And also make sure that Port is selected ( It will be auto-selected on device connection ).
  7. Code Steps:
1) In network credential, enter your wifi name and password.
2) If you want to change the OLED Display image, then follow the `Convert Image to Adafruit GFX Bitmap Code` steps.
  1. After making the changes, click on Verify and then click on Upload
  2. When the code gets uploaded successfully it will show this message Hard resetting via RTS pin.
  3. Then click on Serial Monitor to get the website IP.
  4. Copy the IP and paste it into your browser.
  5. Hence, your IoT application is ready to monitor the soil moisture.

Convert Image to Adafruit GFX Bitmap Code:

  1. Go to this link.
  2. Select the image from your pc.
  3. Go to the Image Settings:
a) Canvas size: Keep resolution below 128 * 64.
  1. Go to Output:
a) Code output format: Select Adafruit GFXbitmapFont.
  1. Click on generate code.
  2. Copy the generated code, paste it in the Arduino Code.