Arduino Based Home Electronics Labs: Basic-& Advanced-Electronics and Sensors Approaches
Arduino Based Home Electronics Labs: Basic-& Advanced-Electronics and Sensors Approaches
University Supervisor:
Prof. Wlodek J. Kulesza
Department of Mathematics and Natural Science
Abstract
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.
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
DC Direct Current
IC Integrated Circuits
PC Personal Computer
iii
RMIT Royal Melbourne Institute of Technology
US Unitated States
3D Three-Dimensional
iv
Contents
Abstract i
Acknowledgments ii
Acronyms iii
List of Tables x
List of Equations xi
1 Introduction 1
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
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
vii
5.23 Waveform of high pass circuit at medium frequency . . . . . . . . . . 37
5.24 Waveform of high pass circuit at high frequency . . . . . . . . . . . . 37
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
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;
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.
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.
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.
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].
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.
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.
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.
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.
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
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
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.
is extra unique than thermistor output [29]. Figure 4.8 shows a view of LM-35
temperature sensor.
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.
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.
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
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
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
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.
21
Chapter 5. Lab 1: Electronic Devices and Circuits 22
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) ;
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.
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.
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.
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
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.
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
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
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.
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
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
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.
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
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
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
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
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.
Labs objectives:
38
Chapter 6. Lab 2: Linear Integrated Circuits 39
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
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
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.
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
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.
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
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.
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
Results : Low pass filter attenuates the high frequencies and produces low fre-
quency signals as shown in Figure 6.35.
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.
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
Results : High pass filter attenuates the low frequencies and produces high
frequency signals as shown in Figure 6.38.
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.
Labs objectives:
61
Chapter 7. Lab 3: Sensor Systems 62
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
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.
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;
• 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.
P rototype : All the connections are made as per the circuit diagram shown in
Figure 7.5 in Figure 7.6.
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
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.
Results : The stopwatch is displayed in LCD with the help of the push buttons
used for start/stop as shown in Figure 7.10.
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.
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
Results : The traffic lights are being controlled by the Arduino as shown in
Figure 7.13.
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.
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
Results : The light dependent sensor sensing no light and makes the LED to
light as shown in Figure 7.16.
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.
• 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.
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
81
Appendix A. WIFI code for measuring temperature 82
83
Appendix B. WIFI code for measuring distance 84
This lab manual is taken from our home university (Andhra University) and
modified according to our requirement.
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.
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:
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:
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:
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
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.
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:
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
Figure 5.7: Model graph for high and low pass circuit
Observations:
Table 5 Gain charateristics
High Pass Circuit Low Pass Circuit
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
This lab manual is taken from our home university (Andhra University) and
modified according to our requirement.
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
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
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:
CMRR:
Slew rate:
Figure 2.4: 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:
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:
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:
Tabular Form:
Input Voltage Vin=
Table 5: Gain characteristics of high pass filter
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
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
Components Used:
1. Resistor - 470Ω
2. Temperature resistor (LM35)
3. Arduino Uno Rev 2
4. Breadboard
5. Connecting wires
Circuit Diagram:
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.
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);
}
WiFiServer server(80);
void setup() {
pinMode(sensor,INPUT);
Serial.begin(9600);
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:
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.
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);
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:
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.
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:
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.
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