Electronics

From Leo's Notes
This page was last edited on 12 May 2020, at 05:04.

Basic electronics theory.

Physics

Some formulas that are fundamental:

  • Ohm's Law: $ V=IR $
  • Power (watts): Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): P=VI

With these two formulas, you can build other calculations. Eg: Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): P = VI = V(V/R) = V^2/R

Fundamentals

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): V_{cc} is the power supply voltage. It is the voltage supplied at the collector.

Diodes

  • Forward bias = on, lets current pass through
  • Reverse bias = off, restricts current completely

The I-V curve shows relationship between voltage and current. The ideal diode will allow all current through at any forward voltage and no current at any reverse voltage. A real diode will have some limitations:

  • Forward voltage (Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): V_f ) - voltage at which the diode turns on and allows forward current to flow. This is the voltage that is required for the diode to be in forward bias
  • Breakdown voltage (Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): V_{br} ) - the negative voltage which the diode fails to stop current from flowing backwards. You can expect the diode to withstand this voltage in the reverse bias before reverse current flows freely. A diode in breakdown is not necessarily broken. What breaks it is the amount of current that goes through it in this state because the diode does not limit the current.
  • Forward voltage drop - the voltage that is 'lost' by going across the diode

Diodes will have a maximum forward current with the limitation typically because of heat dissipation. This means there will be two maximums: One that is constant (maximum forward continuous current, Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): I_F ) and one that is peak.

Determining the forward voltage with a multimeter can be done by using the test option across the diode. Test by connecting the black probe to cathode (the side of the diode with the black stripe) and the red probe to anode.

Example Components:

  • 1N4148 Signal Diode
  • 1N4001 Rectifier Diode (for rectifying power)

Schottky diode

Similar to a normal diode but:

  • Has a lower forward voltage drop
  • Faster switch action

In general, a shottky diode has better characteristics than a typical diode but is more expensive.

Zener Diode

  • Has a specific zener breakdown voltage which allows current to flow in reverse bias
  • Zener breakdown voltage is typically labeled with the device. Eg. 5V1 = 5.1 volts

Can be used to create a constant voltage reference by exploiting the breakdown voltage. Any excess voltage will be 'spilled' over via the zener diode.

The resistor is required in order to limit current that can pass through the diode. Because of this design, attempting to use a zener diode as a voltage regulator for a load is inefficient since a lot of power is wasted with the resistor. For high load or a large voltage difference, the resistor will generate a lot of heat (P=IV).

Transient Voltage Suppression (TVS) Diode

A TVS diode is similar to two zener diodes that are connected together in opposite direction. Connecting this to a circuit will prevent voltage from spiking past a certain voltage. It does not conduct in either direction until the breakdown voltage is reached.

Transistors

There are two types: Bipolar Junction Transistor (BJT) and Field-Effect Transistor (FET). BJT controls current by the current through in the base by the gain. FET controls current by the voltage in the gate.

Transistors come in a few different packages:

TO-90 TO-220
Signal transistors; dissipates a few hundred milliwatts of heat Typically used for power transistors; dissipates few watts or more with a heatsink


Bipolar Junction Transistor

BJT transistors consists of 2 transitions between the positively doped (P) and negatively doped (N) silicon. The two combinations of these layers result in NPN and PNP types each exhibiting different behavior. Fundamentally, the two types are identical with the polarities reversed. This results in NPN transistors turning on when current flows through the base while the PNP version turns off. The simplified construction and diagram for each type can be seen in the figure below. A simple mnemonic for the symbol is NPN's arrow is it does not point in. When reading data sheets or schematics, PNP transistors may sometimes drawn upside down (flipped vertically).

In a nutshell, a transistor turns on when current flows through the internal diode (the arrow in the transistor diagram). Current only begins flowing when the forward voltage is sufficient for the diode (the minimum V_BE(SAT) value), which in most general purpose transistors starts at around 0.6V. Current flowing through the base is directly proportional to the current through the collector and emitter (the gain or h_FE). The flavor of NPN and PNP flips the direction of this diode. NPN transistors 'turn on' when the base has a voltage higher than the emitter while PNP exhibit the opposite behavior where it turns on when the base has a lower voltage than the collector.

NPN transistors are easier to use especially with digital devices such as microcontrollers as the input voltage to the base need not match the collector voltage. It is also more intuitive to use as we can turn something on by setting something high.

PNP with its reversed polarities sometimes result in awkward circuit configurations since in order to allow the base to be lower than the collector, loads must be placed on the emitter ('low') side. Furthermore, extra care is also required to ensure that the maximum voltage on the collector isn't so high that unintended current flows through the base. For example, if the base is controlled by a 5V microcontroller, attempting to drive loads higher than 5.6V (5V + 0.6 V_BE) will result in current flowing through the base uncontrollable by the microcontroller.

When choosing a BJT, the important factors to consider are:

  • Maximum collector current (I_C)
  • Maximum voltage between collector and emitter (V_CEO)
  • The gain (h_FE)

NPN transistors typically have a complementary PNP version with similar characteristics. For example:

NPN PNP V_CE I_C P_D
BC547 BC557 45V 100mA 500mW
BC337 BC327 45V 800mA 625mW
TIP 29 TIP 30 40V 1A 2W
TIP3055 TIP2955 60V 15A 90W
2n3904 2n3906 40V 200mA 625mW

Modes

There are 4 modes a BJT can be in:

  • Cutoff - when the transistor acts like an open circuit and allows no current flow between collector and emitter. Cutoff only occurs when the voltage between the base and emitter is below the threshold voltage of the diode (ie. the arrow, between the collector and emitter).
  • Active - When the voltage exceeds the threshold voltage of the diode, current from collector to emitter is proportional to the current flowing into the base, amplified by the transistor's gain.
  • Reverse-Active - Similar to Active but current flow is reversed, where current flows from emitter to collector.
  • Saturation - Once the voltage between the collector and base exceeds the saturation threshold voltage, the transistor acts like a short circuit and current flows freely from collector to emitter. The current flowing into the base no longer governs the current flowing through collector and emitter.

In summary, the voltage relation to the different modes are:

Voltage Relations NPN PNP
Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): V_E < V_B < V_C Active Reverse
Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): V_E < V_B > V_C Saturation Cutoff
Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): V_E > V_B < V_C Cutoff Saturation
$ V_{E}>V_{B}>V_{C} $ Reverse Active

Important characteristics

  • Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): V_{CEO} is the maximum voltage between the collector and emitter in an open circuit.
  • Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): V_{CBO} is the maximum voltage between the collector and base in an open circuit.
  • Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): V_{EBO} is the maximum voltage between the emitter to the base base in an open circuit.
  • Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): I_C is the continuous collector current. This is the amount of power that can be dissipated by the transistor while operating in saturation mode (ie. smallest voltage drop Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): V_{CE(Sat)} * I_C ). If operating in any other mode, Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): V_{CE} could be higher and the power generated could be higher!
  • Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): I_{CP} is the pulse collector current
  • Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): h_{FE} is the current gain and may be different at different voltages and collector currents.

Power dissipation is the total energy that can be dissipated by the component. For every degrees above 25 degrees Celsius, subtract 5 milliwatts from the maximum rating. Silicon will degrade past 150 degrees celsius.

Field-Effect Transistor

Field-Effect Transistors are transistors that use a field-effect the control current flow. A field effect can be demonstrated by a glowing fluorescent tube placed near a high voltage source. Rather than having current control the electron flow through the silicon, a FET instead uses a electric field. Since FETs is a different technology, it also has slightly different terminology: Base is replaced by a gate, collector is the source, and emitter is the drain. The electrical isolation between the gate and the source is demonstrated by the various symbols representing a FET (gate never touches the source). As a result, only the voltage potential between the gate and source rather than current controls current flow. Similar to BJT, there are also two types of FETs: N-Channel and P-Channel.

N-Channel P-Channel

Like BJT transistors, there are two types of FETs. In a nutshell:

  • N Channel - Source is connected to ground. To let current flow, gate is connected to a higher voltage.
  • P Channel - Source is connected to power. To let current flow, gate is connected to ground or a voltage lower than source.

When choosing a FET for a project, the most important characteristics to keep in mind are:

  • Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): R_{DS(on)} - Resistance between the drain and the source while ON and OFF.
  • $ V_{GS(th)} $ - Threshold voltage required to turn the FET on or off.

As a side note, some FETs are fabricated by the controlled oxidation of silicon, also known as metal-oxide semiconductor (MOS) and are called MOSFETs. For TO-220 packages, the metallic backs used to attach a heat sink to are connected to the drain. Care must be taken if multiple MOSFETs are connected to one heat sink in the event they require electrically separate sinks.

FETs that are used for logical level typically have an 'L' in the name. For example, the IRLZ44N.

Some useful FETs include:

width="50%" N-Channel width="50%" P-Channel

Logic capable (3.3V or 5V):

  • IRF3708, Rds = 0.0095Ohm at Vgs=4.5V
  • IRLZ44N, Rds = 0.025ohm at Vgs=5.0v

General Purpose:

  • 2N700
  • FQP30N06
  • IRF540

Logic capable (3.3V or 5V):

  • NDP6020P

General Purpose:

  • IRF9540

Capacitors

Capacitors can be used to smooth out voltage, as reservoirs for electrical energy storage, or to block DC current.

Capacitors allow DC to pass for a very short period of time until the capacitor is charged. On the contrary, AC passes freely through them, but with a changed, rectified, shape.

Capacitor's capacitance is measured in Farads (F). Typically, capacitors have smaller units and are typically written as micro-farads (µF) or pico-farads (pF).

  • 1000 µF = 1F
  • 1000 pF = 1 µF

Multiple capacitor's capacitance can be added when connected in parallel. It is reduced when connected in series. Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): Cparallel = C1 + C2 + C3 ... Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): Cseries = 1 / (1/C1 + 1/C2 + ...)

A perfect capacitor should have zero resistance, also known as the equivalent series resistance (ESR). A good capacitor should have a low ESR. Failing capacitors might still have a proper capacitance, but a very high ESR.

When using a capacitor, ensure that you do not exceed the rated voltage. For electrolytic capacitors, ensure you have connect the polarities correctly.

Capacitor Tiers

The list here was gathered from https://www.tomshardware.com/reviews/power-supplies-101,4193-5.html.

Japanese capacitors are typically higher quality. These include:

  • Rubycon
  • United Chemi-Con (or Nippon Chemi-Con)
  • Nichicon
  • Sanyo/Suncon
  • Panasonic
  • Hitachi
  • FPCAP or Functional Polymer Capacitor (ex-Fujitsu caps segment, which was bought by Nichicon)
  • ELNA

Other high quality brands include:

  • Cornell Dubilier (USA)
  • Illinois Capacitor (Currently owned my Cornell Dubilier)
  • Kemet Corporation (USA)
  • Vishay (USA)
  • EPCOS (TDK company, Germany)
  • Würth Elektronik (Germany)

Taiwanese manufacturers with factories in China perform well and are cheaper.

  • Taicon (belongs to Nichicon)
  • Teapo
  • SamXon (except GF series which belongs to a lower Tier)
  • OST
  • Toshin Kogyo
  • Elite

Above grade:

  • Jamicon
  • CapXon

Bottom of the barrel:

  • G-Luxon
  • Su'scon
  • Lelon
  • Ltec
  • Jun Fu
  • Fuhjyyu
  • Evercon

IC Technology

Silicon IC technology can be classified into:

  1. Bipolar
    • Structured as either PNP or NPN
  2. Metal Oxide Semiconductor
    • Classified under PMOS, NMOS, and CMOS
  3. BiCMOS
    • Employs both CMOS and Bipolar transistors in the same semiconductor chip

Bipolar Junction Transistors (BJT) are manufactured in either NPN or PNP. Transistor-Transitor Logic (TTL) is a logic family that is built on BJT.

Complementary metal oxide semiconductor (CMOS) technology is used to construct digital logic as well as some analog circuits using a combination of PMOS and NMOS transistors. Negative Channel Metal Oxide Semiconductor (NMOS) is a type of semiconductor that is built with n-type source and drain and a p-type substrate. Carriers are electrons and when a voltage is applied to the gate, NMOS will conduct. NMOS are faster than PMOS since carriers bare electrons and travels twice as fast as holes. In contrast, Positive Channel MOS (PMOS) which works by moving electron vacancies or holes. A a voltage is applied to the gate, PMOS will not conduct.

Benefits of CMOS technology are low static power consumption and high noise immunity.

Operational Amplifiers

Operational Amplifiers (op amp for short) are versatile components which can be used in many applications.

At its basic form, op-amps have 5 terminals: two inputs, one output, a positive and negative supply voltage. Its operation is to sense the difference between the two input terminals and multiply this by a differential gain of A which ideally is infinite, but in reality is in the order of 105 - 106. An ideal op-amps have inputs that draw no current (infinite impedance, it only senses voltage) while the output maintains its voltage regardless of any load (zero impedance) by acting as a current source when positive and current sink when negative. When both inputs are equal, an ideal op-amp should have an output voltage of 0V, a property is called common-mode rejection.

Real life op-amps are very close to the ideal nowadays though there are a few limitations to keep in mind:

  • Output voltage cannot be greater than positive rail or less than negative rail. Op-amps that have output voltages come very close to its positive and negative input voltages are sometimes called rail-to-rail op-amps.
  • Input offset voltage is the voltage difference between the two input pins when shorted together. ie. Shorting the inputs will still yield a value of 'input-offset-voltage*Gain' in the output. A LM358 has 3mV.
  • Some op-amps offer an offset null terminal which can be used to compensate for the offset voltage.
  • Input offset current is the amount of current flowing into each of the input terminals in order to bias the internal transistors. Ideally this should be 0A. A LM358 has 20 nanoamps.

Inverting Op-Amp Circuit

The inverting op-amp circuit is the most commonly used configuration. The circuit is connected such that the output is connected to the negative input:

Since no current flows into the negative input, we know that the current flowing through both resistors must be equal. We can then calculate the output voltage based on the input voltage which ends up being Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): v_O = -\frac{R_2}{R_1}v_i .

The interesting fact is that despite a large gain (A), an inverting op-amp circuit allows us to negate and control the gain of the output signal based solely by the two resistors we choose.


An example op-amp is the 741 which contains only one op-amp in the 8-pin PDIP package. A 358 has 2 op-amps.

An op-amp functions as a differential amplifier with the output voltage equal to the difference of the non-inverting input and the inverting input voltage, multiplied by the open-loop gain (Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): A_{OL} ). Op-amps are designed to have a large open-loop gain, typically over 100,000.

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): V_{OUT} = A_{OL}(V_+-V_-)

When an op-amp is used like a comparator, it is in the open-loop configuration. Using an op-amp in an open-loop configuration makes it very easy to saturate the op-amp because a tiny voltage difference between the input pins will yield a very large change in the output.

To reduce the sensitivity, a closed-loop configuration can be used where the op-amp's output is feed back to one of the input in order to stabilize itself.

Negative Feedback: When the feedback is routed to the inverting input (negative). Output counteracts changes to input, and lets the circuit achieve equilibrium.

Positive Feedback: Feedback is routed to the non-inverting input (positive). The output quickly goes into one of two states: Saturating at the positive or negative supply rail value. Less common.

LM358: Low cost, low power, a dual op-amp.

Characteristics

Power supply: Can be either single or dual supply.

  • Single: Voltage given to positive supply rail, with the negative supply rail connected to ground
  • Dual: Voltage is given to the positive and negative supply rail. Negative supply rail does not need to be ground and can be some negative voltage.

Open-loop differential voltage gain. Typically 100dB, or 100,000 gain.

  • 1dB = 1000x voltage gain.

The voltage gain decreases as input frequency increases.

Wide unity gain bandwidth is the highest frequency the op-amp can operate with a gain of 1 before distorting the signal


Comparator

An op-amp can be used as a comparator to compare two input signals.

  • Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): V_+ > V_- , then Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): V_{out} = +V_{CC}
  • Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): V_+ < V_- , then Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): V_{out} = -V_{CC}

Typically, $ V_{-} $ is connected to a voltage reference (typically ground, or using a zener diode).

This acts as a 1-bit analog to digital converter.

Buffer Signal

Simplest closed-loop op-amp circuit, where the output is tied to the negative inverting input terminal. This creates a voltage follower and effectively makes the op-amp have a gain of 1, also known as a unity gain. Signals passed through this circuit are neither amplified or attenuated.

The use for this is to buffer the signal between to different circuits. This is done because the impedance between the input and output are different. The input impedance is low, but the impedance in the output is high.

Dual Voltage Supply

A dual voltage is required if a AC signal is desired.

When using a DC input source, you can create a negative voltage using a DC-to-DC voltage converter, such as the TC7660H.

Alternatively, use a 'virtual ground' by dividing the input voltage. This requires the impedance on both sides of the virtual ground to be equal. An op-amp can be used to

Inverting Amplifier

Connect the op-amp's output through a resistor Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): R_f and the input signal through another resistor Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): R_{in} to the negative inverting input terminal with.

The non-inverting input is connected to ground.

By doing so, the gain can be controlled using this formula: Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): \text{Voltage Gain} = \frac{V_{out}}{V_{in}} = -\frac{R_f}{R_{in}}


Non-Inverting Amplifier

Connect the op-amp's output through a resistor Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): R_f and ground through another resistor Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): R_2 to the negative inverting input terminal with.

The non-inverting input terminal is connected to Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): V_{in} .

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): \text{Voltage Gain} = 1 + \frac{R_f}{R_2}

It is not possible to build a non-inverting amplifier circuit with a gain less than 1.