AUTOMATIC WATER TANK LEVEL INDICATOR & MOTOR CONTROL USING ULTRASONIC SENSOR

14,818

55

22

Introduction: AUTOMATIC WATER TANK LEVEL INDICATOR & MOTOR CONTROL USING ULTRASONIC SENSOR

About: working as a college professor.

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

Step 1: Tools and Materials Required

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

Step 2: CIRCUIT DIAGRAM:

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

Step 3: 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;

}

}

Step 4: TRIAL IT ON BREAD BOARD

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

Step 5: CUT THE PLASTIC SHEET

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

Step 6: MAKE a HOLE

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

Step 7: PREPARING THE LCD DISPLAY

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

Step 8: PLACING THE COMPONENTS ON PCB

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

Step 9: FIXING AND CONNECTION OF LED'S

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

Step 10: TOGGLE SWITCH

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

Step 11: BUZZER

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

Step 12: PLACEMENT OF ARDUINO

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

Step 13: SMALL TESTING

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

Step 14: CLOSING THE BOX

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

Step 15: ULTRASONIC SENOR

Then fix the sensor on the box like mentioned on image

Step 16: STICKERS

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

Step 17: PLACE SENSOR ON WATER TANK

JUST refer the image and place those sensors.

Step 18: FIX THAT BOX ON WALL

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

Make it Move Contest

Participated in the
Make it Move Contest

Be the First to Share

    Recommendations

    • Cold Challenge

      Cold Challenge
    • Make it Glow Contest

      Make it Glow Contest
    • Clocks Contest

      Clocks Contest

    22 Comments

    0
    victoriano
    victoriano

    4 months ago

    Hi this is a great project, this latest days we increase the usage of water tanks to save water and this could be perfect to monitor constantly

    1
    jamali_murtaza063
    jamali_murtaza063

    Question 8 months ago

    Can you post a photo of PCB wiring layout ? So that I can start making this project for my home and office

    0
    ravijag
    ravijag

    4 years ago

    Hi

    Will the water condensation on the ultrasonic sensors affect the readings? Did u leave the system running for a few days and observe any issues with water condensation?

    0
    gsantony
    gsantony

    Reply 9 months ago

    Ya you are correct.... That will affect.... For that u must cover entire are of ultrasonic sensor except that tx and Rx rounds...

    0
    tanmayjalan
    tanmayjalan

    Reply 2 years ago

    Hey, any fix/workaround for the condensation on ultrasonic sensors?

    0
    gsantony
    gsantony

    Reply 4 years ago

    Hi...
    You are correct..... fixed this at last month still now I didn't find any of these problems like what u have mentioned...... Everything working fine

    0
    gilainareshreddy
    gilainareshreddy

    Question 1 year ago on Step 18

    I made it works well superb .....but problem is with sensors it was not stable with water vapours so please change the code for jsn sr-04T waterproof sensor

    0
    gsantony
    gsantony

    Answer 9 months ago

    Will change it and give u

    0
    gsantony
    gsantony

    Reply 9 months ago

    Ya sure you can do

    0
    gsantony
    gsantony

    Reply 9 months ago

    Welcome

    0
    MarkP416
    MarkP416

    3 years ago

    1. Relay 6v/5A anyone know how to wire this part into the circuit?
    0
    SivanC
    SivanC

    Question 3 years ago

    How can we incorporate dry run protection, any simple method ?

    0
    anumay
    anumay

    3 years ago on Step 18

    welldone clearly,
    thank u alot

    Hey... great work.. I would like to know, how did u protect water damage of the Ultrasonic sensor due to the water drop while pumping the water into the tank? I was facing that problem. If you could help me, it would be great. Thanks.. :)

    0
    lbotello1
    lbotello1

    Question 4 years ago on Step 18

    Hi how far this sensor can reach on cms? And if I want to remove the motor and just the 1 sensor for 1 tank what should I change on the code? Thank you

    0
    gsantony
    gsantony

    Reply 4 years ago

    sensor will detect up to 300 cm's....no need to change anything on the code ...just remove that switch and one sensor ...that's it.....

    0
    CyrilV5
    CyrilV5

    4 years ago on Step 18

    congrats dear... its usefull one..if anybody needs ill inform you

    0
    gsantony
    gsantony

    Reply 4 years ago

    thank u