rain detection

Rainwater alert system

Rain alert alarm with code

In this post we are creating an arduino based rain alert alarm circuit with the code explanation line by line.Here we also discuss about the working of the rain water sensor which includes the intensity of rain falls into the circuit

Rain water sensor working

This module works on the basics of opamp LM393, The sensor board is coated with Nickel as lines which helps analyse the moisture content in the board. when there is moisture content the resistance is low and when the board is dry the resistance will be high and the opamp amplifies the output


  • Adopts high quality of RF-04 double sided material.
  • Area: 5cm x 4cm nickel plate on side,
  • Anti-oxidation, anti-conductivity, with long use time;
  • Comparator output signal clean waveform is good, driving ability, over 15mA;
  • Potentiometer adjust the sensitivity;
  • Working voltage 5V;
  • Output format: Digital switching output (0 and 1) and analog voltage output AO;
  • With bolt holes for easy installation;
  • Small board PCB size: 3.2cm x 1.4cm;
  • Uses a wide voltage LM393 comparator

Arduino code

//paste this code in arduino IDE 

const int sensorMin = 0; // set minimum sensor value 

const int sensorMax = 1024; //set maximum sensor value

//void setup is single time running program in Arduino 

void setup()


Serial.begin(9600);//here we initialize the baud rate to 9600


//loops are continuously executing the programme in Arduino programming

void loop() 


  int sensorReading = analogRead(A0); //to read analog value from the A0 pin

  int range = map(sensorReading, sensorMin, sensorMax, 0, 3); //map funtion to map the values to our rated range 

  switch (range) 


    case 0: // Sensor getting completely wet



    case 1: // Sensor getting partially wet

      Serial.println(“RAIN WARNING”);


    case 2: // Sensor dry

      Serial.println(“NOT RAINING”);



  delay(1000); //delay 1 second



arduino project

Radar using arduino

DIY Radar using Arduino

arduino project

Components required

Arduino Uno R3 compatible(Buy Now)

Arduino uno R3 is an atemga328p based development board which consist of 13 digital pins and 6 analog pins, This board is one of the most popular development board among the Hobby circuit designers

HC-SR04 Ultrasonic sensor(Buy Now)

HC-SR04 ultrasonic module is generally used t calculate the distance.As name implied this module works by creating ultrasonic sound and the time required to reach its echo(operating range 2cm to 400cm)

Servo Motor SG-90(Buy Now)

Here it gives the swing mechanism 

Jumper Cables

diy radar

Here we use a software to display real time Radar screen in our  computer named as processing3 ( click to download


Arduino code(click here)

Process3 code (click here)

Pins and connections

Servo pins: 

data pin — 12th pin of arduino



Ultrasonic Pins:

Trigger Pin to 10th pin of arduino

Echo pin to 11th pin of  arduino





The smart dustbin is an Arduino based project which is an innovative method to keep the city clean, top of the dustbin will open automatically when a person approaches the dustbin and get closed when he returns

smart dust bin

Working principle

Ultrasonic sensor work based on the ultrasonic sound, ultrasonic sensor continuously monitor the echo signal and detect the obstacle in front of the device if the obstacle is within the threshold range by using a mathematical formula (Distance (in cm) = (duration/2) / 29). then microcontroller and make a decision to open the cap of the dustbin by using a servo motor ,



Arduino – an introduction

Arduino is an opensource platform which is an easy to use hardware-based development, This development boards are commonly used Atmel based microcontroller which is programmed by using Arduino IDE(Integrated Development Environment). This freeware can be downloaded from the Arduino official site or use can program in a web-based platform named as Arduino create

project training

Key features

  • 16Mhz CLK speed
  • 1Kb EEPROM
  • 5v operating voltage
  • Input voltage can be vary from 7v to 12V(recommended)
  • The input voltage ranges from 6v to 20V
  • 14 Digital input/output pins
  • 6 Analog i/p pins
  • 40 mA DC Current for each input/output pin
  • Flash Memory is 32 KB
  • SRAM is 2 Kb

Pin diagram of arduino uno


Arduino programming

Once you purchase Arduino UNO (buy now ) you can connect with the computer after installing Arduino ide, Then you need to choose the development board and port from the tools option

Adruino was written in C++ also with some other functions and specific methods which are called as a sketch in Arduino IDE and then it process and compiles to machine language

Serial monitoring

For open serial monitoring option, we can see a magnifying glass icon in the right top of the Arduino IDE. This tool is mainly used for interacting the Arduino development board with the computer. Which means this tool help to debug and monitoring of the real-time program similarly like serial monitor Arduino also have a serial plotter which helps to plot the graph of a realtime running Arduino application