Download as pdf or txt
Download as pdf or txt
You are on page 1of 157

Bachelor of Science in Electrical Engineering

Arduino Based Home Electronics Labs


Basic- & Advanced-Electronics and Sensors Approaches

Jyotheesh Reddy Kamasani


Sai Jaswanth Yadala
Uday Suhas Nakkapalli

Blekinge Institute of Technology, 371 79 Karlskrona, Sweden


Contact Information:
Author(s):
Jyotheesh Reddy Kamasani
E-mail: [email protected]

Sai Jaswanth Yadala


E-mail: [email protected]

Uday Suhas Nakkapalli


E-mail: [email protected]

University Supervisor:
Prof. Wlodek J. Kulesza
Department of Mathematics and Natural Science
Abstract

Background. Engineering is incomplete without the practical knowledge so


laboratories and practical experiments play a quite vital role in the study. Engineer-
ing requires both practical knowledge and skills along with theoretical background.
However, new technology provides opportunity to perform experiments on distance
or at home, what in current situation of COVID-19 pandemic has created a great
motivation to have a deep study on distance education of Engineering. This report
proposes the Home Labs for basic course in electronics. It shows both technical and
educational approaches in terms of communication between a student and instructor.

Objectives. The main objective of this project is to design and implement three
labs of dedicated to basic electronics, linear integrated circuit and sensors. Each
lab consists of five experiments. All experiments need to be accessed from home.
Surveillance of lab results is one of the keys of the Home Labs, which cannot be
compromised. Miniaturization of commonly used heavy lab equipment is one of the
main project issue. Documentation of each and every experiment should be prepared
in feasible way to help students to perform their experiments easily. The reporting
template should also be easy to understand and implement.

Methods. Most of the experiments apply Arduino as control unit. The mi-
crocontroller does not only control the experiments and connect it to the Internet
as an element of IoT concept, but it also take responsibility for measurements and
visualisation. The Arduino kit along with electronic components is owned by each
student and could be handle anytime. Some extra components such as mini digital
oscilloscope facilitate the experiments.

Conclusions. Laboratories are the prime requirement of the Engineering Pro-


grams for developing students’ practical skills. As implementation of all the exper-
iments shows they can be done by not only real time lab equipment but also with
miniaturized components. The proposed Home Lab budget was so friendly and eco-
nomical compared to the campus labs. The Arduino based home electronic labs is the
replica of the real time lab for the students who are doing their distance education
and cannot have proper resource of the campus labs.

Keywords: Circuits, Components, Distance education, Experiments, Internet, Minia-


turizing, Sensors, Surveillance.
Acknowledgments

We would like to thank and express profound gratitude to our guide Prof. Wlodek
Kulesza for being an excellent guide with his invaluable support, supervision, sug-
gestions and encouragement through out the the project. Without him our project
would be incomplete. We are appreciative and grateful for providing us with all the
tools and equipment whenever required all the time. His moral support and guidance
made us to complete our work successfully.
Our completion of the project could not have been accomplished without the help
of our friend, Lukka Balakrishna. We also thank our family for giving us ultimate
support through out the project.
We would like to take this opportunity as a big milestone in our career develop-
ment. We would like use this knowledge and skills in all the best possible ways for
good deeds. We hope to continue cooperation with all of you in the future.

Sincerely,
Kamasani Jyotheesh Reddy
Nakkapalli Uday Suhas
Yadala Sai Jashwanth

ii
Acronyms
AC Alternate Current

ARM Adjustable-Rate Mortgage

BTH Blekinge Institute of Technology

BNC Bayonet Neill-Concelman

CAN Controller Area Network

CMRR Common-Mode Rejection Ratio

COVID-19 Coronavirus Disease 2019

DC Direct Current

DDS Direct Digital Synthesis

EDC Electronics Devices and Circuits

e-Portfolios electronic Porfolio

EPFL Electronics Laboratory of the Swiss Federal Institute of Technology

GOLDi Grid of Online Laboratory Devices ilmenau

HPF High Pass Filter

HTML Hyper Text Markup Language

IC Integrated Circuits

ICT Information and Communication Technology

IDE Integrated Development Environment

IOT Internet of Things

ISA iLab Shared Architecture

LCD Liquid Crystal Display

LDR Light Dependent Resistor

LED Light Emitting Diode

LIC Linear Integrated Circuits

LPF Low Pass Filter

MIT Massachusetts Institute of Technology

PC Personal Computer

iii
RMIT Royal Melbourne Institute of Technology

TEMPUS Trans-European Mobility Programme for University Studies

US Unitated States

USB Universal Serial Bus

WebGL Web Graphics Library

WiFi Wireless Fidelity

3D Three-Dimensional

iv
Contents

Abstract i

Acknowledgments ii

Acronyms iii

List of Figures vii

List of Tables x

List of Equations xi

1 Introduction 1

2 Review of Related Works 2


2.1 Virtual Labs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2.1.1 Remote Labs . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.1.2 Home Labs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.2 Available Educational Online Labs . . . . . . . . . . . . . . . . . . . 5
2.3 Electronics Labs in Engineering Programs . . . . . . . . . . . . . . . 6

3 Problem Statement, Objectives and Main Contributions 7

4 Labs Principles and Components 8


4.1 Labs Principles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
4.2 Components used: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4.3 Precautions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4.4 Educational Principles . . . . . . . . . . . . . . . . . . . . . . . . . . 19

5 Lab 1: Electronic Devices and Circuits 21


5.1 Experiment 1.1: Characteristics of p-n junction diode . . . . . . . . . 23
5.2 Experiment 1.2: Characteristics of Zener diode . . . . . . . . . . . . . 27
5.3 Experiment 1.3: Characteristics of Light Emitting Diode . . . . . . . 29
5.4 Experiment 1.4: Designing of half wave rectifier . . . . . . . . . . . . 31
5.5 Experiment 1.5: Linear wave shaping . . . . . . . . . . . . . . . . . . 33

6 Lab 2: Linear Integrated Circuits 38


6.1 Experiment 2.1: Non Linear wave shaping . . . . . . . . . . . . . . . 39
6.2 Experiment 2.2: Parameters of Op-amp . . . . . . . . . . . . . . . . . 48

v
6.3 Experiment 2.3: Schmitt trigger . . . . . . . . . . . . . . . . . . . . 54
6.4 Experiment 2.4: Frequency response of active low pass filter . . . . . 57
6.5 Experiment 2.5: Frequency response of active high pass filter . . . . . 59

7 Lab 3: Sensor Systems 61


7.1 Experiment 3.1: Measuring temperature using LM-35 . . . . . . . . . 62
7.2 Experiment 3.2: Finding the distance of the object . . . . . . . . . . 64
7.3 Experiment 3.3: Displaying Stopwatch in LCD . . . . . . . . . . . . . 67
7.4 Experiment 3.4: Traffic lights using LED’s . . . . . . . . . . . . . . . 69
7.5 Experiment 3.5: Dark Sensing LED . . . . . . . . . . . . . . . . . . . 71

8 Conclusion and Future Work 74


8.1 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
8.2 Future work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75

Bibilography 79

Appendices 80
A WIFI code for measuring temperature . . . . . . . . . . . . . . . . . 81
B WIFI code for measuring distance . . . . . . . . . . . . . . . . . . . . 83
C EDC lab Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
D LIC Lab Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
E Sensors Lab Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . 126

vi
List of Figures

4.1 A view of Arduino [22] . . . . . . . . . . . . . . . . . . . . . . . . . . 10


4.2 A view of DDS signal generator [23] . . . . . . . . . . . . . . . . . . . 10
4.3 Operational Amplifier (IC741) [24] . . . . . . . . . . . . . . . . . . . 11
4.4 Step down transformer [25] . . . . . . . . . . . . . . . . . . . . . . . . 12
4.5 Ultrasonic sensor [26] . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.6 Liquid crystal display [27] . . . . . . . . . . . . . . . . . . . . . . . . 13
4.7 Photo Resister [28] . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.8 Temperature [29] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4.9 LED [30] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4.10 DSO-138 oscilloscope [31] . . . . . . . . . . . . . . . . . . . . . . . . 15
4.11 Push button [32] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.12 Resistors [33] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.13 Capacitors [34] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.14 Zener diode IMZ 5.1V [35] . . . . . . . . . . . . . . . . . . . . . . . . 17
4.15 Diode IN4007 [36] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

5.1 Flow chart of EDC lab . . . . . . . . . . . . . . . . . . . . . . . . . . 22


5.2 Circuit diagram of forward bias of P-N junction diode . . . . . . . . . 24
5.3 Circuit diagram of P-N junction diode in reverse bias . . . . . . . . . 25
5.4 Picture of forward bias prototype . . . . . . . . . . . . . . . . . . . . 25
5.5 Picture of reverse bias prototype . . . . . . . . . . . . . . . . . . . . . 26
5.6 Results of experiment with forward bias . . . . . . . . . . . . . . . . 26
5.7 Results of experiment with revers bias . . . . . . . . . . . . . . . . . 27
5.8 Circuit diagram of Zener diode . . . . . . . . . . . . . . . . . . . . . 28
5.9 Picture of prototype of Zener diode experiment . . . . . . . . . . . . 28
5.10 Results of Zener diode experiment . . . . . . . . . . . . . . . . . . . . 29
5.11 Circuit diagram of LED . . . . . . . . . . . . . . . . . . . . . . . . . 30
5.12 Picture of prototype of LED experiment . . . . . . . . . . . . . . . . 30
5.13 Results of LED experiment . . . . . . . . . . . . . . . . . . . . . . . . 31
5.14 Circuit diagram of half wave rectifier with filter . . . . . . . . . . . . 32
5.15 Picture of prototype of half wave rectifier . . . . . . . . . . . . . . . . 32
5.16 Output of half wave rectifier with filter . . . . . . . . . . . . . . . . . 33
5.17 Low pass filter circuit diagram . . . . . . . . . . . . . . . . . . . . . . 34
5.18 High pass filter circuit diagram . . . . . . . . . . . . . . . . . . . . . 34
5.19 Prototype of passive high pass circuit . . . . . . . . . . . . . . . . . . 35
5.20 Prototype of passive low pass circuit . . . . . . . . . . . . . . . . . . 35
5.21 Waveform of low pass circuit at medium frequency . . . . . . . . . . . 36
5.22 Waveform of low pass circuit at high frequency . . . . . . . . . . . . . 36

vii
5.23 Waveform of high pass circuit at medium frequency . . . . . . . . . . 37
5.24 Waveform of high pass circuit at high frequency . . . . . . . . . . . . 37

6.1 Flow chart of LIC lab . . . . . . . . . . . . . . . . . . . . . . . . . . . 39


6.2 Clipping circuits and its model waveforms . . . . . . . . . . . . . . . 40
6.3 Clamping circuits and its model waveforms . . . . . . . . . . . . . . . 41
6.4 Prototype of positive peak clamping . . . . . . . . . . . . . . . . . . . 42
6.5 Prototype of negative peak clamping . . . . . . . . . . . . . . . . . . 42
6.6 Prototype of positive base clipping . . . . . . . . . . . . . . . . . . . 43
6.7 Prototype of negative base clipping . . . . . . . . . . . . . . . . . . . 43
6.8 Prototype of clamping of zero volts . . . . . . . . . . . . . . . . . . . 44
6.9 Prototype of clamping of Vr volts . . . . . . . . . . . . . . . . . . . . 44
6.10 Output waveform of positive peak clipping . . . . . . . . . . . . . . . 45
6.11 Output waveform of negative peak clipping . . . . . . . . . . . . . . . 45
6.12 Output waveform of positive base clipping . . . . . . . . . . . . . . . 46
6.13 Output waveform of negative base clipping . . . . . . . . . . . . . . . 46
6.14 Output waveform of clamping to zero volts . . . . . . . . . . . . . . . 47
6.15 Output waveform of clamping to Vr volts . . . . . . . . . . . . . . . . 47
6.16 Input offset voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
6.17 Input offset current . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
6.18 CMRR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
6.19 Slew rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
6.20 Input bias current . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
6.21 Prototype of input offset current . . . . . . . . . . . . . . . . . . . . . 50
6.22 Prototype of input offset voltage . . . . . . . . . . . . . . . . . . . . . 51
6.23 Prototype of CMRR . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
6.24 Prototype of slew rate . . . . . . . . . . . . . . . . . . . . . . . . . . 52
6.25 Prototype of input bias current . . . . . . . . . . . . . . . . . . . . . 52
6.26 Output waveform of input offset voltage . . . . . . . . . . . . . . . . 53
6.27 Output waveform of CMRR . . . . . . . . . . . . . . . . . . . . . . . 53
6.28 Output waveform of slew rate . . . . . . . . . . . . . . . . . . . . . . 54
6.29 Schmitt trigger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
6.30 Prototype of Schmitt trigger . . . . . . . . . . . . . . . . . . . . . . . 55
6.31 Input waveform to Schmitt trigger . . . . . . . . . . . . . . . . . . . . 56
6.32 Output waveform of Schmitt trigger . . . . . . . . . . . . . . . . . . . 56
6.33 Low pass filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
6.34 Prototype of low pass filter . . . . . . . . . . . . . . . . . . . . . . . . 58
6.35 Output waveform of low pass filter . . . . . . . . . . . . . . . . . . . 58
6.36 High pass filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
6.37 Prototype of high pass filter . . . . . . . . . . . . . . . . . . . . . . . 60
6.38 Output waveform of high pass filter . . . . . . . . . . . . . . . . . . . 60

7.1 Flow chart of SS lab . . . . . . . . . . . . . . . . . . . . . . . . . . . 62


7.2 LM-35 connection with Arduino . . . . . . . . . . . . . . . . . . . . . 63
7.3 LM-35 connection with Arduino . . . . . . . . . . . . . . . . . . . . . 64
7.4 Result of experiment - measuring temperature . . . . . . . . . . . . . 64
7.5 Ultrasonic sensor connection with Arduino . . . . . . . . . . . . . . . 65

viii
7.6 Ultrasonic sensor connection with Arduino . . . . . . . . . . . . . . . 66
7.7 Result of experiment - finding the distance of the object . . . . . . . 67
7.8 LCD and push button connection with Arduino . . . . . . . . . . . . 67
7.9 LCD and push button connection with Arduino . . . . . . . . . . . . 69
7.10 Result of displaying stopwatch in LCD . . . . . . . . . . . . . . . . . 69
7.11 LED’s connection with Arduino . . . . . . . . . . . . . . . . . . . . . 70
7.12 LED’s connection with Arduino . . . . . . . . . . . . . . . . . . . . . 71
7.13 Result of traffic lights using LED . . . . . . . . . . . . . . . . . . . . 71
7.14 LED and IR connection with Arduino . . . . . . . . . . . . . . . . . . 72
7.15 LED and IR connection with Arduino . . . . . . . . . . . . . . . . . . 73
7.16 Result of dark sensing light . . . . . . . . . . . . . . . . . . . . . . . 73

ix
List of Tables

4.1 Roles of students and instructors . . . . . . . . . . . . . . . . . . . . 20

x
List of Equations

6.1 CMRR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
7.1 Distance finding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

xi
Chapter 1
Introduction

From the last few years, many institutes have planed to establish a new and easy
way of doing lab experiments. Nowadays many universities are providing the courses
online for the students who are studying from distance, so it became a competition
among the educational institutes to provide the finest online courses. Laboratories
are the heart of Engineering Education, therefore, while thinking about new ways of
doing laboratory experiments one got to know about three types of distance labs as:
Virtual, Remote and Home.
One of the main motivation that made us to propose this project in the first place
is due to global pandemic such as COVID-19, which has caused global shutdown
that even includes educational institutions, that caused the rise of online classes and
lectures through various other online platforms. The main drawback of these online
education is that the experiments that have to be performed in laboratory cannot
be done remotely. To overcome this problem we propose the home laboratories,
which can be accessed from home round the clock and that can be monitored by the
mentor’s through the Internet.
As from the name suggests, the Home Electronics Lab needs to be based on a
micro-controller, which supervises the whole system and all the other components
that are connected to it. It is assumed that every engineering student has his/her
own PC to run micro-controller such Arduino IDE or Raspberry Pi, and all the heavy
components from the lab can be reduced into the miniaturized kits. By this, we can
reduce the cost of home laboratory equipment. The real-time interaction between
the instructor and the student can be made via Internet through which the students
receive instructions from the lecturer. Also the resultant values of lab experiment
obtained can be shown through the Internet connected with Arduino module. In
presented here home electronics laboratories we focuse on three laboratories, which
include Electronics Devices and Circuits, EDC; Linear Integrated Circuits, LIC; and
Sensors System.
This thesis mainly deals with Engineering laboratories working from home and
using Arduino. We discussed about various labs such as virtual, remote, home,
educational online labs and electronics labs in Chapter 2: Survey of Related Works.
Chapter 3 states the problem, defines objectives and summaries main contributions
of the project. Chapter 4 presents various components used, and a table that explains
how to use the equipment and introduces the three labs. The five experiments of
EDC lab are discussed in Chapter 5. Similarly, Chapter 6 and Chapter 7 present
LIC and Sensors Systems Laboratory respectively. The last, Chapter 8 consists of
Conclusion and Future Work that can be done on the topic.

1
Chapter 2
Review of Related Works

In this section we refer to reported online labs, which are accessible through
Internet. These kind of labs can be divided into three types [1]: Virtual Labs;
Remote Labs; and Home Labs;

2.1 Virtual Labs

Virtual labs allow to carry out their experiments from a PC anytime and any-
where, without going out from home, they are based on simulation software programs
executed in the computer [1]. This is also called Simulation-based Virtual Lab. In
these types of labs, there is no real hardware or equipment. The simulations are
carried out using a software at a high-end server, and the results are communicated
to the user over the Internet. Such labs are saleable and can cater to a large number
of simultaneous users [2]. Below some of the virtual lab projects are mentioned.
In paper [3] the concept of a virtual lab developed at the LEG-EPFL (Electronics
Laboratory of the Swiss Federal Institute of Technology) is described. The main
objective is to promote the complementary classical methods through the rapidity
of the experiences, the possibility to visualize experiences impossible to see in the
reality, the link between modelization and reality. The difficulties of such a project
will be presented and a first feed-back will be analyzed.
The paper [4] presents a virtual lab experimental setup for students in control
systems engineering, which is accessible via Internet. The experimental system is
an omni-directional vehicle, several different tasks can be carried out with this vehi-
cle ranging from kinematics and dynamics analysis to controller design and system
identification. Tele-operation control options for these experiments have been cho-
sen in addition to conventional practice because of two major reasons, they are to
share this experimental setup with other universities and to simplify experiments for
home-learners and professionals in a distance teaching environment.
The paper [5] outlines a demonstration of a few remote and virtual laboratories
at Labicom platform. The interactive Labicom demo session during REV’16 confer-
ence will show client side browser applications. HTML plug-in less cross-platform
interfaces of remote and virtual labs will be demonstrated. An experimental WebGL
3D-interface of the laser laboratory will also be shown in this paper.
This proposal of [6] is a Virtual Automation Lab. It is a Web based interactive

2
Chapter 2. Review of Related Works 3

learning environment for both Computer Science and Automation Engineering con-
cepts within a virtual university setting. It describes three lab exercises in which
students learn how to operate CAN field bus devices without any physical proximity
to the devices themselves. One of the exercises is a pure simulation realized with a
Java applet. In the other exercises, Java applets provide a remote interface to a server
which acts as a bridge between the Internet and the CAN field bus. No proprietary
software has to be installed and no browser plug-ins are needed to access the devices
via the Internet. While our exercises pave the ground for teaching lab based courses
over the Internet, or enriching physical labs with virtual devices that are located
elsewhere, our Java based software solutions may also form the basis for industrial
applications like remote control, monitoring, maintenance, or data acquisition.

2.1.1 Remote Labs


Remote labs that are real, but the user controls them remotely [1]. In these labs,
user is able to trigger a real-experiment on a real piece of equipment or hardware.
The output of the experiment is communicated back to the user over the Internet.
These type of labs gives the user the output of real-time experiments. Typically,
time-slots are booked before conducting such experiments. Many such labs can work
from home, although the physical instruments are in a real laboratory [2]. Here are
some of the remote lab projects mentioned below.
The main focus of the paper [7] is the interconnection of multiple remote labs to
a remote lab cloud. It is based on the GOLDi infrastructure. Within two running
TEMPUS projects ten remote labs in four countries can be used worldwide. Based
on this cloud structure it is necessary to adapt the complex GOLDi access control
system. With this new reservation system possibilities for an effective worldwide
experiment management will be available, which will be described in the article.
In the paper [8], a remote lab for electrical engineering has been designed and im-
plemented. This has been intended as a platform that supports existing traditional
labs by offering lab experiments that serve some of the student learning outcomes of
the program. This offers fully interactive environment to the remote user. A ded-
icated architecture that meets network security and equipment safety requirements
has been implemented. The remote control of the experiment is ensured through the
powerful and flexible shared variables engine of Lab view. The remote lab has been
successfully tested with two sample experiments. The infrastructure may accommo-
date many more concurrently-running experiments.
In the paper [9], authors describe a remote lab system that allows remote groups
to access a shared PR2. This lab will enable a larger and more diverse group of
researchers to participate directly in state-of-the-art robotics research and will im-
prove the reproducitivity and comparability of robotics experiments. This paper
identify a set of requirements that apply to all web-based remote laboratories and
focus on solutions to these requirements. Specifically, this paper present solutions to
interface, control and design difficulties in the client and server-side software when
implementing a remote laboratory architecture. The combination of shared physical
hardware and shared middle ware software allows for experiments that build upon
Chapter 2. Review of Related Works 4

and compare against results on the same platform and in the same environment for
common tasks. It describe how researchers can interact with the PR2 and its envi-
ronment remotely through a web interface, as well as develop similar interfaces to
visualize and run experiments remotely.
The proposed solution in the paper [10] is an e-portfolio system on the basis
of a personal learning environment. With e-portfolios the student is able to do
individually and collectively document. It reflect what he has been doing and can
share his outcomes with others. The paper outlines the important role e-portfolios as
personal learning environments can play to experience remote laboratory work and
to foster the creative attitude.

2.1.2 Home Labs

Home Labs are real one and the user has to perform experiment on a hardware
equipment. The output of the experiment is communicated to the user through a
personal computer or a digital oscilloscope. In Home Labs the heavy components
from real lab are miniaturized. So, it can be handy. These types of labs can work
from home, although the physical instruments are real. Here are some of the home
based labs mentioned below.
The progression of growth of Information and Communication Technology(ICT)
and design of electronic circuit boards will be helping in construction of electronic
labs from home. This paper [11] shows it can achieve it by miniaturized the size of
the equipment and with the personal laptops we can achieve this home electronic
labs. This home electronic labs requires very low budget investment when compared
to the real time laboratories.
The proposal [12] is based on the massive lending of low-cost programmable logic
hardware kits to students for the whole semester. Here students are introduced with
the kits named as DL - kit that contain all the required components fixed to it and
they are non - removable except the power supply wire. For the kit to be used there
are some necessary precautions and some manual instructions should be considered
by the students in order for their safety measures. Through this kit students can do
three different laboratories and they are combinational circuits, sequential circuits
and hardware description language.
Students can watch the tutorials of the required experiment in the website. This
website is the whole package of data sheets, tutorials and software’s required for
designing and programming purpose, this will make the work easy for the students.
Some software is developed for the administrative task of the students, like slot
booking for oral presentation with the lab instructor, etc [12].
From the proposal [13] we assume that the miniaturized kit are generally designed
for some particular interdisciplinary courses and this kits can not be used for all
the upper division technical courses. All the experiments which are done through
this kits requires a step-by-step procedure from performing simple measurements
to design and build hardware and software. Arduino micro controller was one the
important component which can used as replica of many equipment’s in the kit and
Chapter 2. Review of Related Works 5

this also allows to use hardware and software easily. So, the Arduino will be helping
in miniaturizing kit. This also helps in the further developments of the lab kit from
the students and instructor cooperation. This home electronic labs are the perfect
platform for the distance education students.
The proposal [11] presents low cost interactive and portable electronics lab kit.
The kit here is for courses in circuits and electronics at the undergraduate level.
This kit has all the components required and kit has two cameras to provide real-time
interaction with lab partners or lab instructor through Skype internet based software
platform. This kit was designed to minimize the cost for the learning institution as
well as for the student. The kit is done with cost around 300 US Dollars, including
real-time interaction through internet it costs around 500 US Dollars.

2.2 Available Educational Online Labs

Nowadays there are a lot of institutions and universities developing their own
architectures for web and remote labs. In this section we are going to describe some
of the most important initiatives.
This initiative originates in a remote laboratory project established at Blekinge
Institute of Technology, BTH, in 1999 by Prof. Ingvar Gustavsson to ascertain that it
is feasible to design a remote electronics laboratory comprising standard equipment
to supplement local instructional laboratories and provide free access to the experi-
mental equipment to students enrolled in circuit analysis and electronics course [14],
[15].
WebLab-Deusto is a research group of the University of Deusto, which aims to
provide different solutions to different scenarios related to Remote Experimenta-
tion [16]. The most important solutions you can find there are WebLab-Deusto
project. This Open Source project provides a web-based, experiment-agnostic, scal-
able software infrastructure which permits the University of Deusto to offer several
laboratories to its students through the Internet. A micro-server based solution for
deploying low-cost standalone remote laboratories.
The Massachusetts Institute of Technology has implemented the iLab Shared Ar-
chitecture (ISA) to facilitate the rapid development of new web labs and to provide
a mechanism that allows students from one university to use experiments and hard-
ware instruments published from another [17]. As a result of this, MIT has designed
two Web Architectures based on batched experiments.
LiLa is the acronym for the Library of Labs, an initiative of eight universities
and three enterprises, for the mutual exchange of and access to Virtual laboratories
(simulation environments) and Remote experiments (real laboratories, which are
remotely controlled via the Internet) [18].
Labshare is led by the University of Technology, Sydney and it is a joint initiative
of the Australian Technology Network: Curtin University of Technology, Queensland
University of Technology, RMIT University, University of South Australia, and the
Chapter 2. Review of Related Works 6

University of Technology, Sydney [19]. This project aims to create a national network
of shared remotely accessible laboratories. This will mean a great number of high-
quality, laboratory-based, educational experiments that will be available to university
and high school students from anywhere in Australia and around the world [19].

2.3 Electronics Labs in Engineering Programs

The Electronics Labs are used for teaching and research purposes in all engineer-
ing degree programs. In the nearby electronic workshop, long-term projects can be
planned and electronic prototypes manufactured in an assembly line. The labora-
tory specializes in projects in the areas of Electrical Engineering, Measurement and
Control Engineering, Signal Processing and Power Electronics.
Blekinge Institute of Technology in Sweden has opened a local instructional labo-
ratory for undergraduate education in electrical and electronic engineering for remote
operation and control 24/7 as a complement and a supplement to traditional labora-
tories. It is equipped with a unique virtual interface enabling students to recognize
on their own computer screen the desktop instruments and the breadboard, most of
them have already used in the local laboratory. The open laboratory is used in regu-
lar courses in circuit analysis for distant learning students dispersed all over Sweden
and for campus students as well. The research is focused on what is perceived to be
the greatest challenge, to give students laboratory experience that is as genuine as
possible despite the lack of direct contact with the actual lab hardware. The goal is
to produce an open international standard in cooperation with universities and other
organizations around the world [20].
This paper describes the design [21], implementation and development of a re-
mote laboratory for digital electronics. The laboratory uses the MIT three-tiered
iLab architecture, a framework for remote lab development and deployment. This
specific experiment involves using a simple encoder-multiplexer circuit connection
where users will be required to determine an unknown input to the multiplexer. Not
much emphasis is placed on the details of digital electronics, but rather it serves as a
proof of concept for how remote/online laboratories can be implemented and adopted
in any engineering/science discipline. This paper also introduced a new approach to
presenting remote experiments to distance learning students in order to give them
an experience similar to what students who have access to the physical laboratories.
Chapter 3
Problem Statement, Objectives
and Main Contributions

As per the review of related works, there are many exceptional solutions for online
labs. In many remote laboratories the main goal is to reduce the real equipment into
miniaturized kits. So that every component has its own functionalities. But these
solutions does not solve all the problems. Instead of reducing all the components
into miniaturized ones we can make some components with various functionalities.
Arduino is an example of multi-functional device, which can be used as oscilloscope,
ammeter, voltmeter and in real-time interaction.
The main goal of the project is to gain the knowledge for the students from the
source of electronic Home Labs, which is now considered as a e-learning strategy.
The main objectives of the thesis could be defined as to find answer to the following
research questions:
• How can Arduino be used to replace the voltmeter and ammeter in electronic
lab?
• In which way Arduino can be used as digital oscilloscope?
• To design the circuits of the required experiments.
• Which facilities of home lab would be suitable for a real time interaction be-
tween the lab instructor and students.
Main contributions of this project could be summarised as:
• Design and implementation of 15 experiments using Arduino.
• Making resultant data of the experiments to be accessible and controllable for
the lab instructor.
• Arduino is used for surveillance of the resultant data.
• Minimization of heavy equipment into a small size kit, which is handy.
Authors’ contribution to the thesis is balanced. All the three labs required deep
study to know about the different subject in detail. This work was assigned to Sai
Jaswanth Yadala and also all the required documents for the experiments was col-
lected by him. Majority of hardware related works of the laboratory was assigned to
the Kamasani Jyotheesh Reddy. All the three labs are based on Arduino, which needs
IDE to work. The majority of handling software work was assigned to Nakkapalli
Uday Suhas.

7
Chapter 4
Labs Principles and Components

Generally, the equipment in the real time lab has more functionalities and high
cost. So principle of this design is to use the devices with the required and essential
functionalities, what can reduce the size and cost of the equipment to be uncompli-
cated while using them at home. In every designed lab, which are Electronic Devices
and Circuits Lab, Linear Integrated Circuits Lab, and Sensor Systems Lab, Arduino’s
ADCs are used to measure voltage and current. We minimize the size of DDS signal
generator and oscilloscope by applying a miniaturized kits. Most of the experiments
in the project uses a code, which has to be uploaded for Arduino to perform exper-
iment. The values obtained after the code execution can be seen by a teacher via
a Web-server. The general principles of the three electronic labs named Electronics
Devices and Circuits, Linear Integrated Circuits and Sensor Systems are summarised
in this section.

4.1 Labs Principles


In this section, the three labs are summarised to introduce their principles.

Electronic Devices and Circuits Lab

For the electronic devices and circuits lab we propose five experiments for stu-
dents to perform. All the experiments can be done very feasibly by using only the
basic required components. In this laboratory only some basic components are re-
quired and some of the components can be replaced with Arduino as well such as
a voltmeter or ammeter. Arduino is also used for surveillance of the resultant data
via web server. This laboratory is to help in learning basics of electronics. This lab
can be useful not only for electronics students but also for any branch students who
are interested about the electronics. A manual of the experiments are prepared very
feasibly that any student can perform the experiment very easily.

Linear Integrated Circuits Lab

In the linear integrated circuits lab we propose five experiments for students to
perform. All the experiments in this lab are the advanced version of the basic lab,
which requires some of the advanced components such as an oscilloscope, operational

8
Chapter 4. Labs Principles and Components 9

amplifier, function generator and power station. Arduino replaces voltmeter and am-
meter, the same as in the basic lab. Here Arduino can also be used as oscilloscope.
Since using it as oscilloscope can faced some minor issues such as producing more
noise then as an alternative DSO-138 oscilloscope is the best alternative for it. In
real time laboratories, a signal generator is big in size, and hard for handling from
home. Therefore DDS signal generator is to be used. Both the DSO-138 oscilloscope
and DDS signal generator are economical in price with the best features. In this lab,
an operational amplifier is one of the main component. The operational amplifier is
treated as single entity of the multi stage high gain amplifier. The operational am-
plifier is driven from the bipolar power supply. Documentation of this lab is written
in detail to help students to clearly understand the procedure of the experiment.

Sensor systems lab

In the sensor system lab, five experiments would be performed. All the experi-
ments in this lab deal with basics of sensors. A different kind of sensors is used for
every experiment, and every sensor has its own working environment. Sensors are
treated here as a devices, which take an input and gives an output with respect to
a physical quantity. Arduino is the main component, where the code is executed.
We developed all the codes of Arduino for four experiments but the students have
to develop their own code for one experiment of dark sensing light. This should
help students in understanding coding and increase the knowledge of the coding and
sensors. An experiment manual is designed to help students understand and perform
the experiments.

4.2 Components used:


In this section main components used for labs are presented.

Arduino Uno WiFi Rev2: The Arduino comes up with the integrated WiFi
module. The NINA-W13 will help to access your WiFi network. This Arduino
is a solution for all the basic IOT tasks. It has a total of 14 input/output pins
with a power jack, a USB connection and a reset button. This Arduino works in
both online and offline modes. To run the Arduino offline one must install Arduino
software (IDE) to upload the code into it [22]. Figure 4.1 represents Arduino Uno
Wifi Rev2 board.
Chapter 4. Labs Principles and Components 10

Figure 4.1: A view of Arduino [22]

DDS Signal Generator: This is an incipient implementation of the DDS signal


generator. PCB in Figure 4.2 is compact, single sided with only through-aperture
components for facile construction.The function generator features two BNC outputs:
one for the high speed [1 MHz to 8 MHz] square signal (BN C1 ) and another for the
DDS signal (BN C2 ). Offset and amplitude can be regulated by two potentiometers
offset in range of +5V to -5V (potentiometer 1) and amplitude in range of 0 V to
10 V (potentiometer 2). Up and down arrow buttons are utilized for transmuting the
function type (sine, triangle etc.) while left and right arrow buttons are utilized for
transmuting the frequency value. There is additionally a separate menu for trans-
muting frequency step. When the middle button is pressed, the signal generation
commences. Middle button is pressed again for ceasing the signal [23].

Figure 4.2: A view of DDS signal generator [23]


Chapter 4. Labs Principles and Components 11

Operational Amplifier (IC741): The term operational amplifier or op-amp


refers to a class of high-gain DC coupled amplifiers with inputs and a single output.
The modern integrated circuit version is typified by way of the well-known 741 op-
amp. Some of the general characteristics of the IC version are:

• High gain, on the order of a million;

• High input impedance, low output impedance;

• Used with split supply, usually +/- 15V;

• Used with feedback, with gain determined by the feedback network.

The operational amplifiers became designed to carry out mathematical opera-


tions. Despite the fact that now outmoded with the aid of the digital computer,
op-amps are a common feature of contemporary analog electronics [24]. Figure 4.3
shows a view and schema of UA741.

Figure 4.3: Operational Amplifier (IC741) [24]

Step Down Transformer: A step down transformer is a tool, which converts


high primary voltage to a low secondary voltage. In a step down transformer, the
primary winding of a coil has more turns than the secondary winding. Figure 4.4
suggests the winding representation of an average step down transformer [25].
Chapter 4. Labs Principles and Components 12

Figure 4.4: Step down transformer [25]

Ultrasonic Sensor: The ultrasonic sensor used on this venture is HC-SRF04.


The main use of this sensor is to measure the distance of the object. The range of the
sensor is 400 cm. The sensor has nozzles for transmitting and receiving the ultrasonic
waves. The distance is measured based on the duration of time that ultrasonic waves
take to tour again to the sensor after reflecting from the obstacle [26]. Figure 4.5
shows a view of HC-SR04 ultrasonic sensor.

Figure 4.5: Ultrasonic sensor [26]

LCD: Liquid Crystal Display (LCD) are flat-panel display which produces the
images by using light-modulating properties of liquid crystals. This technology is
used in TVs, computer monitors, and mobile devices. Normally, a standard LCD
screen requires 8 pin connections to work with an Arduino [27]. Figure 4.6 shows a
view of LCD.
Chapter 4. Labs Principles and Components 13

Figure 4.6: Liquid crystal display [27]

Photo Resistor: Photo resistor is also know as light dependent resistor (LDR).
It is used to measure light intensity. In dark their resistance will be high it is up-to
1M, but when it is exposed to light the resistance drops dramatically down to few
ohms depending on light intensity [28]. Figure 4.7 will show a view of photo resistor.

Figure 4.7: Photo Resister [28]

Temperature Sensor: LM35 is a temperature measuring tool having an analog


output voltage proportional to the temperature. It offers output voltage in centigrade
(Celsius). The sensitivity of LM35 is 10 mV/°C. As temperature increases, output
voltage also increases. It is far a 3-terminal sensor used to measure surrounding
temperature ranging from -55°C to 150°C. LM-35 offers temperature output which
Chapter 4. Labs Principles and Components 14

is extra unique than thermistor output [29]. Figure 4.8 shows a view of LM-35
temperature sensor.

Figure 4.8: Temperature [29]

Light Emitting Diode: LED’s are kind of semi conductors with the light
sources in which both P-type(holes) and N-type(electrons) semiconductors will com-
bine. By giving some certain forward voltage this combination of holes and electrons
occurs, releasing the form of which is light. The wastage of electricity is very less
in LED’s and it directly converts electrical energy into light energy [30]. Figure 4.9
shows a view of LED.

Figure 4.9: LED [30]


Chapter 4. Labs Principles and Components 15

DSO-138 Oscilloscope: DSO-138 was basically designed as a training purpose.


It contains only the basic oscilloscope functions there will be no advanced function
as available in the real-time equipment. This oscilloscope works with the M3 ARM
processor from ST. The display of the oscilloscope is only 2.4 inch which will display
the waveforms [31]. Figure 4.10 shows a view of DSO-138 oscilloscope.

Figure 4.10: DSO-138 oscilloscope [31]

Push Buttons: A push-button is a easy transfer mechanism to govern some


issue of a system. while the push button is open (unpressed) there is no connection
between the 2 legs of the push button, so the pin is hooked up to floor (thru the
pull-down resistor) and we study a LOW. whilst the button is closed (pressed), it
makes a connection among its legs, connecting the pin to 5 volts, so that we study a
excessive [32]. Figure 4.11 shows a view of push button.

Figure 4.11: Push button [32]


Chapter 4. Labs Principles and Components 16

Resistors: A resistor is a passive two-terminal device that implements electric


resistance as a circuit. Resistors are used to resist the flow of current and have a
stated cost of Resistance. Many kinds of resistors are used having extraordinary
makes use of and construction. The most common types have a hard and fast value
of resistance so are often referred to as fixed resistors [33]. Figure 4.12 shows a view
of resistors.

Figure 4.12: Resistors [33]

Capacitors: Capacitor is a electronic device which stores electrical energy in


electric field. It is a two terminal device. Capacitors are one of the maximum useful
components after resistors. The effect of capacitor is known as capacitance. There
are different kind of capacitors used in circuits[34]. Figure 4.13 shows a view of
Capacitors.

Figure 4.13: Capacitors [34]


Chapter 4. Labs Principles and Components 17

Zener Diode: A Zener diode is a silicon semiconductor device that can actually
allow current to flow in both forward and reverse directions. The diode is heavily
doped with p-n junction. Zener diode has reverse break down voltage, When it
starts conducting current, and continuous in the reverse-bias mode without getting
damaged. The main application of Zener diode is voltage regulation [35]. Figure 4.14
shows a view of Zener diode.

Figure 4.14: Zener diode IMZ 5.1V [35]

Diodes: Diodes are a semiconductor device that allow current to flow in one
direction, and restrict current flow in opposite direction. When a diode allows current
flow, it is forward-biased. When a diode does not allow current to flow, it is reverse-
biased and it acts as an insulator. It is also know as rectifier because they change
alternating current to direct current (AC/DC) [36]. Figure 4.15 shows a view of
diode.
Chapter 4. Labs Principles and Components 18

Figure 4.15: Diode IN4007 [36]

4.3 Precautions
Attention to the the safety is the first priority while performing laboratory. Gen-
erally in the real-time laboratory students do experiments under the supervision of
the lab instructor. Now, in home laboratory students should clearly know the pro-
cedure and precautions before the beginning of the experiments. It is mandatory
to follow some set of lab rules and precautions for every student while performing
laboratory. All the precautions need to be followed to avoid some circumstances that
cause hazards. Main requirements are as follow:
• Connections must be made carefully to avoid short circuit.
• Loose connections should be avoided.
• The output voltage and current of the experiments should not exceed the lim-
ited range of the Arduino. If exceeds use resistors to decrease the readings.
• Make sure that the equipment is not placed near the extreme conditions of
temperature.
• Keep the working area clean and tidy.
• No other electronic devices should be near the circuits while performing exper-
iments.
Chapter 4. Labs Principles and Components 19

4.4 Educational Principles


The communication between the students and lab instructor is done for the dif-
ferent aspects for the Home Labs. Both the students and lab instructor have their
own roles to play in the communication session as shown in Table 4.1. Some of the
main subjects of the interaction are:

Architecture: For every experiment in each lab students should be acquired


with the required components (hardware) and software. All the hardware compo-
nents should be handled very carefully by the students after the hand over of the
hardware components by the lab instructor. Lab instructor has to give the proper
suggestions for which software can be used to the experiments. He should give proper
guide lines and precautions to be taken while performing the experiments.

Communication: The communication between the students and lab instructor


should be done very frequently so that they have to prepare schedule for interactions.
All the experiment related documents will be provided to students by lab instruc-
tor so that it will help in make their work easy. Interactions will help in mutual
understandings with each other. Students have a possibility to clarify their doubts
during this interaction. Lab instructor can see the progress of the experiment and
correct the students if any mistakes were done. Lab instructor will surveillance the
resultant data of the experiment via web server and it will be evaluated. So all this
communication between the students and lab instructor will help in increasing the
bonding between them.

Accessibility: Generally in the real time labs both the students and lab instruc-
tor have the access to components. But here in Home electronic Labs lab instructor
have no sign of accessibility for it. So, all the students should take the responsibility
of the labs. If any problems occurs in the Home Labs, students should able to handle
it because lab instructor cannot be directly contacted. Students can access the Home
Labs round the clock they cannot get worried about the time and when to perform
the experiments.

Lab Execution: Lab instructor will help the students in the designing the
circuits by giving proper guidelines. The designed circuit should be verified whether
it is matched with the given components. Lab instructor should help while connecting
the circuit diagram giving proper guidelines. Students connect the circuit as per the
circuit diagram and take precautions given by the lab instructor or else there will be
a chance of burning the components.

Evaluation: Students perform the experiments and update the results to the lab
instructor via web server. The resultant data will be evaluated by the lab instructor
so he/she can find mistakes if done any by the students. Students should report all
the experiments in detail how the experiments were handled by them and send it to
the lab instructor for the evaluation.
Chapter 4. Labs Principles and Components 20

Table 4.1: Roles of students and instructors


Function Role of participant
General Itemized Student Instructor
Students are provided Instructor should
with the required provide every
components for the required components
Hardware project. They should for the project and
Architecture
take care of the also give proper
components carefully guidelines for
while performing it. using it.
Instructor need to
Students need to
guide the students
install the software
Software about the software
in their personal
and how to use
computer.
it in the project.
Instructor can see
Student should
the progress of the
Surveillance provide surveillance
Communication project through
through the camera.
web camera.
Instructor should
provide all the
materials and
Students have documents which
Interaction opportunity of will be helpful for
expressing their idea. students. He should
properly instruct
every next step
about the project.
Students have access Instructor do not
Accessibility Accessibility to home lab round have access to
the clock. the home lab.
Students design the Instructor should
Design circuits by following help in designing
Lab Execution
instructions. the circuits.
Instructor will
give guidance in
Students connect the connection of the
Connection components as per circuits and give
the circuit diagram. suggestions if
changes are to
be made.
Instructor analysis
Students will update
Resultant Data the resultant data
Evaluation the results of project.
of the project.
Students should
Instructor will
report every pin
Reporting evaluate the report
to pin detail
of the experiments.
of experiment.
Chapter 5
Lab 1: Electronic Devices and Circuits

Electronic devices and circuits lab consists of diodes, transformers, resistors and
capacitors. It is basic lab of electronic components. This laboratory covers the prac-
tical oriented work of the electronic circuits which helps in developing the theoretical
concepts for the students. This laboratory helps a lot in practical world of the elec-
tronic circuits. The knowledge of these practicals are very much required for the
engineers. This lab is sub-classified into two sections: diodes and filters.

The electronic devices and circuits lab is to understand the concepts, working
and its characteristics diodes and filters. It also provides the information about the
flow of current. This course is foundation for all the courses in the electronics. The
knowledge of electronic devices and circuits lab is basic for all the further courses
in the electronics. A detailed lab manual of the Electronic Devices and Circuits lab
experiments are shown in Appendix C and we took these experiments reference from
our home university (Andhra University) and modified according to our requirement.
The flowchart of the experiments is shown in Figure 5.1.

Five experiments are proposed, which are:


• Experiment 1.1: Characteristics of p-n junction diode;
• Experiment 1.2: Characteristics of Zener diode;
• Experiment 1.3: Characteristics of LED, Light Emitting Diode;
• Experiment 1.4: Designing of half wave rectifier;
• Experiment 1.5: Linear wave shaping.
Labs objectives:
• To understand the characteristics of the diode.
• To gain the knowledge of the half wave and full wave rectifiers.
• Introduction of digital oscilloscope.
• To test the characteristics of the voltage and current of the electronic device.
Arduino IDE code: The shown Arduino code is useful for the first three ex-
periments with small changes in code:

21
Chapter 5. Lab 1: Electronic Devices and Circuits 22

Figure 5.1: Flow chart of EDC lab

1 # include < SPI .h >


2 # include < WiFiNINA .h >
3 char ssid [] = " username " ; // your network SSID ( name )
4 char pass [] = " password " ; // your network password
5 int keyIndex = 0; // your network key \ newline
Index number ( needed only for WEP ) \ newline
6 int status = WLIDLESTATUS ;
7 float value , Vacross1 , Vacross2 , current , vin = 0.0;
8 float R1 = 30000.0;
9 float R2 = 10000.0;
10 // float R3 = 30000.0; // For PN junction in reverse bias only
11 // float R4 = 20000.0; // For PN junction in reverse bias only
12
13 WiFiServer server (80) ;
14
15 void setup ()
16 \\* // Initialize serial and wait for port to open :
17 Serial . begin (9600) ;
18 while (! Serial ) ;
19 // wait for serial port to connect .
20
21 // attempt to connect to Wifi network :
22 while ( status != WLCONNECTED )
23 Serial . print ( " Attempting to connect to SSID : " ) ;
24 Serial . println ( ssid ) ;
25 // Connect to WPA / WPA2 network .
26 status = WiFi . begin ( ssid , pass ) ;
27 // wait 10 seconds for connection :
28 delay (10000) ;
Chapter 5. Lab 1: Electronic Devices and Circuits 23

29 server . begin () ;
30 // you ’ re connected now , so print out the status :
31 Serial . print ( " SSID : " ) ;
32 Serial . println ( WiFi . SSID () ) ;
33 IPAddress ip = WiFi . localIP () ;
34 Serial . print ( " IP Address : " ) ;
35 Serial . println ( ip ) ;\ newline
36 void loop ()
37 value = analogRead ( A0 ) ;
38 Vacross2 = analogRead ( A1 ) ;
39 vin = ( value * 5.0) / 1023.0;
40 Vacross1 = vin / ( R2 /( R1 + R2 ) ) ;
41 Vacross2 = ( Vacross2 * 5.0) / 1023.0;
42 // Vacross2 = Vacross2 / ( R4 /( R3 + R4 ) ) ; // For PN junction in reverse
bias only
43 current = ( Vacross1 - Vacross2 ) ;
44 Serial . print ( " Source Voltage = " ) ;
45 Serial . println ( Vacross1 ) ;
46 Serial . print ( " V " ) ;
47 Serial . print ( " Current = " ) ;
48 Serial . println ( current ) ;
49 Serial . print ( " mA " ) ;
50 Serial . print ( " output Voltage = " ) ;
51 Serial . println ( Vacross2 ) ;
52 Serial . print ( " V " ) ;
53 WiFiClient client = server . available () ;
54 client . println ( " < html > " ) ;
55 client . println ( " < table style = ’ width :100% ’ , > " ) ;
56 client . println ( " <tr > " ) ;
57 client . println ( " <th > " ) ;
58 client . println ( " Source Voltage = " ) ;
59 client . println ( Vacross1 ) ;
60 client . println ( " V " ) ;
61 client . println ( " </ th > " ) ;
62 client . println ( " Current = " ) ;
63 client . println ( current ) ;
64 client . println ( " mA " ) ;
65 client . println ( " </ th > " ) ;
66 client . println ( " <th > " ) ;
67 client . println ( " Output Voltage = " ) ;
68 client . println ( Vacross2 ) ;
69 client . println ( " V " ) ;
70 client . println ( " </ th > " ) ;
71 client . println ( " </ tr > </ table > " ) ;
72 client . println ( " </ html > " ) ;
73 delay (5000) ;

5.1 Experiment 1.1: Characteristics of p-n junction


diode
Aim : To evolve the characteristics of p-n diode in forward and reverse bias, and
to calculate static and dynamic resistance.
Chapter 5. Lab 1: Electronic Devices and Circuits 24

T heory : A P-N junction diode works only in one direction. The characteristics
of the diode are curve between voltage across the diode and current flowing through
the diode. The potential barrier does not allow the current to flow when the circuits
is open and its external voltage is zero. So, the circuit current is zero. When p-
type (anode) is connected to +Ve terminal and n-type (cathode) is connected to
−Ve terminal of the supply voltage is known as forward bias. When diode is in
the forward biased condition the potential barrier is reduced. In the ON state of
the diode at forward voltage, the potential barrier altogether eliminated and current
starts flowing through the diode and also in the circuit. The current increases with
increasing forward voltage. When P-type (anode) is connected to negative terminal
and N-type (cathode) is connected to positive terminal of the supply voltage, it is
known as reverse bias and the potential barrier across the junction increases. In the
off state of the diode resistance is very high and current is very low. The reverse
bias current occurs due to minority charge carriers.
Circuit Diagram : Figure 5.2 shows that the P-N junction diode is placed in
forward bias. In reverse the output voltage increases with the increase in the input
voltage irrespective with cut-off voltage. Figure 5.3 shows that the P-N junction
diode is placed in reverse bias.

Figure 5.2: Circuit diagram of forward bias of P-N junction diode


Chapter 5. Lab 1: Electronic Devices and Circuits 25

Figure 5.3: Circuit diagram of P-N junction diode in reverse bias

P rototype : All the connections are made as per the circuit diagram shown in
Figure 5.2 and Figure 5.3 with the help of the breadboard shown in Figure 5.4 and
Figure 5.5.

Figure 5.4: Picture of forward bias prototype


Chapter 5. Lab 1: Electronic Devices and Circuits 26

Figure 5.5: Picture of reverse bias prototype

Results : In forward bias the voltage through the p-n junction is limited to the
cut-off voltage at output with the increase of the input. The output voltage linearly
increases up-to the cut-off voltage. In Figure 5.6 output voltage is not crossing the
cut-off voltage and in Figure 5.7 output voltage is increasing linearly with input
voltage.

Figure 5.6: Results of experiment with forward bias


Chapter 5. Lab 1: Electronic Devices and Circuits 27

Figure 5.7: Results of experiment with revers bias

5.2 Experiment 1.2: Characteristics of Zener diode


Aim : To evolve the characteristics of Zener diode in reverse bias, and to verify
that Zener diode acts as a voltage regulator.
T heory : A Zener diode is specially made to operate the break down region
which is heavily doped p-n junction diode. Reverse bias was not conducted by the
p-n junction diode but in case if it is increased voltage starts conducting heavily
which is Break down voltage which may damage the device. So to avoid such high
currents we connect resistors in series with Zener diode to maintain the constant
voltage across the terminals. It is used in voltage regulators.

Circuit Diagram : In Figure 5.8 the output voltage through the Zener diode
will increase with the increase in input voltage up-to the cut-off voltage of 5.1 V.
Zener diode is to operate in the breakdown region and it helps in maintaining the
constant voltage. Zener diode work in forward direction.
Chapter 5. Lab 1: Electronic Devices and Circuits 28

Figure 5.8: Circuit diagram of Zener diode

P rototype : All the connections are made as per the circuit diagram in Fig-
ure 5.8 with the help of the breadboard in Figure 5.10.

Figure 5.9: Picture of prototype of Zener diode experiment

Results : In Figure 5.10 we can see that output voltage is not exceeding more
than 5.1 V.
Chapter 5. Lab 1: Electronic Devices and Circuits 29

Figure 5.10: Results of Zener diode experiment

5.3 Experiment 1.3: Characteristics of Light Emit-


ting Diode
Aim : To determine the forward bias characteristics of the light emitting diode
(LED).
T heory : Light Emitting Diode(LED) will work only in forward biased condi-
tion. In this connection we connect cathode to the negative terminal and anode
to positive terminal of the battery. In the forward biased condition electrons move
from n to p and holes from p to n. It is a kind of normal P-N junction diode. Under
reverse bias condition we cannot find out any carriers so there will be no emission of
the light. The flow of the current passing through LED will be limited by connecting
resistors in series to avoid it from the burning. The resistor value R can be calculated
by (R=Vs -Vi )/2 where (Vs ) is supply voltage, (Vi ) is LED voltage.

Circuit Diagram : In Figure 5.11 we can find out that Light Emitting Diode
cannot handle high resistance so we place a resistor in between the input voltage and
the LED in order to prevent it from burning.
Chapter 5. Lab 1: Electronic Devices and Circuits 30

Figure 5.11: Circuit diagram of LED

P rototype : All the connections are made as per the circuit diagram shown in
Figure 5.11 with the help of the breadboard in Figure 5.12.

Figure 5.12: Picture of prototype of LED experiment

Results : We can find out the output voltage will not increase with input volt-
age. The intensity of light will increase with increase in voltage as shown in Fig-
ure 5.13.
Chapter 5. Lab 1: Electronic Devices and Circuits 31

Figure 5.13: Results of LED experiment

5.4 Experiment 1.4: Designing of half wave rectifier


Aim : To design half wave filter and evolve ripple factor, percentage regulation
of a half wave rectifier with filter.
T heory : In Half wave rectifier when the AC supply is applied at the input we
can see the negative half cycle is suppressed and positive half cycle will be appeared
in the load areas. In the negative half cycle, the diode is reverse biased and no current
flows in the circuits. In the positive half cycle, we can see the diode is in forward
bias and current produces through the output voltage across the load resistor. The
reason for the transformer coupling are

• From prevention of shock hazards the AC source is electrically isolated from


the rectifier.

• The voltage can be stepped up and stepped down as required.

• The efficiency of the half wave rectifier is 40.6

Circuit Diagram : In the half wave rectifier it allows only the positive half
cycles in the output waveform and blocks the negative half cycle. It is used to convert
the AC voltage into DC voltage. Single diode is only required for construction of
half wave rectifier as shown in Figure 5.14.
Chapter 5. Lab 1: Electronic Devices and Circuits 32

Figure 5.14: Circuit diagram of half wave rectifier with filter

P rototype : All the connections are made as per the circuit diagram in Fig-
ure 5.14 with the help of the breadboard shown in Figure 5.15.

Figure 5.15: Picture of prototype of half wave rectifier

Results : We can observe the positive half cycle in the output wave form in
Figure 5.16.
Chapter 5. Lab 1: Electronic Devices and Circuits 33

Figure 5.16: Output of half wave rectifier with filter

5.5 Experiment 1.5: Linear wave shaping


Aim : To design Low Pass and High Pass RC circuits for an input time period
of 1 m sec and and observe the conditions for which the circuits acts as an integrator
and differentiator.
T heory : A square wave is a periodic waveform which maintains itself at con-
stant level V with respect to ground for a long time t and changes abruptly through
another level V and remains constant at that level for which a time to when such a
wave is given as an input to circuit.
High P ass Circuit : The high pass circuit is connected as shown in
Figure 5.18 and output is taken across the resister.
When, RC >> τ , output is in the form of hill.
RC = τ , output rises and falls exponentially.
RC << τ , output consists of alternative and negative spikes.
Low P ass Circuit : The low pass circuit is connected as shown in
Figure 5.17 and output is taken across the capacitor. The reactance of capacitor
decreases with increase in frequency.
1. If RC >> τ , the output takes a fairly long time to come to steady stage and
as such the transient response.
2. If RC << τ , input signal is integrated and distorted.

Circuit Diagram : Low pass filter circuit diagram is shown in Figure 5.17
and high pass filter circuit diagram is shown in Figure 5.18.
Chapter 5. Lab 1: Electronic Devices and Circuits 34

Figure 5.17: Low pass filter circuit diagram

Figure 5.18: High pass filter circuit diagram

P rototype : All the connections are made as per the circuit diagram in Fig-
ure 5.17 and Figure 5.18 with the help of the breadboard shown in Figure 5.19 and
Figure 5.20.
Chapter 5. Lab 1: Electronic Devices and Circuits 35

Figure 5.19: Prototype of passive high pass circuit

Figure 5.20: Prototype of passive low pass circuit

Results : The responses of high pass and low pass RC circuits at different
frequencies are shown in Figure 5.21, Figure 5.22, Figure 5.23 and Figure 5.24.
Chapter 5. Lab 1: Electronic Devices and Circuits 36

Figure 5.21: Waveform of low pass circuit at medium frequency

Figure 5.22: Waveform of low pass circuit at high frequency


Chapter 5. Lab 1: Electronic Devices and Circuits 37

Figure 5.23: Waveform of high pass circuit at medium frequency

Figure 5.24: Waveform of high pass circuit at high frequency


Chapter 6
Lab 2: Linear Integrated Circuits

Linear Integrated Circuits lab deals with of op- amp’s, resistors, capacitors, func-
tion generator and oscilloscope. Transistors play a vital role in the linear integrated
circuits. In this lab we work with the different types of Analog IC, timers and regula-
tors. Here we design and analyse the linear and non linear circuits using operational
amplifiers. Identification and verification of the IC’s like LM-741, 555 timer will be
done. Primary emphasis placed on practical performance of circuits by analog IC’s.
The practical information is studied related to output and input characteristics. This
lab will develop the skills and knowledge about the circuits which will help the stu-
dents in further upcoming projects. A detailed lab manual of the Linear Integrated
Circuits lab experiments are shown in Appendix D and we took these experiments
reference from our home university (Andhra University) and modified according to
our requirement. The flowchart of the experiments is shown in Figure 6.1.

Five experiments are proposed, which are:

• Experiment 2.1: Non Linear wave shaping;

• Experiment 2.2: Parameters of Op-amp;

• Experiment 2.3: Schmitt trigger;

• Experiment 2.4: Frequency response of active low pass filter;

• Experiment 2.5: Frequency response of active high pass filter;

Labs objectives:

• To understand the characteristics of operational amplifier;

• To get the knowledge about the special function integrated circuits;

• To use and apply operational amplifier in linear and non-linear applications;

• Design oscillators and amplifiers using operational amplifiers;

• Analyse the performance of oscillators.

38
Chapter 6. Lab 2: Linear Integrated Circuits 39

Figure 6.1: Flow chart of LIC lab

6.1 Experiment 2.1: Non Linear wave shaping


Aim : It could be divided into two types, they are:
1. To observe wave forms of clipper circuits using:
a. Positive clipper;
b. Negative clipper;
c. Two level clipper or Slicer circuit;
2. To observe the clamping circuit wave forms.
T heory : Clipping circuits are used to select the transmission that part of an
arbitrary waveform which lies above or below some particular reference voltage level.
Clipping circuits are referred to as voltage limiters, amplitude selectors or slicers.
1. A series combination of a diode, resistor and reference supply.
2. A network consists of several diodes, resistors and reference voltages.
3. Two emitter-coupled or cathode triodes, operating as an over driven difference
amplifier.
We know that capacitor block the passage of DC hence when a non-sinusoidal
periodic signal is transmitted as capacitance coupling circuit, it loses the DC compo-
nent. It is necessary to restore a DC invertor. In a damping circuit by applying the
sinusoidal input which begins at t = 0, now capacitor is uncharged at t = 0, during
first half quarter cycle, the input signal rises from zero to maximum value (Vmax ).
Circuit Diagram : Different types of clipping circuits are shown in Figure 6.2
and different types of clamping circuits are shown in Figure 6.3.
Chapter 6. Lab 2: Linear Integrated Circuits 40

Figure 6.2: Clipping circuits and its model waveforms


Chapter 6. Lab 2: Linear Integrated Circuits 41

Figure 6.3: Clamping circuits and its model waveforms

P rototype : All the connections are made as per the circuit diagram in the
Figure 6.2 and Figure 6.3 with the help of the breadboard shown in Figure 6.4,
Figure 6.5, Figure 6.6, Figure 6.7, Figure 6.8 and Figure 6.9.
Chapter 6. Lab 2: Linear Integrated Circuits 42

Figure 6.4: Prototype of positive peak clamping

Figure 6.5: Prototype of negative peak clamping


Chapter 6. Lab 2: Linear Integrated Circuits 43

Figure 6.6: Prototype of positive base clipping

Figure 6.7: Prototype of negative base clipping


Chapter 6. Lab 2: Linear Integrated Circuits 44

Figure 6.8: Prototype of clamping of zero volts

Figure 6.9: Prototype of clamping of Vr volts

Results : All the output waveforms of clipping and clamping circuits are ob-
served in the Figure 6.10, Figure 6.11, Figure 6.12, Figure 6.13, Figure 6.14 and
Figure 6.15.
Chapter 6. Lab 2: Linear Integrated Circuits 45

Figure 6.10: Output waveform of positive peak clipping

Figure 6.11: Output waveform of negative peak clipping


Chapter 6. Lab 2: Linear Integrated Circuits 46

Figure 6.12: Output waveform of positive base clipping

Figure 6.13: Output waveform of negative base clipping


Chapter 6. Lab 2: Linear Integrated Circuits 47

Figure 6.14: Output waveform of clamping to zero volts

Figure 6.15: Output waveform of clamping to Vr volts


Chapter 6. Lab 2: Linear Integrated Circuits 48

6.2 Experiment 2.2: Parameters of Op-amp


Aim : To measure the parameters of operational amplifier.
T heory : Op-amp is a direct coupled high gain negative feedback amplifier. It
can amplify signals having frequency range from 0 to 1 MHz. Few commonly used
electrical parameters of op- amp are as follows:
Input of f set voltage : When input voltage is 0 V, the output voltage
should be 0 V. But practically there is some offset voltage at the output. The input
offset voltage is defined as voltage that must be applied between two input terminals
of op-amp to nullify output.
Input of f set current : It is a parameter defining the differential dc
voltage required between the inputs of an operational amplifier to make the output
0 V.
Input bias current : Ideally no current flows into the input terminals of
an op-amp. In practice there are always two input bias current Ib+ and Ib− .
CM RR : The abilities of a differential amplifiers to reject common mode
signal is expressed by its CMRR. It is defined as follows:

CM RR = |Ad /Ac | (6.1)

where Ad is differential output change and Ac is differential input change.


Slewrate : It is defined as the maximum rate of change of output voltage
per unit time and is expressed in volts per microseconds.
Circuit Diagram : Input offset voltage circuit diagram is shown in Figure 6.16,
input offset current circuit diagram is shown in Figure 6.17, input bias current circuit
diagram is shown in Figure 6.20, CMRR circuit diagram is shown in Figure 6.18 and
Slew rate circuit diagram is shown in Figure 6.19.

Figure 6.16: Input offset voltage


Chapter 6. Lab 2: Linear Integrated Circuits 49

Figure 6.17: Input offset current

Figure 6.18: CMRR

Figure 6.19: Slew rate


Chapter 6. Lab 2: Linear Integrated Circuits 50

Figure 6.20: Input bias current

P rototype : All the connections are made as per the circuit diagrams in the
Figure 6.16, Figure 6.17, Figure 6.18, Figure 6.19 and Figure 6.20 with the help
of the breadboard shown in Figure 6.21, Figure 6.22, Figure 6.23, Figure 6.24 and
Figure 6.25.

Figure 6.21: Prototype of input offset current


Chapter 6. Lab 2: Linear Integrated Circuits 51

Figure 6.22: Prototype of input offset voltage

Figure 6.23: Prototype of CMRR


Chapter 6. Lab 2: Linear Integrated Circuits 52

Figure 6.24: Prototype of slew rate

Figure 6.25: Prototype of input bias current

Results : Some of the results in this experiment can be taken through multi me-
ter. We can find out input offset voltage, slew rate, CMRR in Figure 6.26, Figure 6.27
and Figure 6.28.
Chapter 6. Lab 2: Linear Integrated Circuits 53

Figure 6.26: Output waveform of input offset voltage

Figure 6.27: Output waveform of CMRR


Chapter 6. Lab 2: Linear Integrated Circuits 54

Figure 6.28: Output waveform of slew rate

6.3 Experiment 2.3: Schmitt trigger


Aim : To design Schmitt trigger circuit and calculate it’s lower and upper trig-
gering points and observe its output wave forms.
T heory : The circuit shows an inverting comparator with positive feedback.
This circuit converts arbitrary wave forms to a square wave or pulse. The circuit is
known as the Schmitt trigger (or) squaring circuit. The input voltage Vin changes
the state of the output V0 every time it exceeds certain voltage levels called the upper
threshold voltage VU T P and lower threshold voltage VLT P . When V0 = −Vsat , the
voltage across R1 is referred to as lower threshold voltage, Vlt . When V0 = +Vsat ,
the voltage across R1 is referred to as upper threshold voltage Vut . The comparator
with positive feedback is said to exhibit hysteresis, a dead band condition.
Circuit Diagram : The Schmitt trigger circuit is as shown in Figure 6.29.
Chapter 6. Lab 2: Linear Integrated Circuits 55

Figure 6.29: Schmitt trigger

P rototype : All the connections are made as per the circuit diagram as shown
in Figure 6.29 with the help of breadboard as shown in Figure 6.30.

Figure 6.30: Prototype of Schmitt trigger

Results : The square wave output is observed for sinusoidal wave input of the
Schmitt trigger circuit as shown in Figure 6.31 and Figure 6.32.
Chapter 6. Lab 2: Linear Integrated Circuits 56

Figure 6.31: Input waveform to Schmitt trigger

Figure 6.32: Output waveform of Schmitt trigger


Chapter 6. Lab 2: Linear Integrated Circuits 57

6.4 Experiment 2.4: Frequency response of active


low pass filter

Aim : is to design and evaluate the frequency response of first order low pass
filter:
T heory : An LPF allows frequencies from 0 to higher cut of frequency, fH . At fH
the gain is 0.707 Amax , and after fH gain decreases at a constant rate with an increase
in frequency. The gain decreases 20 dB each time the frequency is increased by 10.
Hence the rate at which the gain rolls off after fH is 20 dB/decade or 6 dB/octave,
where octave signifies a two-fold increase in frequency. The frequency fH is called
the cut off frequency because the gain of the filter at this frequency is down by 3 dB
from 0 Hz. Other equivalent terms for cut-off frequency are -3 dB frequency, break
frequency, or corner frequency.
Circuit Diagram : The low pass filter circuit is shown in Figure 6.33.

Figure 6.33: Low pass filter

P rototype : All the connections are as per circuit diagram in Figure 6.33 with
the help of breadboard in Figure 6.34.
Chapter 6. Lab 2: Linear Integrated Circuits 58

Figure 6.34: Prototype of low pass filter

Results : Low pass filter attenuates the high frequencies and produces low fre-
quency signals as shown in Figure 6.35.

Figure 6.35: Output waveform of low pass filter


Chapter 6. Lab 2: Linear Integrated Circuits 59

6.5 Experiment 2.5: Frequency response of active


high pass filter

Aim : is to design and evaluate the frequency response of first order high pass
filter:
T heory : The frequency at which the magnitude of the gain is 0.707 times the
maximum value of gain is called low cut off frequency. Obviously, all frequencies
higher than fL are pass band frequencies with the highest frequency determined by
the closed-loop band width all the op-amp.
Circuit Diagram : The high pass filter circuit is shown in Figure 6.36.

Figure 6.36: High pass filter

P rototype : All the connections are as per the circuit diagram in Figure 6.36
with the help of breadboard in Figure 5.19.
Chapter 6. Lab 2: Linear Integrated Circuits 60

Figure 6.37: Prototype of high pass filter

Results : High pass filter attenuates the low frequencies and produces high
frequency signals as shown in Figure 6.38.

Figure 6.38: Output waveform of high pass filter


Chapter 7
Lab 3: Sensor Systems

The aim of the sensor systems laboratory is to widen the applicability and to
develop the innovative sensor system solutions. The sensor systems laboratory will
cover all the design factors, algorithms, technologies will be in used in the future
generations. These systems are used in various fields like security, entertainment,
communication.
In this laboratory, sensor technologies have the impact of the embedded design.
A sensor is a converter which converts the physical quantity into signal and observed
by the instrument. They are many types of sensors each one has its own role in the
environment. Micro controllers have a crucial role in this lab for functioning of the
system. A detailed lab manual of the sensor system lab experiments are shown in
Appendix E. By this lab we will gain the knowledge of sensors and its role and how
it participates in the future. The flowchart of the experiments is shown in Figure 7.1.

Five experiments are proposed, which are:

• Experiment 3.1: Measuring temperature using M-35;

• Experiment 3.2: Finding the distance of the object;

• Experiment 3.3: Displaying stopwatch in LCD;

• Experiment 3.4: Traffic lights using LED’s;

• Experiment 3.5: Dark sensing LED;

Labs objectives:

• To know the working of the sensors.

• To widen the applicability of the sensors.

• We can monitor the surroundings of the environment through the sensors.

61
Chapter 7. Lab 3: Sensor Systems 62

Figure 7.1: Flow chart of SS lab

7.1 Experiment 3.1: Measuring temperature using


LM-35
Aim : To measure the room temperature of a place through Arduino using LM-
35.
T heory : LM-35 is an absolute temperature sensor which can measure the tem-
perature of the surroundings with in 100 to 500 feet. LM-35 output voltage is pro-
portional to the Celsius/Centigrade temperature which increments the output by 1
on every 10-mV change in temperature. LM-35 can measure from -50 to 150 degree
Celsius.
• Arduino analog pins work normally on +5 V.
• Resolution of analog pin starts from 0 to 1023.
• Maximum voltage of LM-35 is 1.5 V.
• Formula for converting the voltage into system input number = (V/5) *1023
The measured temperature can be viewed in the web-server with the help of code
shown in the Appendix A.
Circuit Diagram : As shown in Figure 7.2 resistor is connected in between
the temperature sensor and ground to avoid the sensor from burning.
Chapter 7. Lab 3: Sensor Systems 63

Figure 7.2: LM-35 connection with Arduino

Arduino IDE code :


1 const int sensor = A0 ;
2 float tempc ;
3 float tempf ;
4 float vout ;
5
6 void setup () {
7 pinMode ( sensor , INPUT ) ;
8 Serial . begin (9600) ;
9 }
10
11 void loop () {
12 vout = analogRead ( sensor ) ;
13 vout =( vout /1024.0) *5.0;
14 tempc = ( vout - 0.5) *100;
15 tempf =( tempc *1.8) +32;
16 Serial . print ( " in DegreeC = " ) ;
17 Serial . print ( " \ t " ) ;
18 Serial . print ( tempc ) ;
19 Serial . print ( " C ");
20 Serial . print ( " in Fahrenheit = " ) ;
21 Serial . print ( " \ t " ) ;
22 Serial . print ( tempf ) ;
23 Serial . println ( " F ");
24 delay (5000) ;
25 }

P rototype : All the connections are made as per the circuit diagram shown in
Figure 7.2 with the help of the breadboard in Figure 7.3
Chapter 7. Lab 3: Sensor Systems 64

Figure 7.3: LM-35 connection with Arduino

Results : We can find out the temperature of the environment in both Fahren-
heit and Celsius with LM-35 and update it to web server as shown in Figure 7.4.

Figure 7.4: Result of experiment - measuring temperature

7.2 Experiment 3.2: Finding the distance of the ob-


ject
Aim : To measure the distance of the object using ultrasonic sensor.
T heory : The ultrasonic sensor emits out the very high frequency sound pulse
and checks the time taken to reflect the sound back. It has two openings in front,
one for transmitting and other for receiving the sound waves. The sound travels with
Chapter 7. Lab 3: Sensor Systems 65

the speed of 341 meters per second in air. The time difference between the sending
and receiving will help to measure the of distance to the object and can be expressed
as:

Distance = T ime ∗ (speed of sound/2) m (7.1)

Ultrasonic sensors will measure contact less the following quantities:

• Distance;

• Level;

• Position;

• Presence;

• Diameter.

The measured distance can be viewed in the web-server with the help of code
shown in the Appendix B.
Circuit Diagram : As shown in Figure 7.5 the ultrasonic sensor has two com-
ponents transmitter and receiver. Transmitter will emit the sound wave and receiver
will receive the wave from the object (reflection of transmission wave from object)
and time taken will be calculated to measure the distance.

Figure 7.5: Ultrasonic sensor connection with Arduino

Arduino IDE code :


1 const int trigPin = 3;
2 const int echoPin = 2;
3 long duration ;
4 int distance ;
5 void setup () {
6 pinMode ( trigPin , OUTPUT ) ; // Sets the trigPin as an Output
Chapter 7. Lab 3: Sensor Systems 66

7 pinMode ( echoPin , INPUT ) ; // Sets the echoPin as an Input


8 Serial . begin (9600) ; // Starts the serial communication
9 }
10 void loop () {
11 digitalWrite ( trigPin , LOW ) ;
12 delayMicroseconds (2) ;
13 digitalWrite ( trigPin , HIGH ) ;
14 delayMicroseconds (10) ;
15 digitalWrite ( trigPin , LOW ) ;
16 duration = pulseIn ( echoPin , HIGH ) ;
17 distance = duration * 0.034 / 2;
18 Serial . print ( " Distance : " ) ;
19 Serial . println ( distance ) ;
20 delay (10) ;
21 }

P rototype : All the connections are made as per the circuit diagram shown in
Figure 7.5 in Figure 7.6.

Figure 7.6: Ultrasonic sensor connection with Arduino

Results : The distance of the object is measured and updated in the server as
shown in Figure 7.7.
Chapter 7. Lab 3: Sensor Systems 67

Figure 7.7: Result of experiment - finding the distance of the object

7.3 Experiment 3.3: Displaying Stopwatch in LCD


Aim : To display stopwatch through LCD and control the stopwatch through
start/stop button.
T heory : We come across LCD displays all around the world. Laptops, mobiles,
calculators, T.V, digital watches use display to display the digits. An LCD uses
the liquid crystal to show us the visible image, which Is an electronic device. In
circuits we generally use 16*2 LCD display which is most used. The 16 characters
are displayed in 2 lines, so we call it as a 16*2 display. Each character is displayed
in 5*7-pixel matrix. So here we now display the stopwatch with the LCD.
Circuit Diagram : As shown in Figure 7.8, potentiometer is connected to
LCD with Arduino to control and adjust the brightness of the Liquid crystal display.

Figure 7.8: LCD and push button connection with Arduino


Chapter 7. Lab 3: Sensor Systems 68

Arduino IDE code :


1 # include < LiquidCrystal .h >
2 LiquidCrystal lcd (7 , 6 , 5 , 4 , 3 , 2) ;
3 double i = 0;
4 double a = millis () ;
5 double c ;
6 void setup () {
7 lcd . begin (16 , 2) ;
8 lcd . clear () ;
9
10 Serial . begin (9600) ;
11
12 pinMode (8 , INPUT ) ;
13 digitalWrite (8 , HIGH ) ;
14 pinMode (9 , INPUT ) ;
15 digitalWrite (9 , HIGH ) ;
16 }
17
18 void loop () {
19 lcd . clear () ;
20 lcd . print ( " press start " ) ;
21 delay (100) ;
22

23 if ( digitalRead (8) == LOW ) {


24 lcd . clear () ;
25 a = millis () ;
26 while ( digitalRead (9) == HIGH )
27 {
28 c = millis () ;
29 i = ( c - a ) / 1000;
30 lcd . print ( i ) ;
31 lcd . setCursor (7 ,0) ;
32 lcd . print ( " Sec ’s " ) ;
33 lcd . setCursor (0 ,0) ;
34 Serial . println ( c ) ;
35 Serial . println ( a ) ;
36 Serial . println ( i ) ;
37 Serial . println ( " ...... " ) ;
38 delay (100) ;
39 }
40

41 if ( digitalRead (9) == LOW )


42 {
43 while ( digitalRead (8) == HIGH )
44 {
45 lcd . setCursor (0 ,0) ;
46 lcd . print ( i ) ;
47 lcd . setCursor (11 ,0) ;
48 lcd . print ( " " ) ;
49 lcd . setCursor (0 ,0) ;
50 delay (100) ;
51 }
52 }
53 }
54 }
Chapter 7. Lab 3: Sensor Systems 69

P rototype : All the connections are made as per the circuit diagram shown in
Figure 7.8 with the help of the breadboard in Figure 7.9.

Figure 7.9: LCD and push button connection with Arduino

Results : The stopwatch is displayed in LCD with the help of the push buttons
used for start/stop as shown in Figure 7.10.

Figure 7.10: Result of displaying stopwatch in LCD

7.4 Experiment 3.4: Traffic lights using LED’s


Aim : To switch the traffic lights with a pre-defined time.
T heory : LED (Light emitting diode) works with very little power. The digital
pin 13 is built in the Arduino board for the LED. LED’s have polarity will work only
Chapter 7. Lab 3: Sensor Systems 70

the legs are oriented in the proper way. The two legs of the LED, one leg goes for
the positive and other leg is for the ground. The LED has flat edge on one side of
the bulb. To protect the LED we should use resistors in series to protect it from
burning.
Circuit Diagram : As shown in Figure 7.11, resistors are used to safe guard
the Light emitting diodes from the higher voltage and prevent them from burning.

Figure 7.11: LED’s connection with Arduino

Arduino IDE code :


1 int red = 10;
2 int yellow = 9;
3 int green = 8;
4
5 void setup () {
6 pinMode ( red , OUTPUT ) ;
7 pinMode ( yellow , OUTPUT ) ;
8 pinMode ( green , OUTPUT ) ;
9 }
10
11 void loop () {
12 digitalWrite ( green , HIGH ) ;
13 digitalWrite ( yellow , LOW ) ;
14 digitalWrite ( red , LOW ) ;
15 delay (5000) ;
16 digitalWrite ( green , LOW ) ;
17 digitalWrite ( yellow , HIGH ) ;
18 digitalWrite ( red , LOW ) ;
19 delay (5000) ;
20 digitalWrite ( green , LOW ) ;
21 digitalWrite ( yellow , LOW ) ;
22 digitalWrite ( red , HIGH ) ;
23 delay (5000) ;
24 }

P rototype : All the connections are made as per the circuit diagram shown in
Figure 7.11 with the help of the breadboard in Figure 7.12.
Chapter 7. Lab 3: Sensor Systems 71

Figure 7.12: LED’s connection with Arduino

Results : The traffic lights are being controlled by the Arduino as shown in
Figure 7.13.

Figure 7.13: Result of traffic lights using LED

7.5 Experiment 3.5: Dark Sensing LED


Aim : To light up the LED when there is no sensing light (Dark) environment.
T heory : An LDR (Light Dependent Resistor) is a component which changes
its resistance depending upon the light intensity falling on it. These components are
used in light sensing circuits. In most common LDR if the light intensity is more
falling on it then the resistance will gradually decrease.
Chapter 7. Lab 3: Sensor Systems 72

The resistance of the LDR has the following


Daylight = 5 kΩ
Dark = 20 MΩ
Some of the application of LDR:
1. Lighting Switch,
2. Camera shutter control.
An LED is a small light which works with very little power. The digital pin 13
is built in the Arduino board for the LED. The LED has polarity will work only the
legs are oriented in the proper way. The two legs of the LED one leg goes for the
positive and other leg is for the ground. The LED has flat edge on one side of the
bulb. To protect the LED we should use resistors in series to protect it from burning.

T heory f or the coding : We will the check the Light Dependent Resistor(LDR)
for its analog values in the dark and the daylight conditions. So as per the values we
command the Arduino to light up the LED in the dark and to turn off the light in
the daylight condition using the if condition.

Circuit Diagram : As shown in Figure 7.15, resistors are kept for safe guard-
ing both Light dependent sensor and light emitting diode from high currents and
avoid it from burning.

Figure 7.14: LED and IR connection with Arduino

P rototype : All the connections are made as per the circuit diagram shown in
Figure 7.15 with the help of the breadboard in Figure 7.14.
Chapter 7. Lab 3: Sensor Systems 73

Figure 7.15: LED and IR connection with Arduino

Results : The light dependent sensor sensing no light and makes the LED to
light as shown in Figure 7.16.

Figure 7.16: Result of dark sensing light


Chapter 8
Conclusion and Future Work

8.1 Conclusion
As an overall conclusion we can say that Home Laboratories will be the best
solution for the students who are pursuing their distance education. Home Labs are
budget friendly when compared to University Labs. While designing these laborato-
ries there are many set backs for each and every lab. All the designing architecture of
the lab are done as per the requirement of it. The conclusion which we came across
after building the home laboratories are:

EDC lab:
We design the circuits as per the Arduino and eliminated all the unwanted com-
ponents. As we know the maximum voltage that can be supplied to the Arduino
is 5 V so we optimised the connections accordingly to make it 20 V which will be
required for performing the experiments for the lab. It is easy to obtain the values
of voltmeter from Arduino. Obtaining the values of ammeter is bit tricky so we used
some formulas to obtain the values.

LIC lab:
We planned on using Arduino as an oscilloscope but the amount of noise produced
was very high. We tried all the possible ways to isolate the noise but it became dif-
ficult for us. So, we used DSO138 oscilloscope in our project. It is mini version of
oscilloscope and perfectly suitable for our labs. The minimised version of the func-
tion generator we used is DDS signal generator and it is suitable for our experiments
in our lab. We updated some experiments output values directly to web interface so
that instructor can verify the values. Assembling and configuring of miniaturized kit
is one of main task before using them in the experiments.

Sensors lab:
We used Arduino as micro-controller so that it will be easy to control and co-
ordinate the sensors. Some of the sensors values are directly updated to web interface
so that instructor can verify the values. Documentation is done in a suitable way
such that every student can easily perform the experiments. Designed all the circuit
diagrams with Arduino as main component. In all the labs the heavy equipment
from laboratories are miniaturised and also, the values are updated in web interface.

74
Chapter 8. Conclusion and Future Work 75

As mentioned in the above sections Arduino is replaced for voltmeter and amme-
ter, a DS0138 oscilloscope for cathode ray oscilloscope, DDS function generator for
function generator. Most of the circuit connections are made according to Arduino
and experiment results are updated in web-interface via Arduino. We also replaced
the power station with DC power adapter (12 V).
All the documentation of the labs was prepared so clearly for the students to
prepare their own prototype to make it work and perform the experiment. Based
on the working prototype, we can conclude that the main aim and objectives of
the problem statement proposed have been achieved with proper design, testing and
calibration. Therefore, the working prototype is ready to be used by the student.
Three different electronic laboratories has been taken and implemented successfully.

8.2 Future work


The following advancements can be made to the prototype to make it into a more
functional device:

• Using camera a real-time surveillance can be made between the student and
lab instructor.

• Develop a cathode ray oscilloscope with the help of the Arduino and make it
display for the lab instructor via web.

• The analog current intake at the Arduino end can be rectified during future
work. More experiments can be introduced in a feasible way.

• It can also be implemented using advanced micro controller like Raspberry Pi.
Design many different electronic labs with the help of the miniaturized kit.

• Design a single equipment with characteristics of signal generator, oscilloscope


and DC power supply.
Bibliography

[1] M. Ozvoldova and P. Ondrušek, “Integration of online labs into educational


systems,” International Journal of Online Engineering (iJOE), vol. 11, no. 6,
p. 54, Nov. 5, 2015, issn: 1861-2121, 1868-1646. doi: 10.3991/ijoe.v11i6.
5145. [Online]. Available: http : / / online - journals . org / index . php / i -
joe/article/view/5145 (visited on 05/04/2020).
[2] R. Bose, “Virtual labs project: A paradigm shift in internet-based remote exper-
imentation,” IEEE Access, vol. 1, pp. 718–725, 2013, Conference Name: IEEE
Access, issn: 2169-3536. doi: 10.1109/ACCESS.2013.2286202.
[3] E. Zysman, “Multimedia virtual lab in electronics,” in Proceedings of Interna-
tional Conference on Microelectronic Systems Education, Jul. 1997, pp. 151–
152. doi: 10.1109/MSE.1997.612590.
[4] A. Jochheim and C. Rohrig, “The virtual lab for teleoperated control of real
experiments,” in Proceedings of the 38th IEEE Conference on Decision and
Control (Cat. No.99CH36304), ISSN: 0191-2216, vol. 1, Dec. 1999, 819–824
vol.1. doi: 10.1109/CDC.1999.832891.
[5] I. Titov, A. Glotov, Y. Andrey, and V. Petrov, “Labicom labs: Remote and
virtual solid-state laser lab, RF microwave amplifier remote and virtual lab:
Interactive demonstration of labicom labs in winter 2016,” in 2016 13th In-
ternational Conference on Remote Engineering and Virtual Instrumentation
(REV), Feb. 2016, pp. 336–338. doi: 10.1109/REV.2016.7444496.
[6] D. Buhler, W. Kuchlin, G. Grubler, and G. Nusser, “The virtual automa-
tion lab-web based teaching of automation engineering concepts,” in Proceed-
ings Seventh IEEE International Conference and Workshop on the Engineer-
ing of Computer-Based Systems (ECBS 2000), Apr. 2000, pp. 156–164. doi:
10.1109/ECBS.2000.839873.
[7] K. Henke, T. Vietzke, R. Hutschenreuter, and H.-D. Wuttke, “The remote lab
cloud "GOLDi-labs.net",” in 2016 13th International Conference on Remote
Engineering and Virtual Instrumentation (REV), Feb. 2016, pp. 37–42. doi:
10.1109/REV.2016.7444437.
[8] A. Khalil, M. Hasna, M. Benammar, M. Chaabane, and C. B. Amar, “Devel-
opment of a remote lab for electrical engineering program,” in 2009 3rd IEEE
International Conference on E-Learning in Industrial Electronics (ICELIE),
Nov. 2009, pp. 40–44. doi: 10.1109/ICELIE.2009.5413214.

76
BIBLIOGRAPHY 77

[9] B. Pitzer, S. Osentoski, G. Jay, C. Crick, and O. C. Jenkins, “PR2 remote lab:
An environment for remote development and experimentation,” in 2012 IEEE
International Conference on Robotics and Automation, ISSN: 1050-4729, May
2012, pp. 3200–3205. doi: 10.1109/ICRA.2012.6224653.
[10] C. Terkowsky, D. May, T. Haertel, and C. Pleul, “Experiential remote lab learn-
ing with e-portfolios: Integrating tele-operated experiments into environments
for reflective learning,” in 2012 15th International Conference on Interactive
Collaborative Learning (ICL), Sep. 2012, pp. 1–7. doi: 10.1109/ICL.2012.
6402097.
[11] V. Nerguizian, R. Mhiri, M. Saad, H. Kane, J.-S. Deschênes, and H. Saliah-
Hassane, “Lab@home for analog electronic circuit laboratory,” in 2012 6th
IEEE International Conference on E-Learning in Industrial Electronics (ICELIE),
Oct. 2012, pp. 110–115. doi: 10.1109/ICELIE.2012.6471157.
[12] J. P. Oliver and F. Haim, “Lab at home: Hardware kits for a digital design
lab,” IEEE Transactions on Education, vol. 52, no. 1, pp. 46–51, Feb. 2009,
Conference Name: IEEE Transactions on Education, issn: 1557-9638. doi: 10.
1109/TE.2008.917191.
[13] J. Sarik and I. Kymissis, “Lab kits using the arduino prototyping platform,” in
2010 IEEE Frontiers in Education Conference (FIE), ISSN: 2377-634X, Oct.
2010, T3C–1–T3C–5. doi: 10.1109/FIE.2010.5673417.
[14] I. Gustavsson, J. Zackrisson, J. S. Bartunek, K. Nilsson, L. Håkansson, I. Claes-
son, and T. Lagö, “A telemanipulator for remote wiring of electrical circuits
telemanipulator for remote wiring of electrical circuits,” 2008.
[15] I. Gustavsson, J. Zackrisson, K. Nilsson, J. Garcia-Zubia, L. Håkansson, I.
Claesson, and T. L. Lagö, “A flexible instructional electronics laboratory with
local and remote lab workbenches in a grid,” presented at the 2nd International
Workshop on e-learning and Virtual and Remote Laboratories, Universität
Potsdam, 2008. [Online]. Available: http://urn.kb.se/resolve?urn=urn:
nbn:se:bth-8606 (visited on 05/04/2020).
[16] J. Garcia-Zubia, P. Orduna, D. Lopez-de-Ipina, and G. R. Alves, “Addressing
software impact in the design of remote laboratories,” IEEE Transactions on
Industrial Electronics, vol. 56, no. 12, pp. 4757–4767, Dec. 2009, Conference
Name: IEEE Transactions on Industrial Electronics, issn: 1557-9948. doi: 10.
1109/TIE.2009.2026368.
[17] V. J. Harward, “iLab: A scalable architecture for sharing online experiments,”
2004.
[18] T. Richter, D. Boehringer, and S. Jeschke, “LiLa: A european project on net-
worked experiments,” in Automation, Communication and Cybernetics in Sci-
ence and Engineering 2009/2010, S. Jeschke, I. Isenhardt, and K. Henning,
Eds., Berlin, Heidelberg: Springer Berlin Heidelberg, 2011, pp. 307–317, isbn:
978-3-642-16207-7 978-3-642-16208-4. doi: 10.1007/978-3-642-16208-4_27.
[Online]. Available: http : / / link . springer . com / 10 . 1007 / 978 - 3 - 642 -
16208-4_27 (visited on 05/11/2020).
BIBLIOGRAPHY 78

<> D. Lowe, S. Murray, L. Weber, M. d. l. Villefromoy, A. J. Johnston, E. Lind-say,
W.Nageswaran,andA.Nafalski.(2009).LabShare:Towardsanationalap-proach
tolaboratorysharing,undefined.LibraryCatalog:www.semanticscholar.org,
[Online]. Available: /paper/LabShare%3A-Towards-a-National-Approach-to-
Laboratory-Lowe-Murray/231c8d694d06c8a0723b2cc752a1d40e1b9c451c
(visitedon 05/25/2020).
<> I. Gustavsson, J. Zackrisson, J. S. Bartunek, H. Åkesson, L. Håkansson, and
5 L. Lagö, “An instructional electronics laboratory opened for remote oper-
ation and control,” presented at the International Conference on Engineering
Education, 2006. [Online]. Available: http://urn.kb.se/resolve?urn=urn:
nbn:se:bth-10038(visitedon 05/25/2020).
<> H.AlbatainehandA.Obawomiye,“Implementingremotelaboratoriesfordigi-tal
electronics:Foundationsfordistancelearningandresourcesharing,” vol.4,no.2,
p.14,2016.
<> ArduinoUNOWIFIrev.2attherightprice@electrokit.LibraryCatalog:
www.electrokit.com, [Online]. Available: https://www.electrokit.com/en/
product/arduino-uno-wifi-rev-2/(visitedon 06/08/2020).
<> DDS signal generator at the right price @ electrokit. Library Catalog:
www.electrokit.com, [Online]. Available: https://www.electrokit.com/en/
product/dds-signal-generator/(visitedon 06/09/2020).
<> LM741cnattherightprice@electrokit.LibraryCatalog:www.electrokit.com,
[Online]. Available: https://www.electrokit.com/en/product/lm741cn-
dip-8-single-op-amp-2/(visitedon 06/09/2020).
<> Transformer48va2x12v2aattherightprice@electrokit.LibraryCatalog:
www.electrokit.com, [Online]. Available: https://www.electrokit.com/en/
product/transformer-48va-2x12v-2a/(visitedon 06/09/2020).
<> Distance sensor ultrasound HY-SRF05 2 – 400cm at the right price @
electrokit. Library Catalog: www.electrokit.com, [Online]. Available: https://
www.electrokit.com/en/product/distance- sensor- ultrasound- hy-
srf05-2-400cm/(visitedon 06/08/2020).
<> LCD 2×16 char JHD162a STN blue/white LED at the right price @ elec-trokit.
Library Catalog: www.electrokit.com, [Online]. Available: https://
www.electrokit.com/en/product/lcd-2x16-char-jhd162a-stn-blue-
white-led/(visitedon 06/08/2020).
<> PhotoresistorCdS2-5kohmattherightprice@electrokit.LibraryCatalog:
www.electrokit.com, [Online]. Available: https://www.electrokit.com/en/
product/photo-resistor-cds-2-5-kohm/(visitedon06/08/2020).
<> TMP36 TO-92 temperature sensor at the right price @ electrokit. Library
Catalog: www.electrokit.com, [Online]. Available: https://www.electrokit.
com/en/product/tmp36-to-92-temperature-sensor/(visitedon06/08/2020).
<> LEDred5mmstandardsoftattherightprice@electrokit.LibraryCatalog:
www.electrokit.com, [Online]. Available: https://www.electrokit.com/en/
product/led-red-5-mm-standard-soft/(visitedon 06/09/2020).
BIBLIOGRAPHY 79

<> DSO 138 oscilloscope DIY kit | JYE tech, [Online]. Available: https://
jyetech.com/dso-138-oscilloscope-diy-kit/(visitedon 06/09/2020).
<> PushbuttonPCB3mmblackattherightprice@electrokit.LibraryCata-log:
www.electrokit.com, [Online]. Available: https://www.electrokit.com/en/
product/push-button-pcb-3mm-black/(visitedon 06/08/2020).
<> P.Richards,“Resistor-transmission-linecircuits,”ProceedingsoftheIRE,vol.
36,no.2,pp.217–220,Feb.1948,ConferenceName:ProceedingsoftheIRE,
issn:2162-6634.doi:10.1109/JRPROC.1948.233274.
<> N.Williams,“Metallisedfilmcapacitorsforhighfrequency,highcurrentappli-
cations,”inIEEColloquiumonCapacitorsandInductorsforPowerElectronics
(Digest No: 1996/054),Mar. 1996,pp.4/1–4/4.doi:10.1049/ic:19960347.
<> BZX55c5v1 DO-35 5.1v at the right price @ electrokit. Library Catalog:
www.electrokit.com, [Online]. Available: https://www.electrokit.com/en/
product/bzx55c5v1-do-35-5-1v/(visitedon 06/09/2020).
<> 1n4007 DO-41 1000v 1a at the right price @ electrokit. Library Catalog:
www.electrokit.com, [Online]. Available: https://www.electrokit.com/en/
product/1n4007-do-41-1000v-1a-2/(visitedon 06/08/2020).
Appendices

80
Appendix A
WIFI code for measuring temperature

1 # include < SPI .h >


2 # include < WiFiNINA .h >
3
4

5 char ssid [] = " username " ; // your network SSID ( name )


6 char pass [] = " password " ; // your network password
7 int keyIndex = 0; // your network key Index number (
needed only for WEP )
8
9 int status = WL_IDLE_STATUS ;
10
11 const int sensor = A0 ;
12 float tempc ;
13 float tempf ;
14 float vout ;
15
16 WiFiServer server (80) ;
17
18 void setup () {
19 pinMode ( sensor , INPUT ) ;
20 Serial . begin (9600) ;
21
22 // attempt to connect to Wifi network :
23 while ( status != WL_CONNECTED ) {
24 Serial . print ( " Attempting to connect to SSID : " ) ;
25 Serial . println ( ssid ) ;
26 status = WiFi . begin ( ssid , pass ) ;
27
28 // wait 10 seconds for connection :
29 delay (10000) ;
30 }
31 server . begin () ;
32 // you ’ re connected now , so print out the status :
33 Serial . print ( " SSID : " ) ;
34 Serial . println ( WiFi . SSID () ) ;
35 IPAddress ip = WiFi . localIP () ;
36 Serial . print ( " IP Address : " ) ;
37 Serial . println ( ip ) ;
38 }
39
40
41 void loop () {
42 vout = analogRead ( sensor ) ; // Reading the value from sensor
43 vout =( vout /1024.0) *5.0;

81
Appendix A. WIFI code for measuring temperature 82

44 tempc = ( vout - 0.5) *100;


45 tempf =( tempc *1.8) +32; // Converting to Fahrenheit
46 Serial . print ( " in DegreeC = " ) ;
47 Serial . print ( " \ t " ) ;
48 Serial . print ( tempc ) ;
49 Serial . print ( " C ");
50 Serial . print ( " in Fahrenheit = " ) ;
51 Serial . print ( " \ t " ) ;
52 Serial . print ( tempf ) ;
53 Serial . println ( " F ");
54 // listen for incoming clients
55 WiFiClient client = server . available () ;
56 client . println ( " < html > " ) ;
57 client . println ( " < table style = ’ width :100% ’ , > " ) ;
58 client . println ( " <tr > " ) ;
59 client . println ( " <th > " ) ;
60 client . println ( " Temperature in Celsius : " ) ;
61 client . println ( tempc ) ;
62 client . println ( " C " ) ;
63 client . println ( " </ th > " ) ;
64 client . println ( " Temperature in Fahrenheit : " ) ;
65 client . println ( tempf ) ;
66 client . println ( " F " ) ;
67 client . println ( " </ th > " ) ;
68 client . println ( " </ tr > </ table > " ) ;
69 client . println ( " </ html > " ) ;
70 delay (5000) ;
71 }
72
Appendix B
WIFI code for measuring distance

1 # include < SPI .h >


2 # include < WiFiNINA .h >
3
4

5 char ssid [] = " username " ; // your network SSID ( name )


6 char pass [] = " password " ; // your network password
7 int keyIndex = 0; // your network key Index number (
needed only for WEP )
8
9 int status = WL_IDLE_STATUS ;
10 const int trigPin = 3;
11 const int echoPin = 2;
12 long duration ;
13 int distance ;
14
15 WiFiServer server (80) ;
16
17 void setup () {
18 pinMode ( trigPin , OUTPUT ) ;
19 pinMode ( echoPin , INPUT ) ;
20 Serial . begin (9600) ;
21 // Initialize serial and wait for port to open :
22 Serial . begin (9600) ;
23 while ( status != WL_CONNECTED ) {
24 Serial . print ( " Attempting to connect to SSID : " ) ;
25 Serial . println ( ssid ) ;
26 status = WiFi . begin ( ssid , pass ) ;
27
28 // wait 10 seconds for connection :
29 delay (10000) ;
30 }
31 server . begin () ;
32 // you ’ re connected now , so print out the status :
33 Serial . print ( " SSID : " ) ;
34 Serial . println ( WiFi . SSID () ) ;
35 IPAddress ip = WiFi . localIP () ;
36 Serial . print ( " IP Address : " ) ;
37 Serial . println ( ip ) ;
38 }
39
40
41 void loop () {
42 digitalWrite ( trigPin , LOW ) ;
43 delayMicroseconds (2) ;

83
Appendix B. WIFI code for measuring distance 84

44 digitalWrite ( trigPin , HIGH ) ;


45 delayMicroseconds (10) ;
46 digitalWrite ( trigPin , LOW ) ;
47 duration = pulseIn ( echoPin , HIGH ) ;
48 distance = duration * 0.034 / 2;
49 Serial . print ( " Distance : " ) ;
50 Serial . println ( distance ) ;
51 Serial . print ( " cm " ) ;
52 WiFiClient client = server . available () ;
53 client . println ( " < html > " ) ;
54 client . println ( " < table style = ’ width :100% ’ , > " ) ;
55 client . println ( " <tr > " ) ;
56 client . println ( " <th > " ) ;
57 client . println ( " Distance : " ) ;
58 client . println ( distance ) ;
59 client . println ( " cm " ) ;
60 client . println ( " </ th > " ) ;
61 client . println ( " </ tr > </ table > " ) ;
62 client . println ( " </ html > " ) ;
63 delay (5000) ;
64 }
65
Appendix C
EDC lab Manual
Electronic Devices and Circuits Lab
Manual

This lab manual is taken from our home university (Andhra University) and
modified according to our requirement.

Jyotheesh Reddy Kamasani


Nakkapalli Uday Suhas
Sai Jaswanth Yadala

In cooperation with
Introduction:
Electronic devices and circuits lab consist of diodes, transformers,
resistors and capacitors. It is basic lab of electronic components. This
laboratory covers the practical oriented work of the electronic circuits which
helps in developing the theoretical concepts for the students. This laboratory
helps a lot in practical world of the electronic circuits. The knowledge of these
practical are very much required for the engineers.

This lab is sub classified into two sections.


1. Diodes
2. Filters

The electronic devices and circuits lab is to understand the concepts,


working and its characteristics diodes and filters. It also provides the
information about the flow of current. This course is the foundation course for
all the electronics students. All the future courses will need the knowledge of
electronic devices and circuits lab.
Contents: Page. No
1. Characteristics of PN junction diode .................. 4-5
2. Characteristics of Zener diode .......................... 6-8
3. Characteristics of Light Emitting Diode ............ 9-10
4. Half Wave Rectifier ........................................ 11-13
5. Linear Wave Shaping ...................................... 14-20
Experiment 1. Characteristics of PN junction diode:
Aim:
To evolve the characteristics of PN diode in forward and reverse bias,
and to calculate Static and Dynamic Resistance.

Components Used:
1. Resistor – 270 Ω, 1 KΩ, 10KΩ, 30 KΩ -2 ,20 KΩ
2. IN 4007 diodes
3. Arduino Uno Rev 2
4. Potentiometer 10 KΩ
5. DC Power Supply (0-12V)
6. Breadboard
7. Connecting wires

Circuit Diagram:
Forward Bias:

Figure 1.1: Circuit diagram of PN in Forward Dias


Reverse Bias:
Figure 1.2: Circuit diagram of PN in reverse bias
Theory:
A P-N junction diode works only in one direction. The characteristics of
the diode are curve between voltage across the diode and current flowing
through the diode. The potential barrier does not allow the current to flow
when the circuits is open, and its external voltage is zero. So, the circuit current
is zero. When P-type (Anode) is connected to +ve terminal and n- type
(cathode) is connected to –ve terminal of the supply voltage is known as
forward bias. When diode is in the forward biased condition the potential
barrier is reduced. In the ON state of the diode at forward voltage, the
potential barrier altogether eliminated and current starts flowing through the
diode and in the circuit. The current increases with increasing forward voltage.
When N-type (cathode) is connected to positive terminal and P-type (Anode) is
connected negative terminal of the supply voltage is known as reverse bias and
the potential barrier across the junction increases. In the off state of the diode
resistance is very high and current is very low. The reverse bias current is due
to minority charge carriers.

Procedure:
Forward bias:
Make the Connections according to circuit diagram.
1. In forward bias, connect the positive end of battery to Anode and
negative end of the battery to Cathode of diode.
2. By varying the input voltage in steps of 0.1V, note corresponding
Voltmeter and Ammeter readings.
3. Plot the graph between forward voltage (Vf) and forward current (If).

Reverse bias:
1. Make the Connections according to circuit diagram.
2. In reverse bias, connect the positive end of battery to Cathode and
negative end of the battery to Anode of diode.
3. By varying the input voltage in steps of 1 volt, note corresponding
Voltmeter and Ammeter readings.
4. Plot the graph between Reverse voltage (Vs) and Reverse current (Ir)

Calculations:
1. Static resistance = V/ I at Q-point
2. Dynamic resistance = AV / AI at Q-point

Result:
V-I Characteristics of a pn-diode are obtained.
1. Static resistance is =
2. Dynamic resistance is =
Experiment 2. Characteristics of Zener diode.
Aim:
To evolve the Characteristics of Zener diode in reverse bias.

Components Used:
1. Zener diode IMZ 5.1V.
2. Resistors- 470 Ω , 30 kΩ, 20kΩ
3. Arduino Rev 2
4. DC power supply 12v
5. Breadboard
6. Potentiometer 10 kΩ.
7. Connecting wires

Circuit Diagram:

Figure 2.1: Circuit diagram of Zener diode in reverse bias

Theory:
A Zener diode Is specially made to operate the break down region which
is heavily doped p-n junction diode. Reverse bias was not conducted by the p-n
junction diode but in case if it is increased voltage starts conducting heavily
which is Break down voltage which may damage the device. So, to avoid such
high currents we connect resistors in series with Zener diode to maintain the
constant voltage across the terminals. It is used in voltage regulators

Procedure:
a) To Plot V-I Characteristics
1. Make the connections as shown in the circuit diagram,
2. Vary the RPS voltage from 0V to 30V in steps of 1V.
3. Tabulate the readings of Ammeter (Iz) and Voltmeter (Vz).
4. Plot the graph between Vz & Iz.
5. Calculate the break down voltage of given zener diode from the graph

Tabular Form:
Table 2 Voltage- Current characteristics of Zener diode
S.No Vs(volts) Vz(volts) Iz(mA)

Precautions:
1. Connections must be made carefully to avoid short circuit.
2. Readings must be taken without parallax error.
3. The readings should not exceed meter range.

Result:
Reverse bias voltage and current characteristics of a Zener diode are
obtained.
Experiment 3. Characteristics of Light Emitting Diode
Aim:
To determine the forward bias characteristics of the light emitting diode
(LED).

Components used:
1. L.E.D
2. Resistors 470 Ω ,10 kΩ,30 kΩ
3. Arduino Uno Rev 2
4. DC Power supply – 12V
5. Breadboard
6. Connecting wires

Circuit Diagram:

Figure 3.1: Circuit diagram of LED

Theory:
Light Emitting Diode (LED) will work only in forward biased condition in
this connection we connect cathode to the negative terminal and anode to
positive terminal of the battery. In the forward biased condition electrons from
n to p and holes from p to n. It is a kind of normal P-n junction diode. Under
reverse bias condition we cannot find out any carriers so there will be no
emission of the light. The flow of the current passing through LED will be
limited by connecting resistors in series to avoid it from the burning.
The resistor value (R) can be calculated by
R = (Vs-Vi)/2
Vs = supply voltage
Vi = LED voltage
I=LED current
Procedure:
1. Connections must be made as per the circuit diagram
2. By varying the voltage in steps related current in the ammeter is noted.
3. At the same time the glow intensity of the light emitting code is also to
be noted.
4. Taking voltage on x - axis and current on Y - axis that gives the forward
bias V characteristics, plot a graph.

Tabular Form
Table 3 Voltage-current characteristics of LED

S.No Vs(v) Vf(v) If(mA) Intensity of


glow

Precautions:
1. Connections must be made carefully to avoid short circuit.
2. Readings must be taken without parallel - ox error.
3. Readings should not exceed meter rang

Result:
Forward characteristics of a light emitting diode are obtained.
Experiment-4: Half Wave Rectifier
Aim:
To evolve Ripple Factor, Percentage Regulation of a Half Wave Rectifier
without filter.

Apparatus:
1. 0-12V Step down Transformer – 1No
2. IN4007 – 1No
3. Arduino Uno Rev 2
4. 100Ω resistor - 1No
5. Potentiometer - 1No
6. Breadboard
7. Connecting wires
Theory:
A Square wave is a periodic waveform which maintains itself at constant
level ‘V’ with respect to ground for a long time ‘t’ and changes abruptly through
another level ‘V’ and remains constant at that level for which a time to when
such a wave is given as an input to circuit.

High pass circuit:


Figure shows that output waveform of high pass circuit under the
condition for the cases.
Where, RC>>τ, output is in the form of hill.
RC= τ, output rises and falls exponentially.
RC<< τ, output consists of alternative and negative spikes.

Low pass circuit:


The low pass circuit is connected as shown in the figure and output is
taken across the capacitor. The reactance of capacitor decreases with increase
in frequency.
1. If RC>> τ, the output takes a long time to come to steady stage and as such
the transient response.
2. If RC<< τ, input signal is integrated and distorted.

Circuit Diagram:
Figure 4.1: Circuit Diagram of Half Wave rectifier

Tabular Form:
Table 4 Regulation of half wave rectifier
Load Current Vac (V) Vdc (V) Ripple % Regulation
factor=Vac/dc ((VNL-VL) *100

Model Graph:

Figure 4.2: Half wave rectifier model graph

Procedure:
1. Connections is made as per the circuit diagram.
2. Note down the no load voltage before applying the load to the Circuit.
3. Apply different load resistances by varying the decade resistance box or
Rheostat and note down different load voltages and Calculate
percentage regulation.
4. Observe the output waveform on CRO. Now put the CRO in DC
mode and find out value of Vm.
5. Now calculate Vac, Vrms, Ripple factor and other parameters of half
wave rectifier according to the formulae.
6. Now connect a shunt capacitor and repeat the above process.
7. For with filter put CRO in ac mode, and find out the value of V,
and calculate Vac and Vr(rms) and other parameters.
8. Plot the regulation curves.

Result:
Ripple factor of half wave filter is obtained without filter.
Experiment-5: Linear Wave Shaping
Aim:
To design Low Pass and High Pass RC circuits and observe the conditions
for which the circuits act’s as an integrator and differentiator.

Apparatus:
1. Resistor-10kohms
2. Capacitor-0.1μF
3. DDS Function Generator
4. DSO138 Oscilloscope and probes
5. 12V DC power supply
6. Breadboard
7. Connecting wires

Theory:
A Square wave is a periodic waveform which maintains itself at constant
level ‘V’ with respect to ground for a long time ‘t’ and changes abruptly through
another level ‘V’ and remains constant at that level for which a time to when
such a wave is given as an input to circuit.
High pass circuit:
Figure shows that output waveform of high pass circuit under the
condition for the cases.
Where, RC>>τ, output is in the form of hill.
RC= τ, output rises and falls exponentially.
RC<< τ, output consists of alternative and negative spikes.
Low pass circuit:
The low pass circuit is connected as shown in the figure and output is
taken across the capacitor. The reactance of capacitor decreases with increase
in frequency.
1. If RC>> τ, the output takes a fairly long time to come to steady stage and as
such the transient response.
2. If RC<< τ, input signal is integrated and distorted.

Procedure:
1. Connections are made as per the circuit diagram.
2. To the high pass circuit, a square wave input of amplitude 5V (p-p)
is given.
3. The time period of waveform is adjusted such that RC << τ, RC= τ and
RC>> τ to get spikes and tilted output respectively and their values are
noted.
4. Now to low pass circuit, a square wave input of amplitude 5V (p-p) is
given.
5. Time period of input signal is adjusted with the help of a function
generator such that RC<< τ and RC>> τ to get corresponding waveforms.
The time period and amplitude are noted.
6. For frequency response the output voltages are noted for different
frequencies by giving sine wave input of amplitude 5V.
7. Graphs are plotted for both input and output waveforms of both
circuits when RC<< τ and RC>>τ

Circuit Diagram:

Figure 5.1: Circuit diagram for high and low pass filter

Waveforms of low pass circuit:


Figure 5.2: Waveforms of low pass circuit

Figure 5.3: Waveforms of low pass circuit at different frequencies

Waveforms for high pass circuit:


Figure 5.4: Waveforms of high pass circuit

Figure 5.5 Waveforms of high pass circuit at different frequencies


Model graphs:
Figure 5.6: Model graph for high and low pass circuit

Figure 5.7: Model graph for high and low pass circuit

Observations:
Table 5 Gain charateristics
High Pass Circuit Low Pass Circuit

Frequency Voltage(o/p) Gain (dB) Frequency Voltage(o/p) Gain (dB)


Observations for waveforms:
High pass RC:
R= 10KΩ, C=0.01μF, T=RC=
F= , Time period=
Amplitude=
CASE 1: For RC<<τ CASE 2: ‘C>>τ CASE 3: ‘C==τ
Output Voltage= Output Voltage= Output Voltage=
V1= , V2= V1= , V2= V1= , V2=
Time period = Time period = Time period =
Low pass circuit:
CASE 1: For RC<<τ CASE 2: RC>>τ CASE 3: RC==τ
Output Voltage= Output Voltage= Output Voltage=
V1= , V2= V1= , V2= V1= , V2=
Time period = Time period = Time period =
A graph is drawn between output waveform and input waveforms of both
circuits for RC<< τ and RC>> τ.
Another graph is drawn between output voltage and frequency by taking
on Y-axis and X-axis respectively giving frequency response for both circuits.
Precautions:
1. Connections should be made properly.
2. Readings should be taken without parallax error.
3. Loose connections should be avoided.

Result:
The output waveforms of Low pass circuit and High pass circuit are
observed, and their frequency response is obtained.
Appendix D
LIC Lab Manual

Linear Integrated Circuits Lab


Manual

This lab manual is taken from our home university (Andhra University) and
modified according to our requirement.

Jyotheesh Reddy Kamasani


Nakkapalli Uday Suhas
Sai Jaswanth Yadala

in cooperation with
Introduction
We use op- amp, resistors, capacitors and function generator in this lab.
This lab is mainly on transistors. The linear integrated circuits lab deals with
different types of Analog IC, timers and regulators. In this laboratory design and
analysis of linear and nonlinear circuits using operational amplifiers. Identification
and verification of the IC's like LM741, 555timer will be done. Primary emphasis
placed on practical performance of circuits by analog IC's. The practical
information is studied related to output and input characteristics. This lab will
help students in doing further mini projects in the linear integrated circuits.
Objectives:
x To understand the characteristics of operational amplifier.
x To get the knowledge about the Special function integrated circuits.
x To use and apply operational amplifier in linear and non -linear
applications.
x Design oscillators and amplifiers using operational amplifiers.
x Analyze the performance of oscillators.
Contents Page. No

1: Experiment: Non-linear wave shaping ....................................4-7


2: Experiment: Measurement of Op-amp parameters ................ 8-13
3: Experiment: Schmitt trigger .................................................. 14-16
4: Experiment: Frequency response of Low Pass Active Filter ...... 17-19
5: Experiment: Frequency Response of High Pass Active Filter .... 20-22
Experiment-1: Nonlinear wave shaping
A. Clipper circuits:
Aim:
To observe waveforms of clipper circuits using
a) Positive clipper
b) Negative clipper
c) Two level clipper or Slicer circuit
Apparatus:
1. IN 4007 diodes - 2
2. Resistors 10 KΩ
3. 12V DC supply wire - 2
4. DDS function generator
5. Breadboard and Connecting wires
6. DSO138 Oscilloscope and probes.
Theory:
Clipping circuits are used to select the transmission that part of an arbitrary
waveform which lies above or below some reference voltage level. Clipping
circuits are referred to as voltage limiters, amplitude selectors or slicers.
1. A series combination of a diode, resistor and reference supply.
2. A network consists of several diodes, resistors and reference voltages.
3. Two emitter-coupled or cathode triodes, operating as an overdriven
difference amplifier.
Procedure:
1. Connections are made as per the circuit diagram.
2. For the positive clipper the diode is connected along with reference voltage
as shown by applying the input and output is observed in the CRO.
3. For the negative clippers the directions of diodes and the reference voltage
are reversed and by giving the input, the output is observed in the CRO.
4. For the slicer circuit two diodes along with reference voltages are
connected as shown and the output is observed on the CRO.
5. A sinusoidal input of 10 Vp-p, 1 kHz is given to positive clipper, negative
clipper and slicer circuit and the corresponding outputs are obtained.
Circuit diagrams and waveforms:
Figure 1.1: Positive peak clipping

Figure 1.2: Negative peak clipping

Figure 1.3: Positive base clipping

Figure 1.4: Negative bias clipping


Precautions:
1. Connections should be made properly.
2. Readings should be taken without parallax error.
3. Loose connections should be avoided.
Result:
The output waveforms of various clipper circuits are observed through non-
linear network.

B. Clamper circuits
Aim:
To observe the clamping circuit waveforms.
Apparatus:
1. 1.4.7μF Capacitor
2. IN 4007 diode
3. 1 MΩ Resistor
4. DDS function generator
5. Breadboard
6. DSO138 Oscilloscope and probes.
7. Connecting wires
Theory:
We know that capacitor block the passage of DC hence when a non-
sinusoidal periodic signal is transmitted as capacitance coupling circuit, it loses
the DC component. It is necessary to restore a DC invertor. In a damping circuit by
applying the sinusoidal input which begins at t=0, now capacitor is uncharged at
t=0, during first half quarter cycle, the input signal rises from zero to maximum
value (Vmax).
Procedure:
1. The circuit is connected as shown.
2. The input signal Vi of 10(Vp-p) frequency (1Kz) is applied to each of the
circuits.
3. The corresponding output waveforms are noted from the CRO.
4. The input and output waveforms are plotted on the graph sheet.
Circuit diagrams and waveforms:
Figure 1.5:Clamping to 0 volts

Figure 1.6: Clamping to Vr Volts

Precautions:
1. Connections should be made properly.
2. Readings should be taken without parallax error.
3. Loose connections should be avoided.
Result:
The output waveforms of various clamper circuits are observed through
non-linear network.
Experiment-2: Measurement of Op-amp parameters
Aim:
To measure the parameters of operational amplifier
Apparatus:
1. IC -741
2. Signal generator
3. Regulated power supply
4. Resistors - 100 KΩ (1)
-1 KΩ (2)
-10 KΩ (1)
5. CRO
Theory:
Op-amp is a direct coupled high gain negative feedback amplifier. It can
amplify signals having frequency range from 0 to 1MHz.Few commonly used
electrical parameters of op amp are as follows.
Input offset voltage:
When input voltage is 0v, the output voltage should be 0. But practically
there is some offset voltage at the output. The input offset voltage is defined as
voltage that must be applied between two input terminals of op-amp to nullify
output.
Input offset current:
It is a parameter defining the differential dc voltage required between the
inputs of an operational amplifier to make the output 0.
Input bias current:
Ideally no current flows into the input terminals of an op-amp. In practice
there are always two input bias current Ib+ and Ib- .
CMRR:
The abilities of a differential amplifiers to reject common mode signal is
expressed by its CMRR. It is defined as follows:
CMRR=|Ad/Ac| dB
Slew rate:
It is defined as the maximum rate of change of output voltage per unit time and is
expressed in volts per microseconds.
Procedure:
Input offset voltage:
1. Connect as per circuit diagram.
2. A dual dc voltage of 15V is given.
3. Input offset voltage is calculated by Vio= V/(1+Rf/R)
Input offset current:
1. Connect as per circuit diagram.
2. Is measured by dc- micro voltmeter.
3. Input offset current is measured by Iio =Vo /Rf.
CMRR:
1. Connect as per circuit diagram.
2.15V dc supply is given.
3. Input of 20V at 1 kHz is given through a signal generator.
4. Output voltage Vo is measured from CRO.
CMRR=1/ (1+ ( Rf /R)(Vi/Vo))
Slew Rate:
1. Connect as per circuit diagram.
2.15v dc supply is given.
3. Input signal of 2v is given through a signal generator.
4. Slew rate is calculated.
Circuit diagrams:
Input offset current:

Figure 2.1: Input offset current


Input offset voltage:

Figure 2.2: Input offset voltage

CMRR:

Figure 2.3: CMRR

Slew rate:
Figure 2.4: Slew rate

Input bias current:

Figure 2.5: Input bias current

IC741 pin diagram:


Figure 2.6: IC 741 pin diagram

Slew rate model graph:

Figure 2.7: Input and output graph of slew rate

Observations:
1. Input offset voltage Vio= Vo/ (1+Rf/Ro) =
2. Input offset current Io= Vo/ Rf =
3. Input bias current Ib = Vo/ Rf =
4. CMRR= 1 / (1+( Rf /R) (Vi/Vo)) or 20log(Ad / Acm)=
5. Slew rate = dVo/dt=
Precautions:
1. Connections should be made properly.
2. Loose connections are avoided.
3. Readings must be taken without any parallax error.
Result:
The parameters are calculated for the given op-amp as
Input offset voltage Vio =
Input offset current Iio =
CMRR =
Slew rate =
These values are compared with the theoretical values of parameters of op-amp.
Experiment-3. Schmitt trigger
Aim:
To observe the output waveforms of Schmitt Trigger circuit and calculate it’s
lower & upper triggering points.
Apparatus:
1. IC 741 Op-amp -1
2. Resistors 1 KΩ -2
3. Resistor 10 KΩ -1
4. DDS function generator
5. 12V DC power supply -2
6. Breadboard
7. Connecting wires
Theory:
The circuit shows an inverting comparator with positive feedback. This
circuit converts arbitrary waveforms to a square wave or pulse. The circuit is
known as the Schmitt trigger (or) squaring circuit. The input voltage Vin changes
the state of the output Vo every time it exceeds certain voltage levels called the
upper threshold voltage VUTP and lower threshold voltage VLTP . When VO= -Vsat,
the voltage across R1 is referred to as lower threshold voltage, Vlt. When Vo=
+Vsat, the voltage across R1 is referred to as upper threshold voltage Vut. The
comparator with positive feedback is said to exhibit hysteresis, a dead band
condition.
Procedure:
1. Connect the circuit as shown in Figure.
2. Apply sinusoidal waveform of 1 KHz frequency to input with the help of
signal generator.
3. A square wave output is obtained for corresponding input for which the
positive peak (+Vsat) and negative peak voltage ( -Vsat ) are noted.
4. Find the upper and lower threshold voltages (VUTP, VLTP) from the output
waveform.
Circuit diagram:
Figure 3.1: Circuit Diagram of Schmitt trigger

Pin diagram:

Figure 3.2: 7 Pin diagram of IC 741

Waveforms:
Figure 3.3: Input and output waveforms of schmitt trigger

Precautions:
1. Check the connections before giving the power supply.
2. Readings should be taken carefully.
Result:
Square wave o/p of a Schmitt Trigger circuit is observed for a Sinusoidal
signal. VUTP and VLTP are noted.
Experiment-4: Frequency response of Low Pass Active
Filter
Aim:
To design and obtain the frequency response of First order Low Pass Filter (LPF)
Apparatus:
1. IC 741.-1No
2. Resistors 10KΩ
3. Capacitors 0.01μf – 1No
4. DSO 138 Oscilloscope – 1No
5. 12v DC power supply – 2 No
6. DDS Function Generator -1No
Theory:
An LPF allows frequencies from 0 to higher cut of frequency, fH. At fH the
gain is 0.707 Amax, and after fH gain decreases at a constant rate with an increase
in frequency. The gain decreases 20dB each time the frequency is increased by 10.
Hence the rate at which the gain rolls off after fH is 20dB/decade or 6 dB/ octave,
where octave signifies a two-fold increase in frequency. The frequency f= fH is
called the cut off frequency because the gain of the filter at this frequency is
down by 3 dB from 0 Hz. Other equivalent terms for cut-off frequency are -3dB
frequency, break frequency, or corner frequency.
Design:
First order LPF:
To design a Low Pass Filter for higher cut off frequency fH = 4 KHz and pass
band gain of 2fH = 1/ (2πRC)
Assuming C=0.01 μF, the value of R is found from
R= 1/(2πfHC) Ω =3.97KΩ
The pass band gain of LPF is given by AF = 1+ (RF/R1) =2
Assuming R1=10 KΩ, the value of RF is found from RF=(AF-1) R1=10KΩ

Procedure:
1. Connections are made as per the circuit diagram shown in Fig 1.
2. Apply sinusoidal wave of constant amplitude as the input such that op-
amp does not go into saturation.
3. Vary the input frequency and note down the output amplitude at each step
as shown in
4. Plot the frequency response as shown in Fig
Circuit Diagram:

Figure 4.1: Circuit Diagram of low pass active filter

Tabular Form:
Input voltage Vin=
Table 4: Gain characteristics of low pass filter
Frequency O/P voltage Voltage Gain Gain in dB
Vo/Vi

Model Graph:
Figure 4.2: Frequency response characteristics

Precautions:
1. Check the connections before giving the power supply.
2. Readings should be taken carefully.

Result:
The frequency response of low pass active filter was obtained
Experiment-5: Frequency Response of High Pass Active
Filter
Aim:
To design and obtain the frequency response of First order Low Pass Filter (LPF)
Apparatus:
1. IC 741.-1No
2. Resistors 10 KΩ
3. Capacitors 0.01 μf – 1No
4. DSO 138 Oscilloscope – 1No
5. 12v DC power supply – 2 No
6. DDS Function Generator -1No
Theory:
The frequency at which the magnitude of the gain is 0.707 times the
maximum value of gain is called low cut off frequency. Obviously, all frequencies
higher than fL are pass band frequencies with the highest frequency determined
by the closed – loop band width all the op-amp
Design:
First order HPF:
To design a High Pass Filter for lower cut off frequency fL = 4 KHz and
pass band gain of 2fL = 1/(2πRC )
Assuming C=0.01 μF, the value of R is found from R = 1/(2πfLC) Ω =
3.97KΩ
The pass band gain of HPF is given by AF = 1+ (RF/R1) = 2
Assuming R1=10 KΩ, the value of RF is found from RF= (AF-1) R1=10KΩ

Procedure:
1. Connections are made as per the circuit diagram shown in Fig
2. Apply sinusoidal wave of constant amplitude as the input such that op-amp
does not go into saturation.
3. Vary the input frequency and note down the output amplitude at each step
as shown in Table
4. Plot the frequency response as shown in Fig
Circuit Diagram:

Figure 8.1: High Pass Filter

Tabular Form:
Input Voltage Vin=
Table 5: Gain characteristics of high pass filter

Frequency O/P voltage (V) Voltage gain Vo/Vi Gain in dB


Model Graph:

Figure 5.2: Frequency responsive characteristics

Precautions:
1. Check the connections before giving the power supply.
2. Readings should be taken carefully.

Result:
The frequency response of High pass active filter was obtained.
Appendix E
Sensors Lab Manual
Sensor Systems Lab Manual

Jyotheesh Reddy Kamasani


Nakkapalli Uday Suhas
Sai Jaswanth Yadala

In cooperation with
Introduction:
The aim of the sensor systems laboratory is to widen the applicability
and to develop the innovative sensor system solutions. The sensor systems
laboratory will cover all the design factors, algorithms, technologies will be in
used in the future generations . These systems are used in various fields like
security, entertainment, communication. In this laboratory sensor technologies
have the impact of the embedded design. A sensor is a converter which
converts the physical quantity into signal and observed by the instrument. They
are many types of sensors each one has its own role in the environment. Micro
controllers have a crucial role in this lab for functioning of the system. By this
lab we will take away the knowledge of sensors and its role and how it
participates in the future.

Objectives:
1. To know the working of the sensors.
2. To widen the applicability of the sensors.
3. We can monitor the surroundings of the environment through the
sensors.
Contents: Page. No

1. Measuring Temperature .................................. 3-7


2. Distance of the object .................................... 8-11
3. Stopwatch in LCD ......................................... 12-14
4. Traffic lights using LED’s ............................... 15-16
5. Dark sensing light ........................................ 17-18
Experiment 1: Measuring Temperature:
Aim:
To measure the room temperature of a place through Arduino using Lm-35.

Components Used:
1. Resistor - 470Ω
2. Temperature resistor (LM35)
3. Arduino Uno Rev 2
4. Breadboard
5. Connecting wires

Circuit Diagram:

Figure 1: Circuit Diagram of measuring temperature


Theory:
Lm-35 is an absolute temperature sensor which can measure the
temperature of the surroundings with in 100 to 500 feet. Lm-35 output voltage
is proportional to the Celsius/centigrade temperature which increments the
output by 1 on every 10-mV change in temperature. Lm-35 can measure from -
50 to 150 degree Celsius.
x Arduino analog pins work normally on +5 volts.
x Resolution of analog pin starts from 0 to 1023.
x Maximum voltage of Lm35 is 1.5 voltage.
x Formula for converting the voltage into system input number =
(V/1024)*5

Procedure:
1. Make connections as per circuit diagram
2. Connect the Arduino to pc and configure Arduino IDE.
3. Copy and verify the code in Arduino IDE.
4. Upload the code to arduino.
5. Now see the temperature through serial monitor and webserver.

Arduino IDE code to display in serial monitor:


const int sensor=A0;
float tempc;
float tempf;
float vout;

void setup() {
pinMode(sensor,INPUT);
Serial.begin(9600);
}

void loop() {
vout=analogRead(sensor);
vout=(vout/1024.0)*5.0;
tempc = (vout - 0.5)*100;
tempf=(tempc*1.8)+32;
Serial.print("in DegreeC=");
Serial.print("\t");
Serial.print(tempc);
Serial.print(" °C ");
Serial.print("in Fahrenheit=");
Serial.print("\t");
Serial.print(tempf);
Serial.println(" °F ");
delay(5000);
}

Arduino code to display in web server:


#include <SPI.h>
#include <WiFiNINA.h>

char ssid[] = "wifi username";


char pass[] = "wifi password";
int keyIndex = 0;
int status = WL_IDLE_STATUS;

const int sensor=A0;


float tempc;
float tempf;
float vout;

WiFiServer server(80);

void setup() {
pinMode(sensor,INPUT);
Serial.begin(9600);

while ( status != WL_CONNECTED) {


Serial.print("Attempting to connect to SSID: ");
Serial.println(ssid);
status = WiFi.begin(ssid, pass);

delay(10000);
}
server.begin();
// you're connected now, so print out the status:
Serial.print("SSID: ");
Serial.println(WiFi.SSID());
IPAddress ip = WiFi.localIP();
Serial.print("IP Address: ");
Serial.println(ip);
}

void loop() {
vout=analogRead(sensor); //Reading the value from sensor
vout=(vout/1024.0)*5.0;
tempc = (vout - 0.5)*100;
tempf=(tempc*1.8)+32; // Converting to Fahrenheit
Serial.print("in DegreeC=");
Serial.print("\t");
Serial.print(tempc);
Serial.print(" °C ");
Serial.print("in Fahrenheit=");
Serial.print("\t");
Serial.print(tempf);
Serial.println(" °F ");
// listen for incoming clients
WiFiClient client = server.available();
client.println("<html>");
client.println("<table style='width:100%',>");
client.println("<tr>");
client.println("<th>");
client.println("Temperature in Celsius : ");
client.println(tempc);
client.println("°C ");
client.println("</th>");
client.println("Temperature in Fahrenheit : ");
client.println(tempf);
client.println("°F ");
client.println("</th>");
client.println("</tr></table>");
client.println("</html>");
delay(5000);
}

Precautions:
1. Connections should be made properly.
2. Avoid loose connections.
3. Verify the code before uploading.

Result:
Temperature is measured with temperature sensor LM35.
Experiment 2. Distance of the object
Aim:
To measure the distance of the object using ultrasonic sensor .

Components Used:
1. Ultrasonic sensor
2. Arduino Uno Rev 2
3. Breadboard
4. Connecting wires

Circuit Diagram:

Figure-2 Circuit Diagram of finding the distance of the experiment

Theory:
The Ultrasonic sensor emits out the very high frequency sound pulse and
checks the time taken to reflect the sound back. It has two openings in front
one for transmitting and other for receiving the sound waves. The sound
travels with the speed of 341 meters per second in air. The time difference
between the sending and receiving will help to measure the of the object
The mathematical equation: Distance = Time *(speed of sound/2)
Ultrasonic sensors will measure the following without any contact with the
medium:
1. Distance
2. Level
3. Position
4. Presence
5. Diameter
Procedure:
1. Make connections as per circuit diagram
2. Connect the Arduino to pc and configure Arduino IDE.
3. Copy and verify the code in Arduino IDE.
4. Upload the code to Arduino.
5. Now we can find out the distance through serial monitor.

Arduino IDE code to display in Serial monitor:


const int trigPin = 3;
const int echoPin = 2;
long duration;
int distance;
void setup() {
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
Serial.begin(9600);
}
void loop() {
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distance = duration * 0.034 / 2;
Serial.print("Distance: ");
Serial.println(distance);
delay(10);
}

Arduino IDE code to display in Web server:


#include <SPI.h>
#include <WiFiNINA.h>

char ssid[] = "username"; //Enter your wifi username here


char pass[] = "password"; //Enter your wifi password here
int keyIndex = 0;

int status = WL_IDLE_STATUS;


const int trigPin = 3;
const int echoPin = 2;
long duration;
int distance;

WiFiServer server(80);

void setup() {
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
Serial.begin(9600);
}
while ( status != WL_CONNECTED) {
Serial.print("Attempting to connect to SSID: ");
Serial.println(ssid);
status = WiFi.begin(ssid, pass);

// wait 10 seconds for connection:


delay(10000);
}
server.begin();
// you're connected now, so print out the status:
Serial.print("SSID: ");
Serial.println(WiFi.SSID());
IPAddress ip = WiFi.localIP();
Serial.print("IP Address: ");
Serial.println(ip);
}

void loop() {
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distance = duration * 0.034 / 2;
Serial.print("Distance: ");
Serial.println(distance);
Serial.print(" cm");
WiFiClient client = server.available();
client.println("<html>");
client.println("<table style='width:100%',>");
client.println("<tr>");
client.println("<th>");
client.println("Distance: ");
client.println(distance);
client.println(" cm");
client.println("</th>");
client.println("</tr></table>");
client.println("</html>");
delay(5000);
}

Precautions:
1. Connections should be made properly.
2. Avoid loose connections.
3. Verify the code before uploading.

Result:
So, the distance of the object is measured with the ultra- sonic sensor.
Experiment 3. Stopwatch in LCD
Aim:
To display stopwatch through LCD and control the stopwatch through
start/stop button.

Components Used:
1. LCD Screen
2. 220Ω Resistor -(1)
3. 10kΩ potentiometer - (1)
4. Arduino Uno (any board)
5. Breadboard
6. Connecting wires
7. Push button - 2

Circuit Diagram:

Figure 3: Circuit diagram of stopwatch in LCD


Theory:
We come across LCD displays all around the world. Laptops, mobiles,
calculators, T.V, digital watches use display to display the digits. An L.C.D uses
the liquid crystal to show us the visible image which Is an electronic device. In
circuits we generally use 16*2 LCD display which is most used. The 16
characters are displayed in 2 lines, so we call it as a 16*2 display. Each
character is displayed in 5*7-pixel matrix. So here we now display the
stopwatch with the LCD.
Procedure:
1. Make connections as per circuit diagram.
2. Connect the Arduino to pc and configure Arduino IDE.
3. Copy and verify the code in Arduino IDE.
4. Upload the code to Arduino.
5. Now we can find out the stopwatch in the L.C.D.

Arduino IDE code:


#include<LiquidCrystal.h>
LiquidCrystal lcd(7, 6, 5, 4, 3, 2);
double i = 0;
double a = millis();
double c ;
void setup()
{
lcd.begin(16, 2);
lcd.clear();

Serial.begin(9600);

pinMode(8, INPUT);
digitalWrite(8, HIGH);
pinMode(9, INPUT);
digitalWrite(9, HIGH);
}

void loop(){
lcd.clear();
lcd.print("press start");
delay(100);

if(digitalRead(8) == LOW)
{

lcd.clear();
a = millis();
while(digitalRead(9) == HIGH)
{

c = millis();
i = (c - a) / 1000;
lcd.print(i);
lcd.setCursor(7,0);
lcd.print("Sec's");
lcd.setCursor(0,0);
Serial.println(c);
Serial.println(a);
Serial.println(i);
Serial.println(" ..... ");
delay(100);
}

if(digitalRead(9) == LOW)
{
while(digitalRead(8) == HIGH)
{
lcd.setCursor(0,0);
lcd.print(i);
lcd.setCursor(11,0);
lcd.print("");
lcd.setCursor(0,0);
delay(100);
}
}
}
}

Precautions:
1.Connections should be made properly.
2.Avoid loose connections.
3.Verify the code before uploading.

Result:
The Stopwatch is displayed in the Liquid Crystal display with the
start/stop button.
Experiment 4. Traffic lights using LED’s
Aim: To control the traffic lights by switching LED’s with time.

Components Used:
1.Red, orange, green LED – 1No
2. 470Ω – 3No
3. Arduino Uno (any board)
4. Push button
5. Breadboard
6. Connecting wires

Circuit Diagram:

Figure Error! No text of specified style in document.4: Circuit Diagram of traffic lights using
LED's

Theory:
An L.E.D(Light emitting diode) is a small light which works with very little
power. The digital pin 13 is built in the Arduino board for the L.E.D. LEDs have
polarity will work only the legs are oriented in the proper way. The two legs of
the L.E.D one leg goes for the positive and other leg is for the ground. The L.E.D
has flat edge on one side of the bulb. To protect the L.E.D we should use
resistors in series to protect it from burning.

Procedure:
1. Make connections as per circuit diagram.
2. Connect the Arduino to pc and configure Arduino IDE.
3. Copy and verify the code in Arduino IDE.
4. Upload the code to Arduino.
5. Now we can see the L.E.D lights up.

Arduino IDE code:


int red = 10;
int yellow = 9;
int green = 8;

void setup() {
// put your setup code here, to run once:
pinMode(red, OUTPUT);
pinMode(yellow, OUTPUT);
pinMode(green, OUTPUT);

void loop(){
// put your main code here, to run repeatedly:
digitalWrite(green, HIGH);
digitalWrite(yellow, LOW);
digitalWrite(red, LOW);
delay(5000);
digitalWrite(green, LOW);
digitalWrite(yellow, HIGH);
digitalWrite(red, LOW);
delay(5000);
digitalWrite(green, LOW);
digitalWrite(yellow, LOW);
digitalWrite(red, HIGH);
delay(5000);
}

Precautions:
1.Connections should be made properly.
2.Avoid loose connections.
3.Verify the code before uploading.

Result:
Traffic lights with LED’s are achieved with time difference.
Experiment 5. Dark sensing light
Aim:
To light up an LED automatically if the room has no light present in it.

Components Used:
1. L.E.D
2. Resistors 470Ω - 1
3. Photo Resistor
4. Arduino Uno (any board)
5. Breadboard
6. Connecting wires

Circuit Diagram:

Figure-5 Circuit Diagram of dark sensing light

Theory:
An LDR (Light Dependent Resistor) is a component which changes its resistance
depending upon the light intensity falling on it. These components are used in
light sensing circuits. In most common LDR if the light intensity is more falling
on it then the resistance will gradually decrease.
The resistance of the LDR have the following
Daylight = 5000Ω
Dark = 20000000Ω
Some of the application of LDR:
1. Lighting Switch
2. Camera shutter control
An L.E.D(Light emitting diode) is a small light which works with very little
power. The digital pin 13 is built in the Arduino board for the L.E.D. LEDs have
polarity will work only the legs are oriented in the proper way. The two legs of
the L.E.D one leg goes for the positive and other leg is for the ground. The L.E.D
has flat edge on one side of the bulb. To protect the L.E.D we should use
resistors in series to protect it from burning.

Theory for the coding:


We will the check the LDR for its analog values in the dark and the
daylight conditions. So as per the values we command the LDR to light up the
LED in the dark and to turn off the light in the daylight condition using the if
condition.

Procedure:
1. Make connections as per circuit diagram.
2. Connect the Arduino to pc and configure Arduino IDE.
3. Design the code with the help of the instructor.
4. Upload the code to Arduino.
5. Now we can see the L.E.D lights up.

Precautions:
1.Connections should be made properly.
2.Avoid loose connections.
3.Verify the code before uploading.

Result:
We can see the LED lighting up in the dark.
Blekinge Institute of Technology, 371 79 Karlskrona, Sweden

You might also like