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

Specifications

  • 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
Hexcodeplus
Hexcodeplus

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

      Serial.println(“RAINING”);

      break;

    case 1: // Sensor getting partially wet

      Serial.println(“RAIN WARNING”);

      break;

    case 2: // Sensor dry

      Serial.println(“NOT RAINING”);

      break;

  }

  delay(1000); //delay 1 second

}

 

Hexcodeplus
image

IR Remote Control Light Switch

To turn ON/OFF home appliances, we can use IR remote control system switch with any IR enabled remotes. The TSOP1738 IR Receiver( or TSOP1736) used here to receive the signals from remotes. These IR sensor having the capability to receiving 36 KHz IR signals from any remotes.

The timer circuit used here is to take the output from IR sensor. Then it is possible to control light or any other appliances.

shop.hexcodeplus.com

circuit diagram

IR Remote Control Light Switch

components required

  1. TSOP 1738
  2. IC 7805
  3. IC 555
  4. IC 4017
  5. 9V Relay
  6. Transistor BC547
  7. Diode 1N4007
  8. Resistor 100KΩ = 2, 330Ω
  9. Capacitor 0.01μF = 2, 10μF
  10. Battery 9V
hexcodeplus

Construction & Working

This relay circuit required 9V supply and it get from battery. This circuit receives any IR signals from any IR remotes and make it turn ON/OFF electrical appliances. For a sample, we can choose a common bulb here to glow the circuit up. The bulb is connected in relay as between common and Normally-Open terminals of the relay.

LM7805 is the 5V regulator IC used here for supply to IR sensor, timer and counter IC. The output of sensor TSOP 1738 is connected with timer IC’s trigger Pin. The IR signals Received by TSOP 1738, produce output and triggers the timer IC. Here, timer IC is configured as mono-stable multi-vibrator and hence produce single pulse signals depends on the timer Resistor R2 and Capacitor C2 values.

The timer output is applied to clock input of IC4017 and this IC counts the clock. If the count begins from zero, then transistor Q1 output becomes high and then BC547 transistor gets turn ON and it makes the relay connected with ground. Then, relay coil get power and attracts the level to Normally-Opened contact. Then the bulb gets power supply and it will start glowing.

If the count begins from one (Q1 is high) then output of Q2 becomes high. And the signal biased to reset pin 15 and hence everything on counter gets reset. So, the transistor Q1 becomes low (zero), then transistor becomes turn OFF. So, the relay also gets turn OFF. This leads to the disconnection of bulb from supply and bulb become OFF.

temperature-control.jpg

Automatic Temperature Controlled Switch

We can make control temperature using this Automatic Temperature Controlled Switch circuit; it will make control temperature automatically. LM35 is the temperature sensor used in this circuit for detection of temperature and also it helps to turn ON/OFF the output devices or appliances.
Once we tune the LM35’s sensitivity level of temperature, the circuit becomes control as an automatic switch. Easily available components can be used for developing this circuit prototype with small PCB boards like line/dot PCBs.

Hexcodeplus

Circuit

Hexcodeplus

Construction & Working

Regulator unit and rectifier are the first stage of this circuit. 110V to 220V AC Supply is the input voltage and it is converted into 9V AC by using step-down transformer. After that, it is being rectified into DC voltage using bridge rectifier. Capacitor C1 reacts as filter to remove AC ripples then using 7805 regulator IC regulates provides constant 5V DC Voltage Supply.
LM35 is the temperature sensor used in this circuit and it gives an output voltage linearly proportional to the centigrade temperature. And an operational amplifier LM358 used here to help us to choose the temperature level through the variable resistor, VR1 and output of this Op-Amp is drives the transistor, Q1. In between +5V DC and collector terminal of the transistor Q1, the relay coil has been connected. When output voltage is higher than 2.5V from Op-Amp transistor Q1 turns ON and it connect the relay coil to neutral/ground. Hence, the coil gets power and makes the Normally-Open contact to Normally-Closed one. So, we can control electrical loads or an appliance automatically depends on temperature.

Hexcodeplus

ac-powered-230v-led

AC Powered 230V LED Circuit

AC powered 230V LED circuit is less cost effective and looks simple. We are using high bright white LEDs and those are connected to the AC source with the support of some rectification components without any step-down transformers.

So, the cost of this circuit has fewer prices in electronics market and the output light cost likewise too.

Circuit Diagram

led power circuit

Construction & Working

This circuit helps to light some LEDs without any step-down transformers. Polyester capacitor (0.47µF / 400V), Resistor 470KΩ 1/4 Watt and Bridge rectifier components are used to step-down the AC Power supply. Due to barrier generated by these components, AC remains reduced to lower level and then is converted in to DC Power Supply.

Hexcodeplus

At the output of bridge rectifier, filters DC output using 47µF/25V electrolytic capacitor. The Zener diode 16V/1 watt regulates DC output from the rectifier. In this circuit, there are 5 high bright LEDs are connected in series and powered by the rectifier circuit. When power is ON, the resistor and polyester capacitor gives barrier to the AC mains and it reduces into lower level. The bridge will convert this lower AC into DC and the filter capacitor, Zener diodes are regulates the DC output. At the end of this process, the DC supply voltage will given to the LED array.

Hexcodeplus

Note: This circuit operating on High Voltage. Attention for Handle with Extreme care.

Polyester Capacitor

The Voltage dropping capacitor (0.47uF / 400V or 474k / 400V X) rated capacitor is a power line filter capacitor. These are mostly used for to reduce the AC power supply through Capacitive Reactance property.

Hexcodeplus