0% found this document useful (0 votes)
82 views

Battery Efficiency Project Thesis Report Dissertation

The document describes a water level monitoring system using ultrasonic sensors and a microcontroller. The system aims to automatically control a solenoid valve to regulate water levels in a tank and reduce water wastage. It works by using an ultrasonic sensor to detect the water level and sending this information to a microcontroller. The microcontroller then opens or closes the solenoid valve based on predefined water level thresholds set by the user. The goal is to minimize human intervention, save water, and prevent damage caused by low or overflowing water levels in the tank.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
82 views

Battery Efficiency Project Thesis Report Dissertation

The document describes a water level monitoring system using ultrasonic sensors and a microcontroller. The system aims to automatically control a solenoid valve to regulate water levels in a tank and reduce water wastage. It works by using an ultrasonic sensor to detect the water level and sending this information to a microcontroller. The microcontroller then opens or closes the solenoid valve based on predefined water level thresholds set by the user. The goal is to minimize human intervention, save water, and prevent damage caused by low or overflowing water levels in the tank.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 41

ACKNOWLEDGMENT

We are very thankful to our supervisor, who supervised and approved our project and
helped us at every step of our project. Without his guidance, motivation and endless
support it would have been impossible to remain sustainable in the convoluted
situations.

1
ABSTRACT

Water wastage in society and also some industries is very common issue now days.
As human life becomes easier in recent years due to the advancement of technology
and this project is also related to automation and control. The main concern of this
project was to monitor the level of water through sensor. The sensor fetches the level
information in the batteery and send to controller. The controller generates level
value and switching the solenoid valve ON/OFF according to user defines levels. The
Solenoid valve is connected with the water tank. It is completely automated with the
help of a micro controller. The user define levels the controller decode it and show us
whether the battery is empty, half and full of wate. It is very useful project in case of
area facing electricity problem. Due to the automation of this project it helps the user
to get rid of switching ON/OFF the solenoid wall manually and it also leads to reduce
the wastage of water.

2
TABLE OF CONTENTS

ACKNOWLEDGMENT.................................................................................1
ABSTRACT....................................................................................................2
TABLE OF CONTENTS................................................................................3
LIST OF ACRONYMS...................................................................................5
Chapter 1.........................................................................................................6
INTRODUCTION...........................................................................................6
1.1 Overview.........................................................................................................6
1.2 Problem statement...........................................................................................6
1.3 Specifications of proposed solution................................................................7
1.4 Purpose of the project......................................................................................7
1.5 Applications of the project..............................................................................7
1.5.1 Society Application..................................................................................7
1.5.2 Daily life Application...............................................................................8
1.6 Project Plan......................................................................................................8
Chapter 2.........................................................................................................9
LITERATURE REVIEW................................................................................9
2.1 Related component and technology................................................................9
2.1.1 Sonar Sensors...........................................................................................9
2.1.2 Microcontrollers.....................................................................................10
2.2 Related Projects.............................................................................................10
2.2.1 Related project 1:...................................................................................10
2.2.2 Related project 2....................................................................................11
2.3 Related Studies..............................................................................................13
2.3.1 Water level indicator through transistor.................................................13
2.3.2 Water level indicator with alarm............................................................13
2.4 Their Limitations and Bottlenecks................................................................14
2.5 Summary.......................................................................................................14
Chapter 3.......................................................................................................15
PROJECT DESIGN AND IMPLEMENTATION........................................15
3.1 Design of the Project Hardware/ Software....................................................15

3
3.1.1 Level Sensor module..............................................................................15
3.1.2 Arduino..................................................................................................16
3.2 Details about software/ algorithms................................................................17
3.2.1 Arduino..................................................................................................17
3.3 Details of final working prototype................................................................17
3.4 Summary.......................................................................................................18
Chapter 4.......................................................................................................19
TOOLS AND TECHNIQUES......................................................................19
4.1 Hardware used with technical specifications................................................19
4.1.1 Ultrasonic module HC-SR04...............................................................19
4.1.2 Arduino.................................................................................................22
4.1.3 Solenoid velve............................................................................................25
4.1.3 Battery...................................................................................................29
4.1.4 7812 IC..................................................................................................36
4.1.5 SPDT Relay...........................................................................................37
4.1.6 2N2222 Transistor................................................................................37
4.2 Software(s), simulation tool(s) used..............................................................39
4.2.1 Arduino development environment.......................................................39
4.3 Testing Procedures........................................................................................39
4.3.1 Ultrasonic module HC-SR04.................................................................39
4.3.2 Arduino uno...........................................................................................40
4.4 Summary.......................................................................................................40

4
LIST OF ACRONYMS

DOD Depth of Discharge


SLI Starting, Lighting and Ignition
PIC Programmable Interface Controller
C C language
RTU Remote Terminal Unit
CTU Control Terminal Unit
PC Personal Computer
LED Light Emitting Diode
UPS Uninterruptible Power Supplies
VCC Voltage Source
GND Ground
CM Centimeter
TTL Transistor Transistor Logic
USB Universal Serial Bus

5
Chapter 1

INTRODUCTION

As human life becomes easier in recent year due to the advancement of technology
every one try to make the things easy and automatic this project is also relate to
automation and control. As we know that scarcity of resources is major issue in these
days so we are going to do this project to save electricity and water over flow. Water
wastage is major issue in big cities. This is a common problem facing by every house
and factory. Due to busy life it is common that when the water level in the battery is
increased or decrease it can demage the battery. So in order to increase the efficiency
of the battery we the tank usually overflows without notice. One has to keep
constantly monitor the battery through ultrasonic sensors. Sometimes this also can
happen that the battery demage because of absence of water in the battery. Due to this
problem monitoring of water or liquid is required. Which take the level information
through sensor and automatically starts and stops the solenoid valve according to user
define levels.

1.1 Overview
This project is introduced for water monitoring system in battery through ultrasonic
sensors. This will provide complete control to solenoid valve that is providing water
to the battery. The main purpose of this project is to control the level of water in the
battery, lesser the human effort and save the time. This system also helps in saving the
electrical energy by automatic switching of solenoid valve. The level information of
battery is collected by sensor and gives that level information to micro controller. The
controller on off the solenoid valve.

1.2 Problem statement


Measuring water level is an essential task for industry, government and residence
perspective. Wastage of Liquid (water) in residence is not an efficient use of water
resources. Wastage of liquid, time, and human power in industry is not acceptable.
From the last few years several systems are designed to overcome this problem. But

6
the limitation of those systems doesn’t solve this problem efficiently. The project
overcome the human effort because sometime person don’t know the level of battery
and it is not always convenient for him to check the level in battery all the time, in
that case this project can help him which will run the solenoid valve according to
user’s conditions.

1.3 Specifications of proposed solution


First ultrasonic sensor fetches the level information of tank. This information is given
to micro controller that converts this information into 4 bits. Micro controller reads
this data and according to the user defined level turn on the solenoid valve if the level
is not less then the defined level the solenoid valve will not be turn on.

1.4 Purpose of the project


Past few years there are many projects implemented related to this project but those
are failed due to their limitations. Limitations in those projects are, the systems are
totally manual a person will regularly check the battery level. Our main aim is to
develop a system which saves Liquid being wasted and overflowed. This problem is
with so many areas covering residential and industrial, that water is being overflowed
and no one noticed it. By implementation of our project, there is no need to humans to
monitor the battery level, the controller will automatically monitor it.

1.5 Applications of the project


It is very useful project in case of area facing electricity problem. It will help a lot due
to its automatic on/off operation..

1.5.1 Society Application

The water level monitoring for societies offers a solution for pumping of the water to
overhead tanks in building it avoids.
 Overflow of overheads tanks
 Electricity saving
 Automatic switching which results in water saving

7
1.5.2 Daily life Application

This project has number of practical users in daily life


 No need to go towards battery
 Can be used to measure underground storage of water
 Water level monitoring works to maintain a constant water level
 It can also be used to calculate incoming and outgoing water in large
reservation.

1.6 Project Plan


We divided our project within the group in different small task so that each group
member can work on it and learn everything and can teach to other group members
what he learnt. By this process every member was assigned a task to do and then this
task was assessed by all group members.

8
Chapter 2

LITERATURE REVIEW

Before this project there are a lot of technique and method to control water flow and
level. The problems that enforce us to use these techniques were:
1. Water scarcity.
2. Water overflow.
3. Wastage of electricity.
4. Wastage of water.
There were some method to monitor the water level in tank but they were using
complex circuitry and having low efficiency or compatibility. This project used same
idea but increase efficiency and compatibility through using wireless link.

2.1 Related component and technology


The related technology and component that we can use in our project as well are:

2.1.1 Sonar Sensors

Sonar sensor is also known as ultrasonic sensors it sends sound waves and receives
this sound wave when it reflects back so it is also called transducer. They send high
frequency sound wave send then start to calculate the time until the sound is received
back to sensors. With the help of this calculating time sensor evaluate the distance
from the object. The basic process is that sensor take command from the controller
and transmit an echo sound when this sound is strike with an object (water or other
solid things) it reflect back to the sensor and sensor receive it during this process
controller calculate the time of sending and receiving to evaluate the distance from the
object with the help of this formula.
S=V*T/2
S= Distance from the object.
V= Velocity of sound wave.
T= Time period between the wave transmit and receive.

9
2.1.2 Microcontrollers

In know days microcontroller is using in every electronic technology because it acts


as brain. A Micro controller controls all the system very efficiently according to
program. It input and processes it then gives command as an output.

2.1.2.1 PIC Microcontroller

Programmable Interface Controllers (PIC) is microcontrollers in which we program


our logic in a C language. This language is user friendly and easily understands by
every human. They are used to make a lot of projects from simple category to high
security purpose. They are very much user friendly

2.1.2.2 Arduino Microcontroller

Now a day’s arduino is use because it makes engineer life easy and having good
efficiency and compatible for all type of project which use controller in other word
you can say that it is an open source and give user friendly platform to code our logics
of programming to make a lot of projects. The language of audino is very easily
having built in command for different tasks and its language is very much close to
human language.

In market there are different types of audino Microcontroller boards are present. Some
of them are following.

 Arduino Ethernet.

 Arduino Mega 2560.

 Arduino Leonardo.

 Arduino Uno.

 Arduino Due.

 Arduino Mega ADK.

10
2.2 Related Projects
2.2.1 Related project 1:

Wireless water level monitoring system is more efficient because it was used in
automation, data acquisition and control system. Wireless unit transmits water level
signal from remote reservoir to a central monitoring station. Central monitoring
station has desktop pc with suitable level which was descried through software as per
real time. This unit plays important role in society water supply scheme and regional
authorities.
At the top of tank remote terminal unit (RTU) is installed which indicates the level of
water in three way, such as 0% (empty), 50% (half full), 100% (full) and contact free
sensors are used to sense the water level. Suitable sensors for this project are rugged
in construction and Sensor sense the water level and send signal trough RTU (remote
terminal unit) to control monitoring unit. This unit is operated on main power supply
so that it can easily inform the central monitoring system about the water level change
even when the power supply is cutoff.
PC at central monitoring station receives the data from RTU through wireless
network. The unit has been powered with main supply with precautions against surge
and provided voltage variation. PC has storage to save the data so that receiver data
can be shown on a special prepared famed of software. If user need any type of
information about the water level so he can collect it from PC.

2.2.2 Related project 2

This technology is also use for water level monitoring. The first part of design is using
sensor to sense the water level and send output to microcontroller through inventor.
Microcontroller is act as main control system which controls all process in the system
automatically hence reduces size of design and control complexity. When the input
from the sensor is change so the output from the microcontroller decides the water
pump is ON or OFF on the current status of water in tank . The figure of the whole
circuit diagram is shown in Fig. 2.1.

11
Figure-2.1 water level indicator using PIC16F84A [4]

In the microcontroller RA4 pin is used to detect the water in the ground or reserve
tank. If there is no water in the reserve tank it send command to switch OFF the
system result pin RA0, RA1, RA2 and RA3 is inverted and does not change until the
water is present. Crystal Oscillator is connected with pin 15 and 16 and with two
capacitor 22pF and 27pF which further connect it to the ground. This combination act
as external clock to executes the instruction of the system.
 If pins RA0, RA1, RA2 and RA3 get zero so all LEDs is OFF that mean
water tank is empty and reserve tank is also empty.
 If all pins remain zero and LED 1 is ON and other LEDs are OFF which mean
water tank is empty and water exist in reserve thank so we can ON motor.
 If RA0 get 1 (5V) and other pins are zero (0V) so LED 1 and 2 is ON remain
are OFF this indicate us tank is ¼ full.
 If RA0 and RA1 get 1 (5V) and other pins are zero (0V) so LED 1, 2, and 3 is
ON and remain LED is OFF this indicate us tank is half full.
 If first three pins get 1 (5V) and all LEDs in ON than this mean tank is ¾ full.
 If all pins get 1 (5V) and all LEDs in ON than this mean tank is complete full.

12
2.3 Related Studies
As we know that there is limited resource like water and electricity etc. So people are
doing research to save the resources and use it efficiently and avoid wasting them. For
this purpose we read many research papers and projects to make our project more
compatible and cost effective. There are following project we research on.

2.3.1 Water level indicator through transistor

Water level indicator is use to indicate the levels of tank trough LEDs. This project is
using 5 transistors and each transistor is connected with corresponding LED and
electrode probes that is fixed step by step from bottom to top of the tank. One probe is
fixed at the bottom of tank having 6V AC supply. As we know that water is good
conductor so when water is raising each transistor gets electrical connection of 6V AC
to ON the corresponding LED and indicates the water level.

water level indicator using Transistors

2.3.2 Water level indicator with alarm

This project is using the same phenomena as in water level indicator through
transistor It also indicates the levels of water through using transistor and their
corresponding LEDs. The things which change in it is using buzzer for alarm purpose.
This buzzer is connected with bottom level LEDs now when the tank become empty it
starts alarming.

13
2.4 Their Limitations and Bottlenecks
The following related project and studies are discussing above have some limitation
and accuracy or efficiency problems.
 All the projects are having low efficiency and less compatibility because user
need time to go overhead tank and check the level.
 The entire projects are not automatically ON the water pump when the tank is
empty.
 All the project using wiring system and having low life time component and
need maintenances after some time so this makes these project expensive.
 Theses project are not doing complete monitoring of reserve tank.
 These projects are useless when the power supply cutoff.

2.5 Summary
This chapter gives reader a complete view about the literature, related technologies,
related project and studies. This chapter clears the sense of reader why we are going
to do this project by telling him about the problems that was faced in daily life. It also
gives over view of different project related to this project and their limitation. It also
gives brief discussion about the related technology and component and their purpose
that we are going to use in our project.

14
Chapter 3

PROJECT DESIGN AND IMPLEMENTATION

3.1 Design of the Project Hardware/ Software

Ultrasonic
Sensors

Controller

Relay
Driver
Circuit

Container

Solenoid Battery
Valve

Figure shows the complete block diagram of this project. The ultrasonic sensor in the
battery measure the distance between water level give that data to Microcontroller.
Microcontroller creates a 4 bit digital data with respect to the distance measure by
ultrasonic sensor (I.e. 0000 for the end level, 1000 for half level and 1111 for full
level of liquid) Details about hardware

3.1.1 Level Sensor module

In this project we use ultrasonic sensor. Like dolphins and bats do, this sensor uses
ultrasonic sound to measure distance. The pitch of the sound is very high that humans
cannot hear. In our case we measure the distance between water level and the top of

15
the tank. This ultrasonic sensor has 2 parts transducer and receiver. The transducer
sends an ultrasonic sound that has frequency of 40 KHz. The receiver listen this
sound.

The speed of sound is 340 meters per second that is 29.41 microseconds per
centimeter. To measure the distance we use the formula

Distance = (Time x speed of sound) / 2

The 2 in the formula is because of the sound travel from transducer and after
reflection come back to the receiver so it travels back and forth.

This sensor can measure distance up to 450 cm. The accuracy of this sensor is 2mm
and it has focus of 15 degrees.

VCC of the sensor is connected to the 5 volts and GND is connected with ground. The
trig pin is connected to the digital output of microcontroller and the Echo pin is
connected with the digital input of microcontroller. A high pulse of at least 10
microseconds is give to Trig pin and then wait for high pulse receives at Echo pin.
The distance travelled by ultrasonic sound is corresponds to the amount of time Echo
pin is stay high.

3.1.2 Arduino

There are two type of Arduino used in this project. One is Arduino uno and the other
is Arduino Mega. Arduino uno is used with both transmitters while Arduino Mega is
used with receivers. In receiver part we need more digital pins that’s why we used
Arduino Mega. The controller used in Arduino uno is ATmega328 having 14 digital
input/output pins. The controller used in Arduino mega is ATmega1280 having 54
digital input/output pins. To operate Arduino 5 volts DC is required.

Ultrasonic sensor is connected with the digital pins of Arduino. The sensor fetches
the distance (Level) information and give to the controller. In controller we run an
algorithm that converts that distance (Level) information in bits (Digital Level). I.e.
0000 for the end tank level, 1000 for half tank level and 1111 for full tank level of
liquid.

Arduino mega is connected with receiver that receives level information of both
tanks. The receivers are connected at the digital input pins of Arduino mega. In this

16
controller we run an algorithm that read the received level information and turn on or
off the motor according to users defined levels. Motor is connected at digital output
pins of Arduino through Relay.

3.2 Details about software/ algorithms


3.2.1 Arduino

Arduino compiler is used in this project to code the Arduino. First of all input and
output ports are initialized. Then send a high pulse and start a counter until it is
received at echo. The counter gives us the value of distance by using formula.

17
3.3 Details of final working prototype

Figure-3.2 final working prototype diagram

The details of final working protocol are shown in Figure 3.2. Sensor gets the level
information of tank and pass to the micro controller. Micro controller makes a 4 bit
code from this level information at pass to the wireless transmitter. The transmitter
modulate the data on 433MHz at transmit it. At the other side receiver receive this
signal and demodulate it, give the 4 bit data to micro controller. These types of

18
arrangements are also done on sump. The level information of sump is also received
by micro controller. On the basis of this data the micro controller starts the pump
according to user defined levels. Micro controller sends high to relay. When relay
receive high signal from micro controller it starts motor that is operating on 220 V
AC. The level information of both tank and sump is also received by receivers that are
connected with LCD through micro controller. The LCD shows the current levels to
the user.

3.4 Summary
In this chapter we highlight the hardware and software techniques which are used in
this project. Ultrasonic sensor fetches the level information and gives it to the micro
controller. Micro controllers process this data and make 4 bit code of it. This 4 bit
code is passing to the transmitter that transmits it on modulating frequency. The
receiver receives both information of tan and sump, demodulate it and pass to the
micro controller. The micro controller checks the levels with to user defined levels
and starts or stop the pump accordingly.

19
Chapter 4

TOOLS AND TECHNIQUES

Multiple hardware and software tools and techniques are used in this project. High
Quality hardware is used to inshore quality. The main parts of this project are shown
in Figure 4.1.

4.1 Hardware used with technical specifications


4.1.1 Ultrasonic module HC-SR04

Figure-4.2 Diagram of Ultrasonic Sensor

The HC-SR04 ultrasonic sensor uses sonar to determine distance to an object like bats
or dolphins do. It offers excellent non-contact range detection with high accuracy and
stable readings in an easy-to-use package. From 2cm to 400 cm or 1” to 13 feet. It
operation is not affected by sunlight or black material like Sharp rangefinders are
(although acoustically soft materials like cloth can be difficult to detect). It comes
complete with ultrasonic transmitter and receiver module.

The basic working of this module is


 Using at least 10us high signal at trigger
 The module sends eight (8) 40 KHz sound signals and detect whether there is
a pulse signal back.
 If the signal is back then

20
Distance = (high level time x velocity of sound (340 m/s)) / 2
Module Pins
 5V Supply
 Trigger Pulse Input
 Echo Pulse Output
 0V Ground

4.1.1.1 Module Electric Parameters

Operating Voltage 5 Volts DC


Operating Current 15 mA
Operating Frequency 40 KHz
Max Range 4m
Min Range 2 cm
Angle 15 degree
Trigger input signal 10 us TTL pulse
Echo output signal Input TTL lever signal and the range in
proportion
Dimension 45 x 20 x 15 mm
Table-4.1 Parameter of Ultrasonic sensor

4.1.1.2 Working

Figure-4.3 Working of Ultrasonic Sensor


10 uS pulse is supply to the trigger input to start the ranging. The module will send
eight cycle of ultrasound at frequency of 40 KHz and receive its echo. The range is
the time between sending trigger and receive echo.

21
SPECIFICATION AND LIMITATIONS

Parameter Min Typ. Ma Unit


x

Operating Voltage 4.50 5.0 5.5 V

Quiescent Current 1.5 2 2.5 mA

Working Current 10 15 20 mA

Ultrasonic - 40 - kHz
Frequency

OPERATION

The timing diagram of HC-SR04 is shown. To start measurement, Trig of SR04 must
receive a pulse of high (5V) for at least 10us, this will initiate the sensor will transmit
out 8 cycle of ultrasonic burst at 40kHz and wait for the reflected ultrasonic burst.
When the sensor detected ultrasonic from receiver, it will set the Echo pin to high
(5V) and delay for a period (width) which proportion to distance. To obtain the
distance, measure the width (Ton) of Echo pin.

Time = Width of Echo pulse, in uS (micro second)

Distance in centimeters = Time / 58

Distance in inches = Time / 148

Or you can utilize the speed of sound, which is 340m/s

4.1.2 Arduino

"Uno" means one in Italian and is named to mark the upcoming release of Arduino
1.0. The Uno and version 1.0 will be the reference versions of Arduino, moving
forward. The Uno is the latest in a series of USB Arduino boards, and the reference
model for the Arduino platform;

22
Arduino uno is ATMEGA328 based microcontroller board. Consists of
 14 digital I/P or O/P pins
 6 analog I/P pins
 16 MHz resonator
 USB connection

The power pins are as follows:


 VIN. The input voltage to the Arduino board when it's using an external power
source (as opposed to 5 volts from the USB connection or other regulated
power source). You can supply voltage through this pin, or, if supplying
voltage via the power jack, access it through this pin.
 5V. The regulated power supply used to power the microcontroller and
other components on the board. This can come either from VIN via an on-
board regulator, or be supplied by USB or another regulated 5V supply.
 3V3. A 3.3 volt supply generated by the on-board regulator. Maximum current
draw is 50 mA.
 GND. Ground pins.
 Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial
data.These pins are connected to the corresponding pins of the ATmega8U2
USB-to-TTL Serial chip.
 External Interrupts: 2 and 3. These pins can be configured to trigger an
interrupt on a low value, a rising or falling edge, or a change in value. See the
attachInterrupt() function for details.
 PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the
analogWrite() function.
 SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI
communication, which, although provided by the underlying hardware, is not
currently included in the Arduino language.
 LED: 13. There is a built-in LED connected to digital pin 13. When the pin is
HIGH value, the LED is on, when the pin is LOW, it's off.

23
4.1.2.1 Technical specifications

Microcontroller ATMEGA328
Operating Voltage 5V
Input Voltage
7-12V
(recommended)
Input Voltage (limits) 6-20V
Digital I/O Pins 14
Analog Input Pins 6
DC Current per I/O Pin 40 mA
DC Current for 3.3V Pin 50 mA
Flash Memory 32 KB
SRAM 2 KB
EEPROM 1 KB
Clock Speed 16 MHz
Length 68.6 mm
Width 53.4 mm
Weight 25 g

Table-4.2 Technical parameter of arduino


Two ways can be used to power up the arduino uno that is USB connection or
external power supply. The arduino select the power source automatically. The
arduino board can operate on 6 - 20 volts. However recommended range is 7-12 volts.

4.1.2.2 Communication:-

Arduino uno can be communicates with computer, other Arduino or other


microcontroller. ATmega328 provides serial communication USB communication
with computer. Arduino uses standard USB drivers.
Dimensions
 2.7 inches Length and 2.1 inches width
 Four screw holes on board

24
 Distance between pins in 0.16 inch.

Programming

The Arduino Uno can be programmed with the Arduino software (download). Select
"Arduino Uno from the Tools > Board menu (according to the microcontroller on
your board). For details, see the reference and tutorials.
The ATmega328 on the Arduino Uno comes preburned with a bootloader that allows
you to upload new code to it without the use of an external hardware programmer. It
communicates using the original STK500 protocol (reference, C header files).
You can also bypass the bootloader and program the microcontroller through the
ICSP (In-Circuit Serial Programming) header using Arduino ISP or similar; see these
instructions for details.
The ATmega16U2 (or 8U2 in the rev1 and rev2 boards) firmware source code is
available . The ATmega16U2/8U2 is loaded with a DFU bootloader, which can be
activated by:
On Rev1 boards: connecting the solder jumper on the back of the board (near the map
of Italy) and then resetting the 8U2.
On Rev2 or later boards: there is a resistor that pulling the 8U2/16U2 HWB line to
ground, making it easier to put into DFU mode.
You can then use Atmel's FLIP software (Windows) or the DFU programmer (Mac
OS X and Linux) to load a new firmware. Or you can use the ISP header with an
external programmer (overwriting the DFU bootloader).

4.1.3 Solenoid velve

A solenoid valve is an electronically operated device. It is used to control the flow of


liquids or gases in a positive, fully-closed or fully-open mode. The valve is commonly
used to replace a manual valve or where remote control is desirable. A solenoid is
operated by opening and closing an orifice in a valve body that permits or prevents
flow through the valve. The orifice is opened or closed through the use of a plunger
that is raised or lowered within a sleeve tube by energizing the coil. The bottom of the
plunger contains a compatible sealing material, which closes off the orifice in the
body, stopping flow through the valve.

25
The solenoid assembly consists of a coil, plunger, and sleeve assembly. In a normally
closed valve, a plunger return spring holds the plunger against the orifice, preventing
flow through the valve. When the coil is energized, a magnetic field is produced,
raising the plunger and allowing flow through the valve. In a normally open valve,
when the coil is energized, the plunger seals off the orifice, stopping flow through the
valve.
Direct Operated Solenoid Valves
Direct operated solenoid valves function to directly open or close the main valve
orifice, which is the only flow path in the valve. Direct operated valves are used in
systems requiring low flow capacities or in applications with low pressure differential
across the valve orifice. The sealing surface that opens and closes the main valve
orifice is connected to the solenoid plunger. The valve operates from zero pressure
differential to maximum rated pressure differential (MOPD) regardless of line
pressure. Pressure drop across the valve is not required to hold the valve open.

Coil de-energized, valve closed

Pilot Operated Valves


Pilot operated valves are the most widely used solenoid valves. Pilot operated valves
utilize system line pressure to open and close the main orifice in the valve body. In a
piston-style valve, the main orifice is held closed with a piston seal pressed against
the main orifice by the combined fluid pressure and spring pressure. In a normally
closed valve, the piston is shifted or opened when the pilot operator is energized. This
allows fluid behind the piston to evacuate through the valve outlet. At this point, the
system line pressure moves the piston, opening the main orifice of the valve allowing
high capacity flow through the valve. When energizing the coil of a normally open

26
valve, fluid pressure builds up behind the piston, forcing the piston to seal the main
orifice of the valve.

Coil de-energized, valve closed

Coil energized, valve open

Design Terminology
Continuous Duty
 A rating given to a valve that can be energized continuously without overheating.
Correction Factor
A mathematical relationship related to a fluid’s specific gravity used to convert
specific flows from a standard media to the media in question.
Current drain
The amount of current (expressed in amperes) that flows through the coil of a
solenoid valve when it is energized.
Cv Factor 
A mathematical factor that represents the quantity of water, in gallons per minute, that
will pass through a valve with a 1 psi pressure drop across the valve.
Flow 
Movement of fluid created by a pressure differential.
Flow Capacity

27
The quantity of fluid that will pass through a valve under a given set of temperature
and pressure conditions.
Manual Stem
A mechanical device that permits the manual opening or closing of a valve in the case
of emergency or power failure. A manual stem is available on all normally closed
valves.
Maximum Operating Pressure Differential (MOPD)
The maximum pressure difference between the inlet and outlet pressures of the valve
must not be exceeded, allowing the solenoid to operate in both the energized and de-
energized positions.
Minimum Operating Pressure Differential
The minimum pressure difference between the inlet and outlet pressures required for
proper operation. This minimum operating pressure differential must be maintained
throughout the operating cycle of pilot operated valves to assure proper shifting from
the closed position to the open position and visa versa. In the absence of the minimum
operating pressure, the valve may close or will not fully open.
Orifice
The main opening through which fluid flows.
Safe Working Pressure 
The maximum pressure a valve may be exposed to without experiencing any damage.
The valve does not have to be operable at this pressure, but merely withstand the
pressure without damage.

Different parts of a solenoid valve


The illustration below depicts the basic components of a solenoid valve. The valve
shown in the picture is a normally-closed, direct-acting valve. This type of solenoid
valve has the most simple and easy to understand principle of operation.

28
1. Valve Body 4. Coil / Solenoid 7. Plunger

2. Inlet Port 5. Coil Windings 8. Spring

3. Outlet Port 6. Lead Wires 9. Orifice

Working of solenoid valve


The media controlled by the solenoid valve enters the valve through theinlet port (Part
2 in the illustration above). The media must flow through the orifice (9) before
continuing into the outlet port (3). The orifice is closed and opened by the plunger (7).
The valve pictured above is a normally-closed solenoid valve. Normally-closed valves
use a spring (8) which presses the plunger tip against the opening of the orifice. The
sealing material at the tip of the plunger keeps the media from entering the orifice,
until the plunger is lifted up by an electromagnetic field created by the coil.

4.1.3 Battery

Lead acid batteries were invented in 1859 by Gaston Planté and first demonstrated to
the French Academy of Sciences in 1860. They remain the technology of choice for
automotive SLI (Starting, Lighting and Ignition) applications because they are robust,
tolerant to abuse, tried and tested and because of their low cost. For higher power

29
applications with intermittent loads however, Lead acid batteries are generally too big
and heavy and they suffer from a shorter cycle life and typical usable power down to
only 50% Depth of Discharge (DOD). Despite these shortcomings Lead acid batteries
are still being specified for PowerNet applications (36 Volts 2 kWh capacity) because
of the cost, but this is probably the limit of their applicability and NiMH and Li-Ion
batteries are making inroads into this market. For higher voltages and cyclic loads
other technologies are being explored.

 
Lead-acid batteries are composed of a Lead-dioxide cathode, a sponge metallic Lead
anode and a Sulphuric acid solution electrolyte. This heavy metal element makes
them toxic and improper disposal can be hazardous to the environment.
The cell voltage is 2 Volts.
Discharge
During discharge, the lead dioxide (positive plate) and lead (negative plate) react with
the electrolyte of sulfuric acid to create lead sulfate, water and energy.
Charge
During charging, the cycle is reversed: the lead sulfate and water are electro-
chemically converted to lead, lead oxide and sulfuric acid by an external electrical
charging source.

30
Many new competitive cell chemistries are being developed to meet the requirements
of the auto industry for EV and HEV applications. 
Even after 150 years since its invention, improvements are still being made to the lead
acid battery and despite its shortcomings and the competition from newer cell
chemistries the lead acid battery still retains the lion's share of the high power battery
market.
Advantages
 Low cost.
 Reliable. Over 140 years of development.
 Robust. Tolerant to abuse.
 Tolerant to overcharging.
 Low internal impedance.
 Can deliver very high currents.
 Indefinite shelf life if stored without electrolyte.
 Can be left on trickle or float charge for prolonged periods.
 Wide range of sizes and capacities available.
 Many suppliers world wide.
 The world's most recycled product.
 
Shortcomings
 Very heavy and bulky.
 Typical coulombic charge efficiency only 70% but can be as high as 85% to
90% for special designs.
 Danger of overheating during charging
 Not suitable for fast charging
 Typical cycle life 300 to 500 cycles .
 Must be stored in a charged state once the electrolyte has been introduced to
avoid deterioration of the active chemicals.

Gassing is the production and release of bubbles of hydrogen and oxygen due to the
breakdown of water in the electrolyte during the charging process, particularly due to
excessive charging, causing loss of electrolyte. In large battery installations this can

31
cause an explosive atmosphere in the battery room. Because of the loss of electrolyte,
Lead acid batteries need regular topping up with water. Sealed batteries however are
designed to retain and recombine these gases.
 Sulphation may occur if a battery is stored for prolonged periods in a completely
discharged state or very low state of charge, or if it is never fully charged, or if
electrolyte has become abnormally low due to excessive water loss from overcharging
and/or evaporation. Sulphation is the increase in internal resistance of the battery due
to the formation of large lead sulphate crystals which are not readily reconverted back
to lead, lead dioxide and sulphuric acid during re-charging. In extreme cases the large
crystals may cause distortion and shorting of the plates. Sometimes sulphation can be
corrected by charging very slowly (at low current) at a higher than normal voltage.
Completely discharging the battery may cause irreparable damage.
 Shedding or loss of material from the plates may occur due to excessive charge rates
or excessive cycling. The result is chunks of lead on the bottom of the cell, and actual
holes in the plates for which there is no cure. This is more likely to occur in SLI
batteries whose plates are composed of a Lead "sponge", similar in appearance to a
very fine foam sponge. This gives a very large surface area enabling high power
handling, but if deep cycled, this sponge will quickly be consumed and fall to the
bottom of the cells.
Toxic chemicals
Lead acid batteries can work down to temperatures below -45 °C, however, like all
batteries the discharge rate and effective capacity are reduced at low temperatures. In
the case of Lead acid batteries the capacity falls by about 1% per degree for
temperatures below +20 °C so that at the lowest temperatures cranking capacity is
seriously impaired.
 
Decomposition of the Electrolyte Cells with gelled electrolyte are prone to
deterioration of the electrolyte and unexpected failure. Such cells are commonly used
for emergency applications such as UPS back up in case of loss of mains power. So as
not to be caught unawares by an unreliable battery in an emergency situation, it is
advisable to incorporate some form of regular self test into the battery.
 
Charging

32
 Charge immediately after use.
 Lasts longer with partial discharges.
 Charging method: constant voltage followed by float charge.
 Fast charge not possible but charging time can be reduced using the V Taper
charge control method.
 
Applications
 Automotive and traction applications.
 Standby/Back-up/Emergency power for electrical installations.
 Submarines
 UPS (Uninterruptible Power Supplies)
 Lighting
 High current drain applications.
 Sealed battery types available for use in portable equipment.
 Grid scale energy storage
 
Costs
 Low cost
 Flooded lead acid cells are one of the least expensive sources of battery power
available.
 Deep cycle cells may cost up to double the price of the equivalent flooded
cells.
Varieties of Lead Acid Batteries
Over the years battery manufacturers have introduced a range of additives such as
Calcium, Antimony and Selenium to improve various battery performance
parameters. For the same reason, different cell and battery constructions have been
developed to optimise various aspects of battery performance.
 
Lead Calcium Batteries
Lead acid batteries with electrodes modified by the addition of Calcium providing the
following advantages:

33
 More resistant to corrosion, overcharging, gassing, water usage, and self-
discharge, all of which shorten battery life.
 Larger electrolyte reserve area above the plates.
 Higher Cold Cranking Amp ratings.
 Little or No maintenance.
 

Lead Antimony Batteries


Lead acid batteries with electrodes modified by the addition of Antimony providing
the following advantages:
 Improved mechanical strength of electrodes - important for EV and deep
discharge applications
 Reduced internal heat and water loss due to gassing, however the water loss is
still greater than the equivalent loss in Lead Calcium batteries.
 Longer service life than Calcium batteries.
 Easier to recharge when completely discharged.
 Lower cost.
 Lead Antimony batteries have a higher self discharge rate of 2% to 10% per
week compared with the 1% to 5% per month for Lead Calcium batteries.
 
Valve Regulated Lead Acid (VRLA) Batteries :
This construction is designed to prevent electrolyte loss through evaporation, spillage
and gassing and this in turn prolongs the life of the battery and eases maintenance.
Instead of simple vent caps on the cells to let gas escape, VRLA have pressure valves
that open only under extreme conditions. Valve-regulated batteries also need an
electrolyte design that reduces gassing by impeding the release to the atmosphere of
the oxygen and hydrogen generated by the galvanic action of the battery during
charging. This usually involves a catalyst that causes the hydrogen and oxygen to
recombine into water and is called a recombinant system. Because spillage of the acid
electrolyte is eliminated the batteries are also safer.
 
AGM Absorbed Glass Mat Battery:

34
Also known as Absorptive Glass Micro-Fibre
Used in VRLA batteries the Boron Silicate fibreglass mat which acts as the separator
between the electrodes and absorbs the free electrolyte acting like a sponge. Its
purpose is to promote recombination of the hydrogen and oxygen given off during the
charging process. No silica gel is necessary. The fibreglass matt absorbs and
immobilises the acid in the matt but keeps it in a liquid rather than a gel form. In this
way the acid is more readily available to the plates allowing faster reactions between
the acid and the plate material allowing higher charge/discharge rates as well as deep
cycling.
This construction is very robust and able to withstand severe shock and vibration and
the cells will not leak even if the case is cracked.
AGM batteries are also sometimes called "starved electrolyte" or "dry", because the
fibreglass mat is only 95% saturated with Sulfuric acid and there is no excess liquid.
Nearly all AGM batteries are sealed valve regulated "VRLA".
AGM's have a very low self-discharge rate of from 1% to 3% per month
 
Gel Cell
This is an alternative recombinant technology to also used in VRLA batteries to
promote recombination of the gases produced during charging. It also reduces the
possibility of spillage of the electrolyte. Prone to damage if gassing is allowed to
occur, hence charging rates may be limited. They must be charged at a slower rate
(C/20) to prevent excess gas from damaging the cells. They cannot be fast charged on
a conventional automotive charger or they may be permanently damaged.
Used for UPS applications.
 
SLI Batteries (Starting Lighting and Ignition)
This is the typical automotive battery application. Automotive batteries are designed
to be fully charged when starting the car; after starting the vehicle, the lost charge,
typically 2% to 5% of the charge, is replaced by the alternator and the battery remains
fully charged. These batteries are not designed to be discharged below 50% Depth of
Discharge (DOD) and discharging below these levels can damage the plates and
shorten battery life.
 

35
Deep Cycle Batteries
Marine applications, golf buggies, fork lift trucks and electric vehicles use deep cycle
batteries which are designed to be completely discharged before recharging. Because
charging causes excessive heat which can warp the plates, thicker and stronger or
solid plate grids are used for deep cycling applications. Normal automotive batteries
are not designed for repeated deep cycling and use thinner plates with a greater
surface area to achieve high current carrying capacity.
Automotive batteries will generally fail after 30-150 deep cycles if deep cycled, while
they may last for thousands of cycles in normal starting use (2-5% discharge).
If batteries designed for deep cycling are used for automotive applications they must
be "oversized" by about 20% to compensate for their lower current carrying capacity.
 
Advanced Lead-Acid Batteries
Carbon doping of the electrodes improves the durability and efficiency of lead-acid
batteries by sharply reducing the accumulation of lead sulphate deposits that
previously inhibited their performance.
 
The Ultrabattery - Sometimes called the Supercabattery
Inserting a supercapacitor into the battery acts as a "buffer" improving its high-rate
charge/discharge performance so that the unit can operate within a state-of-charge
window below 70 percent successfully. By attaching a separate carbon electrode to
the negative lead plate, the battery takes on some of the characteristics of
a supercapacitor. This extra electrode accepts very high charge/discharge rates thus
relieving the original lead plate electrode from this duty and thus avoiding the lead
shedding which plagued lead acid batteries and limited their use. The ultrabattery is
thus also able to deliver a much longer cycle life of over 10 times the cycle life of an
AGM battery.

4.1.4 7812 IC

7812 is a famous IC which is being widely used in 12V voltage regulator circuits.
Truly speaking it is a complete standalone voltage regulator. We only need to use two
capacitors, one on the input and second one on the output of 7812 in order to achieve
clean voltage output and even these capacitors are optional to use. To achieve 12V 1A

36
current, 7812 should be mounted on a good heatsink plate. Thanks to the transistor
like shape of 7812 which makes it easy to mount on a heatsink plate. 7812 has built in
over heat and short circuit protection which makes it a good choice for making power
supplies.

In electronics markets, 7812 is sold under various names such as 7812a, 7812act,
7812t and lm7812. All of them are almost identical with a little to no differences at
all. 7812 input voltage range is 14V to 35V. Exceeding the voltage range may damage
the IC. Given bellow is 7812 pin diagram to make the pinout connections clear in case
you want to do some experiments.

4.1.5 SPDT Relay

This type of a relay has a total of five terminals. Out f these two are the coil terminals. A
common terminal is also included which connects to either of two others.
Single Pole Double Throw Relay an electromagnetic switch, consist of a coil, 1
common terminal , 1 normally closed terminal, and one normally open
terminal. When the coil of an SPDT relay is at rest (not energized), the common
terminal and the normally closed terminal have continuity. When the coil is
energized, the common terminal and the normally open terminal have
continuity. When energizing the coil of a relay, polarity of the coil does not matter
unless there is a diode across the coil. If a diode is not present, you may attach

37
positive voltage to either terminal of the coil and negative voltage to the other,
otherwise you must connect positive to the side of the coil that the cathode side (side
with stripe) of the diode is connected and negative to side of the coil that the anode
side of the diode is connected.

Relay Applications

 Relays are used to realize logic functions. They play a very important role in
providing safety critical logic.

 Relays are used to provide time delay functions. They are used to time the delay
open and delay close of contacts.

 Relays are used to control high voltage circuits with the help of low voltage
signals. Similarly they are used to control high current circuits with the help of
low current signals.

4.1.6 2N2222 Transistor

The 2N2222 is a common NPN bipolar junction transistor (BJT) used for general


purpose low-power amplifying or switching applications. It is designed for low to
mediumcurrent, low power, medium voltage, and can operate at moderately high
speeds.
The 2N2222 is considered a very common transistor, and is used as an exemplar of an
NPN transistor. It is frequently used as a small-signal transistor, and it remains a small
general purpose transistor of enduring popularity.
Operational characteristics make the 2N2222 a low- to medium-current (up to 600
milliamps), low-power (up to 625 milliwatts), medium-voltage (up to 40 volts)
device. Though these parameters may seem to limit the 2N2222’s usefulness, the
2N2222 is perfect for a host of signal manipulation and handling applications prior to
high-power amplification. 2N2222 transistors are also used to condition signals before
and after application to more advanced digital devices.

38
While the 2N2222 was the first of its kind, it has spawned a number of variants
collectively called “2N2222 type” transistors, because they all share functional-
construction and operational characteristics identical to the original 2N2222 transistor.
Chief among these variants is the P2N2222 transistor, which is enclosed in a small
black TO-92 package made of either epoxy or plastic. The combination of the large
number of uses for the 2N2222 and the cost-effective TO-92 package has made the
P2N2222 the least expensive and most used transistor in electronics.
 The main characteristics of this device may be understood with the following
points:

 The transistor 2N2222 or 2N2222A are NPN types and has the following
electrical parameters:

 The device’s maximum voltage tolerance (breakdown voltage) across its


collector and base is 60 volts for 2N2222 and 75 volts for 2N2222A, with the
emitters kept open.

 With their base open, the above tolerance across their collector and emitter
leads is 30 volts for 2N2222 and 40 volts for 2N2222A.

 As expressed earlier, the maximum current that can be applied across the
transistors collector and emitter, via a load is not more than 800 mA.

 Total power dissipation of the device should not exceed above 500 mW.

 hFE or the dC current gain of 2N2222 transistors will be around 75 minimum,


at voltages near 10, with 10 mA collector current.

 Maximum frequency handling capacity or the transition frequency is 250 MHz


for 2N2222 and 300 MHz for 2N2222A.
 The base-emitter saturation voltage for 2N2222 is typically 1.3 volts @ 15
mA, when the collector current is around 150 mA. With collector current

39
exceeding 500 mA, the base optimal trigger voltage becomes 2.6 volts. For a
2N2222A, the figures are 1.2 and 2 volts respectively.

4.2 Software(s), simulation tool(s) used


4.1.1 Arduino development environment

This software is used for the programming of Arduino which have built in
microcontroller controller. Arduino IDE is open source software. It is very easy to
write code and upload it to the Arduino board. It can easily run on windows, Mac and
Linux. It is based on based on the Processing multimedia programming environment.
Arduino uno is preburned with bootloader that allows uploading new code with use of
an external hardware programmer. The protocol used is STK500. [4]

4.3 Testing Procedures


4.1.2 Ultrasonic module HC-SR04

Ultrasonic module HC-SR04 is first connected to Arduino. First we measure a


distance by scale manually and then by ultrasonic module HC-SR04 the result is
accurate.

4.1.3 Arduino uno

Connect the Arduino uno with computer and programmed it with LED blink code.
When we burn the LED blink code in Adruino and start it, the on board LED starts
blinking. This shows that the Arduino uno is working properly.

4.4 Summary
In this chapter we discuss the technical specifications of hardware and software that
we use in our project. The complete specification of components, Input voltages,
Input currents, Input/output pins, dimensions, uses of each component, reliability and
other factors are discussed in details. Application of every component is also listed.

40
We also discuss about the software compiler that is used to program adruino uno. In
last we discuss the testing procedure on each component.

41

You might also like