Module 5
Module 5
The binary number system uses only two digits: 0 and 1. The numbers in this
system have a base of 2. Digits 0 and 1 are called bits and 8 bits together make a
byte. The data in computers is stored in terms of bits and bytes.
The octal number system uses eight digits: 0,1,2,3,4,5,6 and 7 with the base of 8.
Just like the binary, the octal number system is used in minicomputers but with
digits from 0 to 7.
The decimal number system uses ten digits: 0,1,2,3,4,5,6,7,8 and 9 with the base
number as 10. If any number is represented without a base, it means that its base is
10.
Hexadecimal Number System
To convert a number from the binary to the decimal system, we use the
following steps.
• Step 1: Multiply each digit of the given number, starting from the rightmost
digit, with the exponents of the base.
• Step 2: The exponents should start with 0 and increase by 1 every time we
move from right to left.
• Step 3: Simplify each of the above products and add them.
Let us understand the steps with the help of the following example in which
we need to convert a number from binary to decimal number system.
Example: Convert 1001112 into the decimal system.
Solution:
Step 1: Identify the base of the given number. Here, the base of 1001112 is
2.
Step 2: Multiply each digit of the given number, starting from the rightmost
digit, with the exponents of the base. The exponents should start with 0 and
increase by 1 every time as we move from right to left. Since the base is 2
here, we multiply the digits of the given number by 20, 21, 22 , and so on
from right to left.
Step 3: We just simplify each of the above products and add them.
Or, we can use the following steps to make this process simplified.
100111 = (1 × 25) + (0 × 24) + (0 × 23) + (1 × 22) + (1 × 21) + (1 × 20)
= (1 × 32) + (0 × 16) + (0 × 8) + (1 × 4) + (1 × 2) + (1 × 1)
= 32 + 0 + 0 + 4 + 2 + 1
= 39
Thus, 1001112 = 3910.
Conversion of Decimal Number System to Binary / Octal /
Hexadecimal Number System
Step 3: The given number in the octal number system is obtained just by
reading all the remainders and the last quotient from bottom to top.
There are two ways to convert octal to binary, which are explained below:
• Convert octal to decimal and then decimal to binary
• The direct method of octal to binary conversion
• Step 1: List out the powers of 2 for all the digits starting from the rightmost
position. The first power would be 20 and as we move on it will be 21, 22, 23,
24, 25,... In the given example, there are 6 digits, therefore, starting from the
rightmost digit, the weight of each position from the right is 20,21,22,23,24,25.
• Step 2: Now multiply each digit in the binary number starting from the right
with its respective weight based on its position and evaluate the product.
Observe the figure shown below to relate to the step. Finally, sum up all the
products obtained for all the digits in the binary number.
• Step 3: Now, express the binary number as a decimal number: 1011012 =
4510
13 ÷ 2 6 1 (LSB)
6÷2 3 0
3÷2 1 1
1÷2 0 1 (MSB)
After noting the remainders, we will write them in such a way that the Most
Significant Bit (MSB) of the binary number is written first, followed by the
rest. Therefore, the binary equivalent for the given decimal number 1310 is
11012. This means that 1310 = 11012.
How to Convert Decimal to Hexadecimal?
Binary Addition
The binary number system uses only two digits 0 and 1 due to which
their addition is simple. There are four basic operations for binary
addition, as mentioned above.
0+0=0
0+1=1
1+0=1
1+1=10
The above first three equations are very identical to the binary digit
number. The column by column addition of binary is applied below in
details. Let us consider the addition of 11101 and 11011.
1 + 1 = 10 = 0 with a carry of 1.
1 +1 +1 = 11
Binary Subtraction
The subtraction of the binary digit depends on the four basic operations
0–0=0
1–0=1
1–1=0
10 – 1 = 1
The above first three operations are easy to understand as they are
identical to decimal subtraction. The fourth operation can be
understood with the logic two minus one is one.
For a binary number with two or more digits, the subtraction is carried
out column by column as in decimal subtraction. Also, sometimes one
has to borrow from the next higher column. Consider the following
example.
0–0=0
1–1=0
AND Gate
OR Gate
NOT Gate
NAND Gate
The NAND gate is a digital logic gate with ‘n’ i/ps and one o/p, that performs
the operation of the AND gate followed by the operation of the NOT
gate.NAND gate is designed by combining the AND and NOT gates. If the
input of the NAND gate high, then the output of the gate will be low.The
symbol and truth table of the NAND gate with two inputs is shown below.
NOR Gate
The NOR gate is a digital logic gate with n inputs and one output, that
performs the operation of the OR gate followed by the NOT gate. NOR gate
is designed by combining the OR and NOT gate. When any one of the i/ps
of the NOR gate is true, then the output of the NOR gate will be false. The
symbol and truth table of the NOR gate with the truth table is shown below.
Exclusive-OR Gate
The Exclusive-OR gate is a digital logic gate with two inputs and one output.
The short form of this gate is Ex-OR. It performs based on the operation of
the OR gate. . If any one of the inputs of this gate is high, then the output of
the EX-OR gate will be high. The symbol and truth table of the EX-OR are
shown below.
Exclusive-NOR Gate
The Exclusive-NOR gate is a digital logic gate with two inputs and one
output. The short form of this gate is Ex-NOR. It performs based on the
operation of the NOR gate. When both the inputs of this gate are high, then
the output of the EX-NOR gate will be high. But, if any one of the inputs is
high (but not both), then the output will be low. The symbol and truth table of
the EX-NOR are shown below.
The applications of logic gates are mainly determined based upon their truth
table, i.e., their mode of operations. The basic logic gates are used in many
circuits like a push-button lock, light-activated burglar alarm, safety
thermostat, an automatic watering system, etc.
Truth Table to Express Logic Gate Circuit
Gate circuit can be expressed using a common method is known as a truth
table. This table includes all the input logic state combinations either high
(1) or low (0) for every input terminal of the logic gate through the
equivalent output logic level like high or low. The NOT logic gate circuit is
shown above and its truth table is extremely easy indeed
The truth tables of logic gates are very complex but larger than the NOT
gate. The truth table of each gate must include many rows like there are
possibilities for exclusive combinations for inputs. For instance, for the NOT
gate, there are two possibilities of inputs either 0 or 1, whereas, for the two-
input logic gate, there are four possibilities like 00, 01, 10 & 11. Therefore,
it includes four rows for the equivalent truth table.
For a 3-input logic gate, there are 8 possible inputs like 000, 001, 010, 011,
100, 101, 110 & 111. Therefore, a truth table including 8 rows is required.
Mathematically, the required number of rows in the truth table is equivalent
to 2 increased to the power of the no. of i/p terminals.
Analysis
The voltage signals in the digital circuits are represented with binary values
like 0’s & 1’s calculated in reference to ground. The deficiency of voltage
mainly signifies a “0” whereas the existence of full DC supply voltage
signifies a “1”.
A logic gate is a special type of amplifier circuit that is mainly designed for
input as well as output logic level voltages. Logic gate circuits are most
frequently symbolized with a schematic diagram through their own
exclusive symbols Instead of their essential resistors and transistors.
• For AND Gate – If both the inputs are high then the output is also
high
• For OR Gate – If a minimum of one input is high then the output is
High
• For XOR Gate – If the minimum one input is high then only the
output is high
• NAND Gate – If the minimum one input is low then the output is
high
• NOR Gate – If both the inputs are low then the output is high.
De Morgan’s Theorem
The first theorem of DeMorgan states that the logic gate like NAND is equal
to an OR gate with a bubble. The logic function of the NAND gate is
A’B = A’+B’
The second theorem of DeMorgan states that the NOR logic gate is equal
to an AND gate with a bubble. The logic function of NOR gate is
(A+B)’= A’. B’
The Conversion of NAND Gate
The NAND gate can be formed using AND gate & NOT gate. The Boolean
expression & truth table is shown below.
Y= (A⋅ B)’
B Y′=A⋅ B
A Y
0 0 1
0
1 0 1
0
1 0 0
1
1 1 1
0
NOR Gate Conversion
The NOR gate can be formed using OR gate & NOT gate. The Boolean
expression & truth table is shown below.
Y = (A+B)’
B Y′ = A+B Y
A
0 0 1
0
0 1 1
0
1 0 1
0
1 1 1
0
Ex-OR Gate Conversion
The Ex-OR gate can be formed using NOT, AND & OR gate. The Boolean
expression & truth table is shown below. This logic gate can be defined as
the gate that gives high output once any input of this is high. If both the
inputs of this gate are high then the output will be low.
Y=A⊕B or A’B+AB’
A B
Y
0
0 0
0 1
1
1
1 0
0
1 1
Y = (A’B + AB’)’
B
A Y
0
0 1
0
1 0
0
1 0
1
1 1
The basic logic gates can be designed with the help of universal gates. It
uses an error, a bit of test otherwise you can utilize Boolean logic for
attaining these through the logic gates equations for a NAND gate as well
as a NOR gate. Here, Boolean logic is used to solve the output you require.
It takes some time but it is needed to perform this to obtain a hang of
Boolean logic as well as basic logic gates.
Applications
The applications of basic logic gates are so many however they mostly
depend on their truth tables otherwise form of operations. Basic logic gates
are frequently used in circuits like a lock with push-button, the watering
system automatically, burglar alarm activated through light, safety
thermostat & other types of electronic devices.
The main advantage of basic logic gates is, these can be used in a different
combination circuit. In addition, there is no boundary to the number of logic
gates that can be utilized in a single electronic device. But, it can be limited
because of the specified physical gap within the device. In digital ICs
(integrated circuits) we will discover a collection of the logic gate region
unit.
• Operations
• Terminologies
• Truth Table
• Rules
• Laws
• Theorems
• Example
• FAQs
Below is the table defining the symbols for all three basic operations.
Operator Symbol Precedence
OR + (or) ∨ Lowest
Suppose A and B are two Boolean variables, then we can define the three operations as;
Boolean Expression
A logical statement that results in a Boolean value, either be True or False, is a Boolean
expression. Sometimes, synonyms are used to express the statement such as ‘Yes’ for ‘True’
and ‘No’ for ‘False’. Also, 1 and 0 are used for digital circuits for True and False,
respectively.
Boolean expressions are the statements that use logical operators, i.e., AND, OR, XOR and
NOT. Thus, if we write X AND Y = True, then it is a Boolean expression.
A B A∧B A∨B
A ¬A
True False
False True
• Variable used can have only two values. Binary 1 for HIGH and Binary 0 for LOW.
• The complement of a variable is represented by an overbar.
• OR-ing of the variables is represented by a plus (+) sign between them. For example, the OR-
ing of A, B, and C is represented as A + B + C.
• Logical AND-ing of the two or more variables is represented by writing a dot between them,
such as A.B.C. Sometimes, the dot may be omitted like ABC.
Laws of Boolean Algebra
There are six types of Boolean algebra laws. They are:
• Commutative law
• Associative law
• Distributive law
• AND law
• OR law
• Inversion law
Those six laws are explained in detail here.
Commutative Law
Any binary operation which satisfies the following expression is referred to as a commutative
operation. Commutative law states that changing the sequence of the variables does not have
any effect on the output of a logic circuit.
• A. B = B. A
• A+B=B+A
Associative Law
It states that the order in which the logic operations are performed is irrelevant as their effect
is the same.
• ( A. B ). C = A . ( B . C )
• ( A + B ) + C = A + ( B + C)
Distributive Law
Distributive law states the following conditions:
• A. ( B + C) = (A. B) + (A. C)
• A + (B. C) = (A + B) . ( A + C)
AND Law
These laws use the AND operation. Therefore they are called AND laws.
• A .0 = 0
• A.1=A
• A. A = A
• �.�¯=0
OR Law
These laws use the OR operation. Therefore they are called OR laws.
• A +0=A
• A+1=1
• A+A=A
• �+�¯=1
Inversion Law
In Boolean algebra, the inversion law states that double inversion of variable results in the
original variable itself.
• �¯¯=�
A B A’ B’ (A.B)’ A’+B’
0 0 1 1 1 1
0 1 1 0 1 1
1 0 0 1 1 1
1 1 0 0 0 0
A B A’ B’ (A+B)’ A’. B’
0 0 1 1 1 1
0 1 1 0 0 0
1 0 0 1 0 0
1 1 0 0 0 0
Analyzing the working of a Single-stage amplifier circuit, makes us easy to understand the formation
and working of Multi-stage amplifier circuits. A Single stage transistor amplifier has one transistor,
bias circuit and other auxiliary components. The following circuit diagram shows how a single stage
transistor amplifier looks like.
Single Stage
When a weak input signal is given to the base of the transistor as shown in the figure, a small amount
of base current flows. Due to the transistor action, a larger current flows in the collector of the
transistor. (As the collector current is β times of the base current which means IC = βIB). Now, as the
collector current increases, the voltage drop across the resistor RC also increases, which is collected
as the output.
Hence a small input at the base gets amplified as the signal of larger magnitude and strength at the
collector output. Hence this transistor acts as an amplifier.
Practical Circuit
The various prominent circuit elements and their functions are as described below.
Biasing Circuit
The resistors R1, R2 and RE form the biasing and stabilization circuit, which helps in establishing a
proper operating point.
Coupling Capacitor CC
This capacitor is present at the end of one stage and connects it to the other stage. As it couples two
stages it is called as coupling capacitor. This capacitor blocks DC of one stage to enter the other but
allows AC to pass. Hence it is also called as blocking capacitor.
Due to the presence of coupling capacitor CC, the output across the resistor RL is free from the
collector’s DC voltage. If this is not present, the bias conditions of the next stage will be drastically
changed due to the shunting effect of RC, as it would come in parallel to R2 of the next stage.
Base Current
When no signal is applied in the base circuit, DC base current IB flows due to biasing circuit. When
AC signal is applied, AC base current ib also flows. Therefore, with the application of signal, total
base current iB is given by
iB=IB+ib
Collector Current
When no signal is applied, a DC collector current IC flows due to biasing circuit. When AC signal is
applied, AC collector current ic also flows. Therefore, the total collector current iC is given by
iC=IC+ic
Where
IC=βIB
= zero signal collecor current
ic=βib
= collecor current due to signal
Emitter Current
When no signal is applied, a DC emitter current IE flows. With the application of signal, total emitter
current iE is given by
iE=IE+ie
It should be remembered that
IE=IB+IC
ie=ib+ic
As base current is usually small, it is to be noted that
IE≅IC
and ie≅ic
Since LEDs are vulnerable semiconductors devices, they must be driven using a
regulated current and voltage power supply. Thus, we can also say that LED
drivers are basically power supplies, specially designed to operate or illuminate
LEDs through controlled parameters, so that the LEDs illuminate optimally
without the risk of an over voltage or an over current.
This implies that an LED driver must feature a constant voltage and a constant
current, ensuring that the LEDs are never subjected to abnormal voltage or
current conditions, and they never burn or deteriorate overtime.
The biggest enemy of LED is overheating, which can cause a thermal runaway
situation in LEDs. Overheating may be caused due to over current or over
voltage, and this is exactly why these two parameters must be strictly regulated
in any given LED driver circuit.
LED Parameters
Before we start learning LED driver circuits, it would be important to understand
a few of the LED specifications which are crucial to designing drivers for them.
These are, LED forward voltage rating or the VF rating, and LED forward current
rating or the IF rating.
LED Forward Voltage Rating (VF): It is basically an optimal voltage rating of the
LED which is supposed to be supplied by the driver or the power supply to
illuminate the LED with optimal brightness. This voltage must never be
increased to ensure proper safety to the LED.
LED Forward Current Rating (IF): It is the maximum operating current of the LED,
exceeding which can cause a deterioration or even permanent damage to the
LED.
For example a standard 1 watt LED has a forward voltage rating of 3.3 V, and a
forward current of 0.303 Ampere. Exceeding the forward voltage of 3.3 V can
cause an increase in the current consumption exceeding its maximum tolerable
IF rating of 0.303 amps. This may result in overheating of the LED so that it
ultimately burns and gets permanently damaged.
The forward current can be calculated by dividing the LED wattage by its
forward voltage. For the above example, this is IF = 1 / 3.3 = 0.303 Amps
While designing an LED driver it must be ensured that it provides the LEDs with
the correct amount of VF and the IF parameters, so that that the LEDs are able to
illuminate optimally without any risks of damage.
Now we will see how the VF and IF parameters, as explained above, can be
correctly implemented using the right LED configuration and by calculating the
LED resistor correctly.
LED Configuration
While designing LED drivers the LED configuration must be correctly matched
with the voltage output of the driver, such that the driver voltage is equal to the
forward voltage spec of the LED configuration.
This ensures that the correct amount of forward current passes through the
LEDs. However it is always not possible to match the driver output with the
available LED configuration.
In case the driver output does not exactly match with the forward voltage spec
of the LED then we use series current limiting resistor to adjust the voltage and
current of the driver with the LED.
Example#1
For example, let's say, the output voltage of the driver is 12 V DC (with 1 Amp
current), and we want to connect a 3 watt LED with this DC output. Assume we
have 3nos of 1 watt LEDs with forward voltage specification of 3.3 V each.
We want the forward voltage of the LEDs to match as closely as possible with
the 12 V spec of the driver.
Therefore we add the 3 LEDs in series, so that the total forward voltage of the
LED string becomes 3.3 + 3.3 + 3.3 = 9.9 V. This is close to 12 V but still not
precisely equal.
If we connect this 3 LED string directly with the 12 V supply of the driver, that
would cause each LED to be subjected to a forward voltage of 12 / 3 = 4 V. This
looks too high for each of the LEDs, and this would instantly burn the entire 3
LED string.
To prevent the above issue, and to ensure that the 3 LED string works correctly
with the 12 V from the driver, we add a series resistor with the LED string. The
resistor value is calculated by considering the total forward voltage of the LED
string, the maximum current spec of the LED string, and the supply input voltage
from the driver.
R = 12 - 9.9 / 0.303 (All the 3 LEDs will have 0.303 amp current since they are
connected in series.)
Example#2
Let's consider another scenario where we want to configure a 6 watt LED to a 12
V, 1 Amp driver output. Assuming we have 6 nos of 1 watt LEDs, we want to
make sure that the total forward voltage of the LEDs is as close as possible to
the 12 V DC output.
Just as the previous example, putting 3 LEDs in series provides a total forward
voltage of 3.3 + 3.3 + 3.3 = 9.9 V. Since we have 6 LEDs, means we have to create
two such strings having 3 series LEDs on each string.
Once the two strings are created, the next step is to calculate the current
limiting resistor for the two LED strings. As calculated in the previous example,
we have to connect a 7 ohm 1 watt resistor in series with each of the two LED
strings, and then simply join the two LED strings in parallel.
This parallel combination then finally could be attached to the 12 V supply for
getting a matching configuration with the supply.
Example#3
In the above two examples the calculations were pretty easy since the LED
numbers were even. Now let's consider an LED combination which is not even.
Let's assume we have 7 nos of 1 watt LEDs for the 7 watt LED configuration.
We first create two strings of LEDs having 3nos of 1 watt LEDs each, along with
a 7 ohm 1 watt series resistor on the each of the strings.
We have no other option but to connect this single LED parallel to the two
strings.
However, this single LED will also need a resistor so that its 3.3 V forward
voltage could be matched with the 12 V supply.
We use the same formula as above to calculate the limiting resistor for this
single LED string:
Warning: Circuits explained below are not isolated from mains AC, and therefore
are extremely dangerous to touch in the powered and open condition. You
should be extremely careful while building and testing these circuits, and make
sure to take the necessary safety precautions. The author cannot be held
responsible for any mishap due to any negligence by the user.
However, designing SMPS power supplies is not easy and requires a lot of
calculations, so new hobbyists can find this aspect of an SMPS undesirable, and
inefficient.
Therefore it may seem that designing SMPS LED drivers can be indeed a
complex affair, and most electronic enthusiasts or professionals may find this
not so preferable.
That said, there is an easy workaround through which cheap and quick SMPS
LED drivers could be created.
It is by procuring ready-made, cheap SMPS power supplies from the market, and
then configuring an LED stage at its output, through a current control circuit.
A cheap 12 V 1 amp SMPS board example can be seen in the following image:
These modules will produce 12 V DC 1 amp output, with a capacity of 12 watts.
We can easily attach appropriately configured LEDs strings at the output through
a current controller stage for converting these SMPS boards into easy and safe
LED drivers.
Other than emitting invisible infrared light, IR LED looks like a normal LED and
also operates like a normal LED, means it consumes 20mA current and 3vots
power. IR LEDs have light-emitting angle of approx. 20-60 degree and range of
approx. few centimetres to several feets, it depends upon the type of IR
transmitter and the manufacturer. Some transmitters have a range in kilometers.
IR Receiver (TSOP17XX)
TSOP17XX receives the modulated Infrared waves and changes its output.
TSOP is available in many frequency ranges like TSOP1730, TSOP1738,
TSOP1740 etc. Last two digits represent the frequency (in Khz) of modulated IR
rays, on which TSOP responds. Like for example TSOP1738 reacts when it
receives the IR radiation modulated at 38Khz. Means it detects the IR which is
switching On and Off at the rate of 38Khz. TSOP’s output is active low, means
its output is remains HIGH when there is no IR, and becomes low when it detects
IR radiation. TSOP operates on particular frequency so that other IRs in the
environment can’t interfere, except the modulated IR of particular frequency. It
has three pins, Ground, Vs (power), and OUTPUT PIN.
When it’s dark, the LDR has high resistance. This makes the
voltage at the base of the transistor too low to turn the
transistor ON.
If you are using an LED with 2V voltage drop, you will have a
7V voltage drop over the resistor when the transistor is ON.
By using Ohm’s law we can find the current:
You can also make the LED turn ON when it is dark instead
of when it is light. To do this, replace the NPN transistor with
a PNP transistor like this:
What is the Relay Drive?
Briefly, a relay is a switch with an electric operation. A relay driver circuit is a circuit
type that runs a relay, therefore, contributing to an appropriate circuit function. In
turn, the relay switch opens or closes, as per the circuit requirement and functioning.
Example of a relay driver circuit
Source: Wikimedia
Working principle
Let us go through the points below to understand the working principle of a relay
drive.
• A relay structure comprises a spring-loaded contact and coil that move undisturbed
across a pivoted axis.
• The central pole ensures that as the relay coil receives voltage, it joins the N/C
contact (Normally Closed). The connection happens because the relay coil has an
electromagnetic pull that attracts the pole iron.
• Later, when you switch OFF the relay coil, the central pole disconnects from the
Normally Open (N/O) terminal. It then joins the N/C switch contact terminal hence
being in a default contact position.
Generally, the switch OFF and switch ON operations in a relay drive alternately
switches N/C to N/O. And it majorly depends on the state of the relay coil.
Circuit diagram of a functional drive
The expression below gives the formula for calculating a transistor’s base resistor.
R = (Us – 0.6) hFE/Relay coil current
Whereby;
Use another Ohm’s law formula to get the relay current: I = Us/R. Here;
Us = supply voltage
A power MOSFET
Source: Wikiwand
The pin configuration of relay driver circuits depends on the manufacturer. Therefore,
it is advisable to check the datasheet for accurate information.
NO = When the relay coil gets energized, it connects to the common terminal and
remains open throughout.
NC = When the relay coil gets de-energized, it comes in contact with a common
terminal. It’s also always connected.
A relay driver circuit runs on AC power. For that reason, we’ll only need a transient
suppressor and sufficient AC voltage as rated for the relay.
And instead of diodes in eliminating voltage spikes, we’ll use them to alternate half-
cycles. Also, we won’t connect diodes in reverse parallel to create a
functional transient voltage suppressor. Instead, we’ll use an RC series network and
secure it parallel across the coil. Moreover, the resistors regulate the discharge as
the capacitor absorbs excess charge.
• 0.05µF capacitor
• AC voltage source
• AC relay
• 100Ω resistor
Precaution; Handle with great care the AC power that comes directly from a wall
outlet to prevent shock.
Circuit Diagram
The diagram below is the final product we’ll have after our AC relay driver circuit
assembly.
Circuit diagram of an AC relay driver circuit
We only feed the AC relay with an AC voltage of its rating. For example, for a rated
relay voltage of 110VAC, we’ll need 110V from the AC power source.
The resistor and capacitor in series suppress voltage spikes by acting as the
transient voltage suppressors. Therefore, that side of the circuit operates as our
relay driver. Finally, when the relay receives enough power, it turns on then powers
the load it’s in connection with instantaneously.
You’ll use components like the Zener diode for DC relay circuits to eliminate voltage
spikes as the drive closes/opens. In other words, the diode acts as a transient
voltage suppressor. The relay coils function as inductors.
Component to prepare
• Zener diode
• DC voltage source/ DC power source such as wall-wart power and batteries.
A Wall-wart adapter
Source: Wikipedia
Circuit diagram
The relay we’re using today has a 9V rating. Therefore, a 9-volt DC voltage source is
suitable for feeding the resistor. We also place a reverse-biased Zener diode in
parallel to our drive. In that way, once the voltage reaches a specific threshold, the
circuit will shunt excess power to the ground. Contrarily, if it gets to the breakdown
voltage, it will permit electric flow by conducting.
Ultimately, when there’s sufficient power, the relay closes and drives the output
loads.
Electronic projects on relay driver circuits often use MOSFETs and NPN
transistors as their primary switching devices. It’s because transistors can swiftly
provide DC switching (OFF/ON) control of relay coils from several input sources.
Components needed
• Resistor – 1K
• Capacitor – 470µF
• NPN transistor – BC 548
• LED indicators
• IN4007 diode
Circuit diagram
• First, it uses inexpensive NPN drive transistors that are also commonly available.
• It has fewer components.
• Further, you can easily interface it to a low voltage logic circuitry and a relay
economy feature.
• Also, its manufacture has an industry-standard technique.
• In addition, it has several interface options, such as the ULN2003 driver.
• Lastly, you can source the relay power by a higher, unregulated voltage. In that way,
there’s load reduction on the voltage regulator.
Applications include:
• Heaters,
• Motors, and
• Lamps.
Conclusion
All in all, relay driver circuits help in switching connected loads in electronic systems
with ease. YoYou’llostly applies the drive when you need to control several courses
by a single signal. Also, you can use a relay to regulate one circuit by one low-power
signal. Hence, knowing how to make the relay circuit on your own can be lifesaving
for your operations. The examples we’ve given should broadly help you.
In this project, we will show how to build a square wave generator circuit that allows for adjustable
frequency and amplitude of the output square wave signal.
This square wave generator circuit can be built simply a 555 timer chip and a few resistors,
capacitors, and potentiometers.
The circuit is very basic. It simply uses one chip, a 555 timer.
A 555 timer is a very versatile chip. It can easily create square waves when in astable mode of
operation. This circuit utilizes that principle, that 555 timers can easily generate square wave signals.
The potentiometers allow us to vary the frequency of the output signal as well as the amplitude.
This circuit can function well simply if you need square waves or if you need to use it for an IC that
requires clock pulses.
So below we'll explain in detail how to build this circuit as well as how it operates.
Components Needed
The 555 timer can be obtained very cheaply from pretty much any electronic retailer.
The 555 timer can be obtained very cheaply from pretty much any electronic retailer.
The 555 timer requires a power supply voltage of 4.5-16V. We connect this voltage to the VCC pin, pin
8, and we connect GND, pin 1, to ground.
The only other pins we use are the trigger pin, the output pin, the reset pin, and the threshold pin.
Pin 2 is the trigger pin. It works like a starter pistol to start the 555 timer running. The trigger is an
active low trigger, which means that the timer starts when voltage on pin 2 drops to below 1/3 of the
supply voltage. When the 555 is triggered via pin 2, the ouptut on pin 3 goes high.
Pin 3 is the output pin. 555 timer's output is digital in nature. It is either high or low. The output is
either low, which is very close to 0V, or high, which is close to the supply voltage that's placed on pin
8. The output pin is where you would connect the load that you want the 555 timer to power. This may
be an LED, for instance.
Pin 4 is the reset pin. This pin can be used to restart the 555 timer's timing operation. This is an active
low input, just like the trigger input. Thus, pin 4 must be connected to the supply voltage of the 555
timer to operate. If it is momentarily grounded, the 555 timer's operation is interrupted and won't start
again until it's triggered again via pin 2.
Pin 6 is the threshold pin. The purpose of this pin is to monitor the voltage across the capacitor that's
discharged by pin 7. When this voltage reaches 2/3 of the supply voltage (V CC), the timing cycle ends,
and the output on pin 3 goes low.
So the first thing of concern for this circuit is power- what power the circuit will run off from.
Being that we are using a 555 timer chip, the maximum voltage that a 555 timer can withstand is 18V.
Therefore, we use 18V for the supply DC voltage for this circuit. By attaching a potentiometer to the
18V, we create an adjustable power source, so that we can alter the amplitude of the output signal. If
the potentiometer is turned so that it is offering full resistance, the voltage fed to the 555 timer is about
18V. This gives the maximum amplitude that the output signal can be. If we lower the resistance of
the potentiometer, the voltage fed to the 555 timer decreases. This decreases the amplitude of the
output signal.
For this circuit, we use a 200Ω potentiometer to allow for amplitude adjustment. You don't want to use
a smaller potentiometer than this such a00s a 100Ω potentiometer, because most aren't rated to
handle the amount of current that using a potentiometer this low will be. For example, with a 100Ω
potentiometer, current will be 18V/100Ω= 180mA. Many potentiometers can't handle such high current
and will burn out. 200Ω is a much safer bet lowering the current to 90mA (18V/200Ω). You can only
use a 500Ω potentiometer. But it's best not to go higher than 500Ω. If you use a very large
potentiometer value, amplitude adjustment will not work properly. Using low-ohm potentiometers
allows for small changes to resistances, so that the amplitude changes slowly. Using large-ohm
resistors causes abrupt changes to the amplitude, not giving good amplitude adjustment. If you use a
100KΩ potentiometer, for instance, slightly adjusting the potentiometer leads to abrupt changes in
amplitude, which makes for poor amplitude adjustment.
This voltage is fed into the V+ pin of the 555 timer, which is pin 8.
So again, if the potentiometer is offering full resistance, the amplitude is at its maximum amplitude. As
we lower the resistance of the potentiometer, the amplitude decreases and decreases until the
voltage feeding into pin 8 is so low, that no signal is output.
18V is, fed into pin 4 of the 555 timer. Pin 4 is the reset pin of the 555 timer. This pin is active low,
which means it is triggered when fed a voltage near ground or 0V. Therefore, this pin must remain
connected to a positive voltage source in order for the circuit to work.
Besides the amplitude, which we have covered, we now get into the frequency aspect of the circuit,
how the frequency of the signal. And the frequency of the output is determined by the potentiometer
R1 and capacitor C1. These form an RC network that determine the frequency of the output signal.
The product of RC is equal to the time period of the output signal. By decreasing the value of the
resistor, we decrease the time period, which creates a signal with a higher frequency. By increasing
the value of the resistor, we increase the time period, which creates a signal with a lower frequency.
The potentiometer allows us to change the frequency by changing the value of the RC network.
The value of the capacitor C1 that we have chosen is 1nF. If you want even a greater frequency that
can go lower, you cna choose a lower value capacitor such as in the picofarads range. This extends
the frequency range of the circuit, at the high end. The smaller of a capacitor you use, the higher the
frequency. For example, a 330pF capacitor causes even a faster frequency.
The potentiometer value that we use for the RC network is a 1MΩ potentiometer. You can also use a
10MΩ potentiometer if you want to extend the frequency range of the circuit, at the low end. The
greater of a resistance value you use, the lower frequency can extend. For example, with a 10MΩ
potentiometer, the frequency will be just a few hertz on the lower end of the frequency range when the
potentiometer is offering its full resistance.
The 555 timer is a very good chip that is able to produce and output very good, high-quality square
wave signals. And depending on the values you use, you should be able to get any square wave of
any frequency you desire. The 555 timer chip does have a ceiling of frequency but it is several
megahertz. So until you exceed this, the circuit should be able to do what you want it to accomplish.