You are on page 1of 89




Submitted in the fulfillment for the Requirement of

the award of the degree of


Submitted By
V.VENKATA VIVEK (13981A0497)
S. ATCHUTA RAO (14985A0421)
P.VAMSI RAJ (13981A0479)

Under The Esteemed Guidance of

Associate Professor, ECE Department

Department of Electronics and Communication Engineering

(Affiliated to JNTU-KAKINADA)
Dakamarri, Bheemunipatnam Mandal, Visakhapatnam- 531162.

Department of Electronics and Communication Engineering
(Affiliated to JNTU-KAKINADA)
Visakhapatnam- 531162


This is to certify that the project report titled SMART DATA

(13981A0497), S.ATCHUTA RAO (14985A0421), P.VAMSI RAJ
(13981A0479) B-tech IV - II semester Electronics and Communication is a
record bonafied work carried out by them. The result embodied in this report
has not been submitted to any other University for the award of any degree.


Associate Professor Associate professor
Department Of ECE Department Of ECE
Raghu Engineering College Raghu Engineering College
We express our sincere thanks to Sri Kaladindi Raghu, Chairman and Sri
R.Kameshwar Rao, Principal, Raghu Engineering College for having permitted
us to carry out this work. We express our gratitude for their encouragement and
cooperation in fulfillment of our project.

We are also expressing our sincere thanks to Sri K.PHANINDHER VINAY

Associate Professor Head, Department Of Electronics and Communication
Engineering, Raghu Engineering College for providing the required facilities in the
department for successful completion of the project.

We are thankful to our guide Mr.N. MARKANDEYA GUPTA, Associate

Professor, Raghu Engineering College, for his value guidance and useful
suggestions. He has given us the problem statement and the path to solve it and has
been right through with us in the successful completion of this project in time.


LAB, Teaching and Non teaching staff for mentoring us throughout the project
and helped us to complete the project successfully.

This book would not be possible without the cooperation of our Parents, Friends.
We are so grateful for their willingness to help us learn from their examples. They
shaped our life encouraged learning, and themselves are models of creativity.

Level monitoring plays an important role in the industrial production, automotive, oil, petroleum
and natural gas Industries. Here the level measurement, It is simply about determining the liquid
level inside a tank or reactor or other vessel. Here the level measurement should be continuous
and accurate throughout the process. Hence the importance of measurement and data acquisition
plays a vital role in industries.

This project is proposed for measuring and monitoring the level of the tank using LabVIEW
software and Arduino uno board. Arduino uno board is used for interfacing the hardware with
the LabVIEW software. The proposed method is of low cost, easy to use and has wide range of
applications in industries and laboratories.

2.1.2 History of Embedded Systems 7
2.1.3 Characteristics of Embedded Systems 8
2.1.4 Features of Embedded Systems 8
2.1.5 Tools of Embedded Systems 9
2.1.6 Debugging 10
2.1.7 Applications of embedded systems 11
2.2.1 Microcontroller 11
2.2.2 Types of Microcontroller 12
2.2.3 Microcontroller Applications 13
2.2.4 Application of Microcontroller in Day to Day Life Devices 13
2.2.5 Application of Microcontroller in Industrial Control Devices 13
2.3 Arduino UNO 14
2.3.2 Features of the Arduino UNO 15
2.3.3 Atmega328 Pin Diagram 15
2.3.4. Pin Descriptions 18
2.4.1 Circuit Diagram 20
2.4.2 Voltage regulator 20
2.5 RELAY 21
2.5.1 Relay 21
2.5.2 Relay operation 22
2.5.3 Relay working 23
2.6 SENSORS 24
2.6.1 Sensor description 25
2.6.2 Specifications 25
2.6.3 Applications 27
2.6.4 Pin configuration 28
2.6.5 Wiring 28
2.7.1 Pins Functions 30
2.7.2 LCD screen 31
2.7.3 16x2 Alphabetic LCD module features 32
2.7.4 Advantages of graphic LCDs 32
2.8 DC Motor 32


3.1 Concept of lab view 37
3.1.1 Front panel 37
3.1.2 Block diagram 37
3.2 Control palette 38
3.3 Functions palette 38
3.4 Graphical programming 39
3.4.1 Wires 40
3.5 Benefits of lab view 41
3.5.1 Interfacing to devices 41
3.5.2 Code compiling 41
3.5.3 Large libraries 41
3.5.4 Parallel programming 42
3.6 Licensing 42
3.7 Run-time environment 42
3.8 parallel execution and race conditions 42
3.9 Performance 43
3.10 Front panel window toolbar 43
3.11 Debugging tools 45
3.11.1 Fixing broken Vis 45
3.11.2 Finding causes for broken Vis 45
3.11.3 Common causes of broken Vis 46
3.11.4 Fixing incorrect behavior 46
3.12 Block Diagram toolbar 46
3.13 Probe tool 46
4.1Software description 50
4.2Arduino IDE 50
4.3Introduction to PROTEUS 8 53
4.3.1Introduction 53
4.3.2Opening, Creating & Importing Projects 53
4.3.3Steps to create a New Project 59
4.3.4 How to do the simulating 65
4.4 Hardware description 67
5.1 Output screenshots 69
Applications 73
Future scope 73

REFERENCE-------------------------------------------------------------------------- 74

APPENDIX---------------------------------------------------------------------------- 76

Figure 1.1: Block Diagram 3

Figure 2.1:Block Diagram of Embedded System 10

Figure 2.2: Arduino microcontroller 14

Figure 2.3:ATmega328p Microcontroller 15

Figure 2.4:ATmega328 Pin Diagram 16

Figure 2.4.1: Circuit Diagram of Power Supply 20

Figure 2.4.2: Voltage Regulator pin diagram 20

Figure 2.4.3: Voltage Regulator 7805 and 7812 21

Figure 2.5: Relay board. 22

Figure 2.5.1: Relay design 23

Figure 2.6: Ultrasonic Sensor 24

Figure 2.6.1: Pin configuration of Ultrasonic sensor 28

Figure 2.6.2: Ultrasonic sensor wiring with arduino 28

Figure 2.7: LCD Display 29

Figure 2.7.1: LCD Contrast Connection 31

Figure 2.8: DC Motor 33


Table 2.1 Applications of Embedded Systems 11

Table 2.2: Pin Description of ATmega328p 17

Table 2.3: Pin Description of Ultrasonic sensor 25

Table 2.4: Specifications of Ultrasonic sensor 27

Table 2.5: Ultrasonic sensor Pins Connect with Arduino 28

Table 2.6: pin description of LCD 30


Screen 4.1: Arduino IDE- Software icon 50

Screen 4.2: Arduino IDE – Program window 51

Screen 4.3: Arduino IDE- Create the new program window 51

Screen 4.4: Arduino IDE – Main program window. 52

Screen 4.5: Arduino IDE – Program Compilation. 52

Screen 4.6 – Display of water flow in Proteus software. 58

Screen 4.7: Proteus software starting window. 59

Screen 4.8: Proteus software new project window. 59

Screen 4.9: Proteus software Create schematic layout window. 60

Screen 4.10: Proteus software Create PCB layout window. 61

Screen 4.11: Proteus software microcontroller selection window. 61

Screen 4.12: Proteus software window for circuit designing. 61

Screen 4.13: Proteus software component selection window. 62

Screen 4.14 Proteus software component selection example window. 63

Screen 4.15 Proteus software circuit designing window. 64

Screen 4.16: Proteus software Arduino Selection window. 65

Screen 4.17: Proteus software Arduino Program window. 66

Screen 4.18: Proteus software Output Display window. 66

Screen number:4.4.1: Picture of hardware module. 67
Screen number 5.1.1:LCD display motor ON condition. 69
Screen number 5.1.2: LCD display motor OFF condition. 70
Screen number 5.1.3: Empty condition of tank in labview. 71
Screen number 5.1.3: Block diagram of front end in labview. 71
Screen 5.1.4: Full condition of tank in labview. 72
Screen number 5.1.4: Block diagram of front end in labview. 72

Measurement of levels in tanks is important across many industrial applications. There

are many tank monitoring applications, for example water level monitoring, mining process
liquids monitoring, Boiler level detection and pipeline corrosion inhibitor liquid monitoring, etc.
The monitoring is required for two purposes. One is to make sure that the tank does not run dry
or over flow during the process, another purpose is to ensure the liquid is being drawn from the
tank is of prescribed value , for these requirement we are continuously monitoring the level of
the tank using a level sensor.

In most of the industrial applications the level measurement is carried out in terms of
pressure, in which pressure can be calibrated to the level of the tank. Level transmitters are
familiar and well understood technology for liquid level measurement. They are straight forward,
easy to use and install and work in a high variety of applications and wide range of conditions.
The measured value should be monitored and suitable action should be carried out to rectify the
deviation in the process.


Measurement of levels in tanks is important across many industrial applications. There
are many tank monitoring applications, for example water level monitoring, mining process
liquids monitoring, Boiler level detection and pipeline corrosion inhibitor liquid monitoring, etc.
The monitoring is required for two purposes. One is to make sure that the tank does not run dry
or over flow during the process, another purpose is to ensure the liquid is being drawn from the
tank is of prescribed value , for these requirement we are continuously monitoring the level of
the tank using a ultrasonic sensor.

The reactors and boilers in the chemical industries cannot be monitored continuosly by
naked human eye as the temperature near the reactor tanks will be high. Thus this smart data
acquisition and control technique will continuosly monitor the reactors and react to the situation
of level of material in the reactor and spontaneously operate the motor which fill the reactor.


The objective of this project is to develop the water monitoring system where the level
automatically detects by the sensor system to program the automatic pumping system using the
microcontroller, where the program simulates data from sensor. Develop graphic user interfacing
system using Visual Basic software to monitor the level.

Cost is more due to the installation and maintenance of automation equipment .


To assure the safety and productivity of the process, it is essential to be equipped with
instruments providing consistent and precise measurements of level. At the source of level
measurement, it is simply about determining the position of the surface inside a tank, reactor or
other vessel. Precise control of the level of the liquid in a reactor, or vessel is significant in many
process applications.

Increased channel maintenance:

There is a need to increase maintenance of channels and equipment to ensure the system
works correctly. Channels should be fenced to protect the automatic units from stock damage

Each day, our lives become more dependent on “EMBEDDED SYSTEMS‟, digital
Information technology that is embedded in our environment. More than 98% of processors
applied today are in embedded systems, and are no longer visible to the customer as „computers‟
in the ordinary sense. An Embedded System is a special purpose system in which the computer is
completely encapsulated by or dedicated to the device or system it controls. Unlike a general
purpose computer, such as a personal computer, an Embedded system performs one or a few
predefined tasks, usually with specific requirements. Since the system is dedicated to specific
tasks, design engineers can optimize it, reducing the size and cost of the product. Embedded
Systems are offered mass produced, benefiting from economies of scale. The increasing
developments in high end systems have dropped dramatically as a result of this trend, feasibly
some projects which previously would not have been done because of the high cost of non-
PCbased embedded hardware. But software choices for the embedded for the embedded PC
platform are not nearly as attractive as hardware.
Typically, an embedded system is housed on a single micro-processor board with the
programs stored in ROM. Virtually all appliances that have a digital interface watches, micro
waves, VCR‟s, cars-utilize embedded systems. Some embedded systems include an operating
system, but many are so specialized that an entire logic can be implemented as a single program.
Physically, Embedded Systems range from portable devices such as digital watches and MP3
players, so large stationary like traffic lights, factory controllers, or the systems controlling
nuclear power plants. In terms of complimentary embedded systems can range from very simple
with a single microcontroller chip, in very complex with multiple units, peripherals and networks
mounted inside a large enclosure. Many embedded systems are not always stand alone devices.
Many embedded systems consist of small, computerized parts within a larger device that serves a
more general purpose.
The program instructions written for embedded systems are referred to as firmware, and
are stored in read only memory or flash memory chips. They run with limited computer
Hardware resources: little memory. small or non-existent key board or screen.

Embedded system is defined as: For a particular specific application implementing the
software code to interact directly with that particular hardware what we built. Software is used
for providing features and flexibility.
An Embedded system is a special purpose computer built into a larger system for the purposes of
controlling and monitoring the system. A specialized computer system that is part of a larger
system or machine. There are many definitions of embedded systems but all of these can be
embedded into a single concept. An embedded system is a special purpose computer system this
is used for particular task.

2.1.1 History of Embedded Systems:

In earliest years of computers in the 1940‟s, computers were sometimes dedicated to a
single task, but too large to be considered “embedded”. Over time however, the concept of
programmable controllers developed from a mix of computer technology, solid state devices, and
traditional electromechanical sequences. The first recognizably modern embedded system was
the Apollo Guidance Computer, developed by Charles Stark Draper at the MIT Instrumentation
laboratory. At the project‟s inception, the Apollo Guidance computer was considered the riskiest
item in the Apollo project. The usage of the new monolithic circuits, to reduce the size and
weight, increased this risk.
The first mass-produced embedded system was the Automatics D-17 guidance computer for the
Minuteman (missile), released in 1961. It was built from transistor logic and had a hard disk for
main memory. When minuteman II went into production in 1966, the D-17 was replaced with a
new computer that was the first high-volume use of integrated circuits. This program alone
reduced prices on quad NAND gate ICs from $1000/each to$3/each, permitting their use in
commercial products. Since these early applications in the 1960s, embedded systems have come
down in price. There has also been an enormous rise in processing power and functionality. For
example the microprocessor was the Intel 4004, which found its way into calculators and other
small systems, but required external memory and support chips.
In 1978 National Engineering Manufacturers Association released the standard for a
programmable microcontroller. The definition was an almost any computer-based controller.
They included single board computers, numerical controllers, and sequential controllers in order

to perform event-based instructions. By the mid-1980s, many of the previously external system
components had been integrated into the same chip as the processor, resulting in integrated
circuits called microcontrollers, and widespread use of embedded system became feasible.
As the cost of microcontroller fell below $1, it became feasible to replace expensive
knob-based analog components such as potentiometer and variable capacitors with digital
electronics controlled by a small microcontroller with up/down buttons or knobs. By the end of
the 80‟s embedded system were the norm rather than the exception for almost all electronics
devices, a trend which has continued since.

2.1.3 Characteristics of Embedded Systems:

Embedded systems are designed to do some specific task, rather than be general-purpose
computer for multiple tasks. Some also have real-time performance constrains that must be met,
for reason such as safety and usability; others may have low or no performance requirements,
allowing the system hardware to be simplified to reduce costs. Work station programmers often
concentrate on functionality. They may consider the performance characteristics of a few
computational kernels of their software, but rarely analyze the total application. They almost
never consider power consumption and manufacturing cost.
The need to juggle all the requirements makes embedded system programming very
challenging and is the reason why embedded system designer need to understand computer
architecture. An embedded system is not always a separate block- very often it is physically
built-in to the device it is controlling the software written for embedded system is often called
firmware, and is stored in read-only memory or flash memory chips rather than a disk drive. It
often runs with limited computer hardware resources: small or no keyboard, screen, a little

2.1.4 Features of Embedded Systems:

The versatility of the embedded computer system lends itself to utility in all kinds of
enterprises, from the simplification of deliverable products to a reduction in costs in their
development and manufacture. Complex systems with rich functionality employ special
operating systems that take into account major characteristics of embedded systems. Embedded

operating systems have minimized footprint and may follow real-time operating system

The special computer system is usually less powerful than general purpose systems,
although some expectations do exist where embedded systems are very powerful and
complicated. Usually a low power consumption CPU with a limited amount of memory is used
in embedded systems.
Since the embedded system is dedicated to specific tasks, design engineers can optimize
it, reducing the size and cost of the product, or increasing the reliability and performance. Some
embedded systems are mass-produced, benefiting from scale. Some embedded systems have to
operate in extreme environment conditions such as very high temperature and humidity.
For high volume systems such as portable music players or mobile phones, minimizing
cost is usually the primary design consideration. Engineers typically select hardware that is just
“good enough” to implement the necessary functions.

2.1.5 Tools of Embedded Systems:

As for other software, embedded system designers use compilers, assemblers, and
debuggers to develop embedded system software. However, they may also use some more
specific tools:
 An in-circuit (ICE) is a hardware device that replace or plugs into the microprocessor,
and provides facilities to quickly load and debugging experimental code in the system.
 Utilities to add a checksum or CRC to a program, so the embedded system can check if
the program is valid.
 For system using digital signal processing, developers may be math workbench such as
math CAD or mathematic to simulate mathematics.
 Custom compilers and linkers may be used to improve optimization for a particular
 An embedded system may have its own special language or design tool, or add
enhancements to an existing language.

2.1.6 Debugging:
Embedded system Debugging may be performed at different levels, depending on the
facilities available, ranging from assembly or source-level debugging with an in-circuit emulator
or in circuit debugger, to output from serial debug ports or JTAG/Nexus interfaces, to an
emulated environment running on personal computer.
As the complexity of embedded systems grows, higher level tools and operating systems
are migrating into machinery where it makes sense. For example, cell phones, personal digital
assistants and other consumer computers often need significant software that is purchased or
providing by a person other than the manufacturer of the electronics. In the systems, an open
programming environment such as LINUX, OSGI or embedded Java is required so that third-
party software provider can cell to a large market.


Figure 2.1:Block Diagram of Embedded System

Some of the most embedded systems used in everyday life are
Critical Systems Safety and mission critical computations
(E.g. Pace meters, Automatic trains)
Network equipment Emphasis on data movement/packet flow
(E.g. Network switches)
Signal processing Often use DSP chips for vision, audio
(E.g. Face recognition)
Robotics Uses various types of embedded computing
(E.g. Autonomous vehicles)
Computer peripherals Disk drives, Keyboard, Laser printers etc.,
Wireless systems Wireless network connected “sensor
networks” and “motes” to gather and report
Command and control Often used in huge military systems
(E.g. a fleet of warships interconnected with
Control systems Often uses DSP chips for control
Distributed embedded control Mixture of large and small notes Real-time
(E.g. cars, elevators).
Embedded PCs Palmtops and small form factor PCs
embedded into equipment.

Table 2.1 Applications of Embedded Systems


2.2.1 Microcontroller
A microcontroller is a self-contained system with peripherals, memory and a processor
that can be used as an embedded system. Most programmable microcontrollers that are used
today are embedded in other consumer products or machinery including phones, peripherals,
automobiles and household appliances for computer systems. Due to that, another name for a
microcontroller is "embedded controller." Some embedded systems are more sophisticated, while
others have minimal requirements for memory and programming length and a low software
complexity. Input and output devices include solenoids, LCD displays, relays, switches and
sensors for data like humidity, temperature or light level, amongst others.

2.2.2 Types of Microcontroller:

Microcontrollers are divided into categories according to their memory, architecture, bits
and instruction sets. So let‟s discuss types of microcontrollers: -


• 8 bit microcontroller executes logic & arithmetic operations. Examples of 8 bit micro
controller is Intel 8031/8051.
• 16 bit microcontroller executes with greater accuracy and performance in contrast to 8-
bit. Example of 16 bit microcontroller is Intel 8096.
• 32 bit microcontroller is employed mainly in automatically controlled appliances such as
office machines, implantable medical appliances, etc. It requires 32-bit instructions to
carry out any logical or arithmetic function.


• External Memory Microcontroller – When an embedded structure is built with a

microcontroller which does not comprise of all the functioning blocks existing on a chip
it is named as external memory microcontroller. For illustration- 8031 microcontroller
does not have program memory on the chip.
• Embedded Memory Microcontroller – When an embedded structure is built with a
microcontroller which comprise of all the functioning blocks existing on a chip it is
named as embedded memory microcontroller. For illustration- 8051 microcontroller has
all program & data memory, counters & timers, interrupts, I/O ports and therefore its
embedded memory microcontroller.

Instruction Set:

• CISC- CISC means complex instruction set computer, it allows the user to apply 1
instruction as an alternative to many simple instructions.
• RISC- RISC means Reduced Instruction Set Computers. RISC reduces the operation time
by shortening the clock cycle per instruction.

Memory Architecture:

• Harvard Memory Architecture Microcontroller

• Princeton Memory Architecture Microcontroller

2.2.3 Microcontroller Applications:

Microcontrollers are intended for embedded devices, in comparison to the micro-

processors which are used in PCs or other all-purpose devices. Microcontrollers are employed in
automatically managed inventions and appliances like- power tools, implantable medical
devices, automobile engine control systems, , office machines, remote controls appliances, toys
and many more embedded systems. By dipping the size and expenditure in comparison to a
design that make use of a different micro-processor, I/O devices and memory, micro-controllers
formulate it inexpensive to digitally control more & more appliances and operations. Mixed
signal micro-controllers are general; putting together analog constituents required controlling
non-digital electronic structures.

2.2.4 Application of Microcontroller in Day to Day Life Devices:

• Light sensing & controlling devices

• Temperature sensing and controlling devices
• Fire detection & safety devices
• Industrial instrumentation devices
• Process control devices

2.2.5 Application of Microcontroller in Industrial Control Devices:

• Industrial instrumentation devices

• Process control devices

2.2.6 Application of Microcontroller in Metering & Measurement Devices:

• Volt Meter
• Measuring revolving objects
• Current meter
• Hand-held metering systems
The microcontroller we are using in our project is Arduino UNO (ATmega328P) microcontroller

2.3 Arduino UNO
Arduino Uno is a microcontroller board based on the ATmega328P . It has 14 digital
input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz quartz
crystal, a USB connection, a power jack, an ICSP header and a reset button. It contains
everything needed to support the microcontroller; simply connect it to a computer with a USB
cable or power it with a AC-to-DC adapter or battery to get started. You can tinker with your
UNO without worrying too much about doing something wrong, worst case scenario you can
replace the chip for a few dollars and start over again.

"Uno" means one in Italian and was chosen to mark the release of Arduino Software
(IDE) 1.0. The Uno board and version 1.0 of Arduino Software (IDE) were the reference
versions of Arduino, now evolved to newer releases. The Uno board is the first in a series of
USB Arduino boards, and the reference model for the Arduino platform; for an extensive list of
current, past or outdated boards see the Arduino index of boards.

Figure 2.2: Arduino microcontroller

2.3.2 Features of the Arduino UNO:
 Microcontroller: ATmega328
 Operating Voltage: 5V
 Input Voltage (recommended): 7-12V
 Input Voltage (limits): 6-20V
 Digital I/O Pins: 14 (of which 6 provide PWM output)
 Analog Input Pins: 6
 DC Current per I/O Pin: 40 mA
 DC Current for 3.3V Pin: 50 mA
 Flash Memory: 32 KB of which 0.5 KB used by bootloader
 SRAM: 2 KB (ATmega328)
 EEPROM: 1 KB (ATmega328)
 Clock Speed: 16 MHz

2.3.3 Atmega328 Pin Diagram:

The Atmega328 is a very popular microcontroller chip produced by Atmel. It is an 8-bit
microcontroller that has 32K of flash memory, 1K of EEPROM, and 2K of internal SRAM.

Figure 2.3:ATmega328p Microcontroller

The Atmega328 has 28 pins.

Figure 2.4:ATmega328 Pin Diagram

Pin Number Description Function
1 PC6 Reset
2 PD0 Digital Pin (RX)
3 PD1 Digital Pin (TX)
4 PD2 Digital Pin
5 PD3 Digital Pin (PWM)
6 PD4 Digital Pin
7 VCC Positive Voltage (Power)
8 GND Ground
9 XTAL 1 Crystal Oscillator
10 XTAL 2 Crystal Oscillator
11 PD5 Digital Pin (PWM)
12 PD6 Digital Pin (PWM)
13 PD7 Digital Pin
14 PB0 Digital Pin
15 PB1 Digital Pin (PWM)
16 PB2 Digital Pin (PWM)
17 PB3 Digital Pin (PWM)
18 PB4 Digital Pin
19 PB5 Digital Pin
20 Positive voltage for ADC (power)
21 AREF Reference Voltage
22 GND Ground
23 PC0 Analog Input
24 PC1 Analog Input
25 PC2 Analog Input
26 PC3 Analog Input
27 PC4 Analog Input
28 PC5 Analog Input

Table 2.2Pin description of ATmega328p

2.3.4. Pin Descriptions :
Digital supply voltage.
Port B (PB[7:0]) XTAL1/XTAL2/TOSC1/TOSC2
Port B is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each
bit). The Port B output buffers have symmetrical drive characteristics with both high sink and
source capability. As inputs, Port B pins that are externally pulled low will source current if the
pull-up resistors are activated. The Port B pins are tri-stated when a reset condition becomes
active, even if the clock is not running. Depending on the dock selection fuse settings, PB6 can
be used as input to the inverting Oscillator amplifier and input to the internal clock operating
Depending on the dock selection fuse settings, PB7 can be used as output from the inverting
Oscillator amplifier. If the Internal Calibrated RC Oscillator is used as chip dock source, PB[7:6]
is used as TOSC[2:1] input for the Asynchronous Timer/Counter2 if the AS2 bit in ASSR is set.
Port C (PC[5:0])
Port C is a 7-bit bi-directional I/O port with internal pull-up resistors (selected for each bit).
The PC[5:0] output buffers have symmetrical drive characteristics with both high sink and
source capability. As inputs, Port C pins that are externally pulled low will source current if the
pull-up resistors are activated. The Port C pins are tri-stated when a reset condition becomes
active, even if the clock is not running.
If the RSTDISBL Fuse is programmed, PC6 is used as an I/O pin. Note that the electrical
characteristics of PC6 differ from those of the other pins of Port C.
If the RSTDISBL Fuse is unprogrammed, PC6 is used as a Reset input. A low level on this
pin for longer than the minimum pulse length will generate a Reset, even if the clock is not
running. Shorter pulses are not guaranteed to generate a Reset. The various special features of
Port C are elaborated in the Alternate Functions of Port C section.

Port D (PD[7:0])
Port D is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each
bit). The Port D output buffers have symmetrical drive characteristics with both high sink and
source capability. As inputs, Port D pins that are externally pulled low will source current if the
pull-up resistors are activated. The Port D pins are tri-stated when a reset condition becomes
active, even if the clock is not running.
AVcc is the supply voltage pin for the A/D Converter, PC[3:0], and PE[3:2]. It should be
externally connected to Vcc, even if the ADC is not used. If the ADC is used, it should be
connected to Vcc through a low-pass filter. Note that PC[6:4] use digital supply voltage, Vcc.
AREF is the analog reference pin for the ND Converter.
ADC[7:6] (TQFP and VFQFN Package Only)
In the TQFP and VFQFN package, ADC[7:6] serve as analog inputs to the ND converter. These
pins are powered from the analog supply and serve as 10-bit ADC channels.


The power supply unit is used to provide a constant 5V of DC supply from a 230V of AC
supply. These 5V DC will acts as power to different standard circuits. It mainly uses 2 devices.

1. Voltage regulator

2. DC adapter

2.4.1 Circuit Diagram:
The general circuit diagram for total power supply to any embedded device is as shown

Figure 2.4.1: Circuit Diagram of Power Supply


This is most common voltage regulator that is still used in embedded designs.
LM7805 voltage regulator is a linear regulator. With proper heat sink these LM78xx types can
handle even more than 1A current. They also have Thermal overload protection, Short circuit
This will connect at the output of rectifier to get constant Dc supply instead of ripple
voltages. It mainly consists of 3 pins
1. Input voltage
2. Output voltage
3. Ground
The capacitor C2 is used to get thee ripple voltage as input to regulator instead of full positive
Vr = Iload/Xc

Figure 2.4.2: Voltage Regulator pin diagram

For some devices we require 12V/9V/4V Dc supply at that time we go for 7812/7809/7804

regulator instead of 7805 regulator.

Figure 2.4.3: Voltage Regulator 7805 and 7812

2.5 RELAY:
2.5.1 Relay:
We know that most of the high end industrial application devices have relays for their
effective working. Relays are simple switches which are operated both electrically and
mechanically. Relays consist of a n electromagnet and also a set of contacts. The switching
mechanism is carried out with the help of the electromagnet. There are also other operating
principles for its working. But they differ according to their applications. Most of the devices
have the application of relays.
2.5.2 Relay operation:
The main operation of a relay comes in places where only a low-power signal can be used
to control a circuit. It is also used in places where only one signal can be used to control a lot of
circuits. The application of relays started during the invention of telephones. They played an
important role in switching calls in telephone exchanges. They were also used in long distance
telegraphy. They were used to switch the signal coming from one source to another destination.
After the invention of computers they were also used to perform Boolean and other logical
operations. The high end applications of relays require high power to be driven by electric
motors and so on. Such relays are called contactors.
Pole and Throw

Relays have the exact working of a switch. So, the same concept is also applied. A relay
is said to switch one or more poles. Each pole has contacts that can be thrown in mainly three
ways. They are

 Normally Open Contact (NO) – NO contact is also called a make contact.

It closes the circuit when the relay is activated. It disconnects the circuit when the
relay is inactive.
 Normally Closed Contact (NC) – NC contact is also known as break
contact. This is opposite to the NO contact. When the relay is activated, the circuit
disconnects. When the relay is deactivated, the circuit connects.

Change-over (CO) / Double-throw (DT) Contacts – This type of contacts are used to
control two types of circuits. They are used to control a NO contact and also a NC contact with a
common terminal. According to their type they are called by the names break before make and
make before break contacts.

2.5.3 Relay working:

The working of a relay can be better understood by explaining the following diagram
given below.

Figure 2.5.1: Relay Design

The diagram shows an inner section diagram of a relay. An iron core is surrounded by a
control coil. As shown, the power source is given to the electromagnet through a control switch
and through contacts to the load. When current starts flowing through the control coil, the
electromagnet starts energizing and thus intensifies the magnetic field. Thus the upper contact
arm starts to be attracted to the lower fixed arm and thus closes the contacts causing a short
circuit for the power to the load. On the other hand, if the relay was already de-energized when
the contacts were closed, then the contact move oppositely and make an open circuit.

As soon as the coil current is off, the movable armature will be returned by a force back
to its initial position. This force will be almost equal to half the strength of the magnetic force.
This force is mainly provided by two fact1ors. They are the spring and also gravity.

Relays are mainly made for two basic operations. One is low voltage application and the
other is high voltage. For low voltage applications, more preference will be given to reduce the
noise of the whole circuit. For high voltage applications, they are mainly designed to reduce a
phenomenon called arcing.

An Ultrasonic sensor is a device that can measure the distance to an object by using
sound waves. It measures distance by sending out a sound wave at a specific frequency and
listening for that sound wave to bounce back. By recording the elapsed time between the sound
wave being generated and the sound wave bouncing back, it is possible to calculate the distance
between the sonar sensor and the object.

Diagram of the basic ultrasonic sensor operation

Since it is known that sound travels through air at about 344 m/s (1129 ft/s), you can take
the time for the sound wave to return and multiply it by 344 meters (or 1129 feet) to find the total
round-trip distance of the sound wave. Round-trip means that the sound wave traveled 2 times
the distance to the object before it was detected by the sensor; it includes the 'trip' from the sonar
sensor to the object AND the 'trip' from the object to the Ultrasonic sensor (after the sound wave
bounced off the object). To find the distance to the object, simply divide the round-trip distance
in half.

2.6.1 Sensor description:
Ultrasonic sensors are based on measuring the properties of sound waves with frequency
above the human audible range. They are based on three physical principles: time of flight, the
Doppler effect, and the attenuation of sound waves. Ultrasonic sensors are non-intrusive in that
they do not require physical contact with their target, and can detect certain clear or shiny targets
otherwise obscured to some vision-based sensors. On the other hand, their measurements are
very sensitive to temperature and to the angle of the target.


Table 2.3: Pin description of ultrasonic sensor
Ultrasonic sensors “are based on the measurement of the properties of acoustic waves
with frequencies above the human audible range,” often at roughly 40 kHz They typically
operate by generating a high-frequency pulse of sound, and then receiving and evaluating the
properties of the echo pulse.
Three different properties of the received echo pulse may be evaluated, for different
sensing purposes. They are:

 Time of flight (for sensing distance)

 Doppler shift (for sensing velocity)

Modes of Operation

1. Time of Flight
1.a. Reflection Mode
In reflection mode (also known as “echo ranging”), an ultrasonic transmitter emits a short
burst of sound in a particular direction. The pulse bounces off a target and returns to the receiver
after a time interval t. The receiver records the length of this time interval, and calculates the
distance travelled r based on the speed of sound c: r = c * t2)

Very often, separate transmitting and receiving transducers are placed immediately next
to each other, housed as a single unit. (The PING))) Range Finder, Omega flowmeter and
Migatron high-accuracy sensor below are all designed this way.) In these cases, the distance
calculated will be twice the distance from the sensor to the target.

Using proper coordination, a single transducer can be used for both emitting the pulse
and receiving the echo. Note that it takes time for the transducer to change modes, presenting a
challenge to short-distance measurement.

1.b. Direct Measurement Mode

In this mode of operation the transmitter and receiver are two separate units that move relative to
each other. For example, the receiver can be fixed to a target that moves relative to a stationary
transmitter, or vice-versa.

Multiple transmitters can be used to increase the directionality of the transmitted pulse.
Lima placed multiple ultrasonic transmitters on a performer, whose signals were received by
multiple receivers in the performance space, enabling a computer program to triangulate the
performer's position.

Doppler Shift
When a wave reflects off of a moving object, its frequency is shifted by an amount
proportional to the velocity of the object. This fact can be exploited in ultrasonic sensing by
having the receiver measure not the time of flight but the frequency of the returning echo pulse.
Knowing fe and fr, the frequency of the emitted and received pulse, respectively, the velocity v of
the target may be calculated:


Center frequency 40.0±1.0KHz

Sensitivity(dB)0dB=1volt/μbar ≥-65dB

Beam Angle -6dB 80°typical

Capacitance (pF) 2100±20%Pf
Working Temperature(℃) -20 to +70℃
Storage Temperature(℃) -30 to +80℃
Function Transmitter & Receive
Max. Driving Voltage(RMS) 20Vrms
Table2.4: Specifications of ultrasonic sensor

2.6.3 Applications:
1. Level control for caustic liquids
2. Roll diameter an Roll alignment control
3. Obstacle Avoidance
4. Fill level control for packaging line

2.6.4 Pin configuration:

Figure 2.6.1: Pin configuration of Ultra sonic sensor sensor

2.6.5 Wiring:

2.6.2 Ultrasonic sensor interfacing with Arduino Uno






Table2.5: Ultrasonic sensor pins connect with arduino

For this sensor no extra circuit is not required to construct so the data pin of ultrasonic
sensor which is pin 3 is directly connected with Arduino uno‟s analog I/O pin. In this project this
pin is connected with Arduino uno‟s analog pin or digital pin 8 and 9. However the question
arises as to why analog pin? The reason behind using analog I/O pin is because the sensor
provides analog voltage as output. Since Arduino uno has analog-to-digital converter (ADC), it
saves the hobbyist from hassles.


LCD stands for Liquid Crystal Display. LCD is finding wide spread use replacing LEDs
(seven segment LEDs or other multi segment LEDs) because of the following reasons:
 The declining prices of LCDs.
 The ability to display numbers, characters and graphics. This is in contrast to
LEDs, which are limited to numbers and a few characters.
 Incorporation of a refreshing controller into the LCD, thereby relieving the CPU
of the task of refreshing the LCD. In contrast, the LED must be refreshed by the
CPU to keep displaying the data.
 Ease of programming for characters and graphics.

These components are “specialized” for being used with the microcontrollers, which
means that they cannot be activated by standard IC circuits. They are used for writing different
messages on a miniature LCD.

Figure 2.7: LCD Display

A model described here is for its low price and great possibilities most frequently used in
practice. It is based on the HD44780 microcontroller (Hitachi) and can display messages in two

lines with 16 characters each. It displays all the alphabets, Greek letters, punctuation marks,
mathematical symbols etc. In addition, it is possible to display symbols that user makes up on its
Automatic shifting message on display (shift left and right), appearance of the pointer,
backlight etc. are considered as useful characteristics.
2.7.1 Pins Functions:
There are pins along one side of the small printed board used for connection to the
microcontroller. There are total of 14 pins marked with numbers (16 in case the background light
is built in).
Pin no. Name Description

Pin no.1 VSS Power supply(GND)

Pin no.2 VCC Power supply(5V)

Pin no.3 VEE Contrast adjust

Pin no.4 RS 0=Instruction i/p

1=Data i/p

Pin no.5 R/W 0=Write to LCD

1=Read from LCD

Pin no.6 EN Enable signal

Pin no.7 D0 Data bus line 0(LSB)

Pin no.8 D1 Data bus line 1

Pin no.9 D2 Data bus line 2

Pin no.10 D3 Data bus line 3

Pin no.11 D4 Data bus line 4

Pin no.12 D5 Data bus line 5

Pin no.13 D6 Data bus line 6

Pin no.14 D7 Data bus line 7

Pin no.15 A Anode(+5V)

Pin no.16 K Cathode(GND)

Table 2.6: pin description of LCD

2.7.2 LCD screen:

LCD screen consists of two lines with 16 characters each. Each character consists of 5x7
dot matrix. Contrast on display depends on the power supply voltage and whether messages are
displayed in one or two lines. For that reason, variable voltage 0-Vdd is applied on pin marked as
Vee. Trimmer potentiometer is usually used for that purpose. Some versions of displays have
built in backlight (blue or green diodes). When used during operating, a resistor for current
limitation should be used (like with any LE diode).

Figure 2.7.1: LCD Contrast Connection


 Intelligent, with built in Hitachi HD44780 compatible LCD controller and RAM
providing simple interfacing.
 61 x 15.8 mm viewing area.
 5 x 7 dot matrix format for 2.96 x 5.56 mm characters, plus cursor line.
 Can display 224 different symbols.
 Low power consumption ( 1 mA typical )
 Powerful command set and user produced characters.
 TTL and CMOS compatible.
 Connector for standard 0.1 -pitch pin headers.


 Download high quality fonts of any size, style or language easily and quickly.
 Create graphics using primitives such as bitmaps, pixels, lines, rectangles and bar graphs
Software control
 Backlight & Contrast is adjustable in most models.
 Different brightness settings.
 Line wrap and Auto screen scroll.
 General Purpose Output ( 20 mA drive ).
 Bar graphs and Large Digits .

2.8 DC Motor:
DC motors are configured in many types and sizes, including brush less, servo, and gear
motor types. A motor consists of a rotor and a permanent magnetic field stator. The magnetic
field is maintained using either permanent magnets or electromagnetic windings. DC motors are
most commonly used in variable speed and torque
Motion and controls cover a wide range of components that in some way are used to
generate and/or control motion. Areas within this category include bearings and bushings,

clutches and brakes, controls and drives, drive components, encoders and resolves, Integrated
motion control, limit switches,
linear actuators, linear and rotary motion components, linear position sensing, motors
(both AC and DC motors), orientation position sensing, pneumatics and pneumatic components,
positioning stages, slides and guides, power transmission (mechanical), seals, slip rings,
solenoids, springs.
Motors are the devices that provide the actual speed and torque in a drive system. This
family includes AC motor types (single and multiphase motors, universal, servo motors,
induction, synchronous, and gear motor) and DC motors (brush less, servo motor, and gear
motor) as well as linear, stepper and air motors, and motor contactors and starters.
In any electric motor, operation is based on simple electromagnetism. A current-carrying
conductor generates a magnetic field; when this is then placed in an external magnetic field, it
will experience a force proportional to the current in the conductor, and to the strength of the
external magnetic field. As you are well aware of from playing with magnets as a kid, opposite
(North and South) polarities attract, while like polarities (North and North, South and South)
repel. The internal configuration of a DC motor is designed to harness the magnetic interaction
between a current-carrying conductor and an external magnetic field to generate rotational
Let's start by looking at a simple 2-pole DC electric motor (here red represents a magnet
or winding with a "North" polarization, while green represents a magnet or winding with a
"South" polarization).

Every DC motor has six basic parts -- axle, rotor (a.k.a., armature), stator, commutator,
field magnet(s), and brushes. In most common DC motors (and all that Beamers will see), the

external magnetic field is produced by high-strength permanent magnets1 . The stator is the
stationary part of the motor -- this includes the motor casing, as well as two or more permanent
magnet pole pieces. The rotor (together with the axle and attached commutator) rotates with
respect to the stator. The rotor consists of windings (generally on a core), the windings being
electrically connected to the commutator. The above diagram shows a common motor layout --
with the rotor inside the stator (field) magnets.
The geometry of the brushes, commutator contacts, and rotor windings are such that
when power is applied, the polarities of the energized winding and the stator magnet(s) are
misaligned, and the rotor will rotate until it is almost aligned with the stator's field magnets. As
the rotor reaches alignment, the brushes move to the next commutator contacts, and energize the
next winding. Given our example two-pole motor, the rotation reverses the direction of current
through the rotor winding, leading to a "flip" of the rotor's magnetic field, and driving it to
continue rotating.
In real life, though, DC motors will always have more than two poles (three is a very
common number). In particular, this avoids "dead spots" in the commutator. You can imagine
how with our example two-pole motor, if the rotor is exactly at the middle of its rotation
(perfectly aligned with the field magnets), it will get "stuck" there. Meanwhile, with a two-pole
motor, there is a moment where the commutator shorts out the power supply (i.e., both brushes
touch both commutator contacts simultaneously). This would be bad for the power supply, waste
energy, and damage motor components as well. Yet another disadvantage of such a simple motor
is that it would exhibit a high amount of torque” ripple" (the amount of torque it could produce is
cyclic with the position of the rotor).


Laboratory Virtual Instrument Engineering Workbench (Lab VIEW) is a system-design

platform and development environment for a visual language from National Instruments.

The graphical language is named "G"; not to be confused with G-code. Originally
released for the Apple Macintosh in 1986, Lab VIEW is commonly used for data
acquisition, instrument control, and industrial automation on a variety of operating
systems (OSs), including Microsoft Windows, various versions of Unix, Linux, and mac OS. The
latest version of Lab VIEW is 2016, released in August 2016.

Lab view offers powerful features that makes it easy to connect to a wide variety of
hardware and other software. With lab view one can design custom virtual instruments by
creating a graphical user interface on the computer screen through

 Operate the instrumentation program

 Control selected hardware

 Analyze acquired data

 Display

Lab view consists of two panels:

1) Front panel

2) Block diagram


When you open a new or existing VI, the front panel window of the VI appers. The front
panel window is the user interface for the VI. Figure 3.1.1 shows an example of a front panel


After you create the front panel window you add code using graphical representations of
functions to control the front panel objects. The block diagram window contains the graphical
source code. Figure 3.1.2shows an example of a block diagram window.

Figure 3.1.1 front panel

Figure 3.1.2 block diagram

3.2 Control palette:
Every VI has a front panel that you can design as a use interface. You create the user
interface of a VI by placing controls and indicators on the front panel of a VI. Controls are
typically knobs push buttons, dials, strings.

Figure 3.2.1 control palette


The functions palette contains the Vis, functions and by selecting view==functions
palette. The functions palette is broken into various categories; you can show and hide categories
to suit your needs. Figure 3.6.5 shows a functions palette with all of these categories exposed and
the programing category expanded.

Figure 3.3.1 functions palette

Lab VIEW integrates the creation of user interfaces (termed front panels) into the
development cycle. Lab VIEW programs-subroutines are termed virtual instruments (VIs). Each
VI has three components: a block diagram, a front panel, and a connector panel. The last is used
to represent the VI in the block diagrams of other, calling VI‟s. The front panel is built using
controls and indicators. Controls are inputs: they allow a user to supply information to the VI.
Indicators are outputs: they indicate, or display, the results based on the inputs given to the VI.
The back panel, which is a block diagram, contains the graphical source code. All of the objects
placed on the front panel will appear on the back panel as terminals. The back panel also
contains structures and functions which perform operations on controls and supply data to
indicators. The structures and functions are found on the Functions palette and can be placed on
the back panel. Collectively controls, indicators, structures, and functions will be referred to as
nodes. Nodes are connected to

One another using wires, e.g., two controls and an indicator can be wired to the addition
function so that the indicator displays the sum of the two controls. Thus a virtual instrument can
be run as either a program, with the front panel serving as a user interface, or, when dropped as a
node onto the block diagram, the front panel defines the inputs and outputs for the node through
the connector pane. This implies each VI can be easily tested before being embedded as a
subroutine into a larger program.

The graphical approach also allows nonprogrammers to build programs by dragging and
dropping virtual representations of lab equipment with which they are already familiar. The Lab
VIEW programming environment, with the included examples and documentation, makes it
simple to create small applications. This is a benefit on one side, but there is also a certain danger
of underestimating the expertise needed for high-quality G programming. For complex
algorithms or large-scale code, it is important that a programmer possess an extensive knowledge
of the special Lab VIEW syntax and the topology of its memory management. The most
advanced Lab VIEW development systems offer the ability to build stand-alone applications.
Furthermore, it is possible to create distributed applications, which communicate by a client–
server model, and are thus easier to implement due to the inherently parallel nature of G.The
graphical programming contains wires, automatically wiring objects and manual varying objects.

3.4.1 WIRES:
You transfer data among block diagram objects through wires. In figure 3.4.2 wires
connect the control and indicator terminals to add and subtract function. Each wire has a single
data source but you can wire it to many Vis and functions that read the data wires or different
colors, styles and thicknesses depending on the data types.

Figure Table for wiring

Figure 3.4.2 wiring


3.5.1 Interfacing to devices

Lab VIEW includes extensive support for interfacing to devices, instruments, cameras,
and other devices. Users interface to hardware by either writing direct bus commands (USB,
GPIB, and Serial) or using high-level, device-specific, drivers that provide native LabVIEW
function nodes for controlling the device.

Lab VIEW includes built-in support for NI hardware platforms such as Compact
DAQ and Compact RIO, with a large number of device-specific blocks for such hardware,
the Measurement and Automation explorer (MAX) and Virtual Instrument Software
Architecture (VISA) toolsets.

National Instruments makes thousands of device drivers available for download on the NI
Instrument Driver Network (ID Net).

3.5.2 Code compiling:

Lab VIEW includes a compiler that produces native code for the CPU platform. This aids
performance. The graphical code is translated into executable machine code by interpreting the
syntax and by compiling. The Lab VIEW syntax is strictly enforced during the editing process
and compiled into the executable machine code when requested to run or upon saving. In the
latter case, the executable and the source code are merged into a single file. The executable runs
with the help of the Lab VIEW run-time engine, which contains some precompiled code to
perform common tasks that are defined by the G language. The run-time engine reduces
compiling time and provides a consistent interface to various operating systems, graphic systems,
hardware components, etc. The run-time environment makes the code portable across platforms.
Generally, LabVIEW code can be slower than equivalent compiled C code, although the
differences often lie more with program optimization than inherent execution speed.

3.5.3 Large libraries:

Many libraries with a large number of functions for data acquisition, signal generation,
mathematics, statistics, signal conditioning, analysis, etc., along with numerous for functions
such as integration, filters, and other specialized abilities usually associated with data capture
from hardware sensors is enormous. In addition, LabVIEW includes a text-based programming
component named MathScript with added functions for signal processing, analysis, and
mathematics. MathScript can be integrated with graphical programming using script nodes and
uses a syntax that is compatible generally with MATLAB.

3.5.4 Parallel programming:

Lab VIEW is an inherently concurrent language, so it is very easy to program multiple
tasks that are performed in parallel via multithreading. For example, this is done easily by
drawing two or more parallel while loops. This is a great benefit for test system automation,
where it is common practice to run processes like test sequencing, data recording, and hardware
interfacing in parallel.

3.6 Licensing:
The licensing of the lab view can be done only by the National instruments.

3.7 Run-time environment:

Compiled executable produced by version 6.0 and later of the Application Builder are not
truly standalone in that they also require the Lab VIEW run-time engine be installed on any
target computer which runs the application. The use of standard controls requires a run-time
library for any language. All major operating systems supply the libraries needed for common
languages such as C, but no operating system supplies the run-time needed for Lab VIEW. It
must be installed specifically by an administrator or user. This can cause problems if an
application is distributed to a user who is prepared to run the application, but lacks the
inclination or permission to install added files on the host system before running the executable.

3.8 Parallel execution and race conditions:

The G language includes constructs for creating multiple execution threads. Like with
any language that targets non-deterministic operating systems such as Windows, Mac OS, and
Linux, parallel execution of multiple threads can lead to the possibility of race conditions.
Although the G language greatly simplifies both the programming and thread management on
multi-core and multi-processor systems, the G developer must still guard against race conditions;
for which there are several functions and techniques available for doing so. Programming with
the Lab VIEW field-programmable gate array (FPGA) module results in true parallel
implementation on FPGA targets.
3.9 Performance:
Lab VIEW tends to produce applications that are slower than hand coded native
languages such as C, although high performance can be achieved when using multi-core
machines or dedicated toolkits for specific operations. Lab VIEW makes multi-core
programming much simpler than many other languages, due to its implicit parallelism and
automatic thread management.

3.10 Front Panel Window Toolbar:

Each window has a toolbar associated with it. Use the front panel window toolbar buttons
to run and edit the VI. The following toolbar appears on the front panel window.

Click the Run button to run your VI. You do not need to compile your code; LabVIEW
compiles it automatically. You can run a VI if the Run button appears as a solid white arrow,
shown at left.

The Run button appears broken when the VI you are creating or editing contains errors.
If the Run button still appears broken after you finish wiring the block diagram, the VI is broken
and cannot run. Click this button to display the Error List window, which lists all errors and

Click Run Continuously to run the VI until you abort or pause execution. You also can
click the button again to disable continuous running.

While the VI runs, the Abort Execution button appears. Click this button to stop the VI
immediately if there is no other way to stop the VI. If more than one running top-level VI uses
the VI, the button is dimmed.

Caution: The Abort Execution button stops the VI immediately before it finishes the current
iteration. Aborting a VI that uses external resources, such as external hardware, might leave the
resources in an unknown state by not resetting or releasing them properly. Design VIs with a
stop button to avoid this problem.

Click Pause to pause a running VI. When you click the Pause button, LabVIEW
highlights on the block diagram the location where you paused execution, and the Pause button
appears red. Click the Pause button again to continue running the VI.

Select the Text Settings pull-down menu to change the font settings for
the selected portions of your VI, including size, style, and color.

Click the Align Objects pull-down menu to align objects along axes, including vertical,
edge, and left.

Click the Distribute Objects pull-down menu to resize multiple front panel objects to the
same size.

Click the Resize Objects pull-down menu to resize multiple front panel objects to the
same size.

Click the Reorder pull-down menu when your objects overlap each other and you want
to define which one is in front or back of another. Select one of the objects with the Positioning
tool and then select from Move Forward, Move Backward, Move to Front, and Move To Back.

Click the Show Context Help Window button to toggle the display of the context help

Enter Text appears to remind you that a new value is available to replace an old value.
The Enter Text button disappears when you click it, press the <Enter> key, or click the front
panel or block diagram workspace.

Tip: The <Enter> key on the numeric keypad ends a text entry, while the main <Enter> key adds
a new line. To modify this behavior, select Tools»Options, choose Environment from
the Category list, and place a checkmark in the End text entry with Enter key option.

It is important for a VI to have an intuitive and easy-to-read front panel. The front panel is
essentially the gateway for all user input and output of a VI. Therefore it is essential that the
programmer has good grasp of how to effectively program a front panel.

Lab VIEW software contains powerful debugging tools to help you identify problem
areas in your code so you can make the appropriate changes. You may encounter two general
types of software bugs: those that prevent the program from running and those that generate bad
results or incorrect behavior. This module teaches you how to identify and troubleshoot both
types of errors.

If Lab VIEW cannot run your VI, it informs you by changing the run arrow to a broken
icon, and the Error List window lists the specific reasons why the VI is broken. The second type
of bug is typically harder to track down, but LabVIEW has several tools you can use to watch
your code as it executes, which makes the process much easier.

3.11.1Fixing Broken VI:

If a VI does not run, it is a broken, or non-executable, VI. The Run button appears broken when
the VI you are creating or editing contains errors.

Generally, this means that a required input is not wired, or a wire is broken. Press the
broken Run button to access the Error List window. The Error List window lists each error and
describes the problem. You can double-click an error to go directly to the error.

3.11.2 Finding Causes for Broken VIs:

Warnings do not prevent you from running a VI. They are designed to help you avoid
potential problems in VIs. Errors, however, can break a VI. You must resolve any errors before
you can run the VI.

Click the broken Run button or select View --Error List to find out why a VI is broken.
The Error List window lists all the errors. The Items with Errors section lists the files that have
errors. If two or more items have the same name, this section shows the specific application
instance for each item. The Errors and Warnings section lists the errors and warnings for the VI
you select in the Items with Errors section. The Details section describes the errors and, in some
cases, recommends how to correct the errors. Click the Help button to display a topic in the

LabVIEW Help that describes the error in detail and includes step-by-step instructions for
correcting the error.

Click the Show Error button or double-click the error description to highlight the area on
the block diagram or Front panel that contains the error.

Figure example of error list dialog box

3.11.3 Common Causes of Broken VIs:

The following list contains common reasons why a VI is broken while you edit it:

 The block diagram contains a broken wire because of a mismatch of data types or
a loose, unconnected end. Refer to the Correcting Broken Wires topic of the
LabVIEW Help for information about correcting broken wires.
 A required block diagram terminal is unwired. Refer to the Using Wires to Link
Block Diagram Objects topic of the Lab VIEW Help for information about setting
required inputs and outputs.
 A sub VI is broken or you edited its connector pane after you placed its icon on
the block diagram of the VI.
3.11.4 Fixing Incorrect Behavior:
If your VI runs but produces incorrect results then you have a functional error in your
code. LabVIEW has several tools to help you analyse where your VI is not behaving as expected.

3.12 Block Diagram Toolbar:

When you run a VI, buttons appear on the block diagram toolbar that you can use to
debug the VI. The following toolbar appears on the block diagram.
Click the Highlight Execution button to display an animation of the block diagram execution
when you run the VI. Notice the flow of data through the block diagram. Click the button again
to disable execution highlighting.

Execution highlighting shows the movement of data on the block diagram from one node
to another using bubbles that move along the wires. Use execution highlighting with single-
stepping to see how data values move from node to node through a VI.

Note: Execution highlighting greatly reduces the speed at which the VI runs.

Figure 3.12.1 Example of Execution Highlighting in Use

Click the Retain Wire Values button to save the wire values at each point in the flow of
execution so that when you place a probe on the wire you can immediately retain the most recent
value of the data that passed through the wire. You must successfully run the VI at least once
before you can retain the wire values.

Click the Step Into button to open a node and pause. When you click the Step Into button again,
it executes the first action and pauses at the next action of the sub VI or structure. You also can
press the <Ctrl> and down arrow keys. Single-stepping through a VI steps through the VI node
by node. Each node blinks to denote when it is ready to execute.

Click the Step over button to execute a node and pause at the next node. You also can press the
<Ctrl> and right arrow keys. By stepping over the node, you execute the node without single-
stepping through the node.

Click the Step Out button to finish executing the current node and pause. When the VI finishes
executing, the Step Out button is dimmed. You also can press the <Ctrl> and up arrow keys. By
stepping out of a node, you complete single-stepping through the node and navigate to the next

The Warning button appears if a VI includes a warning and you placed a checkmark in the Show
Warnings checkbox in the Error List window. A warning indicates a potential problem with the
block diagram, but it does not stop the VI from running.

3.13 Probe Tool:

Use the Probe tool to check intermediate values on a wire as a VI runs.

Use the Probe tool if you have a complicated block diagram with a series of operations,
any one of which might return incorrect data. Use the Probe tool with execution highlighting,
single-stepping, and breakpoints to determine if and where data is incorrect. If data is available,
the probe immediately updates and displays the data in the Probe Watch Window during
execution highlighting, single-stepping, or when you pause at a breakpoint. When execution
pauses at a node because of single-stepping or a breakpoint, you also can probe the wire that just
executed to see the value that flowed through that wire.




In this project we use two soft wares. The are given below
1.Arduino IDE
2.Proteus IDE software

4.2 Arduino IDE:

In those softwares Arduino IDE is used to write the program and after that we run this
program. When the program executed successfully then dumped into arduino uno
How this software is used, how program is write, how the program run and how the
program is executed all are shown in the following figures.
1. Click on Arduino IDE Icon on Desktop.

Screen 4.1: Arduino IDE- Software icon

2. A new window will be opened in desktop.

Screen 4.2: Arduino IDE – Program window

3. Click on file and go to new.

Screen 4.3: Arduino IDE- Create the new program window

4. Create a program regarding Ultrasonic sensor to motor

Screen 4.4: Arduino IDE – Main program window.

1.Click on verify it will compile.

Screen 4.5: Arduino IDE – Program Compilation

4.3 Introduction to PROTEUS 8:
4.3.1 Introduction:
Proteus 8 is a single application with many service modules offering different functionality
(schematic capture, PCB layout etc.). The wrapper that enables all of the various tools
communicate each other consists of three main parts.
Application Framework:
Proteus 8 consists of a single application (PDS.EXE). This is the framework or container
which hosts all of the functionality of Proteus. ISIS, ARES, 3DV all open as tabbed windows
within this framework and therefore all have access to the common database.
Common Database:
The common database contains information about parts used in the project. A part can
contain both a schematic component and a PCB footprint as well both user and system
properties. Shared access to this database by all application module makes possible a huge
number of new feature s, many of which will evolve over the course of the version 8 lifecycle.
Live Net list:
Together with the common database the maintenance of a live net list allows all open
modules to automatically reflect changes. The most obvious example of this is wiring in ISIS
producing rashest connections in ARES but it goes further than that. The new Bill of Materials
module contains a live viewer and 3D Viewer and Design Explorer are also linked into the net
The home page is a new application module in Proteus 8 which makes it easy to get
started with a project and also perform some system takes.
The Start panel on the screen control project opening and creation while the News panel
includes general information, integrated update manager and crash dump reporting.
4.3.2 Opening, Creating & Importing Projects:
In Proteus 8, the relationship between Schematic Design and PCB Layout
involves a shared database and is far more integrated. We therefore have a single project file
rather than separate design and layout files. You can create a new project or import a legacy
schematic/layout via the options on the home page.

Opening Projects:

Existing projects can be opened via the button on the home page or, in the case of recent
projects, directly from the recent projects list.

Finally, you can browse and open our extensive sample design libraries via the Open
sample button at the right of the start panel.

Creating New Projects:

This wizard guides you through the setup of your next proteus 8 project . There is a start
page in which you specify the project name and destination directory and then potentially three
main screens for schematic, PBC and firmware.
If you are creating a schematic check the box at the top of the screen and then select the
template on which you want to base the schematic. Those provided by Labcenter basically
contain different sizes of work area, although you can customize and save your own templates
from within the schematic capture module.

PCB Layout:
If you are creating a PCB check the box at the top of the screen and select from the
available templates. PCB templates contain pre-defined board edges, mounting holes and a full
set of technology data (design rules, layers in use, default units, ets.) As with schematic, you can
customize and save your own templates from within the PCB layout module.

This screen will only be presented to you if you have a license for one of the proteus PCB design
If you are create an embedded design and want to simulate your firmware, check the
create firmware box at the top of the screen and then select your controller and compiler using
the combo boxes. If selected, the quick start files checkbox will generate a skeleton firmware
project for you and configure project settings for compilation.

Creating a firmware project requires a schematic in order to simulate so you cannot

proceed from this screen if you opted not to create a schematic earlier in the wizard
(Application) Module:
In Proteus 8 an application module encompasses functionality that opens as a top level
tab inside the Proteus application. These include:
 Proteus Home Page
 ISIS Schematic Capture.
 ARES PCB Layout.
 3D PCB Viewer.
 Bill of Materials.
 Design Explorer
 Gerber Viewer.
 VSM Studio IDE

A frame is essentially a window in Proteus 8 and can contain several tabs. By default you
have one can drag tabs to create new frames or to close frames

A tab is a small placeholder at the top of a frame that – when clicked – will bring an
application module to the foreground. You can also drag and drop tabs onto other monitors (or
an area of free space) to open them in a separate frame.

Menus and Icons

The Proteus application framework contains a small set of menu‟s and icons which are
present regardless of which module or modules you are working on. Typically, these are used to
open other application modules and to handle filing and configuration options.
File I/O Toolbar

This is a standard toolbar for creating new projects, opening and saving projects and
closing the current project.
Tabs and Frames
Each top level application module will open in a new tab inside the current frame. If you
prefer (and particularly if you work with two monitors) you can drag and drop a tab into free
space to create a new frame. This allows you to see both modules simultaneously which, together
with the common database and live netlisting, is a common method of working.
To open a new tab
Normally, you would do this simply by clicking on the icon on the application module
toolbar .

The exception to this paradigm is graphs which will open in anew tab when maximized.
Graphs are not represented in the application module toolbar as they are entirely dependent on
being placed in the schematic capture module.
Design explorer can also be opened from the context menu of components in ISIS or footprints
in ARES.
After using the required tools we are designing our project.

Screen 4.6 – Display of water flow in Proteus software

4.3.3Steps to create a New Project:
1. Click on the desktop icon of Proteus 8 and Open the Home page of Proteus 8.

Screen 4.7: Proteus software starting window

2. Now, click on "New Project" option and then, a pop-up window will be opened up in
which you have to name the project and choose the directory to save the project.

Screen 4.8: Proteus software new project window

3. The Next step is to select the Schematic layout from the categories and 'Default' will be
A4 size. You can select the other layout from the list provided.

Screen 4.9: Proteus software Create schematic layout window

4. In next step, you can also create PCB layout in the next step by selecting it and choosing
the required layout.

Screen 4.10: Proteus software Create PCB layout window

5. Now, you have to choose the installed compiler and the microcontroller you are going to

Screen 4.11: Proteus software microcontroller selection window

6. New window will open

Screen 4.12: Proteus software window for circuit designing

Proteus is one of the most famous simulators. It can be uses to simulate almost every
circuit on electrical fields. It is easy to use because of the GUI interface that is very similar to the
real Prototype board. Moreover, it can be used to design Print circuit Board (PCB). Proteus has

many features to generate both analogue and digital result. However, this lab will focus on only
tools that will be used in digital schematic designs.
Parts Browsing:
Proteus has many models of electronic equipment's such as logic gates, many kinds of

switches and basic electronic devices. These equipment's can be founded by clicking on and

then Then, a new window will pop up and wait for the part's information as shown in the

Screen Screen 4.13: Proteus software component selection window

Finding Steps:
1. Type information of the device such as "ARDUINO" in the box I.
2. If some specific category is known, the device can narrow on focusing by selecting catalogue
in the box 2
3. After the information is put, the list of the related devices will appear in the box 3, so that
needed device can be choose here and then click "OK" button to confirm the selection as shown
in Figure 3.
4. Pic the components from the P LIBRARY.
5.Select the components to the required project.

Screen 4.14 Proteus software component selection example window

When we click on the `ok' button of above figure, then the component should be display
on the main PCB sheet.
All of the electrical circuits require power supplies. The power supply for logic gates are
represented in the digital system design on proteus because the schematic will be too
complicated to understand for simulation section. Therefore, the power supplies will be need as
input power for a system. In addition, "Ground" will not contain in this groups because it is not

input signal but it is just a terminal junction. Therefore it will be group in the terminal ( )
category as shown in figure.

After completing the selection of components, they should be wired together.

Screen 4.15 Proteus software circuit designing window

4.3.4 How to do the simulating
Placing Equipments :
After selecting all the devices, now devices needed to be placed on the circuit sheet (Grey
sheet) and wiring before the simulation can be run by following these steps:

 Click on and select a first device that will be placed.

 Place mouse to wherever the device is preferred to be place and then click the left button
of the mouse. The device will be place. If it needed to be moved. Click the right button of
the mouse on the device symbol to select the part and then hold the left button of the
mouse and move the symbol to wherever it is needed to be places.

Screen 4.16: Proteus software Arduino Selection window

3. Like above figure we pic the components, which are useful to complete the required circuit. .
Then we do the connections as we want.
4. To wire the device together, click at the source pin of the device and then move mouse cursor
to the destination pin of the device. In this step the black line will be appear and it will be the
wire of the circuit after click mouse on the destination pin of the circuit.
5. After completion of all the connections double click on Arduino UNO then a window should
be appear which is as shown below

Screen 4.17: Proteus software Arduino Program window

6. Now the simulation is ready to be run by clicking on to run and to stop.

7. After run the program, it starts display according to our program. The display is as shown in
below figure.

Screen 4.18: Proteus software Output Display window


4.4.1 Picture of hardware module

Screen number:4.4.1: Picture of hardware module




5.1.1 After turning on the power supply of the module and the LCD displays the motor turn ON

Screen number 5.1.1:LCD display motor ON condition

5.1.2 After turning on the power supply of the module and the LCD displays the motor turn OFF

Screen number 5.1.2: LCD display motor OFF condition

5.1.3Data monitoring using Labview software while the tank is in empty condition with block

Screen number 5.1.3: Empty condition of tank in labview

Screen number 5.1.3: Block diagram of front end in labview

5.1.4 Data monitoring using Labview software while the tank is in full condition with block

Screen 5.1.4: Full condition of tank in labview

Screen number 5.1.4: Block diagram of front end in labview


In this project we have explained the design and implementation of a simple, reliable and
cost effective automatic level monitoring and controlling device using labView software. This
device can be mainly implemented in chemical industries. LabView has been interfaced to an
Arduino board through the Arduino support palette available in the LabView for various real
time monitoring activities. Ardunio based data acquisition system is used in small scale
industries where the sampling instant is sample for every 1sec. Most of the data acquisition can
be monitored by using this sampling rate. This method can use in small scale industries where
the low sampling instant is required for monitoring process.


1. For liquids is to remotely control the ultrasonic sensor and motor.
2. In petro chemical industry to check out the entire industrial environmental containers and
3. Ultra sonic sensor used for level measurement.
4. In application for renewable resources.
5. We have to reduce the wastage of the liquids and solids.


As a part of the current research, an Ultrasonic sensor is completely designed and

developed and performance demonstrated. However there is scope for future research to improve
the performance and process
The field of pollution monitoring and control is very wide and this is an attempt to
monitor and regular inspections by the utility of global system for mobile communication. For
alleviating these problems, advanced GSM system with lab view is used. The performance and
remotely the pollution monitoring and Temperature sensing can be further be improved by
implementing sensor for controlling dust, smoke and other parameters and thereby improving
industrial and natural environment.


1. T. Bheema lingaiah, D. Hanumesh Kumar, C. Nagaraja and Solomon Woldetsadik. 2013.

“Development of Humidity and Temperature Measurement Instrumentation System using
LabVIEW”, IJAREEIE Journal, Vol. 2, No. 10, December.

2. Pravin J., Deepak Sankar A. and Angeline Vijula D. 2013. “Industrial pollution monitioring
system using LabVIEW and GSM”,International Journal Of Advanced Reasearch in
Electrical,Electronics and Instrumentation Engineering, Vol. 2, No. 6, June.
3. Naveenkumar R. and Prasad Krishna. “Low Cost Data Acquisition and Control using
Arduino Prototyping Platformand LabVIEW‟, International Journal of Science and Research
(IJSR), India Online ISSN: 2319-7064.
4. C. Darandale and B. L. Gunjal. 2013. “Development of Web Based SCADA like Application
using Arduino Platform”, International Journal of Emerging Technology and Advanced
Engineering, Vol. 3, No. 8, August.

5. M. Simic. 2013. “Microcontroller Based System for Measuring and Data Acquisition of Air
Relative Humidity and Temperature”, 37 th International Conference of IMAPS-CPMT Poland,
Krakow, 22-25 September.

6. Praseed Kumar, Shamim S. Pathan and Bipin Mashilkar. 2014. “Liquid Level Control using
PID Controller Based on Labview & Matlab Software”, International Journal of Engineering
Research & Technology (IJERT), Vol. 3 Issue 10, October.

7. Daniel K. Fisher and Ruixiu Sui. 2013. “An inexpensive open-source ultrasonic sensing
system for monitoring liquid levels”, Agric Eng Int: CIGR Journal, Vol. 15, No.4, December.

8. Dorf, R. C. , Bishop R.H. (1998) Modern Control Systems. Addison Wesley Longman, Inc.
Menlo Park, CA

9. Bogart, T. F. (1982). Laplace Transforms and Control Systems Theory For Technology. New York:
John Wiley&Sons.

10. St. Clair David W. (1993). Controller Tuning And Control Loop Performance. (page A-3) Straight-Line
Control Co., Inc.

11. Bateson R.N. (1993). Introduction To Control System Technology. (Page 131) New York:Macmillan
12. Ayob Johari, Mohd Helmy Abd Wahab,” Tank Water Level Monitoring System using GSM
Network”, (IJCSIT) International Journal of Computer Science and Information Technologies,
Vol. 2 (3) , 2011, 1114-1120.

13. T.Deepiga,.A.Sivasankari, ”Smart Water Monitoring System Using Wireless Sensor

Network at Home/Office”,International Research Journal of Engineering and Technology
(IRJET) e-ISSN: 2395-0056 Volume: 02 Issue: 04 | July-2015 p-ISSN: 2395-0072.

14. Islam, N.S. Wasi-ur-Rahman, M. An intelligent SMS-based remote Water Metering System.
12th International Conference on Computers and Information Technology, 2009, 21-23 Dec.
2009, Dhaka, Bangladesh.

15. Al-Ali,A.R.Rousan,M.A.Mohandes, M. “GSM-Based Wireless Home Appliances

Monitoring & Control System”, Proceedings of International Conference on Information and
Communication Technologies: From Theory to Applications, pp 237-238, 2004.

16. Rosolem JB, Dini DC, Penze RS, Floridia C, Leonardi AA, Loichate MD, Durelli AS. Fiber
Optic Bending All Rights Reserved @ 2016 IJARMATE 112 Sensor for Water Level
Monitoring: Development and Field Test: A Review. IEEE Sensor J. 2013;13(11):4113–



 Signal and image processing
 Embedded system programming (pc,dsp,fpga,microcontroller)
 Simulation and prototyping
 Automatic controls and dynamic systems
 Mechatronics and robotics
3. Measurements
 Circuits and electronics
 Measurements and instrumentation


 High Performance, Low Power Atmel AVR® 8-Bit Microcontroller Family

 Advanced RISC Architecture
 131 Powerful Instructions – Most Single Clock Cycle Execution
 32 x 8 General Purpose Working Registers
 Fully Static Operation
 Up to 20 MIPS Throughput at 20MHz
 On-chip 2-cycle Multiplier
 High Endurance Non-volatile Memory Segments
 4/8/16/32KBytes of In-System Self-Programmable Flash program memory
 256/512/512/1KBytes EEPROM
 512/1K/1K/2KBytes Internal SRAM
 Write/Erase Cycles: 10,000 Flash/100,000 EEPROM

 Optional Boot Code Section with Independent Lock Bits
 In-System Programming by On-chip Boot Program
 True Read-While- Write Operation
 Programming Lock for Software Security
 Atmel® QTouch® library support
 Capacitive touch buttons, sliders and wheels
 QTouch and QMatrix® acquisition
 Up to 64 sense channels
 Peripheral Features
 Two 8-bit Timer/Counters with Separate Prescaler and Compare Mode
 One 16-bit Timer/Counter with Separate Prescaler, Compare Mode, and Capture Mode
 Real Time Counter with Separate Oscillator
 Six PWM Channels
 8-channel 10-bit ADC in TQFP and QFN/MLF package : Temperature Measurement
 AIET, Department of ECE24
 6-channel 10-bit ADC in PDIP Package : Temperature Measurement
 Programmable Serial USART
 Master/Slave SPI Serial Interface
 Byte-oriented 2-wire Serial Interface (Philips I2C compatible)
 Programmable Watchdog Timer with Separate On-chip Oscillator
 On-chip Analog Comparator
 Interrupt and Wake-up on Pin Change
 Special Microcontroller Features
 Power-on Reset and Programmable Brown-out Detection
 Internal Calibrated Oscillator
 External and Internal Interrupt Sources
 Six Sleep Modes: Idle, ADC Noise Reduction, Power-save, Power-down, Standby, and
 Extended Standby
 I/O and Packages: 23 Programmable I/O Lines
 28-pin PDIP, 32-lead TQFP, 28-pad QFN/MLF and 32-pad QFN/MLF
 Operating Voltage: 1.8 - 5.5V
 Temperature Range: -
 Speed Grade: 0 - 4MHz@1.8 - 5.5V, 0 - 10MHz@2.7 - 5.5.V, 0 - 20MHz @ 4.5 - 5.5V