Humidity Controlled Buzzer



Introduction: Humidity Controlled Buzzer

IoT Related Projects

Hello!! I'm back with another tutorial on NodeMCU.In today's tutorial, I am going to teach how to interface Servo motor and humidity sensor.This can find its application in agriculture to control the humidity level present over the land.If there is any scarcity of water, alarming the guardian through the buzzer.

Now let's start billing the component.

Step 1: Billing of Materials

Step 2: Connecting DHT11

The humidity sensor is a specially designed circuit that indicates the level of the humidity around its surrounding.Here I am using DHT sensor as a humidity sensor.

The humidity sensor consists of three pins

  • Signal pins: This is the signal pin that sends the input to the node telling the temperature and humidity level content of the surrounding.
  • VCC pins: the positive voltage supply pin.
  • GND pins: the negative voltage supply pin.

The connection of the humidity pin is as follow

  • Signal pin: this is connected to the digital pin of Arduino 2.
  • VCC pin: this is connected to the breadboard positive railing.
  • GND pin: this is connected to the breadboard negative railing.

Let's now get connection of the buzzer

Step 3: Buzzer Connection

The buzzer is an electronic circuit that converts the electrical impulse sent by any micro controller into sound.

The connection of the buzzer is as follows:

  • Red wire indicates a positive terminal that needs to be connected to the digital pin 4.
  • The black wire is connected to the ground pin of the Node MCU.

Let's start coding

Step 4: Coding

#include "dht.h"
 dht DHT; // if you require to change the pin number, Edit the pin with your arduino pin. 
#define DHT11_PIN 2 
int buzzer = 2;
 void setup() { 
PinMode(Buzzer,OUTPUT) }
void loop() {
int chk = DHT.read11(DHT11_PIN); 
Serial.println(" Humidity " ); 
Serial.println(DHT.humidity, 1); 
Serial.println(" Temparature "); 
Serial.println(DHT.temperature, 1); 
if(DHT.humidity < 50%){
 delay(2000); }



    • Fix It! Contest

      Fix It! Contest
    • Tiny Home Contest

      Tiny Home Contest
    • Metalworking Contest

      Metalworking Contest