Vous êtes sur la page 1sur 19

2011

Level 0
Introduction to Electronics
This document is a property of Embedtrix Lab. No commercial usage is allowed without the written permission of the author.

Sahil Khan Embedtrix Lab 4/7/2011

Practical Circuit elements


1. Resistors
Resistor used to limit the limit the current flow through itself to a calculable value based on its resistance and applied voltage. This means that a resistor can be used to run a low voltage device from a higher voltage power supply by limiting the required power to a predetermined level. Resistors are not polarity sensitive. Resistance is measured in Ohms

1.1 Tolerance
The tolerance of a resistor refers to how close its actual resistance has to be to the value marked on it. Common tolerances are 5% and 1%.

1.2 Wattage
Depending upon the power requirements of the circuit, resistor wattage needs to be calculated that they dont over heat. Common ratings are Watt, Watt, 1 Watt and 5 Watt.

1.3 Values
Because it would be impractical to carry every possible value of resistor, they are available in pre-selected ranges. These ranges are known as preferred values.

Fig1: Resistance Color Coding & Wattage

1.4 Resistors in Series


When two or more resistors are placed in series (in line with each other), the overall resistance of the resistance network will change. The new value can be calculated from

Fig2

1.5 Resistors in Parallel


Calculating resistance in parallel is a little more complicated than resistors in series.

Fig3

1.5 Variable resistance/Potentiometers


Variable resistance or potentiometers are used to produce variable resistance in a network. They have 3 terminals AB & W which are used in the way it is shown in the figure.

Page | 2 Course material designed by Sahil Khan | sahil@embedtrix.com

Fig4: Variable resistances

1.7 Light Dependent Resistors


Light Dependent Resistor (LDR) or photo resistor is a device that acts like a resistance and its resistance varies with the intensity of light incident on it. In this device, if photons of sufficient energy fall on it, the resistance drops drastically as the electrons in the semiconductor are able to jump from the valence band to the conduction band and are available for conduction. The LDRs used are mostly responsive to visible light. The resistance might drop from as high as 1M in the dark to 1 k in bright light.

Fig5: Light Dependent Resistors

2.Capacitors
A capacitor works on the principle of having two conductive plates which are very close and are parallel to each other. When a charge is applied to one plate of the capacitor, the electrons will generate an approximately equal, but opposite charge on the other plate. Capacitors will pass AC current, but will block DC current. A capacitor can also be used to smooth voltage ripple, as in DC power supplies. Capacitance is measured in Farads (F). The 2 types of capacitors we frequently use in circuits are ceramic and electrolytic capacitors. While ceramic capacitors do not have a fixed polarity; electrolytic capacitors should be connected in their specified polarities only else they might blow off! This polarity is usually provided on the side of the capacitors corresponding leg.

Fig6:

Electrolytic capacitor

Fig7: Ceramic capacitor

There are two methods for marking capacitor values. One is to write the information numerically directly onto the capacitor itself. The second is to use the EIA coding system.

Page | 3 Course material designed by Sahil Khan | sahil@embedtrix.com

2.1 EIA Coding


The EIA code works on a very similar principle to the resistor colour code. The first two digits refer to the value with the third being the multiplier. The fourth character represents the tolerance. When the EIA code is used, the value will always be in Pico-Farads (see Decimal Multipliers). Example 103K This expands to: 1=1 0=0 3 = x 1,000 K = 10% (sec Capacitor Tolerance for listings) Then we combine these numbers together: 1 0 x 1 000 = 10 000pF = 0.01F, = 10n 10% tolerance Example 335K This expands to: 3 = 3 3 = 3 E = x100,000 K = 10% Then we combine these numbers together 3 3 x100,000 = 3,300,000pF = 3,300nF = 3.3uF 10% tolerance.

3.Diodes
Diode is a two terminal semiconductor device. The most common function of a diode is to allow an electric current to pass in one direction (called the diode's forward bias direction) while blocking current in the opposite direction (the reverse direction). Specialized diodes are used to regulate voltage (Zener diodes), to electronically tune radio and TV receivers (varactor diodes), to generate radio frequency oscillations (tunnel diodes), and to produce light (light emitting diodes). Tunnel diodes exhibit negative resistance, which makes them useful in some types of circuit.

3.1 1N4001 to 1N4007 Silicon Power Rectifiers


Electrical Characteristics Specifications

The following are subminiature general purpose power rectifiers for low power applications

Instantaneous Voltage Drop @ forward current 1 A= 1.1V Maximum Full-Cycle Average Voltage Drop @ forward Current 1 A= 0.8V Maximum Reverse Current 0.03mA RMS Reverse Voltage 1N4001 : 35v 1N4002 : 70v 1N4003 : 140v 1N4004 :280v 1N4005 :420v 1N4006 :560v 1N4007 :700v

Absolute Maximum Ratings Peak Repetitive Reverse Voltage 1N4001: 50V 1N4002 :100V 1N4003 :200V 1N4004 :400V 1N4005 :600V 1N4006 :800V 1N4007 :1000V

Their value will depend on the current and the degree of smoothing required. As a general guide, if the current being drawn from a supply is high, the size of the smoothing capacitor will need to be large (around 2500uF or larger) if the hum level is to be kept down to a respectable level. It must also not be forgotten that all of these circuits are 'unregulated' i.e. as the load increases from zero to

maximum the output voltage will drop due to the transformer voltage dropping under load and losses across the diodes - and the storage capacity of smoothing capacitors. Example Say for example we want a power supply to give 9V at 1 A. We could use a M21 55 transformer which is rated at 1 A. If we use a bridge rectifier and the 9V tapping the output voltage will be:VDC= 1.41 XVAC - 1.41 X9V = 12.69V Peak (9V at 1A load)

Page | 4 Course material designed by Sahil Khan | sahil@embedtrix.com

Fig8: Two Terminals Diode

Fig9: LED

3.2 Light Emitting Diodes


LED (Light Emitting Diode) is frequently used to display the outputs at various stages of the circuit. It is essentially a Diode with the energy released in the form of photons due to electron transitions falling in the visible region. Hence normal diode properties apply to it. It glows only in fwd bias mode i.e. with p junction connected to +ve voltage and n junction to negative. Diodes are essentially low power devices. The current through the LED should be less than 20mA. Hence always put a 220 ohm resistor in series with the LED. Never forget that LEDs consume a significant amount of power of the outputs of the ICs (CMOS based).Hence it is advisable to only use them for checking the voltage level (high or low) and then remove them.

3.3 Zener Diodes


Zener diodes are devices which maintain an almost constant voltage across them despite various changes in circuit conditions. Unlike conventional diodes, zener diodes are deliberately intended to be used with the anode connected to a negative potential (or 0v) and the cathode connected to the positive potential. When connected in this manner, zener diodes have a very high resistance below a certain critical voltage (called the zener voltage). If this voltage is exceeded, the resistance of the zener drops to a very low level. When used in this region, essentially constant voltage will be maintained across the Zener, despite quite large changes in the applied currents. This is illustrated graphically in the figure below. It can be seen that beyond the zener voltage, the reverse voltage remains practically constant despite changes in reverse current. Because of this, Zener diodes may be used to provide a constant voltage drop, or reference voltage. The actual voltage available from a zener diode is temperature dependent. The Basic Voltage regulator circuit is shown below. It uses only one resistor and one zener diode. This is called a SHUNT REGULATOR..

Fig.10 Zener as Shunt Regulator

Page | 5 Course material designed by Sahil Khan | sahil@embedtrix.com

4. Transistors
A transistor is a semiconductor device used to amplify and switch electronic signals. It is made of a solid piece of semiconductor material, with at least three terminals for connection to an external circuit. A voltage or current applied to one pair of the transistor's terminals changes the current flowing through another pair of terminals. Because the controlled (output) power can be much more than the controlling (input) power, the transistor provides amplification of a signal. Today, some transistors are packaged individually, but many more are found embedded in integrated circuits

4.1 Transistor as a switch


BJT used as an electronic switch, in grounded-emitter configuration. Transistors are commonly used as electronic switches, for both high power applications including switchedmode power supplies and low power applications such as logic gates. In a grounded-emitter transistor circuit, such as the light-switch circuit shown, as the base voltage rises the base and collector current rise exponentially, and the collector voltage drops because of the collector load resistor.

Fig11: Bipolar transistor

Fig12. BJT as a Switch

4.2 Transistor as an amplifier


The common-emitter amplifier is designed so that a small change in voltage in (Vin) changes the small current through the base of the transistor and the transistor's current amplification combined with the properties of the circuit mean that small swings in Vin produce large changes in Vout. Various configurations of single transistor amplifier are possible, with some providing current gain, some voltage gain, and some both. From mobile phones to televisions, vast numbers of products include amplifiers for sound reproduction, radio transmission, and signal processing. The first discrete transistor audio amplifiers barely supplied a few hundred milliwatts, but power and audio fidelity gradually increased as better transistors became available and amplifier architecture evolved. Modern transistor audio amplifiers of up to a few hundred watts are common and relatively inexpensive.

Fig13: BJT as an Amplifier

Page | 6 Course material designed by Sahil Khan | sahil@embedtrix.com

Digital Electronics
1.1 What is a Digital system?
In most general terms, this systems behavior is sufficiently explained by using only two of its states can be Voltage(more than x volts or less?),distance covered(more than 2.5 km or less?],true-false or weight of an elephant(will my weighing machine withstand it?) ) Note that although in every case, the all the intermediate states ARE POSSIBLE AND DO EXIST, our point of interest are such that we dont require their explicit description. In electronic systems we mostly deal with Voltage levels as digital entities.

1.2 Assigning States


There is no specific fixed definition of logic levels in electronics. Most commonly used level designation is the one used in CMOS and TTL (transistor transistor logic) families: Logic high > designated as 1 Logic low > designated as 0 Where high and low are actually higher and lower with respect to a reference voltage level (ideally taken as 2.5V) Number Systems in digital electronics Binary: Only 0 and 1. Hexadecimal: 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F

1.3 Types of Digital Circuits


Combinatorial Circuits: In these circuits, the past states are immaterial and the output depends only upon the present state. Example logic gates Sequential circuits: In these circuits, the next state is completely determined by the past states. Hence these follow a predictable structure and essentially require a timing device. Ex. counters, flip flops.

Page | 7 Course material designed by Sahil Khan | sahil@embedtrix.com

1.4 Clock: Building block of a sequential circuit


A clock is simply alternate high and low states of voltage with time i.e. essentially a square wave. Important terms related to clock are its duty cycle and its frequency:

Duty cycle: It is the ratio of Th and Th+Tl

Fig14: Clock Cycles

1.5 Logic Gates: Building block of a combinatorial circuitry


These are essentially combinatorial circuits used to implement logical Boolean operations like AND, NAND, OR, XOR and NOT. NOT and NAND are called universal gates as any other gate can be formed using either of them!

Page | 8 Course material designed by Sahil Khan | sahil@embedtrix.com

Integrated Circuits
1. 78XX Series Voltage Regulator ICs
78XX series are complete voltage regulators with outstanding ripple rejection and superior line load regulation. Current limiting is included to limit peak output current to a safe level. Safe area protection for the output transistor is provided. If internal power dissipation is too high, thermal shutdown occurs. Although designed primarily as fixed voltage regulators, these devices can be used with external components to obtain adjustable voltages and currents.

1.1 7805 Voltage Regulator


7805 voltage regulator is used to get +5 V output out of a higher voltage supply (7.5V-20V).We use adapters supply to generate +5V here. Connect the gnd and +12V of adapter to the pins as shown and get +5V directly as rd an output out of the 3 pin. Current up to 0.5 A can be obtained from this regulator without any significant fall in voltage level.

Fig.15: IC 7805
NOTE: Use 2 capacitors of value say 0.1F to filter the noise in the input and output of regulators supply as shown .

Fig.16: 7805 Circuit

Page | 9 Course material designed by Sahil Khan | sahil@embedtrix.com

2. IC uA741/LM 324 Operational Amplifier


Operational Amplifier or the Opamp is a very important device used in everyday electronics .It is essentially a differential amplifier with a very high gain of the order of 105!By differential amplifier I mean that it amplifies the difference of 2 signals and gives the output.

2.1 Opamp equation:


Vout= A (V+ - V- ) where A is the gain of the order 10 .
5

Fig.17: Operational Amplifier Ironically, this high gain in open loop makes it impossible to use it as a general purpose differential amplifier directly. [GOOGLY: If (V+-V-) = 0.005V; Vss = 12V what will be the output??]

2.2 IC 741 Opamp


The 741 is a high performance operational amplifier with high open loop gain, internal compensation, high common mode range and exceptional temperature stability. It is short circuit proof and allows for nulling of offset voltage.

Fig.18: IC 741 Opamp Simplest use of Opamp is as a comparator. It can be used to convert an analog signal to a digital signal defined by a fixed threshold. Set V- as the threshold voltage say 2.5 V and apply the analog signal to be digitized at V+ .What will be the output? Well if you have worked out the googly, this should be a piece of cake!

Page | 10 Course material designed by Sahil Khan | sahil@embedtrix.com

3. 555 Timer
3.1 555
555 is an IC used to generate a clock .The two attributes of a clock are Frequency Duty cycle. Both of these can be changed using this IC, however the duty cycle is always <50%. A dual version of this IC is available, the 556 There are two modes in which 555 can run. Fig.19: 555 Pin Configurations

3.2 Monostable mode


As the name suggests; in this mode the output is stable in only one (mono) state i.e. off state. Thus it can stay only for a finite time, if triggered, to the other state i.e. on state. This time can be set choosing appropriate values of resistances in the formula: T = 1.1 x R1 x C1

Fig. 20: 555 in monostable mode

Page | 11 Course material designed by Sahil Khan | sahil@embedtrix.com

3.3 Astable mode


In this mode; the output is stable neither in high state nor in low state. Hence it oscillates from one state to another giving us a square wave or clock. We can set the clock frequency and Duty cycle D by the formulae:

F=

D=

Fig.21 555 in astable mode NOTE: Capacitor C2 is just to filter the noise and its value can be suitably chosen to be 0.01F. It can also be neglected.

Page | 12 Course material designed by Sahil Khan | sahil@embedtrix.com

4. 4029 counter
With the clock made, we are ready to count the number of pulses passed into the circuit. Note that any kind of counting requires a memory (you got to know that you have just counted 3 to go to 4!). Hence 4029 can also be used as a memory element that remembers its immediate previous state.

Fig. 1: 4029 pin configuration

4.1 Pin Description


PIN No. 1 2 3 4 5 6 7 Name Parallel load Output Bit 3 Parallel input bit 3 Parallel input bit 0 Clock enable bar Output Bit 0 TC bar Pin function If given high; loads the value of Parallel bit into the o/p bits Most significant bit of o/p Most significant bit of parallel i/p Least significant bit of parallel i/p Low on this pin enables counting as per the clock received Least significant bit of parallel o/p Output bit that gives a low when the count is complete. Can be used to signal the end of counting. Needed for powering To choose b/w binary and hexadecimal modes To choose b/w up counting and down counting modes 2nd bit of o/p 2nd bit of i/p 3rd bit of i/p 3rd bit of o/p Clock pulse is given here Needed for powering Connection reqd. Gnd To pin 6 of 7447 Input Input Gnd To pin 7 of 7447 None if you dont want to use it Gnd low for count 0-15 high for count 0-9 Low for down count High for up count To pin 1 of 7447 Input Input To pin 2 of 7447 Clock from 555 +5 V

8 9 10 11 12 13 14 15 16

Gnd Binary/Hex bar Up/Down bar count Output bit 1 Parallel input bit 1 Parallel input bit 2 Output bit 2 Clock pulse Vdd

Page | 13 Course material designed by Sahil Khan | sahil@embedtrix.com

5. IC 7447: BCD to 7 segment display decoder


For displaying the number in the counter output on a seven segment display (i.e. 7 LEDs making up a figure of 8 as in a general calculator. See fig. ) we need to decode the 4 bits and match them to the 7 pins for lighting the LEDs corresponding to the number. This work is done by 7447.

Fig 23 :7447 pin configuration

Fig.24 Seven Segment Display

5.1 Pin Description


PIN no. 1 2 3 Name i/p B i/p C Lamp Test bar Function 2nd bit(O1) of 4029s o/p 3rd bit(O2) of 4029s o/p Used to check that all LEDs of 7 seg are working. Connection reqd. To O1 of 4029 To O2 of 4029 High for normal fn Low to glow all LEDs Kept high Kept high To O2 of 4029 To O2 of 4029 Connected to gnd To 7 seg display Connected to +5 V

4 5 6 7 8 915 16

BI /RBI RBI i/p D i/p A Gnd a-g as per the fig Vcc

Kept high to allow normal function Blanks 0 from being displayed Most significant bit(O3) of 4029s o/p 3rd bit(O2) of 4029s o/p For power The o/p pins to 7segment display For power

NOTE: The COM pins are to be connected to Vcc via 220 ohm resistor. Why resistor is required?? The dot pin is just for display of decimal point and essentially only makes the upper and lower sides distinguishable from each other for a single display. without the asymmetry produced by dot how will we be able to see which side is upper and which is lower?

Page | 14 Course material designed by Sahil Khan | sahil@embedtrix.com

6. Triac BT136
TRIAC is designed for economical mains power and lighting control. SCI 51 D is a bidirectional thyristor when triggered, it conducts in both directions and can be triggered by a positive or negative gate signal. A TRIAC is approximately equivalent to two complementary unilateral thyristors (one is anode triggered and another is cathode triggered SCR) joined in inverse parallel (paralleled but with the polarity reversed) and with their gates connected together. .

It can be triggered by either a positive or a negative voltage being applied to its gate electrode (with respect to A1, otherwise known as MT1). Once triggered, the device continues to conduct until the current through it drops below a certain threshold value, the holding current, such as at the end of a half-cycle of alternating current (AC) mains power. This makes the TRIAC a very convenient switch for AC circuits, allowing the control of very large power flows with milliampere-scale control currents. In addition, applying a trigger pulse at a controllable point in an AC cycle allows one to control the percentage of current that flows through the TRIAC to the load. Low power TRIACs are used in many applications such as light dimmers, speed controls for electric fans and other electric motors, and in the modern computerized control circuits of many household small and major appliances

Page | 15 Course material designed by Sahil Khan | sahil@embedtrix.com

7. Motor Drivers
7.1 H- Bridge:
It is an electronic circuit which enables a voltage to be applied across a load in either direction. It allows a circuit full control over a standard electric DC motor. That is, with an H-bridge, a microcontroller, logic chip, or remote control can electronically command the motor to go forward, reverse, brake, and coast. H-bridges are available as integrated circuits, or can be built from discrete components. A "double pole double throw" relay can generally achieve the same electrical functionality as an H-bridge, but an H-bridge would be preferable where a smaller physical size is needed, high speed switching, low driving voltage, or where the wearing out of mechanical parts is undesirable. The term "H-bridge" is derived from the typical graphical representation of such a circuit, which is built with four switches, either solid-state (eg, L293/ L298) or mechanical (eg, relays).

Fig 26 Structure of an H-bridge (highlighted in red)

S1 1

S2 0

S3 0

S4 1

0 0 1

0 1 0

0 0 1

0 1 0

Result Motor rotates in one direction Motor rotates in opposite direction Motor free runs (coasts) Motor brakes Motor brakes

Possible states of 4 bridges To power the motor, you turn on two switches that are diagonally opposed.

Page | 16 Course material designed by Sahil Khan | sahil@embedtrix.com

Fig. 27 The two basic states of an H-bridge.

7.2 Motor Driver ICs: L293/L293D and L298

Figure 3: L293D

Figure 2: L298

The current provided by the MCU is of the order of 5mA and that required by a motor is ~500mA. Hence, motor cant be controlled directly by MCU and we need an interface between the MCU and the motor. A Motor Driver IC like L293D or L298 is used for this purpose which has two H-bridge drivers. Hence, each IC can drive two motors. Note that a motor driver does not amplify the current; it only acts as a switch (An H bridge is nothing but 4 switches).

Fig.30: PIN Diagram of L293D

Page | 17 Course material designed by Sahil Khan | sahil@embedtrix.com

Drivers are enabled in pairs, with drivers 1 and 2 being enabled by the Enable pin. When an enable input is high (logic 1 or +5V), the associated drivers are enabled and their outputs are active and in phase with their inputs. When the enable pin is low, the output is neither high nor low (disconnected), irrespective of the input. Direction of the motor is controlled by asserting one of the inputs to motor to be high (logic 1) and the other to be low (logic 0). To move the motor in opposite direction just interchange the logic applied to the two inputs of the motors. Asserting both inputs to logic high or logic low will stop the motor. Resistance of our motors is about 26 ohms i.e. its short circuit current will be around. 0.46Amp which is below the maximum current limit. It is always better to use high capacitance (~1000F) in the output line of a motor driver which acts as a small battery at times of current surges and hence improves battery life.

Difference between L293 and L293D:


Output current per channel = 1A for L293 and 600mA for L293D. Difference between L293 and L298: L293 is quadruple half-H driver while L298 is dual full-H driver, i.e, in L293 all four input- output lines are independent while in L298, a half H driver cannot be used independently, only full H driver has to be used. Output current per channel = 1A for L293 and 2A for L298. Hence, heat sink is provided in L298. Protective Diodes against back EMF are provided internally in L293D but must be provided externally in L298. Speed Control: To control motor speed we can use pulse width modulation (PWM), applied to the enable pins of L293 driver. PWM is the scheme in which the duty cycle of a square wave output from the microcontroller is varied to provide a varying average DC output. What actually happens by applying a PWM pulse is that the motor is switched ON and OFF at a given frequency. In this way, the motor reacts to the time average of the power supply.

Figure 31: Velocity control of motor using PWM

Page | 18 Course material designed by Sahil Khan | sahil@embedtrix.com

Page | 19 Course material designed by Sahil Khan | sahil@embedtrix.com

Vous aimerez peut-être aussi