Lab Manual ECE279
Lab Manual ECE279
ECE279
1
Course Outcome Statements Applicable to
CO1 Learn to use basic electrical & electronics measuring instruments and All practical
component specific ratings.
CO2 Use basic electrical laws and theorems to analyse DC circuits P1 and P2
CO3 Build virtual applications with at least one sensor module by programming P6
microcontroller board.
CO4 Make use of various digital & analogue ICs and conduct their functionality test. P3, P4, P5, P7,
P8
CO5 Assemble various electrical & electronics components on the breadboard and P1 to P5, P7, P8
create circuit connections.
CO6 Design and analyse combinational and sequential circuits. P5, P7, P8
Table of Contents
Practical Title of Experiment Page
No.
1 Implement Kirchhoff voltage and current laws. 5
2 Apply Thevenin's theorem on DC circuits. 11
3 Analyse V-I characteristics of PN Junction 15
diode.
4 Understanding the truth table of Logic Gates 21
and implement these gates using Universal
gates.
5 Understanding the combinational logic by 29
implementing the Boolean function using a
multiplexer.
6 Virtual integration of IR sensor using Arduino 35
7 Understand JK Flip-Flop and implement T- 41
Flip Flop using NAND circuit of JK Flip Flop.
8 Implement Decade counter using IC-7490 and 47
seven segment display.
2
General Safety guidelines for the students
• Use only tools and equipment with non-conducting handles when working with electrical
devices.
• When checking an operating circuit, keep one hand either in a pocket or behind your back to
avoid making a closed circuit through the body.
• Never plug leads into power source unless they are connected to an established circuit.
• Avoid contacting circuits with wet hands or wet materials.
• All current transmitting parts of any electrical devices must be enclosed.
• Maintain a work space clear of extraneous material such as books, papers, and clothes.
• Never change wiring with circuit plugged into power source.
• Place the IC’s Properly in the bread board, don’t break the IC pins by forcefully inserting in
bread board.
• Switch off the power supply when not in use.
• Always cut wire leads so the clipped wire falls on table top and not towards others.
• Shoes must be worn at all times.
• Remove all loose conductive Jewelry and trinkets, including rings, which may come
in contact with exposed circuits. (Do not wear long loose ties, scarves, orother
loose clothing around machines.
• Don’t switch ON the power supply without confirming the connections from the lab
instructor.
• When making measurements, form the habit of using only one hand at a time. No part
of a live circuit should be touched by the bare hand.
• Keep the body, or any part of it, out of the circuit. Where interconnecting wires and
cables are involved, they should be arranged so people will not trip over them.
• Be as neat as possible. Keep the work area and workbench clear of items not used in
the experiment.
4
Evaluation Mechanism for the course
1. Continuous assessment: There will be 4 Continuous Assessment for Practical (CAP), two Written
Test Practical (WTP) Examinations during the term. Each evaluation will be for 30 marks. Both WTP
Examinations are compulsory; and in CAP: 3 best out of 4 will be considered. All CAP will be MCQ
based with 15 questions of two marks each. WTP1, WTP2 will be evaluated for performances and
write up.
Each CAP will be conducted after two practical are performed in the laboratory.
2. Mid Term Practical (MTP): No Mid-term exam is applicable for this course
3. End Term Practical (ETP): This may be conducted in last teaching week or after last teaching week
of the term, Student will get any one practical to perform in the ETP for being evaluated on Viva,
Written and Performance.
4
EXPERIMENT No.1
2. Kirchhoff’s Current Law states that the algebraic sum of all the currents at any node is zero.
Applying Kirchhoff’s current law to the first four nodes in the circuit shown in Figure 2 yields the
following equations; In Figure 2 Clockwise Current: through voltage source is IV, through R1 is I1 ,
through R2 is I2 , through R3 is I3 , Current through R4 is I4 , and Current through R5 is I5 ,
Let’s consider that node e is a reference node and is chosen as GND. Va, Vb, Vc, Vd
are node voltages at points a, b, c and d respectively.
Node a: -Is + I1 = 0=>Vs = 5V= Va
Node b: I1 =I2 + I3 => (Vb-5)/R1 = (Vb- Va)/R3 + (Vb-Vd)/R2 =>
Node c: I3 = I4
Node d: I2 +I4 = I5
Let e as reference point or ground.
Va = 5V----(1)
At node b: I1 = I2 + I3
(5 – Vb)/ R1 = (Vb – Vd)/R2 + (Vb – Vc)/R3
After putting values of Resistence, we get
3Vb -Vc-Vd = 5 ----(2)
At node C : I3 = I4
(Vb – Vc)/ R3 = (Vc – Vd)/ R4
(Vb – Vc) = (Vc – Vd)
5
2Vc – Vb - Vd = 0 ------(3)
At node D: I5 = I2 + I4
(Vd – 0)/ R5 = (Vb – Vd)/R2 + (Vc – Vd)/R4
Vc - Vd + Vc – Vd = Vd
Vb + Vc – 3Vd = 0 -----(4)
Now simplify equation 2, 3 and 4.
Add equation (2) and [(3) × 3], we get
5Vc – 4Vd = 5-----(5)
Add equation (3) and (4), we get
Vc = 4Vd/3 ------(6)
Put equation (6) in equation (5), we get
Vd = 15/8 V -------(7)
Put equation (7) in equation (6), we get
Vc = 2.5V ----(8)
Put equation (7) ad (8) in equation (3), we get
Vb = 25/8 -----(9)
Now to find I1 , I2 , I3 , I4 and I5 put the value of Va, Vb, Vc and Vd in
I1 = (5 – Vb)/ R1
I2 = (Vb – Vd)/R2
I3 = (Vb – Vc) /R3
I4 = (Vc – Vd)/R4
I5 = (Vd – 0)/R5
We get, I1 = 15/ (8×330) A, I2 = 10/ (8×330) A, I3 = 5/ (8×330) A, I4 = 5/ (8×330) A
and I5 = 15/ (8×330) A
Hence Equations below at nodes a, b , c and d are verified theoretically
-Is + I1 = 0
I1 =I2 + I3
I3 = I4
I2 +I4 = I5
6
Figure 1 Voltage measurement across circuit elements
7
4. Least count of Voltmeter and Ammeter:-
In the given figure 3 below, total range is up to 3V for voltmeter and 1000 mA for ammeter.
𝑇𝑜𝑡𝑎𝑙 𝒓𝒂𝒏𝒈𝒆 𝑜𝑓 𝑚𝑒𝑡𝑒𝑟
Least count =
𝑇𝑜𝑡𝑎𝑙 𝒏𝒖𝒎𝒃𝒆𝒓 𝑜𝑓 𝑑𝑖𝑣𝑖𝑠𝑖𝑜𝑛
Least count of voltmeter = 3/30 = 0.1 V
Least count of ammeter = 1/50 = 0.02 A
Reading of Voltmeter = Number of divisions scaled by the pointer * Least count of voltmeter = 21*0.1=2.1V
Reading of Ammeter = Number of divisions scaled by the pointer * Least count of Ammeter= 15 *0.02A=
0.3A=30mA
8
Figure 4: Front view and Back view of Half Breadboard
Procedure:
1. Construct the circuit shown in Figure using the values below: R1 = 330 Ω R2 = 330 Ω
R3 = 330 Ω R4 = 330 Ω R5 = 330 Ω,
2. Set the Variable Power Supply (Vs) to 5 Volts.
3. Accurately measure all voltages and currents in the circuit using the Digital/Analog
Meter.
4. Record the measurements in the observation and calculation table containing the
measured voltage and currentvalues.
5. Verify KVL for the loops in the circuit using equations of Results and Discussion section.
6. Verify KCL for the loops in the circuit using equations of Results and Discussion section.
7. %𝑎𝑔𝑒 𝐸𝑟𝑟𝑜𝑟 = ([𝑉_𝐶𝑎𝑙𝑐𝑢𝑙𝑎𝑡𝑒𝑑 − 𝑉_𝑀𝑒𝑎𝑠𝑢𝑟𝑒𝑑)/𝑉_𝐶𝑎𝑙𝑐𝑢𝑙𝑎𝑡𝑒𝑑]𝑥100
9
2. Verify the KCL principle using measured values for the equations below:
Node b: I1 =I2 + I3
Node c: I3 = I4
Node d: I2 +I4 = I5
Precautions:
1. All the connections should be perfectly tight.
2. Always connect ammeter in series and voltmeter in parallel
3. Use safety guards while working on live parts
4. Don’t touch the bare conductor when supply is ON.
5. Supply should not be switched ON until and unless the connections are checked by the
Faculty/Lab Instructor
6. Use proper wire for connections
10
EXPERIMENT No.2
Aim: Apply Thevenin's theorem on DC circuits.
Learning Objective:
1. To implement the circuit on the breadboard and verify Thevenin’s theorem.
2. To identify different sources of error in this practical.
Apparatus/Components required:
S No Apparatus Range Quantity
1 Regulated Power Supply (0-30V) 2
2 Ammeter (0-10mA) 1
3 Resistor 1Kohm,220ohm. 330ohm 1,3,1
4 Bread Board -- 1
5 Voltmeter (0-30V) 1
6 Digital Multimeter -- 1
Statement: If we wish to find I or V across any element (load resistance) in the linear bilateral circuit,
then we go for Thevenin’s theorem. Any complex circuit can be broken down to only three elements
such as VTH, RTH, and load resistance (RL) using Thevenin’s theorem. In this practical we will find I
across 1Kohm Load resistance of Circuit-1 using Thevenin’s equivalent Circuit-4. We will prove
that IL of Circuit-1 and Circuit-4 are same.
Procedure:
1. Connections are given as per the circuit diagram.
2. Set 5Vvalue of voltage using RPS and note down the correspondingammeter readings
as per Circuit-1.
3. To find VTH : Remove the load resistance and measure the open circuit voltage
using multimeter (VTH) as per Circuit-2.
4. To find RTH : Remove the RPS and short circuit it and find the RTH using multimeter in
Circuit -3.
5. Give the connections for equivalent circuit and set VTH and RTH and note the
corresponding Ammeter reading in Circuit -4.
6. Verify Thevenin’s theorem for theoretical and practical values using observation table and
identify sources of error (if any).
7. Also find percentage error.
Circuit Diagrams: Circuit - 1: To find load current
Since no current is passed through the resistance connected to point A, so it will not contribute to VTH
value, so using potential divider law in the circuit below, VTH = (220*5V)/440 =2.5V
RTH = 220 ohm connected to point A + Parallel combination of other two resistances
Parallel combination of other two resistances = (220*220)/(220+220)=220*220/440=110ohm
RTH =220+110=330ohm
Precautions:
12
1. All the connections should be perfectly tight.
2. Always connect ammeter in series and voltmeter in parallel
3. Use safety guards while working on live parts
4. Don’t touch the bare conductor when supply is ON.
5. Supply should not be switched ON until and unless the connections are checked by
theFaculty/Lab Instructor
6. Use proper wire for connections
13
Results and Discussion:
14
EXPERIMENT No. 3
Learning Objective(s):
1. To identify sources of error in this practical.
2. To measure diode current in forward biased condition.
3. To test the diode for functioning.
Instruments/Components: A p-n junction diode, 30V DC power supply, 1Kohm, 0-30V
voltmeter, 0−100mA ammeter and connecting wires.
Forward Bias Condition: On forward biasing, initially no current flows due to barrier potential. As
the applied potential exceeds the barrier potential the charge carriers gain sufficient energy to cross
the potential barrier and hence enter the other region. The holes, which are majority carriers in the P-
region, become minority carriers on entering the N-regions, and electrons, which are the majority
carriers in the N-region, become minority carriers on entering the P-region. This injection of minority
carriers results in the current flow, opposite to the direction of electron movement. (Resistance RS
calculation for maximum current flow through the diode i.e. at maximum DC supply 20 V/ 30V
and maximum forward current 50 mA given)
When we apply voltage to the terminals of diode, the width of depletion region slowly starts
decreasing. The reason for this is, in forward bias we apply voltage in a direction opposite to that of
barrier potential. So the electrons in n-side get pushed towards the junction (by force of repulsion)
and the holes in p-side get pushed towards the junction. As the applied voltage increases from 0
volts to 0.7 volts, the depletion region width reduces to zero. This means depletion region vanishes
at 0.7 volts of applied voltage.
Procedure:
1. Before connection of the diode in the circuit test that diode is working, for that connect the diode
the anode terminal with +ve probe of multimeter and cathode with –Ve probe and adjust the
multimeter knob at Diode symbol as sown in figure 3. If value on multimeter is zero then diode is
working fine and if lower voltage present in the diode it is due to charged capacitor.
16
Fig: 3 Diode testing with multimeter.
1. Connect the circuit as shown in figure 4 using PN Junction diode
2. Before switch ‘On’ the supply, rotate power supply potentiometer fully in CCW (counter
clockwise direction) to start experiment from Zero voltage otherwise excessive voltage can
damage the diode and multimeter.
3. Connect Ammeter in series of Power supply positive terminal and anode of Diode to measure diode
current ID (mA)
4. Connect Voltmeter across diode to measure diode voltage VD.
5. Initially vary the Regulated Power Supply voltage, Vs from zero in steps of 0.1 V. Once the current
starts increasing vary Vs in steps of 0.5 V, Vary the DC power supply till the value of diode voltage
VF from 0 to 1V, (0.83V) in steps and Measure the corresponding values of diode Forward Current
IF in mA and note down in the Observation Table.
6. Plot a curve between diode voltage VF and diode current IF as shown in figure 5 (First quadrant)
using suitable scale, with the help of Observation Table. This curve is the required forward
characteristics of Si diode.
7. After complete the experiment, Switch ‘Off’ the supply with doing DC power supply to zero volts.
17
Fig. 5: VI characteristic of Forward Bias diode.
Precautions:
Do not press the IC on breadboard until pins are aligned with pours.
1. Make connection properly.
2. There should not any short circuit in the circuit. Avoid the heating of IC. Provide
proper clock pulse.
Calculations from Graph: Cut in Voltage V (It is observed that Ge diode has smaller cut in voltage
when compared to Si diode. The reverse saturation current in Ge diode is larger in magnitude when
compared to Si diode)
In the above diode current equation, defines an exponential relationship between the diode current
(the dependent variable) and the diode voltage (the independent variable). This equation holds over
at least seven orders of magnitude of current and is truly valuable in defining the behaviors of
semiconductor diodes. Where I is the forward current, V is the forward voltage, IO is the reverse
saturation current, and VT = kT/q is the thermal Voltage. VT = T/11600, 26 mV at room temperature,
k is Boltzmann’s constant (1.38 x 10-23 j/⁰K, T is the absolute temperature in degree Kelvin (⁰K =
273 + the temperature in ⁰C) and q indicates the fundamental charge of electron (1.60 x 10-19
Coulombs (C=J/V). η is dependent on material, diode construction and operational considerations
and unless otherwise explicitly stated, the standard simplification of η =1 for Ge and 2 for Si will be
used for all examples and may be made for all analyses. Initially, the V vs I graph is linear but then
after reaching breakdown, it becomes exponential.
18
Worksheet of the Students
Observation Table:
ɳ is the emission coefficient which is 1 for Ge and 2 for Si
Value of reverse saturation current (I0) varies with temperature, since forward current varies between
1mA to 10mA at VF=0.7V for Si and 0.3 V for Ge so approximate range of reverse saturation current
(Io) for Si is 1.22nA to 12.2nA, Ge is 8.52nA to 85.2nA. You can find the correct value from this
range. In this practical, For Si Diode assumed value is 0.53nA
Thermal Voltage VT= 298.15/11600= 0.0257V at room temp.
Forward Bias
Sr. VF I_Calculated Si diode I_Calculated)Ge diode I (Measured) %age
𝑉 𝑉
No. ( ) ( ) Using Error
I=Io[𝑒 ƞ𝑉𝑇 -1] (A) I=Io[𝑒 ƞ𝑉𝑇 -1] (A)
ammeter
0.1 0.1
1. 0.1 ( ) ( )
I= Io[𝑒 2∗0.0257 -1= I= Io [𝑒 1∗0.0257 -1]=
0.2 0.2
2. 0.2 I= Io [𝑒 (2∗0.0257) -1]= I= Io [𝑒 (1∗0.0257) -1]=
0.3 0.3
3. 0.3 I= Io [𝑒
(
2∗0.0257
)
-1]= I= Io [𝑒
(
1∗0.0257
)
-1]=
0.5 0.4
4. 0.4 I= Io [𝑒
(
2∗0.0257
)
-1]= I= Io [𝑒
(
1∗0.0257
)
-1]=
0.5 0.5
5. 0.5 ( ) ( )
I= Io [𝑒 2∗0.0257 -1]= I= Io [𝑒 1∗0.0257 -1]=
0.6 0.6
6. 0.6 I= Io [𝑒 (
2∗0.0257
)
-1]= I= Io [𝑒 (
1∗0.0257
)
-1]=
0.7 0.7
7. 0.7 I= Io [𝑒 (
2∗0.0257
)
-1] = I= Io [𝑒 (
1∗0.0257
)
-1]=
0.7 0.8
8. 0.8 I= Io [𝑒
(
2∗0.0257
)
-1] = I= Io [𝑒
(
1∗0.0257
)
-1]=
0.9 0.9
9. 0.9 I= Io [𝑒 (
2∗0.0257
)
-1]= I= Io [𝑒 (
1∗0.0257
)
-1]=
1.0 1.0
10. 1 ( ) ( )
I= Io [𝑒 2∗0.0257 -1]= I= Io [𝑒 1∗0.0257 -1]=
Calculations:
Find optimal value of Io, for which measured diode current is equal to theoretical value of current,
and using that optimal value find theoretical diode current, and hence calculate
%𝑎𝑔𝑒 𝐸𝑟𝑟𝑜𝑟 𝐼 = ([𝐼_𝐶𝑎𝑙𝑐𝑢𝑙𝑎𝑡𝑒𝑑 − 𝐼_𝑀𝑒𝑎𝑠𝑢𝑟𝑒𝑑)/𝐼_𝐶𝑎𝑙𝑐𝑢𝑙𝑎𝑡𝑒𝑑]𝑥100
19
Results and Discussion on Sources or Error:
20
EXPERIMENT No.4
Aim: Understanding the truth table of Logic Gates and implement these gates using Universal
gates.
Learning Objectives: 1. To verify the functionality of Logic Gates
2. To implement Basic Logic gates using Universal gates and verify their function.
Instruments/Components required: IC-7404,7408,7432, 7400,7402, 7486, Digital Trainer
module,
Theory and verification
1. NOT GATE 7404
Input Output
0 1(LED GLOW)
1 0 (LED OFF)
21
by the Boolean expression A AND B, where A and B are the inputs.
0 0
0 1
1 0
1 1
Table 2: Observation table for AND gate (7408)
3. OR GATE 7432
0 0
0 1
1 0
1 1
Table 3: Observation table for OR gate (7432)
22
4. NOR Gate 7402
0 0
0 1
1 0
1 1
Table 4: Observation table for NOR gate (7402)
5. NAND Gate 7400
23
Input A Input B Output
0 0 1
0 1 1
1 0 1
1 1 0
0 0
0 1
1 0
1 1
Table 5: Observation table for NAND gate (7400)
6. XOR Gate 7486
XOR gate: The XOR gate, also known as an exclusive OR gate, produces a high output
if the number of high inputs is odd. It can be represented by the Boolean expression A
Input A Input B Output
0 0 0
0 1 1
1 0 1
1 1 0
xor B
Figure 12: IC diagram of 7486 and Truth Table
24
7.1 Using NAND Gate:
Input Output
0 1
1 0
Figure 13: NOT gate using NAND Gate and Truth table
Truth Table Outputs taken at
0 1
1 0
25
Truth Table Output
taken at
Input-1 Input-2 Output PIN6, Y1
0 0 1
0 1 1
1 0 1
1 1 0
Table 9: Observation table for AND Gate using NAND Universal gate
Input Output
0 1
1 0
Figure 16: NOT gate using NOR Gate and Truth table
Truth Table Outputs taken at
0 1
1 0
Table 10: Observation table for NOT gate using NOR Gate
0 0 0
0 1 1
1 0 1
1 1 1
Table 11: Observation table for OR Gate using NOR Universal gate
26
NOR Gate as AND Gate:
Input1 Input2 Output
0 0 0
0 1 0
1 0 0
1 1 1
Figure 18:
AND gate using NOR Gate and Truth table
0 0 1
0 1 1
1 0 1
1 1 0
Table 12: Observation table for AND Gate using NOR Universal gate
Procedure:
1. Place the IC on the breadboard of digital trainer module.
2. Identify VCC and GND terminals of the trainer module and connect them to VCC and
GND pins of the IC.
3. Identify toggle switches on the trainer module and connect them as inputs to the IC.
4. Identify output LEDs on the trainer module. Connect output pins of the IC to those
LEDs.
5. Apply various combinations of inputs according to the truth table and observe behavior
of the logic gates of the IC.
6. Disconnect the inputs and outputs of the IC and replace this IC with a new one and go
to step 1.
7. Got to step 1, till all ICs are tested/verified.
8. Now implement NOT, OR, AND using NOR, NAND respectively and verify the
functionality of NOT, OR, AND Gates.
Precautions:
1. All the connections should be perfectly tight.
2. Always connect ammeter in series and voltmeter in parallel.
3. Use safety guards while working on live parts.
4. Don’t touch the bare conductor when supply is ON.
5. Supply should not be switched ON until and unless the connections are
checked by the Faculty/Lab Instructor.
6. Use proper wire for connections.
Viva Questions:
1. Define gates?
2. Define IC?
3. What is DE Morgan’s law?
4. (A+A) A =?
27
5. Define Universal gates and draw their internal and external Pin Diagram.
6. Write the Boolean expression of the 2 inputs AND gate.
7. How many no. of input variables can a NOT Gate have?
8. Under what conditions the output of a two input AND gate is one?
9. Calculate 1+0 =?
10. When will the output of a NAND Gate be 0?
IC Connection Diagram:
28
Practical No: 05
Aim: Understanding the combinational logic by implementing the Boolean function using a
multiplexer.
Learning Objective: 1. To implement FA and FS using 4:1 MUX.
2. To verify the working of FA and FS using MUX.
Instruments/Components: 74153 IC, 7404 IC, Digital Trainer module, connecting probes
Theory: Multiplexer (MUX) is a device that connects one of the input lines to the output line
depending upon control signal as shown in Figure 1. Same is explained through a control
switch and internal circuit of 2:1 MUX.
Figure 1: Block diagram of 2:1Mux, 2:1 Mux implementation using control switch, Internal
circuit of 2:1 MUX
In case of 4:1 Mux, there are four input lines, I0, I1, I2 and I3, which are to be multiplexed on
a single line output line (Y). The four input lines are also known as the Data Inputs. Since there
are four inputs, there is need of two additional inputs to the multiplexer, known as the Select
Inputs. The purpose of select inputs is to select, which of the inputs is reflected at the output.
Call these select lines S1(A) and S0(B). The pin diagram of IC74153, which is dual 4:1
Multiplexer IC is shown below in Figure 2.
29
The given function has three variables, but 4:1 MUX can have only two select lines, so
one of the variables will be taken at the input. In this case we are taking
𝑪𝒏−𝟏 as 3rd variable that will be connected to input line of MUX. Table “Mux Map for
SUM” and “Mux Map for Carry” helps to identify input data line connections using
equations 1 and 2, wherein bracketed values in the table below indicate values of equation
1 and 2 respectively.
Mux map for Sum
Inputs I0 I1 I2 I3
̅ 𝒏−𝟏
𝑪 0 (2) (4) 6
𝑪𝒏−𝟏 (1) 3 5 (7)
𝑪𝒏−𝟏 ̅ 𝒏−𝟏
𝑪 ̅ 𝒏−𝟏
𝑪 𝑪𝒏−𝟏
30
3 and 4 respectively.
31
respectively, Now, complete the observation Table.
Precautions:
1. Do not press the IC on breadboard until pins are aligned with pours.
2. Make connection properly.
3. There should not any short circuit in the circuit. Avoid the heating of IC.
Observation Table:
Full Adder Full Subtractor
Inputs Outputs Inputs Outputs
A B Cn-1 Sn Cn A B Bn-1 Dn Bn
0 0 0 0 0 0
0 0 1 0 0 1
0 1 0 0 1 0
0 1 1 0 1 1
1 0 0 1 0 0
1 0 1 1 0 1
1 1 0 1 1 0
1 1 1 1 1 1
PIN diagram of IC-74153 with other external connections such as 7404, inputs, outputs
32
Learning Outcomes (Expected):
1. Could differentiate between adder is HA and FA?
2. Able to connect the circuit diagram using breadboard.
3. Understand provision of input carry and Borrow in FA, FS respectively
Learning Outcomes (What I have learnt):
Viva Questions:
1. How many select lines are there in 4:1 mux?
2. How can you implement a function with multiplexer?
3. IC 74153 is which type of the IC?
4. In 74153 what is the purpose of Strobe pin?
5. In 74153 how many multiplexers are present?
6. Which pin is active low pin in 74153 IC.
33
34
EXPERIMENT No. 6
Aim: Virtual Integration of IR sensor using Arduino.
Learning Objective (s):
1. To write a program code on Arduino for integration of IR sensor
2. To verify the working of the experiment using a circuit simulator.
Instruments/Components Required:
Theory:
An object can be detected with an infrared system consisting of an infrared transmitter
and a receiver. More in detail an IR transmitter, also known as IR LED, sends an infrared
signal with a certain frequency compatible with an IR receiver which has the task to
detect it. There are different kind of IR sensors for different type of application. In this practical,
IR technology is used as a proximity sensor to detect a near object.
IR sensor principle of operation with/without object: The IR transmitter sends an infrared
signal that, in case of a reflecting surface (e.g., white color),
bounces off in some directions including that of the IR receiver that captures the signal detecting
the object. When the surface is absorbent (e.g., black color) the IR signal isn’t reflected and the
object cannot be detected by the sensor. Same result would occur with object absent.
IR transmitter and IR receiver:
The IR transmitter is a particular LED that emits radiation in the frequency range of infrared,
invisible to the naked eye as shown in Figure 1. An infrared LED just works as a simple LED with
a voltage of 3V DC and a current consumption of about 20mA. The IR receiver, such as a
photodiode or a phototransistor, is capable of detect infrared radiation emitted from the IR
35
transmitter. Aesthetically it is similar to a LED but the external capsule can be wrapped by a dark
color film.
36
}
void loop() {
int SensorValue = digitalRead(2);
//Serial.print("SensorPin Value: ");
//Serial.println(SensorValue);
delay(100);
if (SensorValue==LOW){ // LOW MEANS Object Detected
digitalWrite(13, HIGH);
}
else
{
digitalWrite(13, LOW);
}
}
Procedure:
1. At first, write the program (code) as given above on Arduino Uno 1.8.19. Verify the code
and save it. Secondly, Go to Sketch → export compiled binary, and click on it to get
IR_sensor.ino.standard.hex, and IR_sensor.ino.with_bootloader.standard.hex in your
folder where Arduino program is saved.
2. For circuit simulation, Open simulation window and follow the path: File → Project
Name→ Create a schematic from Templates (Select Default) → Do not create a PCB
layout → No Firmware Project→ Schematic→ Press “finish”.
3. Double click on Arduino board (at simulation window) and place compiled binary files
IR_sensor.ino.standard.hex, and IR_sensor.ino.with_bootloader.standard.hex file at the
location of circuit simulator file.
4. Ensure that following library file are available at a place where circuit simulator file is
saved: “InfraredSensorsTEP.HEX”
5. If files not available as per step 4, then follow path follow path; C:://→ Program files (*86)
→ lab Centre electronics→ professional→ Data→ library → Copy “InfraredSensorsTEP
.HEX” and past at location of circuit simulator file.
37
6. Click on component mode (highlighted in red above) → P icon (highlighted in red) →
search component names as mentioned in “apparatus required” and place components as
per given above diagram with double click on the simulation window.
6.1 Get Arduino Board: Component mode→ P→ Search “Arduino UNO R3 V1.0”
6.2 Get Infrared Sensor: Component mode→ P→ Search “IR Obstacle Sensor”
6.3 Get Toggle Switch: Component mode→ P→ Search “LOGICTOGGLE”
6.4 Get Battery: Component mode→ P→ Search “CELL”→ Battery (single cell). Now edit
the value of battery (right click on the icon) and make it 5V.
6.5 Get Resistance: Component mode→ P→ Search “RESISTORS”→ 1K---10Watt. Now
edit the value of resistance (right click on the icon) and make it 220 ohm.
6.6 Get LED: Component mode→ P→ Search “LED”→ LED-GREEN
6.7 Get Virtual Terminal: Right click on the circuit creation space→ Place→ Virtual
Instrument→ Virtual Terminal.
6.8 Get Ground Terminal: Terminal Mode (as indicated below) and select Ground
7. Now Double click on Arduino board -→ open the folder highlighted in RED→ select the
IR_sensor.ino.standard.hex from circuit simulator file folder → Press “OK”.
38
8. Repeat the same exercise IR sensor, Double click on IR Sensor → Open program file
folder → select “InfraredSensorsTEP.HEX” from circuit simulator file folder→ press
“OK”
9. Once the circuit diagram is completed as indicated in Figure 2, press the play button
available at bottom left corner of simulation window as shown below (highlighted in red).
39
Viva Questions:
1. The function which repeatedly executes in the main program is?
2. How many buttons exist for reset and erase in Arduino Due?
3. What is the Importance Virtual terminal and logic toggle switch?
40
Experiment No.- 7
AIM: Understand JK Flip-Flop and implement T-Flip Flop using NAND circuit of JK Flip Flop.
Learning Objectives:
1. To implement JK flip flop using NAND gates and verify of its functionality.
2. To implement T flip flop using NAND gates and verify its functionality.
Components & Instruments required: IC 7410, 7400, Power supply and LEDs.
Theory:
The logic circuits whose outputs at any instant of time depend not only on the present input but also on
the past outputs are called sequential circuits. The simplest kind of sequential circuit which is capable
of storing one bit of information is called latch. The operation of basic latch can be modified, by
providing an additional control input that determines, when the state of the circuit is to be changed. The
latch with additional control input is called the Flip-Flop. The additional control input is either the clock
or enable input. Flip flop is formed using logic gates. Flip flop are fundamental building blocks in the
memory of electronic devices. Each flip flop can store one bit of data. Based on their operations, flip
flops are basically 4 types. They are
1. S-R flip flop
2. D flip flop
3. J-K flip flop
4. T flip flop
J-K flip-flop: JK flip flop operates on sequential logic principle, where the output is dependent not only on
the current inputs but also on the previous state. There are two inputs in JK Flip Flop Set and Reset denoted
by J and K. It also has two outputs: Output and complement of Output denoted by Q and Q̅. The internal
circuitry of a JK Flip Flop consists of a combination of logic gates, usually NAND gates as shown in Figure
1.
JK flip flop comprises four possible combinations of inputs:
• J=0, K=0: In this state, flip flop retains its preceding state. It neither sets nor resets itself, making it stable.
• J=0, K=1: This input combination forces flip flop to reset, resulting in Q=0 and Q̅=1. It is often referred to
as the “reset” state.
• J=1, K=0: Here, flip flop resides in the set mode, causing Q=1 and Q̅=0. It is known as the “set” state.
• J=1, K=1: This combination toggles flip flop. If the previous state is Q=0, it switches to Q=1 and vice versa.
This makes it valuable for frequency division and data storage applications.
Figure 1: J-K Flip flop using NAND gate, Truth Table (here Qn=Q)
41
Characteristic Table: Excitation table:
Qn Qn+1 J K
0 0 0 ×
0 1 1 ×
1 0 × 1
1 1 × 0
Characteristic Equation:
=>
T flip-flop: T flip flop or to be precise is known as Toggle Flip Flop because it can able to toggle its output depending
upon on the input. T, here stands for Toggle. Toggle basically indicates that the bit will be flipped i.e., either from 1
to 0 or from 0 to 1. The toggle or T-type flip-flop gets its name from the fact that its two outputs Q and Q invert
from their previous state as it toggles back and forth every time it is triggered (T = 1). That is,
the Q and Q outputs change to a “1” if it was “0”, and “0” if it was previously a “1” but only when the “T” input
changes HIGH, otherwise they do not change. Same is shown in Figure 2
42
Characteristic equation:
̅̅̅𝑛̅ + 𝑇
Qn+1 = 𝑇𝑄 ̅ 𝑄𝑛 = T xor Qn
Procedure:
1. Make the connections using IC 7400 and 7410 as given below
2. Power on the IC-7410 and 7400 by connecting VCC at pin 14 and GND at PIN 7.
3. Connect the "Clock 1Hz" button or pulse button as a CLK.
4. Apply the inputs as per characteristic table of JK FF and note the outputs in Figure 1, Update
the observation table of JK FF.
5. Verify the practical and theoretical values of JK-FF as per entries in observation table of
JK FF.
6. Similarly repeat step 4 and 5 for T FF of Figure 2.
7. Identify different sources of error in this practical.
43
IC Diagram of T-FF using NAND Gates
Precautions:
1. Do not press the IC on breadboard until pins are aligned with pours.
2. Make connection properly.
3. There should not any short circuit in the circuit. Avoid the heating of IC. Provide
proper clock pulse.
Learning Outcomes:
1. To learn the working of flip flops.
2. To test the IC of gates used.
3. To learn that how the present inputs and previous outputs effects present output.
Viva Questions:
1. What is the function of clock pulse?
2. What do you mean by race around condition?
3. How the race around condition can be removed?
4. How to convert JK to T-FF.
44
Worksheet of the student
Observation Table for J-K Flip Flop
J K Qn Qn+1 (Calculated using Characteristic equation) Q(n+1) (Observed using LED
display of Digital trainer kit)
0 0 0 ̅̅̅𝑛̅ + 𝐾
𝐽𝑄 ̅𝑄𝑛 =0. 0
̅+0
̅ . 0=0.1+1.0=0+0 = 0
0 0 1 ̅̅̅𝑛̅ + 𝐾
𝐽𝑄 ̅𝑄𝑛 =0. 1
̅+0
̅ . 1=0.0+1.1=0+1 = 1
0 1 0 ̅̅̅𝑛̅ + 𝐾
𝐽𝑄 ̅𝑄𝑛 =0. 0
̅+0
̅ . 0=0.1+1.0=0+0 = 0
0 1 1 ̅̅̅𝑛̅ + 𝐾
𝐽𝑄 ̅𝑄𝑛 =0. 1
̅+1
̅ . 1=0.0+0.1=0+0 = 0
1 0 0 ̅̅̅𝑛̅ + 𝐾
𝐽𝑄 ̅𝑄𝑛 =1. 0
̅+0
̅ . 0=1.1+1.0=1+0 = 1
1 0 1 ̅̅̅𝑛̅ + 𝐾
𝐽𝑄 ̅𝑄𝑛 =1. 1
̅+0
̅ . 1=1.0+1.1=0+1 = 1
1 1 0 ̅̅̅𝑛̅ + 𝐾
𝐽𝑄 ̅𝑄𝑛 =1. 0
̅+1
̅ . 0=1.1+0.0=1+0 = 1
1 1 1 ̅̅̅𝑛̅ + 𝐾
𝐽𝑄 ̅𝑄𝑛 =1. 1
̅+1
̅ . 1=1.0+0.1=0+0 = 0
0 1 ̅̅̅𝑛̅ + 𝑇
𝑇𝑄 ̅ 𝑄𝑛 = 0. 1
̅+0
̅ . 1=0.0+1.1=0+1 =1
1 0 ̅̅̅𝑛̅ + 𝑇
𝑇𝑄 ̅ 𝑄𝑛 = 1. 0
̅+1
̅ . 0=1.1+0.0=1+0 =1
1 1 ̅̅̅𝑛̅ + 𝑇
𝑇𝑄 ̅ 𝑄𝑛 = 1. 1
̅+1
̅ . 1=1.0+0.1=0+0 =0
45
Learning Outcomes (expected):
1. To implement JK and T-FF on the breadboard
2. To verify JK and T FF.
3. To identify different sources of error in this practical.
46
Practical No 8
Aim: Implement Decade counter using IC-7490 and seven segment display.
Learning Objective: To use IC-7490 as MOD-2, MOD-5 and MOD-10 counter, and display
IC-7490 output value on 7 segment display through decoder circuit.
Instruments/Components required: IC 7490, IC 7447 Decoder, Seven Segment display,
digital trainer module with 1Hz clock and 5V Power terminal, breadboard.
Theory: A decade counter resets to zero when the output count reaches the decimal value of
9, i.e. when 1001. A counter with a count sequence from binary 0000 through to 1001 is
generally referred as a BCD binary code decimal counter because its ten state sequences ie
0,1,2,3,4,5,6,7,8,9, are Binary Coded Decimal (BCD) Numbers.
The design of the experiment requires three ICs i.e. 7490, 7447 and seven segment display.
The outputs of 7490 acts as input to 7447 (BCD to seven segment decoder). There are 7 output
PIN from 7447 which acts as inputs to seven segment display IC as shown in Figure 1.
47
Figure 3: State diagram of MoD-10 Counter
2. IC 7447 BCD to seven segment decoder/driver IC: It is a 16 pin IC, which accepts a
binary coded decimal as input and converts it into a pattern to drive a seven-segment for
displaying digits 0 to 9. BCD is an encoding method in which each digit of a number is
represented by its own binary sequence (usually of four bits). It accepts four lines of BCD
(8421) input data and generates their complements internally. The outputs correspond to
common anode (CA) configuration of seven segment as shown in Figure 5.
48
Truth table and internal circuit of IC-7447:
K-Map Simplification
The below figures show the k-map simplification for the common cathode seven-segment
decoder in order to design the combinational circuit.
49
3. Seven Segment Display: Seven segment displays are 10 pin output display device that
provides a way to display information in the form of images or text or decimal numbers,
which is an alternative to the more complex dot matrix displays. It is widely used in digital
clocks, basic calculators, electronic meters, and other electronic devices that displays
numerical information. It consists of seven segments of light-emitting diodes (LEDs),
which are assembled like numerical 8. According to the type of application, there are two
types of configurations of seven-segment displays: common anode display and common
cathode display as shown in Figure 6.
In common cathode seven segment displays, all the cathode connections of LED segments
are connected together to logic 0 or ground. We use logic 1 through a current limiting
resistor to forward bias the individual anode terminals a to g (we may also connect without
using a resistance). Whereas all the anode connections of the LED segments are connected
together to logic 1 in a common anode seven segment display. We use logic 0 through a
current limiting resistor to the cathode of a particular segment a to g (we may also connect
without using a resistance).
Common anode seven segment display Common cathode seven segment display
(LED will glow with input LOW) (LED will glow with input HIGH)
7.1 Power On the ICs: IC-7490: PIN 5 to Vcc and PIN 10 to GND, IC-7447: PIN 15 to
Vcc and PIN 8, 7-Segment display: PIN 8 and or 3 to Vcc through a resistance to
provide less than 5V to power on display IC.
7.2 Connection diagram: - The output of IC-7490 is connected to IC7447 decoder and
decoder output to 7-segment display unit. Make the connections as shown in Figure 7,
as per case-2 of observation table.
7.3 Case-1 of Observation table:
7.3.1 Master CLK of 1Hz taken from Trainer module is connected at PIN -14 of IC-
7490.
7.3.2 PIN-12 is not connected to PIN-1 of IC-7490
7.4 Case-2 of Observation table:
7.4.1 Master CLK of 1Hz taken from Trainer module is connected at PIN -14 of IC-
7490.
50
7.4.2 PIN-12 is connected to PIN-1 of IC-7490.
7.5 Case-3 of Observation table:
7.5.1 Master CLK of 1Hz taken from Trainer module is not connected at PIN -14 of IC-
7490.
7.5.2 PIN-12 is not connected to PIN-1 of IC-7490
7.5.3 Master CLK of 1Hz taken from Trainer module is connected at PIN -1 of IC-7490
Observation Table
Sr No Changes in connection diagram of Figure 7 Expected Observed
sequence Sequence
1) Master CLK of 1Hz taken from Trainer module
is connected at PIN -14 of IC-7490 and 0→ 1→0
Case: 1 2) PIN-12 is not connected to PIN-1 of IC-7490
1) Master CLK of 1Hz taken from Trainer module
Case: 2 is connected at PIN -14 of IC-7490 and 0→1→2→3→4
2) PIN-12 is connected to PIN-1 of IC-7490 →5→6→7→8
→9→0
1) Master CLK of 1Hz taken from Trainer module
Case: 3 is not connected at PIN -14 of IC-7490 and 0→1→2→3→4
2) PIN-12 is not connected to PIN-1 of IC-7490 →0
3) Master CLK of 1Hz taken from Trainer module
is connected at PIN -1 of IC-7490
51
9 Viva Questions:
9.1Which type of seven segment display IC is used in this experiment?
9.2What should be the value of a, b, c, d, e, f and g, if we have to display 6?
9.3What do you understand by MOD-10 counter?
IC Connection Diagram:
52