Venky Idr Final
Venky Idr Final
Venky Idr Final
TRAINING
ANDHRA PRADESH
INDUSTRIAL TRAINING ON
CENTRAL INSTITUTE OF TOOL DESIGN MSME,TOOLROOM
VIJAYAWADA
SUBMITTED TO
State Board Of Technical Education And Training, AP
In Partial Fullfillment For The Award Of the Degree Of
DIPLOMA
In
ELECTRONICS AND COMMUNICATION ENGINEERING
SUBMITTED BY
JAVVADI SAI VENKATESH
(22351-EC-021)
Under esteemed Guidance of
Sri. T.NARENDRA KUMAR, M.Tech,M.I.S.T.E
DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING
AND
INTERFACING MODULES
INDUSTRIAL TRAINING
Submitted by
JAVVADI SAI VENKATESH (22351-EC-021)
IN PARTIAL FULFILLMENT FOR THE AWARD OF DIPLOMA IN
DEPARTMENT
&
Miss. G. MARY EVANGELIN (B.Tech)
FACULTY OF ESDM
NOVEMBER 2024
I
ELECRTRONICS AND COMMUNICATION ENGINEERING
DVR & DR.HS MIC COLLGE OF TECHNOLOGY, KANCHIKACHERLA
BONAFIDE CERTIFICATE
and Pin No: 22351-EC-021 submitted in partial fulfillment of the requirements for the
award of the Diploma in Electronics And Communication Engineering from SBTET, AP.
II
ELECRTRONICS AND COMMUNICATION ENGINEERING
ACKNOWLEDGEMENTS
During the industrial training, we learnt a lot from different experts in the field
of Electrical & Electronic Components and Interfacing Modules. We have
referred to the current research papers in the subject of “Electrical and
electronics” and various other related papers. Also, we honor the suggestions
given by our faculty and friends.
We express our profound regards and extend our gratitude to our Sri.
S.VENKATA KRISHNA Deputy director (Trg./APCU) and giving their
valuable suggestions and guidance in completing this industrial training.
Finally, we also express our thanks to the management and faculty members of
VLSI and Embedded system, CENTRAL INSTITUTE OF TOOL DESIGN
and our family members for providing financial and moral support.
We wish to express our warm and sincere thanks to our Faculties Mr. G. RATNA
PRAKASH and Miss. G. MARY EVANGELIN for their valuable suggestions
III
ELECRTRONICS AND COMMUNICATION ENGINEERING
ABSTRACT
In this course contains so many novel technologies in real time world. Based on
electrical and electronic system which includes basics, implementation methods
and industrial management methods, it also includes requirements of the
domestic peoples, services, government schemes to implement in easiest way
with less economical aspect. It gives knowledge on electrical and electronic
system automation/digital/smart/virtual by the different methods of Analysis,
Design, Implementations, Coding and Testing Electrical and Electronic
Devices Handson Practice. In this course includes so many different methods
and usage of hardware like elements and components, digital ICs like 8086,
8051, Arm7, IOT, Arduino, Raspberry pi with different input and output
modules, processing modules, storage modules and communication protocols
used in real time applications. This learns all the above topics by using
computer-based software tools like Keil, C, Proteus 8 professional, Turbo C,
Arduino tool, Auto tinkering card and operating systems. By using the above
tools, we design different projects /experiments / modules based on hardware
components and usage of different software languages like assembly language,
embedded c language, C language and Arduino C language etc. We have done
many real time projects like traffic lights, digital clock, visitor counter, ATM
running machine, shopping complex display machine and SMS based energy
meter operation using simulation tools and hardware tools, based on hands on
practice. We concluded that Industrial training is merged a great knowledge in
academics with learning and earning to furnish the bright future during the
employ ability and to establish a new firm/entrepreneurship to create the jobs
based on new innovative real time projects in the subject of electrical and
electronics engineering.
IV
ELECRTRONICS AND COMMUNICATION ENGINEERING
CONTENTS
Chapter -1:
BASIC ELECTRICAL COMPONENTS
1.1 Resistor..........................................................................................................1
1.2 Inductor......................................................................................................... 2
1.3 Capacitor....................................................................................................... 2
1.4 Diode............................................................................................................. 2
1.5 Transistor.......................................................................................................3
1.6 Transformer................................................................................................... 5
1.7 LED............................................................................................................... 5
1.8 Protective Switch...........................................................................................5
1.9 Seven Segment Display.................................................................................6
1.10 Stepper Motor............................................................................................... 6
1.11 Keypad.......................................................................................................... 6
1.12 Buzzer........................................................................................................... 6
1.13 555 IC........................................................................................................... 7
1.14 Regulated Power Supply.............................................................................. 7
Chapter -2:
DC THEOREM’S
2.1 KVL (Kirchhoff's Voltage Law)..................................................................... 8
2.2 KCL (Kirchhoff's Current Law)....................................................................... 9
2.3 Thevenin’s Theorem......................................................................................9
2.4 Norton’s Theorem........................................................................................ 11
2.5 Reciprocity Theorem....................................................................................12
2.6 Super Position Theorem............................................................................... 13
2.7 Maximum Power Transfer Theorem............................................................ 14
Chapter -3:
DIGITAL IC’s
3.1 Introduction of MICROPROCESSER (8086)........................................... 15
3.1.1 Architecture Description............................................................................ 15
3.1.2 Features of 8086......................................................................................... 15
3.1.3 Description of 8086.................................................................................... 15
3.2 Introduction of MICROCONTROLLER (8051)....................................... 16
3.2.1 Features of 8051......................................................................................... 16
3.2.2 Pin Description of 8051..............................................................................17
3.2.3 Registers in 8051........................................................................................ 18
3.2.4 Operations of Modes.................................................................................. 20
3.2.5 Addressing Modes of 8051.........................................................................20
3.2.6 Instruction set of 8051................................................................................ 20
V
ELECRTRONICS AND COMMUNICATION ENGINEERING
3.3 Instruction to ARM Architecture................................................................21
3.4 Introduction of ARDUINO........................................................................ 22
3.5 Microcontroller Programs.......................................................................... 23
Chapter -4:
C-PROGRAM
4.1 Introduction....................................................................................................... 37
4.2 Why Should We Learn C?................................................................................ 37
4.3 Structure of the C program...............................................................................37
4.4 Components of a C Program............................................................................ 37
4.5 Keywords of C................................................................................................. 38
4.6 Preprocessor directives of C............................................................................. 38
Chapter-5:
ARDUINO
5.1 Introduction......................................................................................................43
5.2 Types of Arduino Boards.................................................................................43
5.3 Arduino Uno.................................................................................................... 43
5.4 Arduino Power Supply.....................................................................................44
5.5 Software........................................................................................................... 44
5.6 Programming................................................................................................... 46
Chapter-6:
PYTHON
6.1 Introduction......................................................................................................50
6.2 Control Flows And Loops................................................................................ 51
6.3 Functions And Arrays...................................................................................... 52
6.4 Lists,Tuples And Dictionaries......................................................................... 53
6.5 Files Exceptions , Modules And Packages....................................................... 55
Chapter-7:
INTERNET OF THINGS
7.1 Introduction........................................................................................................56
7.2 History Of IOT....................................................................................................57
7.3 Cloud..................................................................................................................58
7.4 Sensors..............................................................................................................59
7.5 Actuator..............................................................................................................59
. 7.6 Wireless Technology........................................................................................60
VI
ELECRTRONICS AND COMMUNICATION ENGINEERING
7.7 Data Managment And Analytics..................................................................... 60
7.8 IOT Platforms And Tools................................................................................ 61
Chapter-8:
RASPBERRY PI
8.1 Introduction.....................................................................................................62
8.2 Raspberry Pi Applications.............................................................................. 63
8.3 Types Of Raspberry Pi................................................................................... 64
8.4 Setting Up Your Raspberry Pi........................................................................ 65
8.5 Software...........................................................................................................65
CONCLUSION............................................................................................. 66
FUTURE SCOPE......................................................................................... 67
VII
ELECRTRONICS AND COMMUNICATION ENGINEERING
CHAPTER -1
BASIC ELECTRICAL COMPONENTS
1.0 INTRODUCTION:
A system is an arrangement of electronic components of both active and passive
in which all its units assemble and work together according to the plan or program in electronic
and electrical circuits. So, the passive components are like resistor, inductor, capacitor and
active components are like diode, transistor, Thyristor, small IC’s, large IC etc. with different
input and output loads.
1.1 RESISTOR:
The device which opposes the flow of current in ac and dc electrical
circuits. It is denoted as R. The symbol of resistor and its color band is
1) The 4th band indicates tolerance. 2) The 3rd band indicates multiplier.
3) The 2nd band indicates the first digit. 4) The 1st band indicate second digit
Types of Resistors:
A) Fixed Resistor B). Variable Resistors
1). Carbon Composition Resistors 1). Potentiometer
2). Carbon film Resistors 2). Wire wound Resistors.
3). Metal film Resistors. 3). Rheostat
1
ELECTRONICS& COMMUNICATION ENGINEERING
1.2 INDUCTOR:
An inductor is a device which can store magnetic energy based on faraday’s laws
of electromagnetic induction. It is denoted by letter L, and its units are Henrys.
• Inductor easily passes DC (constant) signals.
• Inductors blocks AC (changing) signals.
The symbol of Inductor is:
Applications:
Tuning circuits, sensors, filters, chokes, transformers, relays....
1.3 CAPACITOR:
Capacitors are passive elements which can be able to store electric energy. It is denoted
by letter C, and its units are Faradays.
The symbol of Capacitor is:
1.4 DIODE:
A Diode is a semiconductor device that conducts electric current only in one direction. It
has two terminals, an anode and cathode. These are mostly used in converting AC to DC
circuits.
The symbol of Diode is:
2
ELECTRONICS& COMMUNICATION ENGINEERING
Based on applications diodes are divided into two types:
> PN Junction
> ZENER Diode
Applications of Diode:
Rectifying a voltage, such as turning AC into DC.
Isolating signals from a supply.
Controlling the size of a signal.
PN JUNCTION DIODE:
A PN junction is formed when an N-type material is fused together with a P-type material
creating a semiconductor diode. PN junction diode is to allow an electric current in one
direction (called the forward direction) while blocking current in the opposite direction (the
reverse direction). The forward breakdown voltage of Germanium (Ge) is 0.3V and silicon (Si)
is 0.7V.
ZENER DIODE:
A Zener diode is a type of diode that permits current in the forward direction like a normal
diode, but also in the reverse direction if the voltage is larger than the breakdown voltage
known as "Zener knee voltage" or "Zener voltage". Normal diodes are not designed to operate
in the breakdown region, whereas Zener diodes operate reliably in this region.
Zener diodes are used to protect circuits from over voltage.
1.5 TRANSISTOR:
A transistor acts as an electrically controlled switch 0r an current amplifier. A transistor
is a semi-conductor device commonly used to amplify or switch electronic signals. A voltage
or current applied to one pair of the transistor's terminals changes the current flowing through
another pair of terminals. Because the controlled (output) power can be much more than the
controlling (input) power, the transistor provides amplification of a signal.
3
ELECTRONICS& COMMUNICATION ENGINEERING
Applications of Transistor:
Transistors are used in digital and analog circuits as a switch.
Uses in signal amplifier devices Cellular phones would be one of the most widely
used applications of transistors.
Every cell phone uses a transistor amplifier.
Uses in power regulator and controllers
TRANSISTOR TYPES:
• Bipolar Junction Transistor (BJT)
➢ NPN: A small input current and a positive voltage applied @ its base (with VB>VE) allows
a large current to flow from collector to emitter.
➢ PNP: A small output current and a negative voltage @ its base (with VB<VE) allows a
much larger current to flow from emitter to collector.
4
ELECTRONICS& COMMUNICATION ENGINEERING
1.6 TRANSFORMER:
A transformer is a power converter that transfers AC electrical energy through inductive
coupling between circuits of the transformer's windings. A varying current in the primary
winding creates a varying magnetic flux in the transformer's core and thus a varying magnetic
flux through the secondary winding. This varying magnetic flux induces a varying
electromotive force (EMF), or "voltage", in the secondary winding. This effect is called
inductive coupling.
If a load is connected to the secondary winding, current will flow in this winding, and electrical
energy will be transferred from the primary circuit through the transformer to the load.
Transformers may be used for AC-to-AC conversion of a single power frequency.
• The materials used in LED’s are the mixtures of Gallium (Ga), Arsenide (As),
Phosphorous (P). The materials include-GaAs, GaP, GaAsP
COLOUR VALUE VOLTAGE COLOUR VALUE VOLTAGE
White 100Ω 3.3V Red 200 Ω 2.1V
Yellow 200Ω 2.2V Green 100 Ω 3.7V
Blue 100Ω 3.1V Green 100 Ω 2.5V
Table 1.7 LED Specifications
5
ELECTRONICS& COMMUNICATION ENGINEERING
1.9 SEVEN SEGMENT DISPLAY:
A seven-segment display less commonly known as a seven-segment indicator is a
form of display device that is an alternat electronics as a method of displaying decimal numeric
feedback on the internal operations of devices.
Fig 1.9.(a) Common Cathode Fig 1.9.(b) Common Anode Fig 1.9.(c) Display
1.11 KEYPAD:
Keypads are the mostly used input devices of the 8051/52.Keypad is organized in a
matrix of rows and columns. The MCU accesses both rows and columns through ports;
therefore, with two 8-ports, an 8X8 matrix of keys can be connected to a microcontroller.
When a key is pressed, a row and a column make a contact; otherwise, there is no
connection between rows and columns.
It is the function of a program stored in the EPROM of the microcontroller to scan
the keyscontinuously, identify which one has been activated.
1.12 BUZZER:
A buzzer or beeper is a signaling device, usually electronic, typically used in
automobiles,household appliances such as a microwave oven, or game shows.
Typical uses of buzzers and beepers include alarm devices, times, train and
confirmation ofuser input such as a mouse click keystroke.
6
ELECTRONICS& COMMUNICATION ENGINEERING
1.13 555 IC:
This integrated circuit is used for timing. The 555 integrated circuit (IC) is a chip that is issued
in many school projects and commercially made items such as video recorders and timers.
The 555 has eight pins (legs) but the function of two is very important. These are pin two and
three.
PIN 2. This pin is where the current /voltage enters the chip and starts the timing sequence or
starts to count.
PIN 3. This is where the current comes out after the timer has completed counting.
7
ELECTRONICS& COMMUNICATION ENGINEERING
CHAPTER-2
DC THEOREMS
2.0 THEOREMS:
In mathematics, a theorem is a statement that has been proven on the basics of
previously established statements, such as other theorems and generally accepted statements,
such as axioms.
To obtain the verification of all theorems in proteus software
1) KVL 2) KCL 3) THEVINE'S
4) NORTON'S 5) RECIPROCITY 6) SUPER POSITION
7) MAXIMUM POWER TRANSFER
REQUIRED TOOLS:
• Resistors • Loads • Volt Meters & Current Meters
8
ELECTRICAL AND ELECRTRONICS ENGINEERING
2.2 KCL (KIRCHHOFF'S CURRENT LAW):
This Theory states the current in aclosed junction or point and states as following.
"The algebraic sum of the currents at any point is equal to zero".
(or)
"The sum of the currents entering the junction is equal to the sum of the currents leaving the
junction".
If we consider incoming current is positive and outgoing current is negative.
I1+I2+I3=I4+I5
INCOMING CURRENT =OUTGOING CURRENT
As shown in the figure the currents meeting at the junction make their sum zero i.e.as derived
below.
the sum of the current meeting is I1+I2+I3= [-5] + [2] + [3] =0
Hence the KCL is verified
Fig 2.3.(a) Thevenin's Resistance Rth Fig 2.3.(b) Where Vth open circuited
Rth= 1×2
+3 Voltage Drop at AB=0.02×100=2.5V
1+ 2
= 100×300
+ 200 Voltage Across BC= V-Vab
100+300
=2 Ω = (0-2.5)
Vth= 7.5V
Step2: Determine the Rth: (Vs is replaced by SC and current source is replaced by OC).
Step3: Determine of Thevenin's: Equivalent circuit load current
An active network having two terminal A&B can be replaced by a constant voltage source
having an EMF and terminal resistance.
The value of e is the open circuit voltage between a & b and r is the equivalent resistance of
the circuit with load removed and the source of EMF.
Ith=0.0111
10
ELECTRICAL AND ELECRTRONICS ENGINEERING
2.4 NORTONS THEORM:(It is derived from source transmission).
It states that any linear bilateral network can be replaced with can equivalent circuit
consisting of a current source (ISC)in parallel with resistance (Rn) across the load resistances...
(Where ISC short, circuited voltage across the two terminal and Rn is the equivalent resistance
of the network viewing from the load terminals. [while calculating Rn replaces all other
independent sources with their internal resistance by replacing current source with short
circuiting and current source with open circuit terminals].
Thevenin's theorem states that any liner circuit containing several voltages and
resistance can be replaced by just one single Current in parallel with a single resistance
connected across the load".
Step1: Determine of ISC: (ISC open circuited voltage across O/P)
Iab=Ibc=Icd=Ioc=Ith
Determination of RN Determine of VN
Fig 2.4.(a) Rth short, circuited voltage across O/P Fig 2.4.(b) Isc open circuited voltage across O/P
Step2: Determine the Rth: (Vs is replaced by SC and current source is replaced by OC)
Step3: Determine of Thevenin's equivalent circuit load current:
An active network having two terminal A&B can be replaced by a constant voltage
source having an EMF and terminal resistance. The value of e is the open circuit current
between a & b and r is the equivalent resistance of the circuit with load removed and the source
of EMF.
RN=220Ω RL=400Ω
IN=0.0327A VN=4.641v
IL=0.05A
11
ELECTRICAL AND ELECRTRONICS ENGINEERING
2.5 RECIPROCITY THEOREM:
The Reciprocity theorem states that any linear bilateral single source network. The ratio of
excitation to response is constant even when their positions are interchanged. (IT IS
AVERTICAL THEOREM).
The reciprocity theorem can't produce the accurate values for the AC because no of the
transient. The DC has no transient therefore the reciprocity theorem gives the accurate value
of the output. Hence the reciprocity theorem is verified.
When both I/p and o/p are interchanged the response are equal for give circuit is known as
reciprocity theorem.
LOOP 1: -I1R1-I3R3+10V
-I1(75) -(I1-I2) R3+10V=0
-I1(75+50) +I2(50) =-10
I1(125)-I2(50) =10
-I1(225) +I2(50) =0
I1=0.090A
LOOP 2: -I2R2-I2R2+(I1-I2)-R3
-I2R2-I2R2+I1R3-I2R3=0
I1(50)-I2(25+50)-I2(100) =0
I1150-I2(100+75) =0
I1(50)-I2(175) =0
I2=0.090A
12
ELECTRICAL AND ELECRTRONICS ENGINEERING
2.6 SUPER POSITION THEOREM:
In any linear bilateral network consisting of multiple sources, the response in any branch is
the algebraic sum of its responses due to the individual source acting alone).
While considering individual sources. All other independent sources are replaced with their
internal resistance.
If it is an ideal voltage source (internal resistance =0) therefore replaced with short circuit.
If it is an ideal current source (internal resistance= ∞) therefore replaced with open circuit.
Fig 2.6.(b) Super Position Theorem Fig 2.6.(c) Super Position Theorem
= . = .
Total Current Passing Through 3Ω = I1+I2 = 5.625A
13
ELECTRICAL AND ELECRTRONICS ENGINEERING
2.7 MAXIMUM POWER TRANSFER THEROEM:
Maximum power transfer theorem states that "maximum power is transferred from the
source to the load when the load resistance is equal to the Thevenin's equivalent resistance. (if
we draw Thevenin's equivalent circuit for any given network then loads current (IL)can be
given as. (Rth=RL). We know PL=IL²R
Fig 2.7.(a) Maximum Power Transfer Theorem (Circuit) g2.7.(b) Maximum Power Transfer Theorem (Rth)
40×20
ℎ= + 60
20+40
Rth=73.33Ω
In many electrical and electronic application, we are interested in the amount of power
received by a particular load (speaker, electrical motor, antenna). Electrical system is a
source of power and a load connected to that source. source-amplifiers generators, power
supplies. All linearly constructed sources can be reduced to their Thevenin equivalent.
In DC circuits, the load can be represented by a resistance RL
= =
20 − ℎ = 0
= ×= × =
( )
= =
× ×.
=
.
Pmax = 5.45W
14
ELECTRICAL AND ELECRTRONICS ENGINEERING
PROTEOUS 8 PROFESSIONAL:
Proteus Professional 8 is a widely used software suite primarily utilized for electronic
design automation (EDA), particularly in the development of printed circuit boards (PCBs)
and schematic capture. Here's an overview of its key features and functionalities:
PCB Design: Once the schematic is created, Proteus facilitates the design of the actual
PCBlayout. Users can place components, route traces, define board layers, and
perform design rule checks (DRC) to ensure the integrity of the PCB design.
Simulation: One of the standout features of Proteus is its powerful simulation capabilities.
Itprovides simulation tools for both analog and digital circuits
Overall, Proteus Professional 8 is a versatile and feature-rich software suite that caters to
theneeds of electronics engineers, hobbyists, and professionals alike,
providing comprehensivetools for designing, simulating, and prototyping electronic
circuits and PCBs.
15
ELECTRICAL AND ELECRTRONICS ENGINEERING
CHAPTER-3
DIGITAL IC’s
3.1 INTRODUCTION OF 8086:
8086 Microprocessor is an enhanced version of 8085 microprocessor that was
designed by Intel in 1976. It is a 16-bit Microprocessor having 20 address lines and 16 data
lines that provides up to 1MB storage. It consists of a powerful instruction set, which provides
operations like multiplication and division easily. It supports two modes of operation, i.e.,
maximum mode and minimum mode. Maximum mode is suitable for a system having multiple
processors and minimum mode is suitable for a system having a single processor. The 8086
(also called iAPX86) is a 16-bit microprocessor. The 8086 gave rise to the x86 architecture,
which eventually became Intel's most successful line of processors. The 8086 gave rise to the
x86 architecture, which eventually became Intel's most successful line of processors. On June
5, 2018, Intel 8086, called the Intel core i7-8086k.
b. Fetch stage
16
ELECTRICAL AND ELECRTRONICS ENGINEERING
Address/data bus:
AD0-AD15. These are 16 address/data bus.AD0-AD7 carries low order byte data and
AD8- AD15 carries higher order byte data. During the first clock cycle, it carries 16-bit address
and after that it carries 16-bit data.
Address/status bus:
A16-A19/S3-S6. These are the 2 address/status buses. During the first clock cycle, it
carries 4- bit address and later it carries status signals.
RESET:
It is available at pin 21 and is used to restart the execution. It causes the processor to
immediately terminate its present activity. This signal is active high for the first 4 clock cycles
to RESET the microprocessor.
17
ELECTRICAL AND ELECRTRONICS ENGINEERING
➢ 32 general purpose registers each of 8 bits.
➢ 16-bit timers (usually 2, but may have more, or less).
➢ 2 internal and 3 external interrupts.
➢ 16-bit program counter and data pointer.
➢ 1 Microsecond instruction cycle with 12 MHz Crystal.
➢ 4 KB on chip program memory. (ROM)
➢ The 8051 has an on-chip oscillator but requires an external clock to run it.
➢ A quartz crystal oscillator is connected to inputs XTAL1 and XTAL2.
➢ It also needs 2 capacitors of 30pF value.
➢ One side of each capacitor is connected to the ground as shown below:
Reset Circuit
➢ Pins 1&8: Port 1 Each of these pins can be configured as an input or an output.
18
ELECTRICAL AND ELECRTRONICS ENGINEERING
➢ Pin 9: RS A logic one on this pin disables the microcontroller and clears the contents of
most registers. In other words, the positive voltage on this pin resets the microcontroller. By
applying logic zero to this pin, the program starts execution from the beginning.
➢ Pins10-17: Port 3 Similar to port 1, each of these pins can serve as general input or output.
Besides, all of them have alternative functions:
➢ Pin 10: RXD Serial asynchronous communication input or Serial synchronous
communication output.
➢ Pin 11: TXD Serial asynchronous communication output or Serial synchronous
communication clock output.
➢ Pin 12: INT0 Interrupt 0 input.
➢ Pin 13: INT1 Interrupt 1 input.
➢ Pin 14: T0 Counter 0 clock input.
➢ Pin 15: T1 Counter 1 clock input.
➢ Pin 16: WR Write to external (additional) RAM.
➢ Pin 17: RD Read from external RAM
➢ Pin 21-28: Port 2
➢ Pin 29: PSEN If external ROM is used for storing program, then a logic zero (0) appears on
it every time the microcontroller reads a byte from memory.
➢ Pin 30: ALE
➢ Pin 31: EA
➢ Pin 32-39: Port 0
➢ Pin 40: VCC
3.2.3 REGISTERS IN 8051:
➢ In CPU, registers are used to store information temporarily. That information could be a
byte of data to be processed, or an address pointing to the data to be fetched. 8051have 8-bit
register
D7 D6 D5 D4 D3 D2 D1 D0
MSB Table 3.2.3(a) Register LSB
➢ The most widely used registers are A (accumulator), B, R0-R7, DPTR (Data Pointer), PC
(Program Counter). All the registers except DPTR and the program counter are 8bits. DPTR
and PC are 16 bits.
PSW REGISTER:
CY AC F0 RS1 RS0 OV P
Table 3.2.3(b) PSW Register
19
ELECTRICAL AND ELECRTRONICS ENGINEERING
➢ CY PSW.7 Carry Flag
➢ AC PSW.6 Auxiliary Carry Flag
➢ F0 PSW.5 Available to the user for general purpose
➢ RS1 PSW.4 Register Bank selector bit 1
➢ RS0 PSW.3 Register bank selector bit 0
➢ OV PSW.2 Overflow flag
➢ --- PSW.1 User-definable bit
➢P PSW.0 Parity flag. (odd/even know of 1 bit in the accumulator
➢ It is an 8-bit register.
➢ Although it is an 8-bit register, only 6 bits of it are used. The two unused bits are user
definable flags.
➢ Four bits are called conditional flags; they indicate some conditions that result after an
instruction is executed.
➢ These 4 are CY (carry), AC (Auxiliary Carry), P (Parity) and OV (Overflow).
➢ The bits PSW.3 and PSW.4 are designated as RS0 and RS1, respectively are used to change
the bank registers.
➢ CY flag: - This flag is set when there is a carry out from the D7 bit. This flag bit is affected
after an 8-bit addition or subtraction.
➢ AC flag: - If there is a carry from D3 to D4 during ADD or SUB operation, this bit is set;
otherwise cleared.
➢ P flag: - It reflects the number of 1’s in the A (accumulator) register only. If A register
contains an odd number of 1’s, then P=1.If it's even, then P=0.
➢ OV Flag: - This is set whenever the result of a signed number operation is too large, causing
the high order bit to overflow into sign bit.
TMOD REGISTER:
G C\T M1 M0 G C\T M1 M0
TIMER\COUNTER 1 TIMER\COUNTER 0
Table 3.2.3(c) TMOD Register
20
ELECTRICAL AND ELECRTRONICS ENGINEERING
Gate signal. For normal operation clear this bit to 0.
GATE If you want to use the timers to capture external events' length, set it to 1, and the
timer 1/0 will stop counting when External Interrupt 1/0 pin is low (set to 0 V). Note
that this feature involves both a timer and an external interruption, it is your
responsibility to write the code to manage the operation of those two peripherals.
Set to 1 to use the timer/counter 1/0 as a Counter, counting external events on
C/T P3_4/P3_5, cleared to 0 to use it as timer, counting the main oscillator frequency
divided by 12.
M1 Timer MODE: Those two last bits combine as 2-bit word that defines M0 the mode
M0 of operation, defined as the table below.
3.2.4 OPERATION OF MODES:
M1 M0 MODES NO. OF BITS RANGE
0 0 0 13 0-8191
0 1 1 16 0-65535
1 0 2 8(AUTO RELOAD
TIMER) 0-255
TCON:
TF1 TR1 TF0 TR0 IE1 IT1 IE0 IT0
21
ELECTRICAL AND ELECRTRONICS ENGINEERING
INSTRUCTION SET OF 8051:
✓ Data Transfer Instruction e.g.: MOV A, B
✓ Arithmetic Instruction e.g.: ADD A, B
✓ Logical Instruction e.g.: ANL A, B
✓ Branch Instruction e.g.: CJNZ A, B, rel Address
✓ Boolean Instruction e.g.: CPL bit
The architecture can be divided into A, R, and M profiles. A profile is mainly for applications,
R profile is for real-time and M profile is for Microcontroller M profile is used in IOT devices
and can be synchronized with small and high-power devices.
Components of ARM Architecture:
• With the help of these instructions, it is easy to manage the architecture and the
microprocessors.
• Priority encoders help to load the instruction and to store it in the specified register in order
to manage the files.
22
ELECTRICAL AND ELECRTRONICS ENGINEERING
• Multiplexers are used in the architecture to manage the operation of processor buses. The
components are instructed to work in behavioral mode and the components are implemented
as an entity. The architecture of the entity is optimized depending on the application of the
processor and helps to construct and maintain the design.
• 32-bit inputs are used in Arithmetic and Logic Unit which comes from register files and
shifter. The outputs are modified in register flags.
• Booth Multiplier Factor has 32-bit inputs to manage from the register file.
• The Control unit controls the entire process of the architecture and manages the system
operation. It can be made of circuits or can be the combination of functions and circuits in the
design. Timing is managed in the control unit and works with a combination of a state machine
in the processor.
• There is a register set in the architecture to help in managing the registers with the
corresponding time in the structure. It is important to check the number of registers and the
same size for the proper functioning of the system.
*Benefits Given below are the benefits of ARM Architecture:
• Energy consumed is very low in the architecture and their design is such that with high
processing power, low energy to be consumed. Hence devices with high performance prefer
this architecture in the device.
• Cost of the architecture is very less when compared with others. This makes ARM
architecture popular among devices. Portable devices prefer this architecture for the
performance and low-cost model in the system.
• The pipeline used is simple and at a low power envelope, normal loads are managed.
• This helps the system to manage the processes in the architecture easily in portable devices
and also in CPU-managed devices.
• It is used in aviation, automobile, industrial, mechanical, and many other industries with less
complexity.
23
ELECTRICAL AND ELECRTRONICS ENGINEERING
Fig 3.4.1 Arduino
The Arduino UNO can be powered from a USB cable coming from your computer
or a wall power supply (like this) that is terminated in a barrel jack. The USB connection is
also how you will load code onto your Arduino board. More on how to program with Arduino
can be found in our Installing and Programming Arduino tutorial.
24
ELECTRICAL AND ELECRTRONICS ENGINEERING
KEIL C µVISION 5:
Keil C µVision 5 serves as a cornerstone tool for engineers, developers, and hobbyists
engaged in the development of embedded systems. With its intuitive interface and robust
feature set, this IDE simplifies the process of writing, compiling, and debugging code for
microcontroller-based projects.
Compiler and Debugger: Keil C comes with a highly optimized C and C++ compiler
specifically designed for embedded systems development. The compiler generates
efficientcode tailored to the target microcontroller's architecture, optimizing performance
and memory usage. Additionally, Keil C includes a powerful debugger with features such
as real-time code execution analysis, register and memory inspection, and breakpoint
debugging capabilities to facilitate code debugging and troubleshooting.
Simulation and Emulation: Keil C includes simulation and emulation capabilities that
enable developers to test their code in a virtual environment before deploying it to the
targethardware. This feature helps identify and fix issues early in the development cycle,
reducing time-to-market and development costs.
25
ELECTRICAL AND ELECRTRONICS ENGINEERING
3.5 MICROCONTROLLER PROGRAMS
Blinking LED:
26
ELECTRICAL AND ELECRTRONICS ENGINEERING
Even or Odd LED:
27
ELECTRICAL AND ELECRTRONICS ENGINEERING
One after One LED:
28
ELECTRICAL AND ELECRTRONICS ENGINEERING
One by One LED:
29
ELECTRICAL AND ELECRTRONICS ENGINEERING
2-way Traffic Light:
30
ELECTRICAL AND ELECRTRONICS ENGINEERING
4- way Traffic Light:
32
ELECTRICAL AND ELECRTRONICS ENGINEERING
delay:
mov r0, #16
mov tmod, #01h
here1:mov tl0, #00h
mov th0, #00h
setb tr0
here: jnb tf0, here
djnz r0, here1
clr tf0
clr tr0
ret
0-99 Display:
33
ELECTRICAL AND ELECRTRONICS ENGINEERING
mov p3, #7Dh
acall delay1
mov p3, #07h
acall delay1
mov p3, #7fh
acall delay1
mov p3, #67h
acall delay1
delay1:
mov r0, #16
mov tmod, #01h
here1:mov tl0, #00h
mov th0, #00h
setb tr0
here: jnb tf0, here
djnz r0, here1
clr tf0
clr tr0
ret
0-999 Display:
34
ELECTRICAL AND ELECRTRONICS ENGINEERING
mov P1, #6fh }
acall delay2 }
sjmp venkatesh }
delay2: }
mov P2, #3fh
acall delay void delay (unsigned int t)
mov P2, #06h {unsigned int j,k;
acall delay for (j=0; j<t;j++)
mov P2, #5bh for (k=0; k<1275; k++);
acall delay }
mov P2, #4fh
acall delay
mov P2, #66h
acall delay
mov P2, #6dh
acall delay
mov P2, #7dh
acall delay
mov P2, #07h
acall delay
mov P2, #7fh
acall delay
mov P2, #6fh
acall delay1
delay:
mov P3, #3fh
acall delay1
mov P3, #06h
acall delay1
mov P3, #5bh
acall delay1
mov P3, #4fh
acall delay1
mov P3, #66h
acall delay1
mov P3, #6dh
acall delay1
mov P3, #7dh
acall delay1
mov P3, #07h
acall delay1
mov P3, ##7fh
acall delay1
mov P3, #6fh
acall delay1
ret
delay1:
mov tmod, #01h
mov tl0, #00h
35
ELECTRICAL AND ELECRTRONICS ENGINEERING
mov th0, #00h
setb tr0
here:jnb tf0, here
clr tf0
clr tr0
ret
A-Z Display:
36
ELECTRICAL AND ELECRTRONICS ENGINEERING
mov p2, #0c0h mov tmod, #01h
mov p3, #94h here1:mov tl0, #00h
acall delay mov th0, #00h
mov p2, #0f0h setb tr0
mov p3, #00h here:jnb tf0, here
acall delay djnz r0, here1
mov p2, #0cch clr tf0
mov p3, #05h clr tr0
acall delay ret
mov p2, #0cch
mov p3, #11h
acall delay
mov p2, #0ffh
mov p3, #00h
acall delay
mov p2, #0c7h
mov p3, #88h
acall delay
mov p2, #0ffh
mov p3, #10h
acall delay
mov p2, #0c7h
mov p3, #98h
acall delay
mov p2, #0bbh
mov p3, #88h
acall delay
mov p2, #03h
mov p3, #22h
acall delay
mov p2, #0fch
mov p3, #00h
acall delay
mov p2, #0c0h
mov p3, #44h
acall delay
mov p2, #0cch
mov p3, #50h
acall delay
mov p2, #00h
mov p3, #55h
acall delay
mov p2, #84h
mov p3, #0a8h
acall delay
mov p2, #33h
mov p3, #44h
acall delay
sjmp
venkatesh
37
ELECTRICAL AND ELECRTRONICS ENGINEERING
CHAPTER-4
C LANGUAGE
4.1 INTRODUCTION
C is a procedural programming language initially developed by Dennis Ritchie in the year
1972 at Bell Laboratories of AT&T Labs. It was mainly developed as a system programming
language to write the UNIX operating system.
The main features of the C language include:
General Purpose and Portable
Low-level Memory Access
Fast Speed
Clean Syntax
4.2 WHY SHOULD WE LEARN C?
Many later languages have borrowed syntax/features directly or indirectly from the C
language. Like syntax of Java, PHP, JavaScript, and many other languages are mainly
based on the C language. C++ is nearly a super set of C language (Only a few
programs may compile in C, but not in C++).
So, if a person learns C programming first, it will help him to learn any modern
programming language as well. Learning C helps to understand a lot of the underlying
architecture of the operating system. Like pointers, working with memory locations,
etc.
4.3 STRUCTURE OF C
By structure, it means that any program can be written in this structure only. Writinga C
program in any other structure will hence lead to a complication error
4.4 COMPONENTS OF C:
1. Header Files Inclusion – [#include <stdio.h>]
The first and foremost component is the inclusion of the Header files in a C program. A
header file is a file with extension .h which contains C function declarations and macro
definitions to be shared between several source files. All lines that start with # are processed
by a preprocessor which is a program invoked by the compiler. Some of the C Header files:
stdio.h – Defines core input and output functions.
string.h – Defines string handling functions.
math.h – Defines common mathematical functions.
38
ELECTRICAL AND ELECRTRONICS ENGINEERING
2. Main Method Declaration – [int main ()]
The next part of a C program is to declare the main () function. It is the entry point of a
C program, and the execution typically begins with the first line of the main (). The empty
brackets indicate that the main doesn’t take any parameter. The int that was written before
the main indicates the return type of main ().
4.5 KEYWORS OF C
auto break case char const continue default do
Types of Operators in C
C has many built-in operators and can be classified into 6 types:
1. Arithmetic Operators
2. Relational Operators
3. Logical Operators
Bitwise Operators
4. Assignment Operators
4.6 PREPROCESSOR DIRECTIVES
q the boards with the name Arduino on them are the official boards but there are also a
lot of really great clones on the market as well. One of the best reasons to buy a clone is the
fact they are generally less expensive than their official counterpart.
40
ELECTRICAL AND ELECRTRONICS ENGINEERING
Here are the components that make up an Arduino board and what each of their functions are.
1. Reset Button – This will restart any code that is loaded to the Arduino board.
2. AREF – Stands for “Analog Reference” and is used to set an external reference voltage.
3. Ground Pin – There are a few ground pins on the Arduino, and they all work the same.
4. Digital Input/Output – Pins 0-13 can be used for digital input or output.
5. PWM – The pins marked with the (~) symbol can simulate analog output.
6. USB Connection – Used for powering up your Arduino and uploading sketches.
7. TX/RX – Transmit and receive data indication LEDs.
8. Microcontroller – This is the brain and is where the programs are stored.
9. Power LED Indicator – This LED lights up anytime the board is plugged into a power
source.
10. Voltage Regulator – This controls the amount of voltage going into the Arduino board.
11. DC Power Barrel Jack – This is used for powering your Arduino with a power supply.
12. 3.3V Pin – This pin supplies 3.3 volts of power to your projects
13. 5V Pin – This pin supplies 5 volts of power to your projects
14. Ground Pins – There are a few ground pins on the Arduino, and they all work the same.
15. Analog Pins – These pins can read the signal from an analog sensor and convert it too
digital.
5.5 SOFTWARE
The software that is used to program the microcontroller is open-source software and
can be downloaded for free on www.arduino.cc. With this “Arduino software,” you can write
little programs that the microcontroller should perform. These programs are called “Sketch”.
In the end, the sketches are transferred to the microcontroller by USB cable. More on that later
the subject of “programming”.
Arduino Keywords
Digital I/O Time
digital Read() delay()
digital Write() millis()
pinMode() Communication
Analog I/O Print
analog Read() Serial
analogReference() SPI
analog Write()
41
ELECTRICAL AND ELECRTRONICS ENGINEERING
Installation
Now one after another the Arduino software and the USB driver for the board have to
be installed.
Installation and setup of the Arduino software.
1. Download the Arduino software on www.arduino.cc and install it on the computer (The
microcontroller is NOT connected to the PC). After that, you open the software file and start 6
the program named arduino.exe.
Two setups on the program are important and should be considered.
a) The board that you want to connect to must be selected on the Arduino software. The
“Funduino Uno” is here known as “Arduino / Genuino Uno”.
b) You must choose the right “Serial-Port”, to let the computer know to which port the
board has been connected. That is only possible if the USB driver has been installed
correctly. It can be checked this way:
c) 7 At the moment the Arduino isn't connected to the PC. If you now choose “Port”, under
the field “Tool”, you will already see one or more ports here (COM1/ COM2/
COM3…). The quantity of the shown ports doesn't depend on the quantity of the USB
ports on the computer. When the board gets connected to the computer, you will find
one more port.
42
ELECTRICAL AND ELECRTRONICS ENGINEERING
5.6 PROGRAMMING
Fading LED
Task: A LED should pulsating get brighter and darker (fade).
Required equipment: Microcontroller / one LED (blue) / resistor with 100 Ohm / Breadboard
/ cables
Setup:
Code:
int LED=9;
int brightness=0;
int fading=5;
void setup ()
{
pinMode(LED, OUTPUT);
}
void loop ()
{
analogWrite(LED, brightness);
brightness=brightness + fading;
delay (25);
if (brightness==0 || brightness== 255)
{
fading= -fading;
}}
43
ELECTRICAL AND ELECRTRONICS ENGINEERING
Push button and LED
Task: After pushing the button an LED is supposed to light up for 5 seconds.
Required equipment: Arduino / one LED (blue) / one resistor with 100Ohm / one resistor
with 1K Ohm (1000 Ohm) / Breadboard / Cables / Push button
Setup:
Code:
int LEDblue=6;
int button=7;
int buttonstatus=0; 
void setup ()
{
pinMode(LEDblue, OUTPUT);
pinMode(button, INPUT);
}
void loop ()
{
buttonstatus=digitalRead(button);
if (buttonstatus == HIGH)
{
digitalWrite(LEDblue, HIGH);
delay (5000);
digitalWrite(LEDblue, LOW);
}
{
digitalWrite(LEDblue, LOW);
}
}
44
ELECTRICAL AND ELECRTRONICS ENGINEERING
Motion detector
Task: As soon as a motion gets detected, a piezo speaker should beep.
Required equipment: Arduino / motion detector/breadboard/cables / piezo speaker.
Setup:
Code:
int piezo=5;
int movement=7;
int movementstatus=0;
void setup ()
{
pinMode(piezo, OUTPUT);
pinMode(movement, INPUT);
}
void loop ()
{
movementstatus=digitalRead(movement);
if(movementstatus==HIGH)
{
digitalWrite(piezo,HIGH);
delay (5000);
digitalWrite(piezo, LOW);
}
else
{
digitalWrite(piezo,LOW);
}
}
45
ELECTRICAL AND ELECRTRONICS ENGINEERING
Measurement of distance
Task: Measure a distance with the HC-SR04 ultrasonic sensor and show the result on the
serial monitor.
Required equipment: microcontroller board / cables / Breadboard / HC-SR04 ultrasonic
sensor
Code:
inttrigger=7;
int echo=6;
long time=0;
long dist=0;
void setup ()
{ Serial.begin (9600);
pinMode(trigger, OUTPUT);
pinMode(echo, INPUT);}
void loop ()
{ digitalWrite(trigger, LOW);
delay (5);
delay (10);
digitalWrite(trigger, LOW);
time = pulseIn(echo, HIGH);
dist = (time/2) / 29.1;
if (dist >= 500 || dist <= 0)
{ Serial.println("No measurement");}
else
{ Serial.print(dist);
Serial.println("cm");}
delay (1000); }
46
ELECTRICAL AND ELECRTRONICS ENGINEERING
Control a servo
Task: A servo has to turn to three different positions. Between the movements there should be
a short break.
Required equipment: Arduino / one servo / three cables
Setup:
Code:
#include <servo.h> //Include the servo library
Servo servoblue; //The servo gets the name “servoblue”
void setup ()
{
servoblue.attach(8); //The signal line of the servo is on pin 8
}
void loop ()
{
servoblue.write(0);
delay (3000);
servoblue.write(90);
delay (3000);
servoblue.write(180);
delay (3000);
servoblue.write(20);
delay (3000);
Code:
#include
Liquid Crystal lcd (12, 11, 5, 4, 3, 2);
void setup ()
{
lcd.begin(16, 2);
}
void loop ()
{
lcd.setCursor(0, 0);
lcd.print("up");
delay (2000);
lcd.clear();
lcd.setCursor(5, 1);
lcd.print("down");
delay (2000);
lcd.clear();
Data types: Python has various standard data types that are used to define the operations
possible on then and the storage method for each of them.
The data stored in memory can be of many types. They are:
1.int 2.Float 3.boolean 4.string
List: It is a general purpose most widely used in data structures. List is a collection which is
ordered and changeable and allows duplicate members.
Variables: These are nothing but reserved memory locations to store values. This means that
when you create a variable you reserve some space in memory.
Identifiers: Any name that is used to define a class, function, variable module is an identifier.
Literals: These are language-independent terms in python and should exist independently in any
programming language. In python, there are string, byte, integer, floating and imaginary literals.
Operators: You can implement the following operations using the corresponding tokens.
1. add(+)
2. subtract(-)
3.multiply(*)
4.integerdivision(/)
5.remainder(%)
6.and(&)
7. or(|)
8.binaryleftshift(<<)
9.binaryrightshift(>>)
10.lessthan(<)
11.greaterthan(>)
12.equality(==)
2. Printstatement
Modules: Python module can be defined as a python program file which contains a python code
including python functions, class or variables.
Functions: It is a group of related statements that perform a specific task. Functions help break
our program into smaller and modular chunks. These are divided into two types:
1. Build-in functions
2. User-defined functions
There are three types of python function arguments using which we can called function.
1. Default arguments
2. Keyword arguments
3. Variable-length arguments
Conditional(if): The if statement contains a logical expression using which data is compared
and a decision is made based on the result of the comparison.
Iteration: A loop statement allows to execute statement or group of statements multiple times as
long as condition is true. Repeated execution of a set of statements help of loops called iteration.
i. For loop
ii. While loop
iii. Nested for loop
Continue: The continue statement is used to skip the rest of the code inside a loop for the
current iteration only. Loop does not terminate but continues on with the next iteration.
Pass: It is an full statement. The difference between a comment and pass statement in python
is that, while the interpreter ignores a comment entirely, pass is not ignored. Pass is just a
place holder for functionality to be added later.
Fruitful functions : We write functions that returns values, which will call fruitful functions.
We have seen return statement before, but in fruitful function return statement includes
return value.
Return function: The keyword return is used to return back the value to the called function.
Parameters: These are passed during the definition of function while arguments are passed
during the function call.
Local space: A variable which is defined inside a function is local to the function. It is accessible
for the point at which it is defined until the end of the function.
Global space: A variable which is define in the main body of a file is called a global
variable. It will be visible throughout the file, and also inside any file which imports that file.
String: It is a sequence of characters. This is how we declare a string. We can use a pair of
single or double quotes. Every string object is of the type ‘str’. The string functions are
1.is a num() 2.is alpha () 3.is digit() 4.is lower() 5.is numeric() 6.escape() 7.is title() 8.is
upper() 9.replace(old, new[,max])10.split() 11.count() 12.find() 13.swapcase()
14.startswitch()
All the string methods will be returning either True or False as the result.
Template: These class is used to create a string template for simpler string substitutions.
Array: It is a container which can hold a fixed number of items and these items must be of
the same type. Most of the data structures makes us of arrays through implement their
algorithms.
Basic operations of array: Following are the basic operations supported by an array.
1.Traverse 2.Insertion 3.Deletion 4.Search 5.Update
Array methods: Python has a set of built-in methods that you can use on arrays. They are:
1.append() 2.clear() 3.copy() 4.count() 5.extend() 6.index
7.insert() 8.pop() 9.remove() 10.reverse 11.sort()
List methods: The list data types has some more methods here are all of the methods of list.
Mutability: These objects can be changed after it is created, and an immutable objects can’t.
Aliasing: It is a second name for a piece of data. It happens whenever one variables value is
assigned to another variable. If data can change, aliases can result in lot of hard-to-find bugs.
List comprehension: It provides a concise way to create lists. Common applications are to
make new list where each element is the result of one operation applied to each member of
another sequence or to create a sub sequence of those elements that satisfy a certain
condition.
6. Length()
Tuple assignment: These assignment feature enable to assign more than one variable at a
time.
Tuple comprehension: The result of a tuple comprehension is special. You might expect it
to produce a tuple, but what it does is object that we can iterate over.
Tuple as return values: A tuple is a common separated sequence of items. It is created with
or without(). Tuples are immutable.
Dictionaries: It is a collection which is in ordered changeable and indexed. These are return
with curly brackets, and they have keys and values. Following are the methods of
dictionaries:
1.clear() 2.copy() 3.fromkeys(seq[,v]) 4.get(key[,d]) 5.item() 6.keys()
7. pop(key[,d]) 8.popitem() 9.setdefault(key[,d]) 10.update([other]) 11.values()
script is running .
Errors and Exceptions: Python rises exceptions when it encounters errors. When writing a
program, we more often will not encounter error caused by not following the proper
structure of the language is called syntax error. Types of errors are:
1.Zerodivision 2.Overflow 3.Import 4.Index 5.Type 6.Indentation 7.Syntax 8.Runtime
9.Key
Different types of Exceptions: 1.Array Index out of Bound Exception 2.IO Exception
7.NoSuchMethod
Handling Exceptions: The cause of an exception is often external to the program itself. The
exception should be properly handled so that an abrupt termination of the program is
prevented.
Module: It refers to a file containing python statements and definitions. We use modules to
break down large programs in to small manageable and organized files. Types of modules:
1. Date module 2.Time module 3.Osmodule 4.Calendermodule
5.Mathmodule
Packages:
We don’t usually store all of our files in our computer in the same location we use a well
organized hierarchy of directories for easier access.
We plays singular modules in one package and different modules in different package.
APPLICATIONS OF IOT:
Smart Homes: Automation of household systems like lighting, heating, and security.
Healthcare: Wearable devices that monitor health metrics and transmit data to healthcare
providers.
Industrial IOT: Use of connected machinery for monitoring and optimizing production
processes.
Smart Cities: Enhancements in infrastructure, such as traffic management and waste
management, to improve urban living.
Security: Ensuring data protection and device security is crucial, as connected devices can
be vulnerable to cyber attacks.
Interoperability: Different devices and platforms need to work together seamlessly.
Data Privacy: Managing and protecting user data is essential, especially in sensitive
applications like healthcare.
FUTURE OF IOT
The potential for IOT is vast, with predictions of billions of connected devices in the coming
years. This growth will drive innovations in AI, machine learning, and data analytics, enabling
smarter solutions across various sectors
55
ELECRTRONICS &COMMUNICATION ENGINEERING
The history of the Internet of Things (IOT) traces back several decades, marked
by key developments in technology and connectivity. Here’s a brief overview:
1960s-1980s:EARLY CONCEPTS
1960s: The idea of interconnected devices began with ARPANET, the precursor to the internet,
which connected various computers for data sharing.
1982: One of the earliest examples of IOT was a modified Coke vending machine at Carnegie
Mellon University, which could report its inventory and whether drinks were cold.
1999: The term "Internet of Things" was coined by Kevin Ashton, a British technology pioneer,
during a presentation at Procter & Gamble. He used it to describe a system where the internet
connects to the physical world through sensors.
2010: The launch of the IPv6 protocol allowed for a virtually limitless number of IP addresses,
facilitating the connection of billions of devices.
2011: Major tech companies, including IBM, Cisco, and GE, began investing heavily in IOT
technologies, leading to the development of smart homes and industrial IOT solutions.
2020: The COVID-19 pandemic accelerated the adoption of IOT technologies for remote
monitoring and smart health solutions.
2021-2023: Continued advancements in AI, machine learning, and edge computing enhanced IOT
capabilities, leading to smarter and more efficient systems across various sectors.
7.3 CLOUD:
In networking, the cloud is a global network of server that are connected and work
together as a single system.
CLOUD COMPUTING :
Cloud networking, also known as virtual cloud networking is the use of cloud based
services to connect an organization resources, applications and employees .
56
ELECRTRONICS &COMMUNICATION ENGINEERING
IOT ARCHITECTURE :
7.5 ACTUATOR
A device that converts energy into motion to control (or) move a system(or)mechanism.
TYPES OF ACTUATOR:
1. Electric linear actuator
2. Electric rotary actuator
3. Hydraulic linear actuator
4. Hydraulic rotary actuator
5. Piezoelectric actuator
58
ELECRTRONICS &COMMUNICATION ENGINEERING
TYPES OF WIRELESS NETWORK:
1. Cellular network
2. Local area network(LAN/PAN)
3. Low power wide area network(LPWAN)
4. Mesh protocols
Historical analytics
Real-time analytics
Predictive analytics
2. COLLECT:
Once the data is generated, it must be collected in a central repository that can be
accessed and queried by your team. This repository is sometimes called a data warehouse or
data lake. Implementing your own data warehouse can be a challenge, especially for
companies that may not have existing internal expertise in managing a large data
infrastructure.
3. ANALYZE:
Now that the data is stored, it can be analyzed. This is also an inflection
point on the analytics lifecycle when it comes to the value of your data. While there is some
amount of value in generating and collecting data, this is the point at which you can start
delivering real ROI.
4. REACT:
If your company can reach the React stage in the analytics lifecycle, you’ll
begin to see significant value being added to your organization. The React stage is about
automatically making real-time decisions from your data that feed back into a business
process.
59
ELECRTRONICS &COMMUNICATION ENGINEERING
5. PREDICT:
Predicting the future can be the end-result of successfully traversing all
stages of the IoT Analytics Lifecycle. The Predict stage is about identifying the predictive
indicators that lead to eventual failures.
60
ELECRTRONICS &COMMUNICATION ENGINEERING
CHAPTER-8
RASPBERRY PI
8.1 INTRODUCTION
The Raspberry Pi is a debit card-sized low-cost computer that connects to a computer
Desktop or TV and uses a standard mouse and Keyboard. It has a dedicated processor, memory,
and a graphics driver, just like a PC. It also comes with its operating system, Raspberry Pi OS,a
modified version of Linux. Raspberry Pi can browse the internet and stream high-definition
video, as well as spreadsheets, word processing, and gaming, just like a desktop computer. The
Raspberry Pi can communicate with the outside world and has been used in various digital
maker projects, including music machines and parent detectors, weather stations, and tweeting
birdhouses with infrared cameras.
People worldwide use Raspberry Pi to learn how to program and understand how
computers function. Although the Raspberry Pi lacks storage, you can use micro SD cards to
store whichever operating system you choose (Raspberry Pi, Ubuntu Mate, etc.). Because the
Raspberry Pi has Bluetooth, Ethernet, and Wi-Fi connectivity, it may transfer files over the
internet. The software and the design of the Raspberry Pi project are not open source.
61
ELECRTRONICS &COMMUNICATION ENGINEERING
8.3 TYPES OF
RASPBERRY PI
Raspberry Pi model B
Raspberry Pi model A
Raspberry Pi model B+
Raspberry Pi Model A+
Raspberry Pi Zero
Raspberry Pi 2
Raspberry Pi 3 Model B
Raspberry Pi 4
Raspberry Pi Zero W Fig 6.3 Types of Raspberrys Pi
Advantages
The Raspberry Pi is a small computer that is roughly the size of a credit card.
Using a group of Raspberry Pi’s to function as a server is more efficient than using
a regular server.
The Raspberry Pi is ideal for adaptive technology
Disadvantages
It is not a computer replacement, and the processor is not as fast. Downloading and
installing software takes time so you won't do any intricate multitasking.
Other operating systems, such as Windows, are incompatible.
Not able to run Windows Operating system.
62
ELECRTRONICS &COMMUNICATION ENGINEERING
8.5 SOFTWARE
Step 1- Download and install the latest version of Raspberry Pi Imager (Raspberry Pi OS
called Raspberry Pi Imager) on your SD card and you can download the Imager from this link
https://www.raspberrypi.com/software. Turn on the monitor and you will see this
63
ELECRTRONICS &COMMUNICATION ENGINEERING
Step 6- Network Install enables a Raspberry Pi to install an operating system on a storage
device using a version of Raspberry Pi Imager downloaded over the network. With Network
Install, you can get an operating system installed on your Raspberry Pi with no separate SD
card reader and no computer other than your Raspberry Pi. You can run Network Install on
any compatible storage device, including SD cards and USB storage
Network Install only runs on Raspberry Pi 4, 400. If your Raspberry Pi runs an olderbootloader,
you may need to update the bootloader to use Network Install.
Network Install requires the following:
a compatible Raspberry Pi model running firmware that supports Network Install
a monitor
a keyboard
a wired internet connection
.
To launch Network Install, power on your Raspberry Pi while pressing and holding
the SHIFT key in the following configuration:
no bootable storage device
attached keyboard.
attached compatible storage device, such as an SD card or USB storage.
If you haven’t already connected your Raspberry Pi to the internet, connect it with an
Ethernet cable.
Once you’re connected to the internet, your Raspberry Pi will download Raspberry Piinstaller.
If the download fails, you can repeat the process to try again.
Eventually it should start the Raspberry Pi Imager application allowing you to install a fulloperating
system to a blank SD Card or a USB Drive.
After installing an operating system image, connect your storage device to your Raspberry Pi.
First, unplug your Raspberry Pi’s power supply to ensure that the Raspberry Pi is powered
down while you connect peripherals. If you installed the operating system on a microSD card,
you could plug it into your Raspberry Pi’s card slot now. If you installed the operating system
on any other storage device, you could connect it to your Raspberry Pi now.
Then, plug in any other peripherals, such as your mouse, keyboard, and monitor.
Finally, connect the power supply to your Raspberry Pi. You should see the status LED light
up when your Pi powers on. If your Pi is connected to a display, you should see the boot screen
within minutes. If you chose to skip OS customisation in Imager, your Raspberry Pi will run a
configuration wizard on the first boot. You need a monitor and keyboard to navigate through
the wizard; a mouse is optional.
Step 6-Set up Bluetooth devices.
Step 7-Set country.
Step 8-Create user.
Step 9-Select a wireless network.
Step 11-Select a default browser.
66
ELECRTRONICS &COMMUNICATION ENGINEERING
Future Scope
The course in Electrical and Electronics Engineering offers promising future
prospects in various fields. Some of the potential career opportunities include:
Overall, the field of electrical and electronics engineering offers a wide range of
career opportunities with the potential for growth and innovation.