0% found this document useful (0 votes)
65 views39 pages

Project Report

Uploaded by

menonsuyesh.69
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
65 views39 pages

Project Report

Uploaded by

menonsuyesh.69
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 39

DEPT OF ELECTRONICS ENGG.

PROJECT REPORT

GOVERNMENT POLYTECHNIC COLLEGE PERINTHALMANNA

PROJECT REPORT
ON
PUMP HOUSE AUTOMATION

Submitted by:

MOHAMMED MUHSIN. U (Reg.No:20042448)


MOHAMMED SALEEL.MK (Reg.No:20042449)
MOHAMMED ANSHIF.N (Reg.No:20042444)
MOHAMMED FAYIZ.A (Reg.No:20042447)
MOHAMMED ASIF.A (Reg.No:20042446)

DEPT. OF ELECTRONICS ENGINEERING


2022 – 2023

GPTC PERINTHALMANNA
DEPT OF ELECTRONICS ENGG. PROJECT REPORT

GOVERNMENT POLYTECHNIC COLLEGE PERINTHALMANNA

DEPARTMENT OF ELECTRONICS ENGINEERING

CERTIFICATE

This is to certify that the project report on PUMP HOUSE AUTOMATION is a Bonafede record of
the project done by MOHAMMED ANSHIF.N Reg.No.:20042444,MOHAMMED ASIF.A
Reg.No:20042446,MOHAMMED MUHSIN.U Reg.No:20042448,MOHAMMED FAYIZ.A
Reg.No:20042447,MOHAMMED SALEEL.MK Reg.No:20042449 under my supervision and guidance,
submitted towards the partial fulfilment of the requirements for the award of the Diploma in Electronics
Engineering under the Department of Technical Education, Kerala state, during the year 2022-2023.

Staff in Charge Head of the Department

External Examiner Internal Examiner

GPTC PERINTHALMANNA
DEPT OF ELECTRONICS ENGG. PROJECT REPORT

ACKNOWLEDGEMENT

I would like to take this opportunity to thank all those who have been directly or
indirectly involved in making my seminar success. We are very happy to express our sincere gratitude to our
Principal Smt. MANJUSHA.TT For providing necessary and support for successful l completion of the
project work.

We also express our heartfelt to Mr. PRAKASAN.P, Head of The Section in Electronics for valuable
help for the project work.

We would also like to extend a special thanks to Mr. Amjed Ali K for his invaluable assistance and
support throughout the project. His expertise and contributions were pivotal in overcoming various
challenges and ensuring the project's smooth progress. We are truly grateful for his valuable insights and
continuous encouragement.

We also very happy to express our thanks to Mr. NAVANEETH. A, Smt. NAJLA PARY for their
valuable support and co- ordination for our successful project work.

We would like to acknowledge the contributions of all the team members who actively participated in
this project. Their hard work, commitment, and cooperation were crucial in achieving the project's goals and
objectives. Each team member's unique skills and dedication have been pivotal in overcoming obstacles and
delivering a successful outcome. Above everyone, we express our heartiest thanks to the Almighty God.

MOHAMMED ANSHIF.N
MOHAMMED ASIF.A

MOHAMMED MUHSIN.U

MOHAMMED FAYIZ.A

MOAHAMMED SALEEL.MK

GPTC PERINTHALMANNA
DEPT OF ELECTRONICS ENGG. PROJECT REPORT

ABSTRACT

This project aims to automate the control of a pump house using the NodeMCU microcontroller and LORA
WAN wireless communication protocol. The NodeMCU will be programmed to collect data from sensor
and control the pump motor based or prefixed conditions. The LORA WAN protocol will be used to
transmit data wirelessly from the pump house to remote monitoring and control system. This automation
system will allow for remote monitoring and control of the pump house. Increasing efficiency and reducing
the read for manual intervention. This project focuses on the development of an automated control system
for a pump house, utilizing the NodeMCU microcontroller and the LORA WAN wireless communication
protocol. The primary objective is to program the NodeMCU to gather data from various sensors and
regulate the pump motor based on predefined conditions. By employing the LORA WAN protocol, data
transmission between the pump house and a remote monitoring and control system will be facilitated
wirelessly.

The automation system designed in this project offers remote monitoring and control capabilities for the
pump house, thereby enhancing operational efficiency and minimizing the need for manual intervention.
The NodeMCU microcontroller serves as the central control unit, responsible for acquiring data from
sensors and executing appropriate control actions on the pump motor. Through this integration, real-time
monitoring of critical parameters such as water level, pressure, and flow rate can be achie

GPTC PERINTHALMANNA
DEPT OF ELECTRONICS ENGG. PROJECT REPORT

CONTENTS

1.INTRODUCTION………………………………………………………………….2

2. COMPONENTS…………………………………………………………………...3

2.1 ESP8266 WIFI MODULE………………………………………. ...…...3

2.2 LoRa MODULE 433 MHZ……………………………………………... 6


2.3 LED……………………………………………………………………... 8
2.4 LONG PUSH BUTTON………………………………………………... 9
2.5 5V 2 CHANNEL RELAY MODULE………………………………….10
2.6 0.96 INCH 4 PIN OLED DISPLAY ………………………………....... 12
2.7 433 MHz ANTENNA uFL CONNECTER…………………………......13

3.TRANSMITTER SIDE AND RECEIVER SIDE………………………………......14

3.1 BLOCK DIAGRAM OF TRANSMITTER SIDE… …………………. 14

3.2 TRANSMITTER SIDE CIRCUIT


CONNECTION…………………….15

3.3 TRANSMITTER SIDE PROGRAM ………………………………...... 16

3.4 BLOCK DIAGRAM OF RECEIVER SIDE……………………………23

3.5 RECEIVER SIDE CIRCUIT CONNECTION………………………… 24

3.6 RECEIVER SIDE PROGRAM………………………………………. .24

4.WORKING………………………………………………………………………… 30

5.ADVANTAGES AND DISADVANTAGES……………………………………… 32

6.CONCLUSION……………………………………………………………………. 34

7.REFERENCE ………………………………………………………………………35

GPTC PERINTHALMANNA 1
DEPT OF ELECTRONICS ENGG. PROJECT REPORT

CHAPTER 1

INTRODUCTION

The Pump House Automation Project aims to enhance the efficiency, reliability, and control of water
management systems by automating the operations of pump houses. This report provides a comprehensive
overview of the project, outlining its objectives, scope, methodologies, and outcomes.

Water supply and distribution is a critical aspect of urban and rural infrastructure, and pump houses play a
pivotal role in ensuring the smooth operation of these systems. Traditional pump house operations often rely
on manual intervention, leading to inefficiencies, delays, and potential human errors. By implementing
automation technologies, we can streamline the management and control of pump houses, leading to
improved performance and reduced operational costs. The primary objective of this project is to design and
implement a robust automation system for pump houses that integrates various components such as sensors,
controllers, actuators, and a central monitoring system. The automation system will enable real-time
monitoring, remote control, and data analysis, facilitating optimal pump operation, fault detection, and
preventive maintenance.

The scope of the project includes the development of hardware and software components required for
automation, the installation and integration of these components within existing pump house infrastructure,
and the implementation of a user-friendly interface for system control and monitoring.

To achieve these objectives, a systematic methodology was followed, involving the initial assessment of
pump house requirements, the selection of appropriate sensors and actuators, the development of a control
algorithm, the integration of a centralized monitoring system, and extensive testing and validation
procedures.

The outcomes of this project are expected to significantly improve the efficiency and reliability of pump
house operations. Automated control and monitoring will optimize energy consumption, reduce water
wastage, minimize system downtime, and enable prompt response to faults or emergencies. Additionally, the
availability of real-time data and analytics will facilitate informed decision-making, proactive maintenance,
and future system enhancements.

In conclusion, this Pump House Automation Project Report provides a comprehensive overview of the
project, highlighting its objectives, scope, methodologies, and expected outcomes. The successful
implementation ofan automation system for pump houses will revolutionize water management practices,
ensuring more efficient, reliable, and sustainable water supply and distribution systems

GPTC PERINTHALMANNA 2
DEPT OF ELECTRONICS ENGG. PROJECT REPORT

CHAPTER 2

COMPONENTS

 ESP8266 WIFI MODULE


 LoRa MODULE 433 MHZ
 LED
 LONG PUSH BUTTON
 5V 2 CHANNEL RELAY MODULE
 0.96 INCH 4 PIN OLED DISPLAY
 433 MHz ANTENNA uFL CONNECTER

2.1 ESP8266 WIFI MODULE

ESP8266 is a low-cost Wi-Fi module that allows electronic devices to connect to Wi-Fi networks. It was
introduced in 2014 by Expressive Systems, a Chinese manufacturer of microcontrollers and IoT solutions.
The module is based on the Ten silica Xtensa LX106 processor and includes a built-in Wi-Fi antenna,
TCP/IP protocol stack, and several GPIO pins for interfacing with other electronic devices. Mainly two lora
modules are used .

Here are some key features of the ESP8266 module:

Wi-Fi connectivity: The ESP8266 module supports both the 2.4GHz and 5GHz Wi-Fi bands and can
connect to most Wi-Fi networks, including WPA/WPA2, WEP, and open networks. It can operate in both
client and access point modes, allowing devices to connect to it as a hotspot or connect to other Wi-Fi
networks as a client.

Processing power: The module is powered by a 32-bit Ten silica Extensa LX106 processor with a clock
speed of up to 160 MHz It also includes 80KB of RAM for program execution and data storage.

GPIO pins: The module includes several GPIO pins (general-purpose input/output pins) that can be used to
interface with other electronic devices, such as sensors, switches, and LEDs. These pins can be programmed
to perform a variety of functions using the Arduino IDE or other programming tools.

GPTC PERINTHALMANNA 3
DEPT OF ELECTRONICS ENGG. PROJECT REPORT

Low power consumption: The ESP8266 module is designed to operate on very low power, making it
suitable for battery-powered devices. It includes a sleep mode that consumes less than 1mA of current,
allowing devices to conserve power when not in use.

Programming flexibility: The module can be programmed using the Arduino IDE or other programming
tools, including Micro Python and Lua. It also includes a built-in AT command set that allows devices to
communicate with the module using standard serial commands.Low cost: One of the main advantages of the
ESP8266 module is its low cost. It is significantly cheaper than other Wi-Fi modules and can be used in a
wide range of electronic devices, including IoT devices, smart home devices, and wearables.

In summary, the ESP8266 module is a versatile and low-cost Wi-Fi solution that can be used to connect
electronic devices to Wi-Fi networks. Its processing power, GPIO pins, low power consumption, and
programming flexibility make it suitable for a wide range of applications.

diagram of esp8266 Wi-Fi module

The ESP8266 Wi-Fi module is a popular and powerful device that allows devices to connect to Wi-Fi
networks. It has a total of 32 pins, each with a specific function. Here is a detailed explanation of the pins of
the ESP8266 Wi-Fi module:

GPTC PERINTHALMANNA 4
DEPT OF ELECTRONICS ENGG. PROJECT REPORT

VCC: This pin is used to supply power to the module. It requires a voltage of 3.3V.

GND: This is the ground pin.

CH_PD: This is the chip enable pin, and is used to enable the ESP8266.

RESET: This pin is used to reset the module.

GPIO0: This pin is used to enter programming mode. It is pulled high during normal operation.

GPIO2: This pin is used for general-purpose input/output.

TXD: This is the transmit data pin.

RXD: This is the receive data pin.

GPIO5: This pin is used for general-purpose input/output.

GPIO4: This pin is used for general-purpose input/output.

GPIO14: This pin is used for general-purpose input/output.

GPIO12: This pin is used for general-purpose input/output.

GPIO13: This pin is used for general-purpose input/output.

GPIO15: This pin is used for general-purpose input/output.

GPIO3: This pin is used for general-purpose input/output.

GPIO1: This pin is used for general-purpose input/output.

ADC: This pin is used for analog-to-digital conversion.

CH_PD: This is the chip enable pin, and is used to enable the ESP8266.

GND: This is the ground pin.

VCC: This pin is used to supply power to the module. It requires a voltage of 3.3V.

EN: This is the enable pin, and is used to enable the ESP8266.

SPI_CS: This is the chip select pin for SPI.

SPI_CLK: This is the clock pin for SPI.

SPI_MOSI: This is the MOSI (master out, slave in) pin for SPI.

SPI_MISO: This is the MISO (master in, slave out) pin for SPI.

ANT: This is the antenna connection pin.

GND: This is the ground pin.

GPTC PERINTHALMANNA 5
DEPT OF ELECTRONICS ENGG. PROJECT REPORT

UTXD: This is the transmit data pin for the UART.

URXD: This is the receive data pin for the UART.

GPIO9: This pin is used for general-purpose input/output.

GPIO10: This pin is used for general-purpose input/output.

SDIO: This is the SD card interface pin.

Overall, the ESP8266 Wi-Fi module is a versatile device with a range of input/output options that make it
suitable for a variety of applications.

2.2 LoRa MODULE 433 MHZ

LoRa (Long Range) is a wireless communication protocol that was developed specifically for applications
that require long-range communication with low power consumption. LoRa modules are commonly used for
applications such as remote monitoring, smart agriculture, smart cities, and IoT devices. Tow lora modules
are use.

A LoRa module operates on the ISM (Industrial, Scientific and Medical) band, which is a frequency band
that is reserved for scientific and industrial use. The LoRa module operates on the 433MHz frequency band,
which is a license-free band that is available in many countries.

The LoRa module consists of two main components: the transceiver and the microcontroller. The transceiver
is responsible for sending and receiving data over the wireless channel, while the microcontroller handles
the processing and management of the data.

One of the key features of the LoRa module is its long-range capability. The LoRa protocol uses a technique
called spread spectrum modulation, which enables it to transmit data over long distances with very low
power consumption. The range of a LoRa module can vary depending on the environment and the specific
module used, but it can typically range from a few hundred meters up to several kilometres.

The LoRa module also has a low data rate, which makes it ideal for applications that require low-bandwidth
communication over long distances. The data rate can be adjusted depending on the specific application
requirements, but it typically ranges from a few hundred bits per second up to a few kilobits per second.

In addition to its long-range and low-power capabilities, the LoRa module also has a high level of reliability
and security.

GPTC PERINTHALMANNA 6
DEPT OF ELECTRONICS ENGG. PROJECT REPORT

The LoRa protocol uses a unique network architecture that enables it to handle interference and ensure that
the data is transmitted and received accurately. The protocol also includes encryption and authentication
features that provide a high level of security for the data.

Overall, the LoRa module is a powerful and versatile wireless communication solution that is ideal for a
wide range of applications that require long-range, low-power, and secure communication

diagram of lora module

GPTC PERINTHALMANNA 7
DEPT OF ELECTRONICS ENGG. PROJECT REPORT

2.3 LED

LED (Light Emitting Diode).

An LED is a semiconductor device that emits light when an electric current is passed through it. The light
emitted by an LED can be of different colours, including red, green, blue, and white.

LEDs are commonly used in a variety of applications, such as lighting, displays, indicators, and automotive
lighting. They are more energy-efficient and have a longer lifespan compared to traditional incandescent
bulbs, making them a popular choice for lighting solutions.

LEDs work by converting electrical energy into light energy through a process called electroluminescence.
When an electric current is applied to the semiconductor material, it excites the electrons, causing them to
release energy in the form of photons. The photons then emit visible light.

LEDs have many advantages over traditional light sources, such as low power consumption, longer lifespan,
durability, and the ability to produce a wide range of colours. They are also environmentally friendly, as
they do not contain hazardous materials like mercury, which is commonly found in fluorescent bulbs

diagram of led

GPTC PERINTHALMANNA 8
DEPT OF ELECTRONICS ENGG. PROJECT REPORT

2.4 PUSH BUTTON

A long push button switch is a type of switch that requires sustained pressure to activate or deactivate. It is
also known as a momentary switch, because it only remains in the on or off position while the button is
being pressed.

Unlike a toggle switch, which has two stable positions (on or off), a long push button switch returns to its
default position as soon as the button is released. This makes it ideal for applications where you need
temporary control, such as turning on a light or activating a doorbell.

Long push button switches can be found in a variety of designs, ranging from simple round buttons to more
complex rectangular or square shapes. They can also be illuminated, meaning they have a built-in light that
helps to indicate whether the switch is on or off.

Overall, long push button switches are a versatile and reliable option for controlling a wide range of
electrical devices, and they are widely used in a variety of industries, including automotive, aviation, and
consumer electronics.

Diagram of long push button switch

GPTC PERINTHALMANNA 9
DEPT OF ELECTRONICS ENGG. PROJECT REPORT

2.5 5V 2 CHANNEL RELAY MODULE

A 5V 2-channel relay module is an electronic component that allows you to control two separate circuits (or
devices) with a single signal. It is designed to be used with microcontrollers, such as Arduino boards,
Raspberry Pi, or other similar devices.

The module contains two relays, which are essentially switches that can be controlled electronically. Each
relay has three pins: a normally open (NO) pin, a common (COM) pin, and a normally closed (NC) pin.

When the module receives a signal (usually a digital signal) from a microcontroller, it activates the
corresponding relay, which then switches the circuit on or off. For example, you could use the module to
turn on and off two different lights, fans, or motors.

The 5V in the name of the module refers to the voltage required to power the module. Most microcontrollers
operate at 5V, which makes the 5V 2-channel relay module a convenient and easy-to-use option.

Overall, the 5V 2-channel relay module is a versatile and useful component for controlling multiple circuits
or devices with a single signal from a microcontroller The 5V 2-channel relay module works by using an
electromagnetic switch to control the flow of current to an external circuit. Here's how it works:

Power Supply: The relay module requires a power supply of 5V DC to operate. This can be provided from
the microcontroller or a separate power source.

Control Signal: The relay module is controlled by a digital signal from the microcontroller. When the signal
is high (5V), the relay is activated, and when the signal is low (0V), the relay is deactivated.

Electromagnetic Switch: When the relay is activated, it energizes an electromagnetic switch inside the
module, which closes the circuit between the common (COM) and the normally open (NO) pins.

Circuit Control: The external circuit to be controlled is connected between the common (COM) and the
normally open (NO) pins of the relay module. When the relay is activated, the circuit is closed, and current
flows through the external circuit. When the relay is deactivated, the circuit is open, and no current flows.

Dual Channel: The 2-channel relay module has two separate relays that can be controlled independently.
Each relay has its own set of pins (COM, NO, and NC) and can control a separate external circuit.

GPTC PERINTHALMANNA 10
DEPT OF ELECTRONICS ENGG. PROJECT REPORT

Overall, the 5V 2-channel relay module provides a simple and reliable way to control external circuits using
a microcontroller. It can be used in a wide range of applications, including home automation, robotics, and
industrial control systems

Diagram of 5v 2channel relay module

GPTC PERINTHALMANNA 11
DEPT OF ELECTRONICS ENGG. PROJECT REPORT

2.6 0.96 INCH 4 PIN OLED DISPLAY

A 0.96-inch 4 pin OLED (organic light-emitting diode) display is a small, high-resolution display screen that
uses organic materials to produce light. The display has a diagonal size of 0.96 inches and 4 pins for
connecting to a circuit board or other electronic device.

The OLED display is composed of several layers of organic materials, including an emissive layer, a
conductive layer, and a substrate layer. When a current is applied to the conductive layer, it emits light in
response, resulting in a bright, colourful display.

The 4 pins on the OLED display allow it to be easily connected to a microcontroller or other electronic
device. Typically, the pins are labelled VCC, GND, SCL, and SDA. VCC provides power to the display,
GND is the ground connection, SCL is the clock signal, and SDA is the data signal.

The resolution of the 0.96-inch 4 pin OLED display can vary depending on the specific model, but it is
typically high, with a pixel density of around 128x64 or higher. This makes it well-suited for displaying
small text, graphics, and images.

Overall, the 0.96-inch 4 pin OLED display is a versatile and compact display solution that can be used in a
variety of electronic projects and devices.

Diagram of 0.96inch OLED display

GPTC PERINTHALMANNA 12
DEPT OF ELECTRONICS ENGG. PROJECT REPORT

2.7 433 MHz ANTENNA uFL CONNECTER

433MHz antenna with a uFL connector is a type of antenna designed to operate at a frequency of 433
megahertz (MHz) and is equipped with a uFL connector.

The 433MHz frequency is commonly used for various wireless communication applications, such as remote
controls, wireless sensors, and low-power devices. The antenna serves as the interface between the device
and the wireless signals it sends or receives.

The uFL connector is a miniature coaxial connector that allows easy connection between the antenna and the
device it is being used with. It provides a reliable and secure electrical connection while maintaining signal
integrity.

In summary, a 433MHz antenna with a uFL connector is a compact and convenient antenna designed for
wireless communication at the 433MHz frequency, with the uFL connector enabling easy integration with
compatible devices

Diagram of ufl connector antenna

GPTC PERINTHALMANNA 13
DEPT OF ELECTRONICS ENGG. PROJECT REPORT

CHAPTER 3

TRANSMITTER SIDE AND RECEIVER SIDE

3.1 BLOCK DIAGRAM OF TRANSMITTER SIDE

LORA Module: A long-range wireless communication module that enables the transmission of data over
long distances with low power consumption.

LED (Light Emitting Diode): A small electronic device that emits light when an electric current passes
through it. LEDs are commonly used for indicating the status of various system components.

LED Display: A visual display unit that uses an array of LEDs to form characters, numbers, or symbols. It
provides a visual interface to display important information or system status.

3 Switches: These are electronic devices used to control the flow of electrical current. In the context of
pump house automation, switches can be used for various purposes, such as turning on/off the pump,
controlling different modes, or triggering specific actions.

GPTC PERINTHALMANNA 14
DEPT OF ELECTRONICS ENGG. PROJECT REPORT

ESP8266 Module: A popular Wi-Fi module that provides wireless communication capabilities and is
commonly used for Internet of Things (IoT) projects. It can be programmed to connect to a Wi-Fi network
and transmit data to a remote server.

Functionality: The transmitter side of the pump house automation system is responsible for monitoring
various parameters and transmitting relevant data to a remote location. Here's an overview of the
functionality of each component:

LORA Module: The LORA module facilitates long-range communication with a low power requirement. It
can transmit data from the pump house to a remote location such as a control centre or monitoring station.
The module should be connected to a microcontroller or a compatible device capable of collecting relevant
data from sensors and controlling other components.

LEDs can be utilized as status indicators to provide visual feedback regarding the state of different system
components. For example, an LED can indicate whether the pump is running, if there's an error condition, or
if the system is operating normally. LED Display the LED display can be used to show important
information or real-time data related to the pump house automation system.

This display can provide details such as water level, pump status, or any other relevant parameters that need
to be monitored.3 Switches The switches can be employed to control different aspects of the pump house
automation system. For instance, one switch can be used to start or stop the pump, while another switch can
activate a specific mode or initiate a particular action. ESP8266 Module the ESP8266 module, integrated
with a microcontroller, can act as a bridge between the pump house automation system and the internet. It
can establish a Wi-Fi connection to transmit data from the pump house to a remote server or cloud platform.
The module can also receive commands or instructions from the server to control the pump or modify
system parameters.

3.2 TRANSMITTER RSIDE CIRCUIT CONNECTION

GPTC PERINTHALMANNA 15
DEPT OF ELECTRONICS ENGG. PROJECT REPORT

3.3 TRANSMITTER SIDE PROGRAM

To implement the transmitter side of the pump house automation system, the following steps can be
followed:

Connect the LORA module to the microcontroller or the main controller board of the automation system.
Ensure proper power supply and communication connections. Connect the LED indicators to the
microcontroller pins and configure them to reflect the relevant status of the system. For example, light up an
LED to indicate a running pump or a specific error condition.

// GPIO
#define MOTOR_ON_BUTTON D4

#define MOTOR_OFF_BUTTON D0

#define TRANSMITTER_ON_MESSAGE "TURNON"

#define TRANSMITTER_OFF_MESSAGE "TURNOFF"

#define TRANSMITTER_GET_STATUS_MESSAGE "GETSTATUS"

#define RECIEVER_ON_RESPONSE "TURNEDON"

#define RECIEVER_OFF_RESPONSE "TURNEDOFF"

#define RECIEVER_LOCKED_RESPONSE "LOCKED"

#define RECIEVER_WAIT_RESPONSE "WAIT"

#define MOTOR_ON_COUNT_BEFORE_LOCK 5

#define MOTOR_ACTION_TIMEOUT 1000

#define MESSAGE_CHECK_INTREVAL 1000

#define MOTOR_MINIMUM_ACTION_TIME 3E4

#include <Arduino.h>

#include <SPI.h>

#include <Wire.h>

#include <Adafruit_GFX.h>

#include <Adafruit_SSD1306.h>

GPTC PERINTHALMANNA 16
DEPT OF ELECTRONICS ENGG. PROJECT REPORT

#include <LoRa.h>

#define SCREEN_WIDTH 128 // OLED display width, in pixels

#define SCREEN_HEIGHT 64 // OLED display height, in pixels

// Declaration for an SSD1306 display connected to I2C (SDA, SCL pins)

#define OLED_RESET -1 // Reset pin # (or -1 if sharing Arduino reset pin)

#define SCREEN_ADDRESS 0x3C ///< See datasheet for Address; 0x3D for 128x64, 0x3C for 128x32

#define LORA_NSS D8

#define LORA_RESET -1

#define LORA_DIO0 D3

#define DEBUG 1

#if DEBUG

#define P(x) Serial.print(x)

#define PLN(x) Serial.println(x)

#define PT(x) \

Serial.print(millis()); \

Serial.print(F(": ")); \

Serial.println(x)

#else

#define P(x)

#define PLN(x)

#define PT(x)

#endif

Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);

bool motorStatus = false;

bool lockStatus = false;

String message = "";

GPTC PERINTHALMANNA 17
DEPT OF ELECTRONICS ENGG. PROJECT REPORT

uint8_t motorOnCount = 0;

void onReceive(int packetSize)

// received a packet

P("Received packet '");

// read packet

for (int i = 0; i < packetSize; i++)

message += (char)LoRa.read();

// print RSSI of packet

P("' with RSSI ");

PLN(LoRa.packetRssi());

void sendLoRaMessage(const String &msg)

LoRa.beginPacket();

LoRa.print(msg);

LoRa.endPacket();

void printBottomMessageOnDisplay(const String &msg)

display.setTextSize(1);

display.setTextColor(WHITE);

display.fillRect(0, 56, 128, 8, BLACK);

display.setCursor(0, 56);

GPTC PERINTHALMANNA 18
DEPT OF ELECTRONICS ENGG. PROJECT REPORT

display.println(msg);

display.display();

void printStatusOnDisplay(const String &msg)

display.setTextSize(3);

display.setTextColor(WHITE);

display.fillRect(0, 0, 128, 24, BLACK);

display.setCursor(0, 0);

display.println(msg);

display.display();

void setup()

pinMode(MOTOR_ON_BUTTON, INPUT_PULLUP);

pinMode(MOTOR_OFF_BUTTON, INPUT_PULLUP);

#if DEBUG

Serial.begin(9600);

#endif

// SSD1306_SWITCHCAPVCC = generate display voltage from 3.3V internally

if (!display.begin(SSD1306_SWITCHCAPVCC, SCREEN_ADDRESS))

P(F("SSD1306 allocation failed"));

// Don't proceed, loop forever

while (1)

delay(100);

GPTC PERINTHALMANNA 19
DEPT OF ELECTRONICS ENGG. PROJECT REPORT

// Clear the buffer

display.clearDisplay();

printStatusOnDisplay("N/A");

printBottomMessageOnDisplay("Initializing LoRa");

delay(1000);

LoRa.setPins(LORA_NSS, LORA_RESET, LORA_DIO0);

if (!LoRa.begin(433E6))

printBottomMessageOnDisplay("Starting LoRa failed!");

while (1)

delay(100);

// set the sync word, which must be the same for the transmitter and receiver

LoRa.setSyncWord(0xF3);

printBottomMessageOnDisplay("LoRa Initialized");

// register the receive callback

LoRa.onReceive(onReceive);

// put the radio into receive mode

P("LoRa Initialized");

LoRa.receive();

u_int32_t lastMessageTime;

u_int32_t lastSendTime = 0;

u_int32_t interval = 200;

GPTC PERINTHALMANNA 20
DEPT OF ELECTRONICS ENGG. PROJECT REPORT

u_int32_t lastInputReadTime = 0;

u_int32_t lastRecieveUpdateTime = 0;

void loop()

if (millis() - lastInputReadTime > 200)

lastInputReadTime = millis();

if (digitalRead(MOTOR_ON_BUTTON) == LOW)

if (millis() - lastMessageTime > 10000)

sendLoRaMessage(TRANSMITTER_ON_MESSAGE);

lastMessageTime = millis();

printBottomMessageOnDisplay("Sent MOTOR ON signal");

else

printBottomMessageOnDisplay("Wait for " + String(10 - (millis() - lastMessageTime) / 1000) +


"s");

else if (digitalRead(MOTOR_OFF_BUTTON) == LOW)

sendLoRaMessage(TRANSMITTER_OFF_MESSAGE);

printBottomMessageOnDisplay("Sent MOTOR OFF signal");

LoRa.receive();

GPTC PERINTHALMANNA 21
DEPT OF ELECTRONICS ENGG. PROJECT REPORT

if (millis() - lastRecieveUpdateTime > 1000)

lastRecieveUpdateTime = millis();

if (message != "")

printBottomMessageOnDisplay("Message Recieved! Message=" + message);

if (message == RECIEVER_LOCKED_RESPONSE)

printStatusOnDisplay("LOCK");

else if (message == RECIEVER_ON_RESPONSE)

printStatusOnDisplay("ON");

else if (message == RECIEVER_OFF_RESPONSE)

printStatusOnDisplay("OFF");

else if (message == RECIEVER_WAIT_RESPONSE)

printBottomMessageOnDisplay("Wait few seconds");

message = "";

LoRa.receive();

GPTC PERINTHALMANNA 22
DEPT OF ELECTRONICS ENGG. PROJECT REPORT

Overall System Functionality: The transmitter side of the pump house automation system works by
collecting data from sensors, controlling the LEDs and LED display for status indication and information
display, monitoring switches for user input, and transmitting data and receiving commands using the LORA
module and ESP8266 module. The microcontroller acts as the central processing unit, executing the
necessary logic and coordinating the interactions between different components. This allows for remote
monitoring, control, and automation of the pump house system

3.4 BLOCK DIAGRAM OF RECEIVER SIDE

ESP8266 Microcontroller: The ESP8266 is a popular Wi-Fi-enabled microcontroller board that can connect
to the internet and interact with other devices. It will act as the central controller for the pump house
automation system.

Relay Module: A relay module is used to control high-voltage devices like pumps. It allows the low-voltage
ESP8266 to switch on/off the high-voltage equipment safely. Lora Transceiver: LoRa is a wireless
communication technology that provides long-range and low-power capabilities. You'll need a LoRa
transceiver module to enable communication between the pump house and the central controller.

GPTC PERINTHALMANNA 23
DEPT OF ELECTRONICS ENGG. PROJECT REPORT

3.5 RECEIVER SIDE CIRCUIT CONNECTION

3.6 RECEIVER SIDE PROGRAM


#define NSS D8
#define RESET 0
#define dio0 D2
#define TRANSMITTER_ON_MESSAGE "TURNON"
#define TRANSMITTER_OFF_MESSAGE "TURNOFF"
#define TRANSMITTER_GET_STATUS_MESSAGE "GETSTATUS"
#define RECIEVER_ON_RESPONSE "TURNEDON"
#define RECIEVER_OFF_RESPONSE "TURNEDOFF"
#define RECIEVER_LOCKED_RESPONSE "LOCKED"
#define RECIEVER_WAIT_RESPONSE "WAIT"
#define MOTOR_ON_COUNT_BEFORE_LOCK 5
#define MOTOR_ACTION_TIMEOUT 1000
#define MESSAGE_CHECK_INTREVAL 1000
#define MOTOR_MINIMUM_ACTION_TIME 3E4
#define MOTOR_UNLOCK_BUTTON D4
#define MOTOR_ON_PIN D1
#define MOTOR_OFF_PIN D3
#include <Arduino.h>
#include <SPI.h>
#include <LoRa.h>
#include <EEPROM.h>

GPTC PERINTHALMANNA 24
DEPT OF ELECTRONICS ENGG. PROJECT REPORT

// debug Serial Print Macros


#define DEBUG 1
#if DEBUG
#define DEBUG_PRINT(x) Serial.print(x)
#define DEBUG_PRINTLN(x) Serial.println(x)
#define P(x) \
Serial.print(millis()); \
Serial.print(F(": ")); \
Serial.println(x)
#else
#define DEBUG_PRINT(x)
#define DEBUG_PRINTLN(x)
#define P(x)
#endif
String message = "";
uint8_t motorOnCount = 0;
void onReceive(int packetSize)
{
// received a packet
DEBUG_PRINT("Received packet '");
// read packet
for (int i = 0; i < packetSize; i++)
{
message += (char)LoRa.read();
}
// print RSSI of packet
DEBUG_PRINT("' with RSSI ");
DEBUG_PRINTLN(LoRa.packetRssi());
}
void sendLoRaMessage(const String &msg)
{
LoRa.beginPacket();
LoRa.print(msg);
LoRa.endPacket();

GPTC PERINTHALMANNA 25
DEPT OF ELECTRONICS ENGG. PROJECT REPORT

}
void setup()
{
pinMode(MOTOR_ON_PIN, OUTPUT);
pinMode(MOTOR_OFF_PIN, OUTPUT);
pinMode(MOTOR_UNLOCK_BUTTON, INPUT_PULLUP);
EEPROM.begin(512);
Serial.begin(9600);
while (!Serial)
delay(10);
P("LoRa Receiver Callback");
LoRa.setPins(NSS, RESET, dio0);
if (!LoRa.begin(433E6))
{
P("Starting LoRa failed!");
while (1)
delay(10);
}
// set the sync word, which must be the same for the transmitter and receiver
LoRa.setSyncWord(0xF3);
// load motor on count from EEPROM
motorOnCount = EEPROM.read(0);
if (motorOnCount > MOTOR_ON_COUNT_BEFORE_LOCK)
{
motorOnCount = 0;
}
P("Motor On Count: " + String(motorOnCount));
// register the receive callback
LoRa.onReceive(onReceive);
// put the radio into receive mode
P("LoRa Initialized");
LoRa.receive();
}
unsigned long lastMotorOnTime = 0;

GPTC PERINTHALMANNA 26
DEPT OF ELECTRONICS ENGG. PROJECT REPORT

bool isMotorLocked = false;


bool motorRunningStatus = false;
u_int32_t lastMotorActionTime = 0;
u_int32_t lastMessageTime = 0;
boolean motorAction = false;
void loop()
{
// check for TRANSMITTER messages
if (millis() - lastMessageTime > MESSAGE_CHECK_INTREVAL && message != "")
{
P("New message recieved!");
{
if (message == TRANSMITTER_GET_STATUS_MESSAGE)
{
P("Sending Status Response");
if (isMotorLocked || motorOnCount >= MOTOR_ON_COUNT_BEFORE_LOCK)
{
sendLoRaMessage(RECIEVER_LOCKED_RESPONSE);
}
else if (motorRunningStatus)
{
sendLoRaMessage(RECIEVER_ON_RESPONSE);
}
else
{
sendLoRaMessage(RECIEVER_OFF_RESPONSE);
}
message = "";
LoRa.receive();
return;
}
if (millis() - lastMotorActionTime < MOTOR_MINIMUM_ACTION_TIME)
{

GPTC PERINTHALMANNA 27
DEPT OF ELECTRONICS ENGG. PROJECT REPORT

P("No action taken. Waiting for motor to cool down. Wait for " + String((30 - millis() -
lastMotorActionTime) / 1000) + "s");
P("Sending Wait Response");
sendLoRaMessage(RECIEVER_WAIT_RESPONSE);
lastMessageTime = millis();
message = "";
LoRa.receive();
return;
}
if (message == TRANSMITTER_ON_MESSAGE)
{
if (motorOnCount >= MOTOR_ON_COUNT_BEFORE_LOCK)
{
P("Motor Locked");
isMotorLocked = true;
sendLoRaMessage(RECIEVER_LOCKED_RESPONSE);
message = "";
lastMessageTime = millis();
LoRa.receive();
return;
}
P("Turning Motor On");
digitalWrite(MOTOR_ON_PIN, HIGH);
motorRunningStatus = true;
motorOnCount++;
motorAction = true;
lastMotorActionTime = millis();
sendLoRaMessage(RECIEVER_ON_RESPONSE);
// store motorOnCount in EEPROM
EEPROM.write(0, motorOnCount);
EEPROM.commit();
}
else if (message == TRANSMITTER_OFF_MESSAGE)
{

GPTC PERINTHALMANNA 28
DEPT OF ELECTRONICS ENGG. PROJECT REPORT

P("Turning Motor Off");


digitalWrite(MOTOR_OFF_PIN, HIGH);
motorRunningStatus = false;
motorAction = true;
lastMotorActionTime = millis();
sendLoRaMessage(RECIEVER_OFF_RESPONSE);
}
else
{
P("Unknown Message :-");
P(message);
}
message = "";
lastMessageTime = millis();
LoRa.receive();
}
}
if (motorAction && millis() - lastMotorActionTime > MOTOR_ACTION_TIMEOUT)
{
P("Motor Action Timeout");
digitalWrite(MOTOR_ON_PIN, LOW);
digitalWrite(MOTOR_OFF_PIN, LOW);
motorAction = false;
LoRa.receive();
}
// check for MOTOR_UNLOCK_BUTTON if it is pressed for more than 5 seconds then unlock the motor
if (digitalRead(MOTOR_UNLOCK_BUTTON) == LOW)
{
P("Motor Unlock Button Pressed");
P("Unlocking Motor");
motorOnCount = 0;
isMotorLocked = false;
LoRa.receive();
}

GPTC PERINTHALMANNA 29
DEPT OF ELECTRONICS ENGG. PROJECT REPORT

CHAPTER 4

WORKING

In a pump house automation system using ESP8266 and LoRa, switches are used to control the motor. The
ESP8266, which acts as the central controller, is connected to physical switches that can turn the motor on or
off. These switches are monitored continuously by the ESP8266, which reads their status by checking the
GPIO pins. Based on the position of the switches, the ESP8266 generates control commands. If the switch
for turning the motor on is in the "on" position, the ESP8266 generates a command to activate the motor. On
the other hand, if the switch for turning the motor off is in the "on" position, the ESP8266 generates a
command to deactivate the motor.

The control commands are then transmitted using the LoRa transceiver module. The ESP8266 encodes the
commands into LoRa packets and sends them to the intended receiver, which can be a central monitoring
system or another ESP8266 acting as the receiver.

At the receiving end, the LoRa packets are received and decoded. The control commands are interpreted,
and the motor is controlled accordingly. If the command indicates that the motor should be turned on, it is
activated. Conversely, if the command indicates that the motor should be turned off, it is deactivated.

Additionally, the receiving end can provide feedback or status updates back to the ESP8266 in the pump
house. This allows for confirmation of command execution or the transmission of relevant information about
the motor's operation or system status.

If there is a user interface, such as a mobile application or a web-based dashboard, the ESP8266 can update
the interface with real-time information. This enables users to remotely monitor the pump house, view the
status of the switches, and control the motor using virtual switches on the interface.

In summary, the pump house automation system using ESP8266 and LoRa utilizes physical switches to
control the motor. The ESP8266 reads the switch positions, generates control commands, and communicates
them via LoRa. The receiving end interprets the commands and controls the motor accordingly, providing
feedback and allowing for remote monitoring and control through a user interface if available

GPTC PERINTHALMANNA 30
DEPT OF ELECTRONICS ENGG. PROJECT REPORT

FINAL VIEW OF A TRANSMITTER SIDE

FINAL VIEW OF A RECEIVER SIDE

GPTC PERINTHALMANNA 31
DEPT OF ELECTRONICS ENGG. PROJECT REPORT

CHAPTER 5

ADVANTAGES AND DISADVANTAGES

Advantages of Pump House Automation Project:

 Improved Efficiency: Automation can optimize pump operations, leading to increased efficiency
and reduced energy consumption. Automated systems can monitor and control pumps based on real-
time data, ensuring they operate at optimal levels.
 Cost Savings: By minimizing energy waste and improving pump performance, automation can result
in significant cost savings over time. Reduced maintenance and operational costs can be achieved
through predictive maintenance and proactive monitoring.
 Enhanced Safety: Automation reduces the need for manual intervention, minimizing the risk of
human error and accidents. Remote monitoring and control systems can detect and respond to issues
promptly, ensuring the safety of personnel and equipment.
 Increased Productivity: Automated systems can perform tasks quickly and accurately, allowing
pump house operators to focus on other critical responsibilities. This can lead to increased overall
productivity and better resource allocation.
 Real-time Monitoring and Alerts: Automation enables continuous monitoring of pump parameters
such as pressure, flow rate, and temperature. Operators can receive real-time alerts and notifications
about any anomalies, allowing for immediate action and preventive maintenance.

Disadvantages of Pump House Automation Project:

 Initial Investment: Implementing pump house automation requires an initial investment in


equipment, software, and infrastructure. The upfront costs can be significant, and organizations must
assess the financial feasibility of the project.
 Technical Challenges: Automation projects may face technical challenges related to system
integration, compatibility, and software configuration. It is crucial to have qualified personnel or
external experts to handle these complexities effectively.

GPTC PERINTHALMANNA 32
DEPT OF ELECTRONICS ENGG. PROJECT REPORT

 Dependence on Technology: Automation relies on technology, and any system failures or technical
glitches could disrupt pump operations. Backup systems and contingency plans should be in place to
mitigate such risks.
 Workforce Training: With automation, the workforce needs to be trained to operate and maintain
the automated systems effectively. Training programs and continuous skill development initiatives
are essential to ensure the smooth transition and ongoing operation of the automated pump house.
 Limited Flexibility: Once automation is implemented, it may be challenging to make immediate
changes or modifications to the system. Upgrades or adjustments may require additional investments
and careful planning to minimize disruptions

GPTC PERINTHALMANNA 33
DEPT OF ELECTRONICS ENGG. PROJECT REPORT

CHAPTER 6

CONCLUSION

In conclusion, the seminar report on pump house automation highlights the importance of integrating
automated systems in managing and controlling pump operations. The adoption of automation technologies
offers numerous benefits, including improved efficiency, increased productivity, and enhanced reliability.

By implementing automated systems, pump house operators can streamline processes such as pump
monitoring, maintenance scheduling, and fault detection. This leads to optimized pump performance,
reduced downtime, and cost savings in the long run. Additionally, automation enables real-time data
collection and analysis, facilitating proactive decision-making and predictive maintenance.

Furthermore, the seminar report emphasized the significance of cybersecurity measures in pump house
automation. As automated systems become more interconnected, it is essential to prioritize data security and
protect against potential cyber threats. Robust security protocols and continuous monitoring should be
implemented to safeguard critical infrastructure.

Overall, pump house automation is a transformative approach that offers significant advantages for efficient
pump operation and management. By embracing automation technologies and addressing cybersecurity
concerns, organizations can enhance their operational capabilities, achieve greater sustainability, and ensure
reliable water supply systems for the future

GPTC PERINTHALMANNA 34
DEPT OF ELECTRONICS ENGG. PROJECT REPORT

REFERENCE

1.Definition and importance of pump house automation Overview of the seminar objectives and scope

2. Pump House Automation System Components of a pump house automation system Functions and
benefits of automation in pump houses

3.pump house automation Control systems and actuators for automation System Design and Architecture

Overall system architecture and integration Selection of appropriate hardware and software components

Design considerations for reliable and efficient automation Monitoring and Control

Real-time monitoring of pump parameters (flow rate, pressure, temperature, etc.) Automated control of
pump operation based on set parameters Alarm systems and remote monitoring capabilities

Energy Efficiency and Optimization Strategies for optimizing energy consumption in pump houses

Variable speed drives and pump control algorithms Integration with energy management systems

Maintenance and Diagnostics Predictive maintenance techniques for pumps and equipment

Fault detection and diagnostics using automation Remote troubleshooting and preventive maintenance

Case Studies

Examples of successful pump house automation projects Benefits achieved in terms of energy savings, cost
reduction, and system performance Challenges and Future Trends

Common challenges in implementing pump house automation Emerging trends and technologies in the field

Future prospects for further automation advancements Conclusion

Summary of key points discussed in the seminar report Importance of pump house automation for efficient
and sustainable operations References

List of sources and citations used in the seminar report

GPTC PERINTHALMANNA 35

You might also like