AUTOMATIC WATER TANK LEVEL INDICATOR & MOTOR CONTROL USING ULTRASONIC SENSOR

by gsantony in Circuits > Electronics

16195 Views, 56 Favorites, 0 Comments

AUTOMATIC WATER TANK LEVEL INDICATOR & MOTOR CONTROL USING ULTRASONIC SENSOR

IMG_20180517_161806q.jpg
Automatic water level indicator & motor control

Hello every one!!!!

Nice to see you all after long back ....This is my one more creation with this we can monitor the water level of 2 numbers of water tank and control motor ...

In my home i have this problem like water tank over flows while filling up and many more water has been wasted....

To over come this problem i have created this one ...I think many of them having this problem so just try this and solve it... finally give your valuable comments and feed backs...

In this project i have used two ultrasonic sensor for two water tank and one arduino uno 3,we can switch over the sensor by changing the toggle switch.

come Let's make it.....!!!!!!

Tools and Materials Required

IMG_20180521_232401.jpg
IMG_20180517_161806.jpg
IMG_20180517_162605.jpg
IMG_20180517_162226.jpg
IMG_20180517_164609.jpg
IMG_20180517_162057.jpg
IMG_20180517_162303.jpg
IMG_20180517_162701.jpg
IMG_20180517_162725.jpg
IMG_20180517_162741.jpg
IMG_20180517_162825.jpg
IMG_20180517_163006.jpg
IMG_20180517_163926.jpg
IMG_20180517_164028.jpg
IMG_20180517_163959.jpg
IMG_20180517_164424.jpg
IMG_20180517_164450.jpg
IMG_20180517_164518.jpg
IMG_20180517_162012.jpg
IMG_20180517_162021.jpg
IMG_20180517_164705.jpg
IMG_20180517_163711.jpg
IMG_20180517_163657.jpg
IMG_20180518_183701.jpg
IMG_20180602_192733.jpg
IMG_20180517_163829.jpg
IMG_20180517_164104.jpg
IMG_20180517_162506.jpg
IMG_20180517_163115.jpg
MATERIALS:
  1. Arduino R3 - 1 no
  2. Water tank - 2 no's
  3. Buzzer -1 no
  4. Ultrasonic sensor - 2 no's
  5. 16x2 LCD display -1 no
  6. Plastic box -2 no's
  7. Toggle switch -1 no
  8. Relay 6v/5A -1 no
  9. IC ULN2003 with base -1 no
  10. Old emergence light container -1 no
  11. LED's(red,yellow,green) - each 2 no's
  12. Ribbon wire -as required length
  13. 6v or 12v adapter -1 no
  14. General purpose PCB -as required size
  15. Resistor -220 ohm
  16. Screw -20 no's
  17. Plastic sheet -as required size
  18. Variable resistor - 10 k ohm
  19. Connecting wires - as required

TOOLS :

  1. Wire stripper - 1 no
  2. Wire cutter -1 no
  3. Soldering kit -1 no
  4. Hot glue gun -1 no

CIRCUIT DIAGRAM:

water level indicatora.jpg

In this circuit diagram i have used 3 separate toggle switch to change over between two sensors but in real single one is available and that's enough.....if you have any doubt just comment it...

PROGRAM:

PROGRAM:

#include <LiquidCrystal.h>

#define led 13

#define led2 12

#define led3 11

#define led4 10

#define led5 9

#define led6 8

#define trigger 18

#define echo 19

#define motor 17

#define buzzer 16

LiquidCrystal lcd(2,3,4,5,6,7);

float time=0,distance=0;

int temp=0;

void setup()

{

lcd.begin(16,2);

Serial.begin (9600);

pinMode(trigger,OUTPUT);

pinMode(echo,INPUT);

pinMode(motor, OUTPUT);

pinMode(buzzer, OUTPUT);

pinMode(led, OUTPUT);

pinMode(led2, OUTPUT);

pinMode(led3, OUTPUT);

pinMode(led4, OUTPUT);

pinMode(led5, OUTPUT);

pinMode(led6, OUTPUT);

lcd.print(" Water Level ");

lcd.setCursor(0,1);

lcd.print(" b Indicator ");

delay(2000);

}

void loop()

{

lcd.clear();

digitalWrite(trigger,LOW);

delayMicroseconds(2);

digitalWrite(trigger,HIGH);

delayMicroseconds(10);

digitalWrite(trigger,LOW);

delayMicroseconds(2);

time=pulseIn(echo,HIGH);

distance=time*340/20000;

lcd.clear();

lcd.print("Water Space In ");

lcd.setCursor(0,1);

lcd.print("Tank is: ");

lcd.print(distance);

lcd.print("Cm");

delay(2000);

if (distance <= 78)

{

digitalWrite(led, HIGH);

}

else

{

digitalWrite(led,LOW);

}

if (distance < 65)

{

digitalWrite(led2, HIGH);

}

else

{

digitalWrite(led2, LOW);

}

if (distance < 52)

{

digitalWrite(led3, HIGH);

}

else

{

digitalWrite(led3, LOW);

}

if (distance < 45)

{

digitalWrite(led4, HIGH);

}

else

{

digitalWrite(led4,LOW);

}

if (distance <28)

{

digitalWrite(led5, HIGH);

}

else

{

digitalWrite(led5,LOW);

}

if (distance < 15 )

{

digitalWrite(led6, HIGH);

}

else

{

digitalWrite(led6,LOW);

}

if(distance<15 && temp==0)

{

digitalWrite(motor, LOW);

digitalWrite(buzzer, HIGH);

lcd.clear();

lcd.print("Water Tank Full ");

lcd.setCursor(0,1);

lcd.print("Motor Turned OFF");

delay(3000);

digitalWrite(buzzer, LOW);

delay(3000);

temp=1;

}

else if(distance<15 && temp==1)

{

digitalWrite(motor, LOW);

lcd.clear();

lcd.print("Water Tank Full ");

lcd.setCursor(0,1);

lcd.print("Motor Turned OFF");

delay(5000);

}

else if(distance>70)

{

digitalWrite(motor, HIGH);

lcd.clear();

lcd.print("LOW Water Level");

lcd.setCursor(0,1);

lcd.print("Motor Turned ON");

delay(5000);

temp=0;

}

}

TRIAL IT ON BREAD BOARD

IMG_20180517_163140.jpg
IMG_20180518_142535.jpg
IMG_20180518_142502.jpg
IMG_20180518_144316.jpg
IMG_20180518_142006.jpg
Relay-Pinout.png

Just make the connection as per the circuit diagram and download the program to arduino board & check the output

CUT THE PLASTIC SHEET

IMG_20180517_170005.jpg
IMG_20180517_170026.jpg
IMG_20180517_170046.jpg
IMG_20180517_170104.jpg
IMG_20180517_170114.jpg
IMG_20180517_170137.jpg
IMG_20180517_170211.jpg

NOW take the plastic sheet and cut it as set in to the old emergence light box...... please refer the images attached

MAKE a HOLE

IMG_20180517_164129.jpg
IMG_20180518_183047.jpg
IMG_20180518_183059.jpg

Just place a arduino and pcb board in perfect place then mark it to fix and make holes .....

PREPARING THE LCD DISPLAY

IMG_20180519_114847.jpg
IMG_20180519_115243.jpg
IMG_20180519_115325.jpg
IMG_20180518_191415.jpg
IMG_20180519_122911.jpg
IMG_20180519_122928.jpg

Take some wires and solder it on LCD display pins and make a hole space on plastic sheet and place it on the plastic sheet

PLACING THE COMPONENTS ON PCB

IMG_20180518_185159.jpg
IMG_20180518_185318.jpg
IMG_20180519_123821.jpg
IMG_20180518_185317.jpg
IMG_20180518_185228.jpg
IMG_20180519_123802.jpg
IMG_20180519_123812.jpg
IMG_20180519_125917.jpg
IMG_20180519_130322.jpg
IMG_20180519_125725.jpg
IMG_20180519_125853.jpg

Now we are going to place the components on PCB and solder it and connect some wires to connect LED's

FIXING AND CONNECTION OF LED'S

IMG_20180519_124823.jpg
IMG_20180519_124834.jpg
IMG_20180519_124925.jpg
IMG_20180519_124938.jpg
IMG_20180519_132335.jpg
IMG_20180519_132340.jpg
IMG_20180519_132343.jpg
IMG_20180519_132358.jpg
IMG_20180519_132324.jpg
IMG_20180519_133221.jpg
IMG_20180519_133742.jpg

Then make make a perfect size hole to fit LED's then connect them as per the circuit diagram.

TOGGLE SWITCH

IMG_20180519_134220.jpg
IMG_20180519_134237.jpg
IMG_20180519_134304.jpg
IMG_20180519_135929.jpg
IMG_20180519_140613.jpg
IMG_20180519_140623.jpg
IMG_20180519_140721.jpg
IMG_20180519_140738.jpg

Here we are going to fix toggle switch on that plastic sheet and make connection as per the circuit diagram.

BUZZER

IMG_20180519_142425.jpg
IMG_20180519_142720.jpg
IMG_20180521_224358.jpg

Just fix the buzzer on the sheet and make connection...

PLACEMENT OF ARDUINO

IMG_20180519_141744.jpg
IMG_20180521_232048.jpg
IMG_20180521_232401.jpg
IMG_20180521_232520.jpg
IMG_20180521_232652.jpg
IMG_20180521_232847.jpg
IMG_20180521_231742.jpg
IMG_20180521_234451.jpg
IMG_20180521_234503.jpg
IMG_20180521_231758.jpg

NOW place arduino and provide the connection as per the circuit diagram for more details just refer image attached

SMALL TESTING

IMG_20180521_235913.jpg
IMG_20180521_235945.jpg
IMG_20180522_000011.jpg
IMG_20180522_000044.jpg
IMG_20180522_000145.jpg
IMG_20180522_000207.jpg
IMG_20180522_000304.jpg
IMG_20180522_000602.jpg
IMG_20180522_000624.jpg
IMG_20180522_000308.jpg
IMG_20180522_000535.jpg
IMG_20180522_000700.jpg

NOW power on and test the output by just lifting the ultrasonic sensor

CLOSING THE BOX

IMG_20180522_001142.jpg
IMG_20180522_001147.jpg
IMG_20180522_001150.jpg
IMG_20180522_001200.jpg
IMG_20180522_001429.jpg
IMG_20180522_001457.jpg
IMG_20180522_001610.jpg
IMG_20180522_001621.jpg
IMG_20180522_001554.jpg
IMG_20180522_001445.jpg
IMG_20180522_001633.jpg

Here we are going to fix everything in to the box and closed it ....

ULTRASONIC SENOR

IMG_20180602_192140.jpg
IMG_20180602_194832.jpg
IMG_20180602_194759.jpg
IMG_20180602_192115.jpg

Then fix the sensor on the box like mentioned on image

STICKERS

IMG_20180602_181944.jpg
IMG_20180602_182325.jpg
IMG_20180602_182345.jpg
IMG_20180602_182351.jpg
IMG_20180602_182444.jpg
IMG_20180602_182515.jpg
IMG_20180602_195600.jpg
IMG_20180602_195658.jpg

Type the letters like low,high medium,display,tank 1,tank 2, motor status, alarum in word document ..... then take printout & fix it on those place....

PLACE SENSOR ON WATER TANK

IMG_20180517_161636.jpg
IMG_20180603_095108.jpg
IMG_20180602_204456.jpg
IMG_20180603_095138.jpg
IMG_20180603_095120.jpg
IMG_20180603_095124.jpg
IMG_20180603_095137.jpg
IMG_20180602_204355.jpg
IMG_20180602_204343.jpg

JUST refer the image and place those sensors.

FIX THAT BOX ON WALL

IMG_20180603_094857.jpg
IMG_20180602_205759.jpg
IMG_20180609_083506.jpg
IMG_20180609_084554.jpg
IMG_20180609_083810.jpg
IMG_20180609_083831.jpg
IMG_20180609_083522.jpg
IMG_20180609_083714.jpg
IMG_20180609_083851.jpg

Finally fix that entire setup on the wall and switch on the circuit and watch the perfect out put

we made it !!!!!

THANK YOU .........PLEASE GIVE ME YOUR VALUABLE COMMENTS AND FEED BACKS......

YOUR'S

ANTONY XAVIER G