Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Project Documentation

ESP8266 NodeMCU-Based Smart Irrigation System with GPS Tracking

Image of ESP8266 NodeMCU-Based Smart Irrigation System with GPS Tracking

Circuit Documentation

Summary

This circuit integrates various sensors and modules with an ESP8266 NodeMCU microcontroller to perform environmental sensing and control functions. The circuit includes a DHT11 temperature and humidity sensor, a soil moisture module, a water level sensor, a GPS module, a relay for controlling a water pump, and power sources. The ESP8266 NodeMCU serves as the central processing unit, interfacing with the sensors and controlling the relay based on the sensor inputs.

Component List

ESP8266 NodeMCU

  • Microcontroller with WiFi capability
  • Pins: D0, D1, D2, D3, D4, 3V3, GND, D5, D6, D7, D8, RX, TX, A0, RSV, SD3, SD2, SD1, CMD, SD0, CLK, EN, RST, VIN

DHT11

  • Temperature and humidity sensor
  • Pins: DATA, GND, VCC

Soil Moisture Module

  • Sensor for detecting the moisture level in soil
  • Pins: positive, negative, Analog, Digital, Ground, VCC

SparkFun gator:soil

  • Soil moisture sensor designed for educational purposes
  • Pins: VCC, GND, SIG

Water Level Sensor

  • Sensor for detecting the level of water
  • Pins: SIG, VCC, GND

Water Pump

  • Device for pumping water
  • Pins: positive, negative

1-Channel Relay (5V 10A)

  • Electromechanical switch used for controlling high power devices
  • Pins: NC, signal, C, power, NO, ground

GPS NEO 6M

  • GPS module for location tracking
  • Pins: VCC, RX, TX, GND

3xAA Battery

  • Power source
  • Pins: VCC, GND

9V Battery

  • Power source
  • Pins: -, +

Wiring Details

ESP8266 NodeMCU

  • D2 connected to DHT11 DATA
  • D3 connected to Relay signal
  • GND connected to common ground
  • 3V3 connected to VCC of GPS NEO 6M, Soil Moisture Module, and Water Level Sensor
  • D1 connected to Water Level Sensor SIG
  • RX connected to GPS NEO 6M TX
  • TX connected to GPS NEO 6M RX
  • A0 connected to Soil Moisture Module Analog

DHT11

  • DATA connected to ESP8266 NodeMCU D2
  • GND connected to common ground
  • VCC connected to 3xAA Battery VCC

Soil Moisture Module

  • positive connected to SparkFun gator:soil VCC
  • negative connected to SparkFun gator:soil GND
  • Analog connected to ESP8266 NodeMCU A0
  • Ground connected to common ground
  • VCC connected to ESP8266 NodeMCU 3V3

SparkFun gator:soil

  • VCC connected to Soil Moisture Module positive
  • GND connected to Soil Moisture Module negative

Water Level Sensor

  • SIG connected to ESP8266 NodeMCU D1
  • VCC connected to ESP8266 NodeMCU 3V3
  • GND connected to common ground

Water Pump

  • positive connected to Relay NO
  • negative connected to 9V Battery -

1-Channel Relay (5V 10A)

  • signal connected to ESP8266 NodeMCU D3
  • ground connected to common ground
  • power connected to 3xAA Battery VCC
  • NO connected to Water Pump positive
  • C connected to 9V Battery +

GPS NEO 6M

  • VCC connected to ESP8266 NodeMCU 3V3
  • RX connected to ESP8266 NodeMCU TX
  • TX connected to ESP8266 NodeMCU RX
  • GND connected to common ground

3xAA Battery

  • VCC connected to DHT11 VCC and Relay power
  • GND connected to common ground

9V Battery

    • connected to Relay C
    • connected to Water Pump negative

Documented Code

ESP8266 NodeMCU

void setup() {
  // Initialization code here
}

void loop() {
  // Main code to read sensors and control relay
}

Soil Moisture Module

void setup() {
  // Initialization code here
}

void loop() {
  // Code to read soil moisture levels
}

Water Pump

void setup() {
  // Initialization code here
}

void loop() {
  // Code to control the water pump
}

1-Channel Relay (5V 10A)

void setup() {
  // Initialization code here
}

void loop() {
  // Code to control the relay state
}

3xAA Battery

void setup() {
  // Initialization code here
}

void loop() {
  // Code related to power management
}

(Note: The provided code snippets are placeholders and should be replaced with actual implementation code.)