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

Code:

Arduino code(click here)

Process3 code (click here)

Pins and connections

Servo pins: 

data pin — 12th pin of arduino

GND–GND

VCC–5V

Ultrasonic Pins:

Trigger Pin to 10th pin of arduino

Echo pin to 11th pin of  arduino

GND—GND

VCC–5V

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

12v-inverter

12v to 220v inverter DIY circuit

Inverters are made for producing high voltage from low voltage DC sources/batteries. We are here to design an inverter circuit for converting 12V DC source into 220V AC power. Its components are easily available in our electronics markets and so easy to build on PCB boards.

Hexcodeplus

Operations of this kind of inverters are based on switching pulses and were uses step-up transformers. So, the CD4047 microcontroller acts as a switching pulse oscillator and IRFZ44N (N-channel power MOSFET) acts as it’s switch. Then the 12-0-12 secondary transformer will inversely used as a step-up transformer.

Inverter Circuit Diagram

Hexcodeplus

Components Required

  1. Micro-controller CD4047
  2. Power MOSFET IRFZ44 = 2.
  3. 12-0-12V secondary transformer 1 amps
  4. Variable Resistor 22KΩ
  5. Resistors 100Ω / 10 watts = 2
  6. capacitor 0.22µF
  7. 12 volt battery
Hexcodeplus

Construction & Working

This inverter circuit has switch device and step-up transformer. As per the theories, high switch frequency pulse reaches the step up transformer and due to the mutual inductance; output voltage will reach high value.

The microcontroller CD 4047 is configured as an astable multi-vibrator mode with the help of variable resistor RV1 and capacitor C1. By varying the value of RV1, we will collect different range of output pulse at Q and Q’ pins. These all results the variation of output voltage at the step-up transformer.

The IRFZ44 (N-channel power MOSFET) will drain, pins are connected with secondary pins of the transformer and common pin connected with the secondary winding and is connected with battery positive bias. Both MOSFETs source pins are connected to the negative bias of battery. And these are driven by Q and Q’ output from CD4047 micro-controller. If an alternate square pulse drives the MOSFETs switches, the secondary winding may forced to induce alternate magnetic field. This magnetic field induce primary winding of transformer and will produce high alternate voltage.

Note: High AC voltage circuit. Attention for handle with extreme care.

Hexcodeplus

12VbatteeryLevelMonitor

12V Battery Level Monitor

LM3914 IC is the IC used in this circuit. This IC is also called as dot display driver or bar display driver. It has the ability to sense the magnitude of input analogue signals and able to drives up to 10 LEDs at a time. There are two modes of displays we can choose; dot or bar, depends upon the purpose. Pin 9 is connected with power supply and it tends to get a graph output else IC gives dot display.

lm3914 circuit

We can use LM3914 IC to monitor 12V battery level. The power supply needed for this circuit will get from the input battery itself. LED D1 to D10 will show the level of battery. By using very simple components, we can easily monitor the battery level with this IC.

Hexcodeplus
S.NoNameQuantity
1.IC LM39141
2.LED10
3.Resistor 56KΩ
Resistor 18KΩ
Resistor 4.7KΩ
1
1
1
4.Variable Resistor 10 KΩ1
5.Switch1
emergencyLED

LED Emergency light

The portable LED lamp circuit with simple components are so easy to make. Here we are using high luminescent LEDs for making the lamp. The circuit needs 6V rechargeable lead acid as power supply.

Circuit diagram

Hexcodeplus

The circuit will get AC 230V as input voltage, this supply collected by the step-down transformer that will regulate AC into fluctuated DC. The fluctuation is overcome by using bridge rectifier connected along with the transformer. The capacitor C1 stabilizes the DC supply on the circuit.
The 5V two channel relay used here to switch the power action ON/OFF when the power gets into the regulator IC 7805. There is a 6V DC battery used in the circuit in connection with the relay, in between the relay circuit the diode 1N4007 is used to direct the voltage path. The output pins from regulator IC 7805 and negative pole of the 6V DC battery are connected with the seven LEDs serially along with each resistor in one side.

Components List

S.NoNameQuantity
1.Transformer Stepdown 
(230V to 9V)500mA
1
2.Diode 1N40078
3.Relay 9Volt1
4.Battery1
5.Switch1
6.IC 78051
7.Capacitor 100uF & 0.1uF1
8.Resistor 220 Ω7
9.LED white7