1

member

Medium Basics Project 008d Water level sensor, LEDs, LCD 1602 I2C module, piezo buzzer

of Acoptex.com in UNO

Basics: Project 008d

Project name: Water level sensor, LEDs, LCD 1602 I2C module, piezo buzzer - Water leak detection system

Attachments: libraries and sketch1 and sketch2

In this project, you needed these parts :

1.Aruduino Uno R3 (you can also use the other version of Arduino)

2.Water level sensor module

3.Arduino IDE ( you can download it from here  )

4.Jumper cables

5. LED 3 pc (red,yellow, green)

6. Resistor 3 pc (220 Om for each LED) and 1 pc (150 Om for piezo buzzer/optional/)

7. Breadboard half size 

8. LCD 1602 I2C Module

9. Piezo buzzer

Understanding the water level sensor module

More information you can find here.

Understanding LCD 1602 I2C module

More information you can find here.

Understanding piezo buzzer

More information you can find here.

Signals and contacts of piezo buzzer

We will use active piezo buzzer in this project. Piezo buzzer has one leg with (+) marking so that output we connect to on leg of resistor 150 Om and another leg og resistor we connect to Arduino Uno. Another piezo buzzer leg we connect to GND.

Signals and contacts of LCD 1602 I2C module

As you can see on the back of LCD 1602 module there 4 connections: GND (-), VCC (+5V), Serial Data Line (SDA) and Serial Clock Line (SCL)

Signals and connections of water level sensor, LED

"S" stand for signal input (analog)

"+" stand for power supply (+5V)

"-" stand for GND

If you do not have marking on the back of water level sensor module - not a problem. You can print this marking

attach and cover it with silicon to the back of sensor. Just make sure that silicon is dry andbe careful do not use silicon on other side as it will damage the sensor.

Connect the long leg of the LED (the positive leg, called the anode) to the other end of the resistor. Connect the short leg of the LED (the negative leg, called the cathode) to the GND. Resistor connected for long leg.

Wiring

The following picture shows the needed connections with the Arduino Uno 

Watch video here: https://youtu.be/JOi2UOg31mA

Step by Step instruction

  1. Plug your Adruino Uno board into your PC and select the correct board and com port
  2. Open up serial monitor and set your baud to 9600 baud
  3. Do calibration. Take a paper and write down readings of the sensor and the water level in mm or inch  (for example, 0mm -0, 5mm - 223, 10mm - 251, 20mm - 294, 30mm - 314, 40mm - 333)
  4. Verify and upload the the sketch to your Adruino Uno

Libraries:

  • See attachments on the begining of this project description - all libraries included.
  • We have used the library - NewliquidCrystal_1.3.4.zip which I downloaded, unzipped, changed the name of folder to LiquidCristal and added to libraries in my PC, for example C:\Users\toshiba\Documents\Arduino\libraries. This link you can find in Preferences of Adruino IDE program which installed in your PC. If you have LiquidCristal folder in this location already - delete this folder and copy folder, which was made by you, to this location. 
  • Wire library included in Arduino IDE which is installed in your PC.

Program/Sketch

Program 1 attached here.

Measuring water level and sending the status about the water level to serial monitor and LCD screen.

If water level is between:  10-15mm the green LED will be on 

20-25mm the blue LED will be on

35-40mm the red LED will be on

35-40mm the piezo buzzer will be activated too

and switch off when sensor is out of water and dry.

Program 2 attached here.

Measuring water level and sending the status about the water level to serial monitor and LCD screen.

If water level is between:

10-15mm the green LED will be on till level 20-25mm

20-25mm the green LED will be off and the blue LED

will be on till level 35-40mm 

35-40mm the blue LED will be off and the red LED

will be on

35-40mm the piezo buzzer will be activated too

and switch off LEDs and buzzer when sensor is pulled out slowly or fast from the water or if the water level is going down.



Other projects of Acoptex.com

« Go back to category
Is this project fake? Report it!   
Recommend to a friend
Published at 09-05-2017
Viewed: 896 times