0% found this document useful (0 votes)
38 views23 pages

Lec 5 - Part 1 - Electronic Switches

Uploaded by

Hosna Sayed
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)
38 views23 pages

Lec 5 - Part 1 - Electronic Switches

Uploaded by

Hosna Sayed
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
You are on page 1/ 23

This material is developed by IMTSchool for educational use only

All copyrights are reserved


What are electronic switches ?
The electronic switch is an electronic component
that can switch an electrical circuit on or off with an
electrical control signal.

Why electronic switches?


 Allow the Microcontroller to control the electrical
circuits without human interaction
 Help in switching the power circuit on and off, the
microcontroller plays the switching element not the
driving element
 The Isolation between the control circuit and the
power circuit.
Bipolar Transistor Basics:

Transistors are three terminal active devices made


from different semiconductor materials that can act as
either an insulator or a conductor by the application of
a small signal voltage.

The transistor's ability to change between these two


states enables it to have two basic functions:
“Switching" (digital electronics) or “Amplification"
(analogue electronics).

There are two basic types of bipolar transistor


construction, NPN and PNP
The bipolar transistors have the ability to
operate within three different regions:

• 1. Active Region –
Condition: Vbe = 0.7 v and Vc > Vb

Action: works as amplifier, Ic = β Ib , where β is the amplification factor

• 2. Saturation
Condition: Vbe = 0.7 v and Vc < Vb

Action: - the transistor is "fully-ON" operating as a switch and Vc


approximately equals to Ve

• 3. Cut-off
Condition: - the transistor is "fully-OFF" operating as a switch and Ic = 0
When When
Vin = 0V Vin = 5V

Note :
Rb is called a limiting resistor, which is used in order to keep the Vbe not exceeding 0.7 v.
We need to calculate the value of
Rb which achieve the saturation
state when applying 5v on the
base.

From the datasheet of the used


transistor 2n222, the value of the
saturation current at base is 15
mA.

By applying Ohm’s law:


Simple lab :
Description :

We need to switch a buzzer On & OFF by 2n2222


With delay 1 sec.

Circuit Schematic : Coding :


defined the first pin in
DDRA=0b00000001 ; port A as output .

PORTA=0b00000001 ; Set the first pin in


port A to 5v supply.
“switch is on ”
Delay
Set the first pin in
port A as a 0v supply
PORTA=0b00000000 ; “switch is off”
lab 1

Description :

Write a C code to control a DC motor in one


direction using a tactile switch. The switch
shall act as a breaking the system, the motor
shall rotate as long as the switch is not
pressed.
H-bridge
diagram :

Note :

What will happen if we close (S1 & S3) at the


same time…?
Lab 2

Circuit schematic : Coding :


define the first 2
pins in port A as an
DDRA=0b00000011 ; output ”A & B” .

PORTA=0b00000001 ;
clockwise

Delay

counter clockwise
PORTA=0b00000010 ;
We can prevent the danger of S.C of
the H-bridge by using two NPN and 2
PNP transistors .
Advantages :
• Low cost electronic switch
• Small base current controls larger collector current.
• High switching speed.

Disadvantages :
• can’t use in switching for loads which need very
high Power .
• No isolation between power circuit and control unit
Optocoupler Basics:

An Optocoupler (or an optoelectronic


coupler) is basically an interface between
two circuits which operate at (usually)
different voltage levels.

the only contact between the input and


the output is a beam of light.
Working concept:

When applying a voltage difference


between the LED terminal, a beam of light is
generated towards the light sensor installed
on the base of a transistor. The light sensor
then generates an amount of current causes
the transistor to enter a saturation mode.
The optocoupler now is in the on state. If no
voltage on the LED, then the transistor is on
off state and the optocoupler too.
lab 3

Description :

Using Optocoupler, write a C code to control a


DC motor in one direction using a tactile
switch. The switch shall act as a breaking the
system, the motor shall rotate as long as the
switch is not pressed.
Advantages :
• It is small size & light weight.
• Low power operation.
• well protected due to electrical isolation. (High isolation impedance).
• High switching speed.

Disdvantages :
• can’t use in switching for loads which need high
Power.
• High cost comparing to transistor
What are relays ?

Relays are electromechanical devices that


use an electromagnet to operate a pair of
movable contacts from an open position to
a closed position.

Concept of working :

Low Control Voltage is used to switch


contacts of relays which are comparatively
at high potential.
lab 4

Description :

Develop a H-bridge circuit using 2 SPDT


relays. Rotate the dc motor in clockwise
direction for 5 seconds and anti clock wise
direction for another 5 seconds.
 Advantages :
• Simple construction.
• Well protected due to electrical isolation.
• Can be used in switching for loads needs high Power.
• The ability of controlling a AC circuit using a DC control circuit

 Disdvantages :
• High cost.
• High power consumption
• Limited speed of operation.
• Suffer from the effects of age.
• Produce magnetic interference.
Any
questions
…?
Using two tactile switches, control DC motor direction. One switch for rotating the
motor clockwise and the other one for counter clockwise. The direction of the rotation
shall be written on LCD.
www.imtschool.com

ww.facebook.com/imaketechnologyschool/

This material is developed by IMTSchool for educational use only


All copyrights are reserved

You might also like