Microcontroller Based Water Level Controller With Water Level Indicators and Auto-cutoff

by yamuna22 in Circuits > Electronics

2890 Views, 9 Favorites, 0 Comments

Microcontroller Based Water Level Controller With Water Level Indicators and Auto-cutoff

first.png
full_final_iamge-removebg-preview (4).png
second.jpg

People generally worry about the wastage of water when they switch ON the motor and forget to switch OFF the motor. This project may help them in saving water for the future.

A water level detector is used to control the water level in the tank.

In many industries like chemical, there is a restriction on the liquid level of the container in such cases level controller can maintain a level of the liquid at the desired level.

The device works on the principle that the water is capable of passing a current through it. One wire which is connected to VCC is left in the bottom-most part of the tank and the rest wires are set at different levels in the tank. Except for the bottom-most wire which provides VCC to the whole water, we have two wires set at different levels one is for medium level and another one is for full. Another terminal of these two wires is connected to the base of transistors and hence in turn to the microcontroller which is the heart of the device. When water starts rising, different levels touch the water and get some positive voltage. This positive voltage is given to the base of transistors to activate them and hence passing the signal to the controller. The indicating component is LED. This component shows the current status of the water in the tank. Green LED is used for indicating the medium level of the tank and Red LED is used for indicating the full level of the tank.

Video Demonstration

Microcontroller based Water Level controller with Water level indicators and Auto Cutoff

Things Required

thing.png

1.Arduino

2.Transistor - BC 548 (NPN transistor)

3. Resistors - 220Kohm,470ohm,22Kohm,1Kohm,220ohm

4.Water pump(Submersible Mini Water Pump)

5.Jumper Wire (Male to Female)

6.Jumper Wire (Female to Female)

7.Jumper Wire (Male to Male)

8.Capacitor - 10uf

9.5mm RED Led - 1Nos

10.5mm GREEN Led - 1Nos

11.Soldering iron - 1Nos

12.Soldering Lead- 1 Nos

13.General Purpose PCB - 1 Nos

Arduino

arduinooo-removebg-preview.png

Arduino is an open-source electronics platform based on easy-to-use hardware and software.

It has different input /output pins of the microcontroller chip into digital input/output pins and analog input pins. Now, this board can be programmed using an awesome Arduino IDE (free to download). Arduino comes in different shapes and sizes.

some of the well-known Arduino's are...

1. Arduino UNO

2.Arduino nano

3.Arduino Pro mini

4.Arduino mega

Arduino is a great tool for developing interactive objects, taking inputs from a variety of switches or sensors, and controlling a lot of lights, motors, and other outputs like a buzzer. Arduino projects can be stand-alone or they can be connected to a computer using USB.

There are a variety of projects which can be made using Arduino, like remote control car, automation, and other embedded systems and IoT (Internet of things) based projects. If you are a beginner when it comes to making projects then arduino is really your cup of coffee.

Transistor

transistor-removebg-preview.png

A transistor is a device that regulates current or voltage flow and acts as a switch or gate for electronic signals. Transistors consist of three layers of semiconductor material, each capable of carrying a current.

Here we are using a BC548 NPN transistor.

1.Collector (Current flows in through collector side)

2.Emitter (Controls the biasing of the transistor)

3.Base (Current Drains out through emitter side)

They are used as amplifiers and switches. As the amplifiers, they are used in high and low level, frequency stages, oscillators, modulators, detectors, and in any circuit need to perform a function.

Resistor

resistor-removebg-preview.png

The resistor is a passive element in an electrical circuit. It doesn’t produce any energy on its own. It just dissipates electrical energy in the form of heat.

It is like a current limiter. It limits the amount of current flowing through a device(load).

Suppose you have to apply a certain current of 5 amperes to a device input and you have 10 amperes source so what would you do?

Answer: Add a resistor in series connection to limit the current.

This resistance will create a voltage drop (reduces the voltage in that area or drops potential) thus reducing the current passing through it.

Buzzer

buzzer-removebg-preview.png

A piezo buzzer is a sound-producing device. whenever an electric potential is applied across a piezoelectric material, a pressure variation is generated.

A piezo buzzer consists of piezo crystals in between two conductors. When a potential difference is applied across these crystals, they push one conductor and pull the other conductor by their internal property. The continuous pull and push action generate a sharp sound wave.

Piezo buzzers generate a loud & sharp sound. So, they are typically used as an alarm circuit. Also, they are used to make an alert of an event, signal, or sensor input.

Typically, piezo buzzer produce can generate a sound in the range of 2 to 4 kHz

Water Pump

water_pump-removebg-preview.png

A submersible pump is a pump that can be put in the water. The electric motor is sealed in such a way that the power line and the spinning shaft are sealed to prevent water from coming in.

The pump will pick up the water around it and pump it out an outlet port.

submersible pumps are needed to control water movement in the tank and ensure the proper flow of water.

Circuit Diagram - Water Level Sensor

12.png

LED connections:

Green LED:

1. Positive terminal of LED with resistor one end ---- resistor second 5v of Arduino pin

2. Negative terminal of LED ---- Arduino 8th pin

Red LED:

1. Positive terminal of LED with resistor one end ---- resistor second 5v of Arduino pin
2. Negative terminal of LED ---- Arduino 12 pin

Motor connections:

1. Positive terminal of motor -- 5v of Arduino

2. Negative terminal of motor -- collector terminal of transistor(BC 548)

3. Base terminal of transistor -- Arduino 5th pin

4. Emitter terminal of transistor -- Gnd of Arduino

Water level sensor:

Middle-Level detector:

1. Collector terminal of Transistor -- Arduino 2nd pin

2. Base terminal of Transistor -- fix with the middle level of the tank

3. Emitter terminal of transistor -- Gnd of Arduino

Full Level detector:

1. Collector terminal of Transistor -- Arduino 4nd pin

2. Base terminal of Transistor -- fix with the top level of the tank

3. Emitter terminal of transistor -- Gnd of Arduino

One end of resistor -- 5V of Arduino

The second end of resistor -- fix with a base of the tank

Schematic Diagram(Diptrace) - Water Level Sensor

water level sensor.png

Here we are using Transistor BC 548 (NPN). It acts as a Switch. Initially, there is no voltage applied to the base of the transistor Q1 and the transistor is in an OFF state and no current is flowing through the collector, and the emitter and LED are in the OFF state.

When the water level reaches point A(Medium) in the tank, the positive side of the battery is connected to the base of the transistor Q1 through the water. So when a positive voltage has been applied to the base of the transistor Q1, it gets into an ON state, and the current starts flowing from collector to emitter and GREEN led glows. R3, R5 at the base of each transistor, which is used to limit the maximum base current. When the water level reaches point B(HIGH) in the tank, the positive side of the battery is connected to the base of the transistor Q2 through the water. So when a positive voltage has been applied to the base of the transistor Q2, it gets into an ON state, and the current starts flowing from collector to emitter and RED led glows and the water pump or motor can be turned off.

Schematic Diagram(Diptrace) - Motor Control Circuit

ckt diagram motor.png

The circuit consists of a transistor Q1 (BC548) NPN transistor, driven by the PWM from Arduino. The resistor is to limit the current to the base, but enough to operate the transistor in saturation when the input is high. The circuit is supplied by a 5V power supply. It starts the motor from slow to the fastest, then slower again until it stops, and repeats the cycle.

Schematic Diagram(Diptrace) - LED Indications

led ckt pcb.png

One end of the resistor is connected to the 5V power supply and another end of the resistor is connected to the positive terminal of the LED and the negative terminal of the LED is connected to the digital pin of the Arduino pin.

PCB Layout - Water Level Sensor Circuit

p1.png

PCB Layout - Water Level Sensor 3D Image

pp1.png

PCB Layout - Motor Control

p2.png

PCB Layout - Motor Control 3D Image

pp2.png

PCB Layout - LED Indications

p3.png

PCB Layout - 3D Image

pp3.png

Physical Building : PCB Connection

20210122_131604.jpg
20210122_131502.jpg
20210122_131506.jpg
20210122_131613.jpg
20210122_131521.jpg

Prototype - Testing Process

20210122_120522.jpg
20210122_120614.jpg
20210122_120644.jpg

Physical Building -wiring Setup

arduino.jpg
buzzer.jpg
pcb.jpg
20210128_113823.jpg

3D Image - Water Tank

IMG_20210124_091642.jpg
Screenshot 2021-01-22 122232 (1).png
tank image.jpg
20210128_113657.jpg
house.jpg

3D Printing - Ultimaker Cura

Screenshot 2021-01-29 100201.png
Screenshot 2021-01-29 100241.png

Export each component as an STL file, and send them to the Ultimaker Cura 3D printing software.I used the following settings in the Creality Ender 3D printer.

Printer Nozzle Size: 1mm

Supports: enabled

Retraction Distance: 10 mm

Retraction retract speed: 60 mm/sec

Prime speed: 30 mm/sec

Z hop when retracted: enabled

Max Z speed: 120 mm/s

Z hop height: 1 mm

Travel speed: 200 mm/s

Layer height: 0.15 mm

Print temp initial layer: 200 Temperatures

Print Bed Temperature: 60 Temperatures

MainPrinting Temperature: 180 Temperature (degrees) for main print

tempOverhang: 30 degrees

Brim: enabled

Support Pattern: GridSupport

Placement: Touching build Plate

Support Overhanging

angle: 45

All the other settings: default

Material: PLA

Infill Density: 10Initial

Layer height: 0.2

Arduino - Code

Thank You