0% found this document useful (0 votes)
338 views41 pages

Tinkercad: IC 74HC08 & 74H73 Analysis

Uploaded by

aayushisinghstar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
338 views41 pages

Tinkercad: IC 74HC08 & 74H73 Analysis

Uploaded by

aayushisinghstar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

• Gurjot Singh – 102205001

• Raghav – 102205045
• Priyansh – 102109059
• Hasan - 102205043
ASSIGNMENT - 1
INPUT / OUTPUT INTERFACE DESIGN

Exercise 1 (A) – Blink


1. To blink the LED with an Arduino for the amount of time equal to the sum of last two
digits of your Roll number, leaving the amount of time the LED is ‘OFF’ to 2 second.
(For example, if your Roll No. is 1019***27, the LED must be kept on for 9 second).

2. Hook up 8 LEDs to pins 2 through 9 (with resistors). Modify the code to turn on each
one in order and then extinguish them in order.
(HINT: hook them up one additional LED at a time and make sure the new one works before you
add the next one.)

Hardware/Software Required

• Arduino Board
• Breadboard
• LED and Resistors

Circuit description
To build the circuit, attach a 100-ohm resistor to either leg of the diode. Attach the leg of the LED
connected to the flat edge of the body (the negative leg, called the cathode) to ground. Connect the
remaining leg (the positive leg, called the anode) to pin 13. Then plug your Arduino board into
your computer, start the Arduino program, and upload the code.

Code
Schematic

Reflections (Conclusions):

It made it easier for us to comprehend how Arduino works. Arduino is a convenient tool for taking

control of a circuit and manipulating it in many ways. We can use it to power a variety of simulations.

It is particularly helpful when applying complicated concepts in practical ways. The simplest instance

of we received the ideal understanding of how to code for various scenarios from illuminating the

LED bulb. It also taught us how to put out schematic circuit diagrams on a breadboard and how to

understand them. Direct supply of voltage and ground was made to the Arduino, which was then

connected on the breadboard. The circuit was configured in this manner.


Exercise 1 (B) – Push Button
On a breadboard, connect Pushbutton to turn on the built-in LED on pin 13 i.e., when you press
the button LED should glow otherwise it should be in off state.
Hardware Required
• Arduino Board
• momentary button or switch
• 10K ohm resistor
• breadboard
• hook-up wire
Circuit description
Connect three wires to the Arduino board. The first two, red and black, connect to the two long
vertical rows on the side of the breadboard to provide access to the 5- Vo let supply and ground.
The third wire goes from digital pin 10 to one leg of the pushbutton. The same leg of the button
connects through a pull-down resistor (here 10 K Ohms) to ground. The other leg of the button
connects to the 5-volt supply.
When the pushbutton is open (unpressed) there is no connection between the two legs of the
pushbutton, so the pin is connected to ground (through the pull-down resistor) and we read a LOW.
When the button is closed (pressed), it makes a connection between its two legs, connecting the
pin to 5 volts, so that we read a HIGH.
You can also wire this circuit the opposite way, with a pullup resistor keeping the input HIGH, and
going LOW when the button is pressed. If so, the behavior of the sketch will be reversed, with the
LED normally on and turning off when you press the button.
If you disconnect the digital I/O pin from everything, the LED may blink erratically. This is
because the input is "floating" - that is, it will randomly return either HIGH or LOW. That's why
you need a pull-up or pull-down resistor in the circuit.

Code
Schematic

Reflections (Conclusions):
That advanced our understanding of how Arduino works. The example of using a push button to
illuminate an LED bulb offered us the ideal overview of how to write for various circumstances. It
also taught us how to put out schematic circuit diagrams on a breadboard and how to understand
them. Direct supply of voltage and ground was made to the Arduino, which was then connected on
the breadboard. The circuit was configured in this manner. It can serve as an illustration for complex
circuits, such as testing logic gates.
• Gurjot Singh – 102205001
• Raghav – 102205045
• Priyansh – 102109059
• Hasan - 102205043

Exercise 2– Study of ICs

To verify the function tables of CD4027 and CD4081 ICs.

Hardware Required
• Breadboard
• CD 4027 and CD 4081
• Single core connecting wires

Theory
The data sheet of CD4027 and CD4081 is given below.

(a) (b)
Figure 1: Datasheet of CD4081 IC (a) pin diagram (b) functional truth table

(a) (b)
Figure 2: CD4027 IC (a) pin diagram (b) Internal architecture
Schematic:

Reflections (Conclusions):

As a result, the JK flip-flop is an example of a controlled bi-stable latch, where the control signal is
the clock signal. As a result, the output has two stable states depending on the inputs that have been
described below. The states of the flip-output flop are denoted by Q and Q'.
ASSIGNMENT – 2 (B) STUDY OF IR SENSORS

Exercise 1
A. Demonstrate the working of IR sensors and receiver and display output using LED.
B. Use the two pair IR sensors of Mangonel to combine the two sensors output into one signal.

Hardware
• Bread Board, Power supply
• Resistances and LED
• IR transmitter and Receiver (Photodiode), Single core connecting wires

Theory

The figure below shows an IR pair in which IR LED emits infrared light which is received by photo
diode D1 and the output voltage across resistor R1 is high. When we block the flow of light then the
output voltage becomes low.

Reflections (Conclusions):
The working of the IR sensor is very simple, it consists of two main components: the first is the IR
transmitter section and the second is the IR receiver section. In the transmitter section, IR led is used
and in the receiver section, a photodiode is used to receive infrared signal and after some signal
processing and conditioning, you will get the output.

Name - Gurjot singh Roll no – 102205001 Subgroup – 1EI1

Assignment Tasks:

A. Using Tinker cad, Illustrate the pin configuration and verify the truth table of IC 74HC08and
IC 74H73
[I] IC

74HC08

Code

[II]IC 74H73
Code

B. Using Tinker cad, hook up 5 LEDs to pins 2 through 6 (with resistors). Modify the code to
turn on each one in order and then extinguish them in order.
(HINT: hook them up one additional LED at a time and make sure the new one works before you
add the next one.)
Code

C. With the help of Tinker cad, use push buttons to simulate the behavior of listed logic gates
(Without using ICs of logic gates)
a) Logic gates: OR, NOR, XNOR for students with even numbered Roll Number.
OR
Code
NOR
Code

XNOR

Code
b) Logic gates: AND, NAND, XOR for students with odd numbered Roll Number.

(I)
Code

(II)
Code

(III)

Code
• Gurjot Singh – 102205001
• Raghav – 102205045
• Priyansh – 102109059
• Hasan - 102205043

ASSIGNMENT – 3(A)

Exercise 1 – To verify the functional table of CD4543

Hardware Required
▪ Decoder (CD4543)
▪ Seven Segment Display
▪ Single core connecting wires
▪ Tinker cad Software tool ([Link]

Theory
The decoder (CD4543) is a combinational digital circuit that decodes a 4-bit binary input in the
range 0000-1001 (BCD) in to its corresponding decimal level. Example for the binary value 0101
we need to display 5. Hence the decoder will output a HIGH on segments (a, c, d, f and g) with
output a LOW on segments (b and e). The latch signal is normally connected to 5V via 10Kohm
resistor as per the circuit diagram. This allows the decoder to decode the present binary input (the
latch is said to be in a transparent state). When the latch is connected to 0V via the jumper provided
its logic state changes to a LOW and the decoder will decode the binary input prior to the latch
going low (i.e., the display is frozen when the latch is LOW).

Schematic Diagram
Figure 1: Pin diagram of CD4543
Figure 2:
Functional table of CD4543

Exercise 2 – BCD (binary coded decimal) to 7 Segment Display

Hardware Required
▪ Decoder (CD4543)
▪ Seven Segment Display
▪ Single core connecting wires
▪ Tinker cad Software tool ([Link]
▪ Arduino Uno

Theory
The decoder (CD4543) is a combinational digital circuit that decodes a 4-bit binary input in the
range 0000-1001 (BCD) in to its corresponding decimal level. Example for the binary value 0101
we need to display 5. Hence the decoder will output a HIGH on segments (a, c, d, f and g) with
output a LOW on segments (b and e). The latch signal is normally connected to 5V via 10Kohm
resistor as per the circuit diagram.
This allows the decoder to decode the present binary input (the latch is said to be in a transparent
state). When the latch is connected to 0V via the jumper provided its logic state changes to a
LOW and the decoder will decode the binary input prior to the latch going low (i.e., the display
is frozen when the latch is LOW).

Schematic Diagram

Figure 1: Connection setup for converting BCD input to seven segment output.
Experimental connection diagram:
Sketch:

Reflections:

Each of the decimal numbers (from 0 to 9) is represented by its equivalent binary pattern in the
Binary Coded Decimal (BCD) encoding technique (which is generally of 4-bits). Whereas, seven
segment display is an electronic device which consists of seven Light Emitting Diodes (LEDs)
arranged in some definite pattern (common cathode or common anode type), which is used to
display Hexadecimal numerals (in this case decimal numbers, as input is BCD i.e., 0-9).

Exercise 3 – Write an Arduino sketch to make an up counter which counts from 0 to 9 & repeat it
infinitely. Display the digits using BCD code on the 7-segment display on digital trainer kit.
Hardware Required
▪ Decoder (CD4543)
▪ Seven Segment Display
▪ Single core connecting wires
▪ Arduino Uno

Theory (Write the theory as per your understanding during self-effort and lab hours)

So how does this 2-digit 7-segment display counter work. The first half of the
digital counter circuit works the same as before except that the activation of the
pushbutton SW1 increments the “one’s” (also called “units”) LED display.
The first 74LS90 BCD counter, U1 counts upwards from 0 to 9 (0000 to 1001)
on each closing (trailing-edge) of SW1. However, when the counting sequence
reaches “8” (1000) on the one’s display, pin-11 of U1 corresponding to output
“D” goes “HIGH” and stays HIGH until U1 resets itself back to zero on the 10th
count at which time pin-11 of U1 goes “LOW” again.

Experimental connection diagram:

Sketch:
Reflections:

In this tutorial we are going to interface a seven segment display to ARDUINO UNO. The display
counts from 0-9 and resets itself to zero. Before going further, let us first discuss about seven segment
displays. You can also check this detailed tutorial on interfacing Arduino with seven segment
display.
A seven-segment display got its name from the very fact that it got seven illuminating segments.
Each of these segments has a LED (Light Emitting Diode), hence the lighting.

Name - Gurjot singh Roll no – 102205001 Subgroup – 1EI1

Assignment Tasks:

▪ Use Tinker cad to redesign Exercise 2 and display the last digit of your Roll Number on the
7-segment display.
Code
▪ Using Tinker cad, write an Arduino sketch to make an up counter which counts from 0 to 9
& repeat it infinitely using Tinker cad

Code
• Gurjot Singh – 102205001
• Raghav – 102205045
• Priyansh – 102109059
• Hasan - 102205043

ASSIGNMENT – 4 (ASSEMBLY OF HARDWARE AND SOFTWARE)

Exercise 1 – To construct a circuit which will record and display the length of time taken by the
throwing arm on the Mangonel to pass between the sensors mounted on the chassis. Implement
the real hardware on the breadboard, at the input side of the Arduino. Demonstrate the hardware
and software by attaching to a real Mangonel.

Hardware Required
▪ CD4027, CD4081, CD4543
▪ Arduino Uno
▪ Seven Segment Display
▪ Single core connecting wires
▪ Digital Trainer Kit

Theory
The circuit is required to:
• Accept the individual inputs from the two sensors on the Mangonel,
• Combine the two signals into one,
• Convert the two short pulses into one long pulse,
• Deliver this pulse to the relevant input on the Arduino Board,

The input signals:


The input signals received from the sensors on the Mangonel are shown in Figure 1 below:

Figure 1: Mangonel sensors signals

Required signal:
The signal required for the Arduino program is shown in figure 2:
Figure 2:
Required signal for Arduino.

How do we achieve the required signal?


In order to make one signal out of the two, we first need to combine the two individual signals.
This is done by means of a combination logic setup. You should by now be familiar with the basic
logic circuits as shown below.

Figure 3: Basic logic gates

Of the devices above, the best choices for combining our two signals into one are the AND or
NAND gates as either will preserve the signal from each individual sensor whilst also combining
the two signals into one. It is important to note that NAND is simply inverted AND, similarly, if
we invert NAND, we get AND again.

Figure 4: Logic inversion

The output from NAND and AND gates respectively to the input signal provided are shown below.
Figure 5:
AND
and NAND logic outputs

Figure 5 shows how the logic signals from the inputs are each maintained but combined into one
signal. The next task is to convert the two small pulses into one long pulse.

Looking at the AND output signal, it could be argued that we already have a long pulse from this
step alone – however, the long pulse between the two short pulses given by the AND logic is not
an accurate measurement of the transit time of the arm because the pulse length is shortened by
the width of the second pulse. We need to generate a single long pulse as shown in figure 6 which
extends from either the rising or falling edge of the first pulse, to the corresponding edge of the
second pulse.

Figure 6: Logic comparison chart

This can be achieved by using the two shorter pulses in the output of the AND gate to “toggle” or
“clock” the output of a latching logic device. For this purpose, we are going to use a J-K flip-flop.

Figure 7: J-K flipflop and function table.


The J - K
flip- flop
is the most versatile of the basic flip -flops. It has two inputs, traditionally labelled J and K. If J
and K are different then the output Q takes the value of J at the next clock edge. If J and K are both
low then no change occurs. If J and K both are high at the clock edge then the output will toggle
from one state to the other. This toggle application means that we can use the two signal pulses
from the output of the AND gate to cause the output of the flip-flop to change state, hence allowing
us to create one long pulse between the corresponding edges of the two shorter pulses. The device
also has set and reset functions which will be useful for clearing the output states when we want
to start a new timing run. Figure 7 shows the function table of the J-K flip-flop.

The output of out J-K flip-flop then goes to the appropriate input of the Arduino and from there
the program in the Arduino will measure the length of the pulse and output the appropriate values
to the various registers on the display. Hence, our circuit should wind up looking something like
this:

Figure 8: Circuit Schematic

Explain Figures 9 succinctly, in fewer than 50 words per stage, each of the five stages involved in
measuring the swing time of the Mangonel arm.
Figure 9: Stages 1 to 5
Schematic Diagram

Reflection:
Name – Gurjot Singh Roll no – 102205001 Subgroup – 1EI1

Assignment Tasks:

1. Obtain the required signal for Arduino shown in figure 2 using at least two different logic gates
(explain using waveforms).
2. Using Tinker cad, design the following sensor based micro-projects to:

a. Detect the motion of an object,


PIR SENSOR

Code
b. Measure distance between an object and the sensor itself.
ULTRASONIC SENSOR

Code
Also mention the application of these project in terms of designing a Precision Mangonel.

• PIR sensor application in mangonel


However, if a PIR sensor were incorporated into a contemporary mangonel adaptation
or modification, it might be utilized to detect the presence of a target and cause the
mangonel to fire. For instance, the PIR sensor may be set up to detect the movement of
a person or vehicle, and once the target is within range, the sensor could trigger the
mangonel's firing mechanism.

• Ultrasonic sensor application in mangonel


The ultrasonic sensor may be put on the mangonel, pointed at the target, and used to
measure the time it takes for high frequency sound waves to return from the target
mangonel may use this measurement to determine the distance to the target and alter the
firing angle and power as needed.
An ultrasonic sensor could be used to not only increase accuracy but also to look for
targets or objects close to the mangonel in order to prevent collisions or other damage.

You might also like