Introduction: Smart Garden Alarm

Smart garden Alarm system is a system that can be used by owners to measure soil moisture and ambient temperature. The system can also provide awareness and help owners to act early. If the status of the land is not in good condition, an alarm will sound, the led will light up and a notification will be sent to the owner.

In smart garden alarm, we use soil moisture sensor to measure soil moisture. Based on this project, if the soil moisture percentage is in the range of less than 10%, it will send a notification that the soil needs water via telegram to the owner. At the same time, the buzzer will sound and the LED will light up.

If the soil moisture percentage exceeds 45%, it will send a notification that the soil is still in a wet state via telegram to the owner.

In addition, we also use temperature sensors to measure the ambient temperature to keep the soil in good condition.

Supplies

  • Resistor
  • Glue Gun
  • Bread board
  • Soil Moisture Sensor
  • Temperature sensor
  • Buzzer
  • LED
  • Female to Female Jumper
  • Male to Male Jumper
  • Node MCU
  • USB Micr

Step 1: Preparing the Components

Firstly, we need to prepare all the components that we want to use on this projects. So, in this projects, we use

  • breadboard
  • soil moisture sensor
  • temperature sensor
  • LED
  • buzzer
  • nodeMCU
  • resistor
  • female to female jumper
  • male to male jumper

Step 2: Connect NodeMCU to Breadboard

Make sure all the jumpers are connect into the correct pin.

Step 3: Connect LED and Buzzer to Circuit.

Secondly, connect LED to circuit. Make sure put resistor before anode of the LED connect to pin D0. And for the buzzer, make sure negative side connect to the GND and the positive side connect to pin D4.

Step 4: Connect Soil Moisture Sensor and Temperature Sensor.

For soil moisture sensor, make sure VCC part connect to 3.3V pin, GND part connect to negative row and analog part connect to A0 pin on nodeMCU. Meanwhile, for temperature sensor, 4-20V pin connect to 3.3V pin, OUT pin connect to analog A0 pin and for GND pin connect to negative row.

Step 5: Install Library CTBot Into Sketch

This installation is used to connect this project with telegram. Refer step below to install

  1. Click Sketch >> Include Library >> Manage Libraries >> Search ''CTBot'' >> Click Install
  2. Click Sketch >> Include Library >> Manage Libraries >> Search ''UniversalTelegramBot'' >> Click Install

Step 6: Create a Bot Telegram for Project

1. Search botFather on Telegram application

2. To create a new bot, click on newbot

3. Assign name of the bot

4. Make sure the name of the bot doesn't have a match with others

5. After the bot has been created, copy the given token to access the HTTP AP1

Step 7: Getting ID From Telegram

1. Search IDBot

2. Click /start

3. Click /getID for get our own ID

Step 8: Declare Token and ID on Sketch

1. Paste the given ID on the ID part

2. Paste the given token on the token part