• No results found

Arduino Water Level Sensor, Controller + Indicator

N/A
N/A
Protected

Academic year: 2021

Share "Arduino Water Level Sensor, Controller + Indicator"

Copied!
8
0
0

Loading.... (view fulltext now)

Full text

(1)

Labs free energy Q&A quizzes Comments Submit article Contact Register Login Arduino 555 Alarms Audio Basic DIY Hobby Lights Measure Power supply Radio Solar Tested Theory Various » Tools »

Arduino Water Level Indicator + Controller

This circuit was tested and worked properly!

Posted by P. Marian in Arduino, Tested with 19 comments Tagged with: water

4 Tweet 4

Here is a tested Arduino project that uses 3 sensor probes as water level indicator with 3 leds and one LCD display + a simple controller that turns on a motor when the water has reached the desired level (the highest in our case). You can use only the leds if you want, the lcd is optional.

261 Share

(2)

Check out the schematic, prototype and video below

The Arduino sketch code is pretty simple even though I spent almost 1 hour to test it. You can download it using the link below and then extract the files.

arduino water level skecth Water Level Sensor Code

//source: http://www.electroschematics.com/9964/arduino-water-level-sensor/ 1. #include <LiquidCrystal.h> 2. LiquidCrystal lcd(7, 6, 5, 4, 3, 2); 3. byte sensorPin[] = {8, 9, 10}; 4.

byte ledPin[] = {11, 12, 13}; // number of leds = numbers of sensors 5.

const byte sensors = 3; 6.

int level = 0; 7.

int motor = A4; 8.

9.

void setup() { 10.

for(int i = 0; i < sensors; i++) { 11.

pinMode(sensorPin[i], INPUT); 12.

pinMode(ledPin[i], OUTPUT); 13.

(3)

} 14. pinMode(motor, OUTPUT); 15. lcd.begin(16, 2); 16. } 17. 18. void loop() { 19. level = 0; 20.

for(int i = 0; i < sensors; i++) { 21. if(digitalRead(sensorPin[i]) == LOW) { 22. digitalWrite(ledPin[i], HIGH); 23. level = sensors - i; 24. } else { 25. digitalWrite(ledPin[i], LOW); 26. } 27. } 28. lcd.clear(); 29. lcd.print("Water level"); 30. lcd.setCursor(0,1); 31. switch(level) { 32. case 1: 33. lcd.print("HIGH"); 34. digitalWrite(motor, HIGH); 35. break; 36. case 2: 37. lcd.print("AVERAGE"); 38. digitalWrite(motor, LOW); 39. break; 40. case 3: 41. lcd.print("LOW"); 42. digitalWrite(motor, LOW); 43. break; 44. default: 45. lcd.print("NO WATER"); 46. digitalWrite(motor, LOW); 47. break; 48. } 49. delay(50); 50. } 51.

On line 2 we have included the LiquidCrystal.h header and then on line 3 the pins where to connect the LCD display. On line 4 we use sensorPin array to set the sensor pins, on line 5 ledPin is where we connect the 3 leds. We connected the motor on pin A4 so we use this in our motor variable.

Inside the setup() function we set the sensor pins as INPUT and led pins and motor as OUTPUT. In the loop() we check to see if the water level has reached any sensor and if so then turn an the corresponding led. We also use the LCD to display HIGH if the water has reached the highest poing, AVERAGE for half-filled water tank, LOW when there is little water and NO WATER when the container is empty or the water has not reached the LOW point yet.

We also used a motor (or you can use an electric water valve) that is turning ON when the water level is HIGH. This can be useful when you want to empty the tank once it is full or to stop the water flow to the water tank.

(4)

4 Tweet 4 Water Level Indicator Circuit Simple Water Level Indicator Water Level Indicator/Sensor Numeric Water Level Indicator

19 Responses to "Arduino Water Level Indicator + Controller"

ramesh says: on March 16, 2014 at 5:06 am

reply

Whi, this ckt is very usefull n easy to construct, can u tell me how can I get monetered byvsms on my mobilesthroughh at command.

Thanks 1.

russ says: on March 18, 2014 at 8:00 pm reply

What are you using as a sensor, just a wire? 2.

P. Marian says: on March 21, 2014 at 5:35 pm reply

I am using simple jumper wires, but you’ll have to use probes that do not oxidize in liquids if you want to use it in a water tank.

pranav says: on April 3, 2014 at 8:36 am reply

hey is it necessary to connect lcd display…..because i dont have one!!! can i construct the circuit without it??

Marty says: on August 13, 2014 at 2:45 pm reply

Hi! What are your suggestions for rugged non oxidizing conductors?

pawan says: on March 20, 2014 at 7:25 am reply

3. 261 Share

(5)

i want the circuit of water level indicator using these components-transistor bc 548-4pcs

resistor 220 ohm- 6pcs led colored bulb- 4pcs buzzer

9volt battery.

can you pls help me out by sending the circuit and explaining how to construct it??

Samaj says: on March 20, 2014 at 7:27 am reply

Very Good Work

is it possible this ckt without Arduino. means another way without like 555ic or other component

and i want to use a ac submercial motor as a load 4.

Excellent project - Hanumanthappa.S says: on March 21, 2014 at 10:32 am reply

You have not published the entire thing. Let me something more because i am searching MCU based projects. I have done the same project using NE555. Let me know about MCU programming

Thanks 5.

valli says: on March 21, 2014 at 4:10 pm reply

can u tell us d connections in detail pls? and tell d components to be used pls reply 6.

P. Marian says: on March 21, 2014 at 5:31 pm reply

You can see the connections in the schematic and the pins where to connect the lcd are showned in the Arduino code.

nida says: on March 23, 2014 at 12:59 pm reply

i have run the above code using LCD on ISIS but LCD is not displaying anything,also the motor is continously running irrespective of high.low or avg

7.

Frank says: on March 23, 2014 at 8:40 pm reply

This is perfect for my purpose. I want to use it in a storage tank and for watering my garden at intervals that still have to be determined.

8.

Kay says: on April 30, 2014 at 7:25 am reply

Hye Mr P. Marian 9.

(6)

just want to ask do you have your project flow chart? I want to make a references to my project as very similar to your project here.

Really appreciate if u can share me your project flow chart. Thank You

Val says: on May 12, 2014 at 6:55 pm reply

I think it’s smart project..but I’m having problems trying to implement this project with BC 547c transistors.. No response from the probes and comes off and on irregularly

10.

Maleeha Iesar says: on May 20, 2014 at 6:15 pm reply

good project.very helpful 11.

kate says: on May 20, 2014 at 7:32 pm reply

what about if I use this with bluetooth ? and without the motor? how will the code be? please reply

12.

Gelu says: on July 6, 2014 at 3:43 pm reply

acest circuit poate fi flosit pentru a masura nivelul de benzina din rezervor? 13.

venketkumar says: on July 22, 2014 at 8:58 pm reply

Sir I need to construct the Water level controller without using the Micro controllers and arduino boards Pls guid me a circuit

14.

ramesh says: on July 25, 2014 at 7:22 pm reply

Hi dear rui,

Can u tell me the connection of lcd with arduino or parallel with led, pl repl 15.

What do you think about this article? Leave a comment!

Name (required)

(7)

You may add a picture too No file selected.

Check this checkbox to get notifications of followup comments via e-mail. You can also subscribe without commenting. electroschematics partners Login Username Password Remember Me

let’s talk about electronics!

(8)

Recent Questions

How to check whether a Lightening Detector Circuit is working? Need help to disable the PIR in a combined light/movement sensor gsm signal repeater amplifier circuit diagram?

recently added electronic circuits

SCR Based SSS Solar Charge Control AVR Bootloader – Tutorial #18 Fluorescent Lamp Driver with Starter 4049 Datasheet

GSM Home Security Alarm System with Arduino

References

Related documents

Originally indicated for selected young patients (for example, with intra-articular bicompartmental deformity fol- lowing fracture of the tibial plateau), bi-UKR slowly began to be

The Premspec Group Limited T | 029 2130 3710 E | [email protected] www.premspec.co.uk Electric heating and EPC ratings.. With so much confusion being created through new

This model is compared with the common modeling approach where an instantaneous damage evolution (ID) is manifested upon reaching the damage threshold criterion. In DEFORM 2D TM ,

Subject to the limitations stated below, We will pay up to the maximum benefit shown on the Schedule of Benefits for additional reasonable traveling expenses that are incurred by You

This previous studies on data mining applications in various fields use the variety of data types range from text to images and stores in variety of

For physicians from the Americas, possible ways to reduce DP include cultivating a climate that generates positive work attitudes, quality and safety culture, work-life balance,

This means that higher levels of community trust (horizontal social capital) and higher levels of trust in the formal institutions (healthcare provider and health insurer) result

Factors that might affect willingness to participate in medical research include patients' perceived benefits associated with their participation in drug trials [6,7], confusion