Electronics: Difference between revisions

From Leo's Notes
This page was last edited on 10 September 2020, at 18:42.
m Text replacement - "{\| " to "{| class="wikitable" "
 
(36 intermediate revisions by the same user not shown)
Line 1: Line 1:
Basic electronics theory.


== Physics ==
==Formulas==
Some important formulas:


Some formulas that are fundamental:
*Ohm's Law: <math>V=IR</math>
* Ohm's Law: <math>V=IR</math>
*Power (watts): <math>P=VI</math>
* Power (watts): <math>P=VI</math>


With these two formulas, you can build other calculations. Eg:
With these two formulas, you can build other calculations. Eg:
<math>P = VI = V(V/R) = V^2/R</math>
<math>P = VI = V(V/R) = V^2/R</math>


== Fundamentals ==
==Diodes==
<math>V_{cc}</math> is the power supply voltage. It is the voltage supplied at the collector.
[[File:Conventional Diode.png|alt=|right]]Diodes restrict the direction of current flow. A diode is '''forward bias''' is when the anode has a higher voltage which for most diodes allow current to flow. On the other hand, a '''reverse bias''' occurs when the cathode has a higher voltage and most diodes restrict current.  


== Diodes ==
An ideal diode would allow all current flow at any forward bias and none in the reverse bias. However, real-world behavior is bound by the following limitations which are found in the datasheet:
{{highlight|lang=text|code=<nowiki>
  Anode (+)        Cathode (-)
  ----------[  |]----------


  Electronic symbol:
*Non-zero Forward voltage (<math>V_f</math>). A diode typically requires some forward voltage before it becomes forward bias and allows current to flow.
            | \  |
*A non-infinite breakdown voltage (<math>V_{br}</math>). A diode when in reverse bias may allow current to flow in the reverse direction when a certain reverse voltage is reached. This is sometimes useful behavior and is a feature of '''Zener diodes'''.
  ----------|  >|---------
*A non-zero forward voltage drop. If voltage drop is important, find diodes with a low voltage drop such as '''Schottky diodes'''.
            | / |
*A delay in switch action. High frequencies may be an issue as a result. Schottky diodes have faster switching.
</nowiki>
*A limit on the maximum current flow
}}
*A limit on heat dissipation. Both in terms of continuous current and peak current.


* Forward bias = on, lets current pass through
Note that 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.
* 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:
The forward bias and reverse bias behavior is charted in a current-voltage (I-V) curve that graphs current flow relative to the forward or reverse voltage. These graphs are found in the datasheet.
* Forward voltage (<math>V_f</math>) - 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 (<math>V_{br}</math>) - 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, <math>I_F</math>) and one that is peak.
=== Regular p-n junction Diodes ===
The most common diode are the 1N4001 through 1N4007 '''rectifier diodes''' and are used to rectify power. For lower voltage applications, use a '''signal diode''' such as the 1N4148.


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.
A light emitting diode (LED) emits light when forward biased.


Example Components:
===Schottky diode===
* 1N4148 Signal Diode
Schottky diodes have better characteristics than a normal diode and is more expensive. Better characteristics include:
* 1N4001 Rectifier Diode (for rectifying power)


=== Schottky diode  ===
*Has a lower forward voltage drop
Similar to a normal diode but:
*Faster recovery and switch action
* 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===
[[File:Zener diode constant voltage.png|right|200px]]Zener diodes have a specific breakdown voltage that allows current to flow while in reverse bias, known as the '''Zener breakdown'''.  This breakdown voltage is useful when creating a constant voltage reference, where excess voltage is 'spilled' over through the Zener diode. [[File:Zener-ref-voltage2.png|right|200px]]When using a Zener as a voltage reference, a resistor is required in order to limit current that can pass through the diode. As a result, using a Zener as a a voltage regulator with a load is inefficient since a lot of power is wasted through the resistor.


=== Zener Diode ===
Strictly speaking, Zener diodes have a breakdown voltage of under 5 volts. Anything higher are usually Avalanche diodes. A related diode used to suppress voltage spikes is the '''Transient Voltage Suppression (TVS) Diode''' which clamps a voltage from spiking past a certain voltage.
* 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.
==Transistors==
[[File:Zener diode constant voltage.png|right]]
There are three types of transistors:


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).
#Bipolar Junction Transistor ('''BJT''')
#Field-Effect Transistor ('''FET''')
#'''IGBT''' (BJT with MOSFET gate)


[[File:Zener-ref-voltage2.png|right]]
In short, the differences between the types are outlined in the following table.
{| class="wikitable"
! !!BJT!!MOSFET!!IGBT
|-
!Cost
|Cheap||Medium||Expensive
|-
!Voltage Capabilities
|Wide: 40-1000V||Medium: 20-400V||Very high voltages, up to 4000V
|-
!ESD Damage
|Robust against static discharge||Can be easily damaged||Can be easily damaged
|-
!Noise
|Linear behavior results in low noise||Non-linear behavior results in high noise||Not intended as an amplifier
|-
!Switching Speed
|<2MHz when used as a saturating switch. Slow turn-off||<20MHz with high power loads||<50kHz
|-
!Efficiency
|High efficiency at high current when in saturation mode||low-medium currents acts as a low-valued resistor||Efficient for very large currents, similar but less than BJT
|-
!Ease of Use
| ||Easy to drive because of open circuit gate||
|-
!Current Direction
|collector to emitter||Bi-directional when on||collector to emitter
|-
!Important Characteristics
|
*Abs. Max  <math>I_C</math>: Maximum current through collector
*Abs. Max <math>V_{CEO}</math>: Maximum voltage through collector and emitter
*Abs. Max <math>V_{CBO}</math>: Maximum voltage through collector and emitter
*<math>V_{CE}</math>: Voltage required to turn on
*<math>H_{fe}</math>: current gain
|
*Abs. Max <math>I_D</math>: Maximum current through drain
*<math>V_{DSS}</math>: Breakdown voltage
*<math>R_{DS}</math>: Resistance when on
*Threshold <math>V_{GS}</math>: Minimum voltage to start turning on. Use a <math>V_{GS}</math> with an acceptable <math>R_{DS}</math> value.
|
|}
 
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
|-
|[[File:TO-90 Package.svg|40px|center]]
|[[File:TO-220 Package.svg|60px|center]]
|}
 
Different packages have different amounts of power dissipation. As a rule of thumb, for every degrees above 25 degrees Celsius, subtract 5 milliwatts from the maximum rating. Silicon will degrade past 150 degrees Celsius.


==== 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 ==
===Bipolar Junction Transistor===
There are two types: Bipolar Junction Transistor (BJT) and Field-Effect Transistor (FET)
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 '''n'''ot '''p'''oint i'''n'''. When reading data sheets or schematics, PNP transistors may sometimes drawn upside down (flipped vertically).
<div class="res-img">[[File:NPN PNP Transistor Diagram.svg|center]]</div>


=== Bipolar Junction Transistor ===
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.
There are two types of BJT transistors: NPN and PNP.


In a NPN transistor, current flows in to the base terminal and the larger regulated current flows from the collector to the emitter. The emitter emits negative charge to the collector.
[[File:NPN Transistor.svg|left]]
[[File:PNP Transistor.svg|right]]


In a PNP transistor, current flows out of the base terminal, and the larger regulated current flows from the emitter to the collector. The emitter emits positive charge (or holes) to 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.  


In a PNP transistor, because current flows from the emitter to the collector, the voltage at the emitter terminal must be higher than the collector terminal. This is the opposite of a NPN transistor where the voltage at the collector is higher than the emitter.
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:
{| class="wikitable"
!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
|}


PNP transistors are typically drawn upside down because nodes near the top of the page are at a higher voltage.
====Modes====
<div class="row">
<div class="col-lg-8">
There are 4 modes a BJT can be in:


A NPN transistor has the arrow pointing out. Remember by mnemonic: '''N'''ot '''P'''ointing i'''N'''.
*'''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.
</div>


NPN transistors will have a complementary counterpart with similar characteristics.
<div class="col-lg-4">
In summary, the voltage relation to the different modes are:
{| class="wikitable"
{| class="wikitable"
! NPN
!Voltage Relations
! PNP
!NPN
! V_CE
!PNP
! I_C
! P_D
|-
|-
| BC547
|<math>V_E < V_B < V_C</math>||Active||Reverse
| BC557
| 45V
| 100mA
| 500mW
|-
|-
| BC337
|<math>V_E < V_B > V_C</math>||Saturation||Cutoff
| BC327
| 45V
| 800mA
| 625mW
|-
|-
| TIP 29
|<math>V_E > V_B < V_C</math>||Cutoff||Saturation
| TIP 30
| 40V
| 1A
| 2W
|-
|-
| TIP3055
|<math>V_E > V_B > V_C</math>||Reverse||Active
| TIP2955
|}
| 60V
</div>
| 15A
</div>
| 90W
 
===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
|-
|-
| 2n3904
|[[File:N-Channel MOSFET.svg|frameless|center|100px]]
| 2n3906
|[[File:P-Channel MOSFET.svg|frameless|center|100px]]
| 40V
| 200mA
| 625mW
|}
|}


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:


Transistors come in a few different packages:
*<math>R_{DS(on)}</math> - Resistance between the drain and the source while ON and OFF.
* TO-90 - signal transistors; dissipates a few hundred milliwatts of heat
*<math>V_{GS(th)}</math> - Threshold voltage required to turn the FET on or off.
* TO-220 - power transistors (looks like fets); dissipates few watts or more with a heatsink


==== Modes ====
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.
===== Cutoff Mode =====
Fully off; blocks all current.


Cutoff happens when:
FETs that are used for logical level typically have an 'L' in the name. For example, the IRLZ44N.
* NPN transistor: Voltage between base and emitter is less than some voltage threshold (<math>V_{BE} < V_{TH}</math>), where <math>V_{TH}</math> is some positive value such as 0.7V.
* PNP transistor: Voltage between base and emitter is greater than some voltage threshold (<math>V_{BE} > V_{TH}</math>), where <math>V_{TH}</math> is some negative value such as -0.7V.


* NPN: <math>V_E > V_B < V_C</math>
Some useful FETs include:
* PNP: <math>V_E < V_B > V_C</math>
{| class="wikitable"
! width="50%" |N-Channel
! width="50%" |P-Channel
|-
|
Logic capable (3.3V or 5V):


There is a specific forward voltage required before semiconductors conduct (like a diode); until that happens, the current flowing through the transistor is 0.
*IRF3708, Rds = 0.0095Ohm at Vgs=4.5V
*IRLZ44N,  Rds = 0.025ohm  at Vgs=5.0v


When the forward voltage is met, the base and the emitter acts as a short circuit and no current is limited. This means it is important to limit the amount of current that can flow from the base to the emitter (with a resistor).
General Purpose:


===== Active Mode =====
*2N700
Partially on. Also known as the linear region because there is a relationship between the current flowing through the transistor and the current flowing through the base.
*FQP30N06
*IRF540
|
Logic capable (3.3V or 5V):


<math>I_C = h_{FE} * I_B</math>, where <math>h_{FE}</math> is the current gain, also sometimes written as a uppercase beta.
*NDP6020P


<math>h_{FE}</math> may change from operating conditions.
General Purpose:


* NPN: <math>V_E < V_B < V_C</math>
*IRF9540
* PNP: <math>V_E > V_B > V_C</math>
|}


Example:
==Capacitors==
A typical transistor has a <math>h_{FE}</math> of 100. If a transistor has 1mA flowing through the base (<math>I_B</math>), then 100mA can flow through the collector (<math>I_C</math>). The current flowing through the emitter will be equal to the sum of the base and collector (<math>I_E = I_C + I_B</math>)
Capacitors can be used to smooth out voltage, as reservoirs for electrical energy storage, or to block DC current.


===== Saturation Mode =====
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.
Fully on; Acts like a short circuit between the collector and emitter.


Changing the current flowing through the base will not affect the current through the collector.
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).


* NPN: <math>V_E < V_B > V_C</math>
*1000 µF = 1F
* PNP: <math>V_E > V_B < V_C</math>
*1000 pF = 1 µF


Ideally, the voltage drop between collector and emitter (<math>V_{CE}</math>) is 0. In practice, it is typically something small at around 0.2V. This voltage drop is also known as the saturated emitter-collector voltage or <math>V_{CE(Sat)}</math>.
Multiple capacitor's capacitance can be added when connected in parallel. It is reduced when connected in series.
<math>Cparallel = C1 + C2 + C3 ...</math>
<math>Cseries = 1 / (1/C1 + 1/C2 + ...)</math>


On a PNP transistor, the voltage drop is negative since the collector has a higher voltage than the emitter and base.
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.


It is important to limit the amount of current that can flow from the collector to emitter because the transistor acts as a short circuit.
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.


==== Important characteristics ====
Japanese capacitors are typically higher quality. These include:


* <math>V_{CEO}</math> is the maximum voltage between the collector and emitter in an open circuit.
*Rubycon
* <math>V_{CBO}</math> is the maximum voltage between the collector and base in an open circuit.
*United Chemi-Con (or Nippon Chemi-Con)
* <math>V_{EBO}</math> is the maximum voltage between the emitter to the base base in an open circuit.
*Nichicon
* <math>I_C</math> 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 <math>V_{CE(Sat)} * I_C</math>). If operating in any other mode, <math>V_{CE}</math> could be higher and the power generated could be higher!
*Sanyo/Suncon
* <math>I_{CP}</math> is the pulse collector current
*Panasonic
* <math>h_{FE}</math> is the current gain and may be different at different voltages and collector currents.
*Hitachi
*FPCAP or Functional Polymer Capacitor (ex-Fujitsu caps segment, which was bought by Nichicon)
*ELNA


Other high quality brands include:


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.
*Cornell Dubilier (USA)
Silicon will degrade past 150 degrees celsius.
*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.


=== Field-Effect Transistor ===
*Taicon (belongs to Nichicon)
Most commonly fabricated by the controlled oxidation of silicon (ie. metal-oxide semiconductor, the MOS in MOSFET).
*Teapo
*SamXon (except GF series which belongs to a lower Tier)
*OST
*Toshin Kogyo
*Elite


A MOSFET can be thought of as a variable resistor where the resistance is a function of the voltage difference between the gate and source.
Above grade:


Like BJT transistors, there are two types of FETs. In a nutshell:
*Jamicon
* N Channel - Source is connected to ground. To let current flow, gate is connected to a higher voltage.
*CapXon
* P Channel - Source is connected to power. To let current flow, gate is connected to ground.


The back of MOSFETS (for heat sinks) are connected to the drain. Multiple mosfets connected to one heat sink must be electrically isolated.
Bottom of the barrel:


Important datasheet values to keep in mind are:
*G-Luxon
* <math>R_{DS}</math> - Resistance between the drain and the source while ON and OFF.
*Su'scon
* <math>V_{GS(th)}</math> - Threshold voltage required to turn the FET on or off.
*Lelon
*Ltec
*Jun Fu
*Fuhjyyu
*Evercon


== Operational Amplifiers ==
==IC Technology==
Silicon IC technology can be classified into:


Symbolized as a sideways pointing triangle with 5 inputs. The inputs are:
#Bipolar
#*Structured as either PNP or NPN
#Metal Oxide Semiconductor
#*Classified under PMOS, NMOS, and CMOS
#BiCMOS
#*Employs both CMOS and Bipolar transistors in the same semiconductor chip


Differential inputs:
Bipolar Junction Transistors (BJT) are manufactured in either NPN or PNP. Transistor-Transitor Logic (TTL) is a logic family that is built on BJT.
* Non-inverting (positive) input
* Inverting (negative) input
Output, with its voltage referenced to common ground:
* Output
Outer rails, which provides power to the op-amp:
* <math>V_{S+}</math>
* <math>V_{S-}</math>


The input to an op-amp is the difference in voltage between the two input terminals.
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.
The golden rule for op-amps:
* The input draws no current; Treat the input with an infinitely high input impedance.  
* The output attempts to make the voltage difference between the inputs zero (for closed-loop?)


Output voltage cannot be greater than positive rail or less than negative rail.
Benefits of CMOS technology are low static power consumption and high noise immunity.


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.
==Operational Amplifiers==
Operational Amplifiers (op amp for short) are versatile components which can be used in many applications.


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 (<math>A_{OL}</math>). Op-amps are designed to have a large open-loop gain, typically over 100,000.
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/open-loop gain''' of A which ideally is infinite, but in reality is in the order of 10<sup>5</sup> - 10<sup>6</sup>. 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 known as '''common-mode rejection'''.
[[File:Operational Amplifier.svg|center]]


<math>V_{OUT} = A_{OL}(V_+-V_-)</math>
Amplifier gains represents a ratio of an output to an input (100,000:1). Datasheets may write the gain as 100V/mV or 100,000mV/mV. Alternatively, the gain can be written using a logarithmic measure known as a decibel. <math>Gain_{dB} = 20 log|A|</math>. Typical values in decibels are 120dB (1,000,000 gain), 100dB (100,000 gain). Negative gains means there will be a 180° phase difference.


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.
Real life op-amps are very close to the ideal nowadays though there are a few limitations to keep in mind:


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.
*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.


Negative Feedback: When the feedback is routed to the inverting input (negative). Output counteracts changes to input, and lets the circuit achieve equilibrium.
Additional example uses here: https://www.arrow.com/en/research-and-events/articles/fundamentals-of-op-amp-circuits


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.
===Inverting Op-Amp Circuit===
The inverting op-amp circuit is the most commonly used configuration. As the name implies, this circuit inverts the signal. A negative feedback loop is created by connecting the output to the negative input.
[[File:Inverting Op-Amp.svg|center]]
[[File:Inverting Op-Amp Math.svg|thumb|right]]
Since op-amps with feedback loops such as the one above are governed by the formula <math>v_O/A = v_2 - v_1</math> where A is ideally infinite, the op-amp will try to satisfy <math>0 = v_2 - v_1</math>. In other words, an op-amp in an inverting circuit will try to make both inputs be at same voltage. The behavior between these two pins is referred to as a virtual ground and can be used ease the calculation of <math>v_O</math> by using it as a reference point.  While it is called a virtual 'ground', it isn't actually ground. It is just a quasi-concept to say that both input pins have roughly the same voltage. In fact, <math>v_2</math> could be offset to some positive or negative voltage to bias the output.


LM358: Low cost, low power, a dual op-amp.
Using the concept of a virtual ground, we can save a lot of extra work by safely assuming that both input pins have about equal voltage.  


=== Characteristics ===
If we do not use the virtual ground idea to make this assumption, the calculation requires a bit more work.  Since we know that the current flowing through both resistors must be equal (because no current can flow into the input of an op-amp), calculating the current through R1 and solving for V=IR after R2 will give us our answer. The work to do this can be seen on the right hand image.
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.
It turns out that a inverting op-amp's output ends up being <math>v_O = -\frac{R_2}{R_1}v_i</math>. Despite having an infinite bias, this circuit's use of negative feedback allows us to precisely control its output gain.
* 1dB = 1000x voltage gain.


The voltage gain decreases as input frequency increases.
<div class="row">
<div class="col-lg-4">'''Basic Op-Amp Circuit'''
The inverting op-amp where the output is inverted and adjusted by the two resistors.
[[File:Inverting Op-Amp Circuit.svg|center]] </div>
<div class="col-lg-4">'''Summation Op-Amp Circuit'''
The output is the sum of the input voltages, weighted by their resistor values.
[[File:Inverting Op-Amp Summation.svg|center]]</div>
</div>


Wide unity gain bandwidth is the highest frequency the op-amp can operate with a gain of 1 before distorting the signal
===Non-Inverting Op-Amp===
A non-inverting op-amp circuit is identical to the inverting op-amp circuit with the difference being the input is now applied to the positive input.
[[File:Non-Inverting Op-Amp.svg|center]]


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.
The input in a non-inverting op-amp circuit is not inverted. The bias is also different because our input is no longer directly going into the feedback loop. Other example configurations are given below.


On some op-amps, an offset null terminal can be used to compensate for the offset voltage.
<div class="row">
<div class="col-lg-4">'''Voltage Follower / Buffer'''
The output follows the input and is also known as a buffer or unity gain.
[[File:Non-Inverting Op-Amp Follower.svg|center]]</div>
<div class="col-lg-4">'''Summation Op-Amp Circuit'''
The summer adds all voltages. Inputs can be weighed based on the input resistor.
[[File:Non-Inverting Op-Amp Summer.svg|center]]
</div>
</div>


Input offset current is the amount of current flowing into each of the input terminals in order to bias the internal transistors. A LM358 has 20 nanoamps.
===Example Components===
An example op-amp is the LM741 which contains only one op-amp in the 8-pin PDIP package.


The output current has two conditions based on the differential output voltage.
A LM358 is a low cost, low power, a dual op-amp.
* Positive: Output acts as a current source (current is pushed out of the output terminal to raise output voltage) and
* Negative: Output acts as a current sink (current is drawn into the output terminal, lowering the output voltage).


=== Comparator ===
An op-amp can be used as a comparator to compare two input signals.
* <math>V_+ > V_-</math>, then <math>V_{out} = +V_{CC}</math>
* <math>V_+ < V_-</math>, then <math>V_{out} = -V_{CC}</math>


Typically, <math>V_-</math> is connected to a voltage reference (typically ground, or using a zener diode).
===Characteristics===
Power supply: Can be either single or dual supply.


This acts as a 1-bit analog to digital converter.
*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.


=== Buffer Signal ===
Open-loop differential voltage gain. Typically 100dB, or 100,000 gain.
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.
*1dB = 1000x voltage gain.


=== Dual Voltage Supply ===
The voltage gain decreases as input frequency increases.
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.
Wide unity gain bandwidth is the highest frequency the op-amp can operate with a gain of 1 before distorting the signal


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 ===
===Comparator===
An op-amp can be used as a comparator to compare two input signals.


Connect the op-amp's output through a resistor <math>R_f</math>
*<math>V_+ > V_-</math>, then <math>V_{out} = +V_{CC}</math>
and the input signal through another resistor <math>R_{in}</math>
*<math>V_+ < V_-</math>, then <math>V_{out} = -V_{CC}</math>
to the negative inverting input terminal with.


The non-inverting input is connected to ground.
Typically, <math>V_-</math> is connected to a voltage reference (typically ground, or using a zener diode).


By doing so, the gain can be controlled using this formula:
This acts as a 1-bit analog to digital converter.
<math>\text{Voltage Gain} = \frac{V_{out}}{V_{in}} = -\frac{R_f}{R_{in}}</math>




=== Non-Inverting Amplifier ===
===Dual Voltage Supply===
A dual voltage is required if a AC signal is desired.


Connect the op-amp's output through a resistor <math>R_f</math>
When using a DC input source, you can create a negative voltage using a DC-to-DC voltage converter, such as the TC7660H.  
and ground through another resistor <math>R_2</math>
to the negative inverting input terminal with.


The non-inverting input terminal is connected to <math>V_{in}</math>.
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


<math>\text{Voltage Gain} = 1 + \frac{R_f}{R_2}</math>


It is not possible to build a non-inverting amplifier circuit with a gain less than 1.
{{Navbox Tinkering}}
[[Category:Tinkering]]

Latest revision as of 18:42, 10 September 2020

Basic electronics theory.

Formulas

Some important formulas:

  • Ohm's Law: 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=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

Diodes

Diodes restrict the direction of current flow. A diode is forward bias is when the anode has a higher voltage which for most diodes allow current to flow. On the other hand, a reverse bias occurs when the cathode has a higher voltage and most diodes restrict current.

An ideal diode would allow all current flow at any forward bias and none in the reverse bias. However, real-world behavior is bound by the following limitations which are found in the datasheet:

  • Non-zero 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 ). A diode typically requires some forward voltage before it becomes forward bias and allows current to flow.
  • A non-infinite 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} ). A diode when in reverse bias may allow current to flow in the reverse direction when a certain reverse voltage is reached. This is sometimes useful behavior and is a feature of Zener diodes.
  • A non-zero forward voltage drop. If voltage drop is important, find diodes with a low voltage drop such as Schottky diodes.
  • A delay in switch action. High frequencies may be an issue as a result. Schottky diodes have faster switching.
  • A limit on the maximum current flow
  • A limit on heat dissipation. Both in terms of continuous current and peak current.

Note that 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.

The forward bias and reverse bias behavior is charted in a current-voltage (I-V) curve that graphs current flow relative to the forward or reverse voltage. These graphs are found in the datasheet.

Regular p-n junction Diodes

The most common diode are the 1N4001 through 1N4007 rectifier diodes and are used to rectify power. For lower voltage applications, use a signal diode such as the 1N4148.

A light emitting diode (LED) emits light when forward biased.

Schottky diode

Schottky diodes have better characteristics than a normal diode and is more expensive. Better characteristics include:

  • Has a lower forward voltage drop
  • Faster recovery and switch action

Zener Diode

Zener diodes have a specific breakdown voltage that allows current to flow while in reverse bias, known as the Zener breakdown. This breakdown voltage is useful when creating a constant voltage reference, where excess voltage is 'spilled' over through the Zener diode.

When using a Zener as a voltage reference, a resistor is required in order to limit current that can pass through the diode. As a result, using a Zener as a a voltage regulator with a load is inefficient since a lot of power is wasted through the resistor.

Strictly speaking, Zener diodes have a breakdown voltage of under 5 volts. Anything higher are usually Avalanche diodes. A related diode used to suppress voltage spikes is the Transient Voltage Suppression (TVS) Diode which clamps a voltage from spiking past a certain voltage.

Transistors

There are three types of transistors:

  1. Bipolar Junction Transistor (BJT)
  2. Field-Effect Transistor (FET)
  3. IGBT (BJT with MOSFET gate)

In short, the differences between the types are outlined in the following table.

BJT MOSFET IGBT
Cost Cheap Medium Expensive
Voltage Capabilities Wide: 40-1000V Medium: 20-400V Very high voltages, up to 4000V
ESD Damage Robust against static discharge Can be easily damaged Can be easily damaged
Noise Linear behavior results in low noise Non-linear behavior results in high noise Not intended as an amplifier
Switching Speed <2MHz when used as a saturating switch. Slow turn-off <20MHz with high power loads <50kHz
Efficiency High efficiency at high current when in saturation mode low-medium currents acts as a low-valued resistor Efficient for very large currents, similar but less than BJT
Ease of Use Easy to drive because of open circuit gate
Current Direction collector to emitter Bi-directional when on collector to emitter
Important Characteristics
  • Abs. Max 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 : Maximum current through collector
  • Abs. Max 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} : Maximum voltage through collector and emitter
  • Abs. Max 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} : Maximum voltage through collector and emitter
  • 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} : Voltage required to turn on
  • $ H_{fe} $: current gain
  • Abs. Max 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_D : Maximum current through drain
  • 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_{DSS} : 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/":): R_{DS} : Resistance when on
  • Threshold 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_{GS} : Minimum voltage to start turning on. Use a 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_{GS} with an acceptable 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} value.

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

Different packages have different amounts of power dissipation. As a rule of thumb, for every degrees above 25 degrees Celsius, subtract 5 milliwatts from the maximum rating. Silicon will degrade past 150 degrees Celsius.


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

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.
  • 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_{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:

N-Channel 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/open-loop 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 known as common-mode rejection.

Amplifier gains represents a ratio of an output to an input (100,000:1). Datasheets may write the gain as 100V/mV or 100,000mV/mV. Alternatively, the gain can be written using a logarithmic measure known as a decibel. 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/":): Gain_{dB} = 20 log|A| . Typical values in decibels are 120dB (1,000,000 gain), 100dB (100,000 gain). Negative gains means there will be a 180° phase difference.

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.

Additional example uses here: https://www.arrow.com/en/research-and-events/articles/fundamentals-of-op-amp-circuits

Inverting Op-Amp Circuit

The inverting op-amp circuit is the most commonly used configuration. As the name implies, this circuit inverts the signal. A negative feedback loop is created by connecting the output to the negative input.

Since op-amps with feedback loops such as the one above are governed by the 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/":): v_O/A = v_2 - v_1 where A is ideally infinite, the op-amp will try to satisfy 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/":): 0 = v_2 - v_1 . In other words, an op-amp in an inverting circuit will try to make both inputs be at same voltage. The behavior between these two pins is referred to as a virtual ground and can be used ease the calculation of 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 by using it as a reference point. While it is called a virtual 'ground', it isn't actually ground. It is just a quasi-concept to say that both input pins have roughly the same voltage. In fact, 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_2 could be offset to some positive or negative voltage to bias the output.

Using the concept of a virtual ground, we can save a lot of extra work by safely assuming that both input pins have about equal voltage.

If we do not use the virtual ground idea to make this assumption, the calculation requires a bit more work. Since we know that the current flowing through both resistors must be equal (because no current can flow into the input of an op-amp), calculating the current through R1 and solving for V=IR after R2 will give us our answer. The work to do this can be seen on the right hand image.

It turns out that a inverting op-amp's output 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 . Despite having an infinite bias, this circuit's use of negative feedback allows us to precisely control its output gain.

Basic Op-Amp Circuit

The inverting op-amp where the output is inverted and adjusted by the two resistors.

Summation Op-Amp Circuit

The output is the sum of the input voltages, weighted by their resistor values.

Non-Inverting Op-Amp

A non-inverting op-amp circuit is identical to the inverting op-amp circuit with the difference being the input is now applied to the positive input.

The input in a non-inverting op-amp circuit is not inverted. The bias is also different because our input is no longer directly going into the feedback loop. Other example configurations are given below.

Voltage Follower / Buffer

The output follows the input and is also known as a buffer or unity gain.

Summation Op-Amp Circuit

The summer adds all voltages. Inputs can be weighed based on the input resistor.

Example Components

An example op-amp is the LM741 which contains only one op-amp in the 8-pin PDIP package.

A LM358 is a 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, 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_- is connected to a voltage reference (typically ground, or using a zener diode).

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


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