Difference between revisions of "Electronics notes/Transistors"

From Helpful
Jump to: navigation, search
m (BJTs and FETs)
m (Bipolar family)
(7 intermediate revisions by the same user not shown)
Line 94: Line 94:
 
largely because NPN is naturally more efficient (with everything else being equal: faster, and higher current).
 
largely because NPN is naturally more efficient (with everything else being equal: faster, and higher current).
  
Still, in some cases PNP is the natural choice, and in some applications the combination of NON and PNP is.
+
Still, in some cases PNP is the natural choice, and in some applications the combination of NPN and PNP is.
  
  
Line 115: Line 115:
  
 
====Transistor behaviour, circuit styles====
 
====Transistor behaviour, circuit styles====
<!--
+
{{stub}}
  
Transistors are nonlinear.
+
Transistors are linear in a region, but nonlinear overall.  
  
 
+
They have four distinct modes of operation:
They also have four distinct modes of operation:
+
 
+
* Saturation
+
: When
+
:: NPN: Vb > Ve  and Vb > Vc
+
:: PNP: Vb < Ve  and Vb < Vc
+
: The C-E connection is essentially a short circuit. The transistor acts like a switch (to the degree it carries current)
+
: Saturation also describes the fact that increasing the voltage on the base no longer has an effect on the current on the collector (because the collector is at its maximum current).
+
  
 
* Cutoff
 
* Cutoff
Line 139: Line 131:
 
:: NPN: Vc > Vb and Vb > Ve
 
:: NPN: Vc > Vb and Vb > Ve
 
:: PNP: Vc < Vb and Vb < Ve
 
:: PNP: Vc < Vb and Vb < Ve
: The C-E currrent is proportional to the current into the base
+
: The C-E currrent is hFE*I<sub>B</sub> i.e. proportional to the current into the base, amplifying current
 +
 
 +
* Saturation
 +
: When
 +
:: NPN: Vb > Ve  and Vb > Vc
 +
:: PNP: Vb < Ve  and Vb < Vc
 +
: The C-E connection is essentially a short circuit already. The transistor acts like a switch
 +
: Saturation also describes the fact that increasing the current on the base no longer has an effect on the C-E current (because it's already maximum).
  
 
* Reverse (a.k.a. Reverse Active)
 
* Reverse (a.k.a. Reverse Active)
Line 154: Line 153:
 
'''Gain'''
 
'''Gain'''
  
A BJT's (forward) current gain, h<sub>fe</sub>, is &#x394;I<sub>C</sub>/&#x394;I<sub>B</sub>, a dimensionless value.
+
A BJT's (forward) current gain, h<sub>FE</sub>, is &#x394;I<sub>C</sub>/&#x394;I<sub>B</sub>, a dimensionless value.
 
: If the input and output impedance is equal (it often is), this can be simplified to I<sub>out</sub>/I<sub>in</sub>, and can be given in dB
 
: If the input and output impedance is equal (it often is), this can be simplified to I<sub>out</sub>/I<sub>in</sub>, and can be given in dB
  
Line 163: Line 162:
  
  
 +
<!--
 +
'''On reverse avalanche breakdown'''
  
'''On avalance'''
+
Like in a diode, when enough voltage is put on a P-N junction in the wrong direction,
 +
it will start conducting.
  
Avalanche happens when the carriers in the transition region are affected by the electric field
+
It happens when the carriers in the transition region are affected by the electric field
 
enough to create mobile or free electron-hole pairs via collisions with bound electrons,
 
enough to create mobile or free electron-hole pairs via collisions with bound electrons,
 
which leads to a relatively large current spike.
 
which leads to a relatively large current spike.
  
 
Avalance transistors, and avalance diodes (often Zeners)
 
Avalance transistors, and avalance diodes (often Zeners)
are those more specifically manufactured for a specific breakdown voltage, and to not break due to the current.
+
are those more specifically manufactured for a predictable breakdown voltage, and to not break due to the current.
  
  
 
This can be used for  
 
This can be used for  
* faster switching,
+
* faster switching
  
 
* random pulses/noise/number generation
 
* random pulses/noise/number generation
Line 183: Line 185:
 
* audio oscillators
 
* audio oscillators
 
: https://www.muffwiggler.com/forum/viewtopic.php?t=208048&sid=f99b7f324d634dc76f121eb48a2acd9b
 
: https://www.muffwiggler.com/forum/viewtopic.php?t=208048&sid=f99b7f324d634dc76f121eb48a2acd9b
 
 
 
  
  
Line 209: Line 208:
 
<!--
 
<!--
  
FETs are more suited to this than BJTs, in that FETs are more energy-efficient - though also more fragile so take some more circuit design care.
+
As noted bove, a BJT in saturation is essentially a switch.
 +
 
 +
Note that FETs are more suited to this than BJTs,
 +
in that FETs are more energy-efficient - though also more fragile so take some more circuit design care.
  
  
Line 237: Line 239:
 
High side and low side switching refers to which side of the switch the load sits.
 
High side and low side switching refers to which side of the switch the load sits.
  
[[Image:High and low side.png|300px]]
+
[[Image:High and low side.png|300px|right]]
  
For a mechanical switch there are almost no differences.  
+
For a mechanical switch, there is almost no difference.
  
When using transistors as switches it does, due to the way they deal with voltage (differences).
 
  
 +
When using transistors as switches it does,
 +
due to the way their behaviour depends more on voltage (differences).
  
[[Image:High and low side transistors.png|300px]]
 
  
A High-side driver is one where the load is between Vcc and the transistor
+
[[Image:High and low side transistors.png|300px|right]]
  
A low-side a.k.a. sink-side driver is one where the load is between the transistor and Gnd.
+
A high-side driver is one where the load is between Vcc and the (NPN) transistor
 +
 
 +
A low-side a.k.a. sink-side driver is one where the load is between the (PNP) transistor and Gnd.
  
  
Line 263: Line 267:
 
'''Driver ICs'''
 
'''Driver ICs'''
  
Consider e.g. ULN2803 and family, which also has integrated [[freewheeling diode]]s, and high-side and low-side variants
+
Consider e.g. ULN2803 and its siblings,
 +
which also has integrated [[freewheeling diode]]s, and high-side and low-side variants.
 +
<br style="clear:both"/>
  
======Differences and details======
 
  
  
'''Ground'''
+
======Some limits and choices======
  
 +
'''Constraints from the load'''
  
Low-side switching means that ground levels differ, since the switching element has a non-zero voltage drop.
+
When the load it has other ground-referenced signals, then low-side amounts to taking away the ground, which typically does weird things and you need to use high-side.
(implications?)
+
  
 +
Low-side switching also means that ground levels differ, since the switching element has a non-zero voltage drop. This can matter to some uses.
  
When the load it has other ground-referenced signals, then taking away the ground isn't really an option.
+
Neither of these things matter to most 2-wire loads (motor, solenoid, LED, etc) as they have no need to compare anything to earth (call them floating loads),
 +
so in terms of this ground argument can be driven either way.
  
Yet on floating loads, i.e. those that have no other connections to the larger circuit,
 
it usually doesn't matter, in which case low side switching is often a little easier.
 
  
  
 
+
'''If you want to switch higher voltages''' than you supply to your base, you need high-side.
 
+
'''Constraints from the load'''
+
 
+
Most 2-wire loads (motor, solenoid, LED, etc) have no need to compare anything to earth (call it floating), and can generally be driven either way. There is a mild preference for low-side.
+
 
+
 
+
'''If you want to switch switch higher voltages''' than your base-side Vcc, you need high-side.
+
 
e.g. 5V from the uC controlling a 12V LED/motor.
 
e.g. 5V from the uC controlling a 12V LED/motor.
  
This because Vbe needs to be >0.6V
+
This because on low-side, the PNP's Vbe needs to be above ~Ve-0.6V{{verify}} to switch off,
 
+
and due to Ve being so much higher, it will never switch off.
 
+
 
+
  
  
'''If the load has other ground-referenced signals'''
 
then low-side basically means you're disconnecting that reference from it -- you will need high-side switching.
 
  
  
If there's no reason for high-side, then you probably want to avoid it.
+
In general, if both are equally valid, then there is a mild preference to low-side.
  
Not "avoid at all costs", just "hey, if you have the choice anyway..." - high side switching  
+
Not "avoid high-side at all costs", just "hey, if you have the choice anyway..." - high side switching  
 
: is a little more work
 
: is a little more work
 
: has a lower maximum current ("since P-type (high-side) switching elements usually have a higher on resistance than N-type (low-side) switching elements.[https://electronics.stackexchange.com/questions/188072/difference-between-high-and-low-side-switching-of-power]"{{verify}}/explain)
 
: has a lower maximum current ("since P-type (high-side) switching elements usually have a higher on resistance than N-type (low-side) switching elements.[https://electronics.stackexchange.com/questions/188072/difference-between-high-and-low-side-switching-of-power]"{{verify}}/explain)
Line 334: Line 328:
  
 
High-side:
 
High-side:
 
 
 
 
  
  
Line 345: Line 335:
  
 
Either make sure that IO pin never does that, or add a pullup/pulldown on the base.
 
Either make sure that IO pin never does that, or add a pullup/pulldown on the base.
(slower response, though{{verify}})
+
(slightly slower response, though{{verify}})
  
  

Revision as of 00:59, 14 July 2019

This is for beginners and very much by a beginner. It's meant to try to cover hobbyist needs, and as a starting point to find out which may be the relevant details for you, not for definitive information.

Some basics and reference: Volts, amps, energy, power · Ground · batteries · resistors · changing voltage · transistors · fuses · diodes · varistors · capacitors · inductors · transformers · baluns · amplifier notes · frequency generation · skin effect


And some more applied stuff:

IO: IO and wired communication · localish communication · wireless (ISM RF, GSM, RFID, more) · 802.11 (WiFi) · 802.15 (including zigbee)


Sensors: General sensor notes, voltage and current sensing · Knobs and dials · Pressure sensing · Temperature sensing · humidity sensing · Light sensing · Movement sensing · Capacitive sensing · Touch screen notes

Actuators: General actuator notes, circuit protection · Motors and servos · Solenoids

Some stuff I've messed with: Avrusb500v2 · GPS · Hilo GPRS · Bluetooth serial · JY-MCU · DMX · ESC/POS notes

Audio notes: basic audio hacks · microphones · amps and speakers · device voltage and impedance, audio and otherwise ·

Less sorted: Common terms, useful basics, soldering · Microcontroller and computer platforms · Arduino and AVR notes · ESP series notes · Electronics notes/Phase Locked Loop notes · mounts, chip carriers, packages, connectors · signal reflection · pulse modulation · electricity and humans · Unsorted stuff


See also Category:Electronics.

BJTs and FETs

Bipolar family

Transistor behaviour, circuit styles

This article/section is a stub — probably a pile of half-sorted notes, is not well-checked so may have incorrect bits. (Feel free to ignore, fix, or tell me)

Transistors are linear in a region, but nonlinear overall.

They have four distinct modes of operation:

  • Cutoff
NPN: Vb < Ve and Vb < Vc
PNP: Vb > Ve and Vb > Vc
C-E is an open circuit, nothing happens.
Maximum VCE (VCE = VCC, the least flow through the collector (verify))
  • Active (a.k.a. Forward active)
When
NPN: Vc > Vb and Vb > Ve
PNP: Vc < Vb and Vb < Ve
The C-E currrent is hFE*IB i.e. proportional to the current into the base, amplifying current
  • Saturation
When
NPN: Vb > Ve and Vb > Vc
PNP: Vb < Ve and Vb < Vc
The C-E connection is essentially a short circuit already. The transistor acts like a switch
Saturation also describes the fact that increasing the current on the base no longer has an effect on the C-E current (because it's already maximum).
  • Reverse (a.k.a. Reverse Active)
When
NPN: Vb > Vc and Ve > Vb
PNP: Vb < Vc and Ve < Vb
the gain in this direction will be much smaller
this is rarely used intentionally


https://learn.sparkfun.com/tutorials/transistors/operation-modes


Gain

A BJT's (forward) current gain, hFE, is ΔIC/ΔIB, a dimensionless value.

If the input and output impedance is equal (it often is), this can be simplified to Iout/Iin, and can be given in dB

There is also a reverse gain, which will be much smaller, and is rarely characterized because it's not typically used.



As a switch

High side versus low side switching/driving
This article/section is a stub — probably a pile of half-sorted notes, is not well-checked so may have incorrect bits. (Feel free to ignore, fix, or tell me)


Oscillators

As a diode

Identifying a bipolar transistor's legs

FET family

Voltage controlled resistor

Insulated-gate bipolar transistors (IGBT)

A hybrid of the above, basically the high-current ruggedness of a Bipolar with the sensitivity of a FET

https://en.wikipedia.org/wiki/Insulated-gate_bipolar_transistor

Transistor behaviour, circuit styles

Compound pairs

Some practical notes

Tri-state buffer

Phototransistor / optocouple / opto-isolator

These can be seen as transistors that are triggered via light (LED-and-phototransistor combination) instead of using conductors.


Often used for isolation of currents, to avoid communicating some of the voltage noise, or to have simple (one-way) interaction between circuits at different voltages.


Often appear as 4-pin or 6-pin ICs.

  • The 4-pin variants give you the LED cathode and anode, and the transistor's collector and emitter.
  • The 6-pin variant use 5 pins; it adds the transistor's base, which just works as an extra (non-isolated) trigger. In practice it may often be left unconnected, but occasionally it's rather convenient to be able to trigger both ways (e.g. from the same and from the isolated circuit).


ICs with multiple optocouplers also exist.

Specs vary in details such as:

  • current use
  • output voltage
  • how much voltage difference can be isolated
  • added components -- may e.g. be a darlington setup

...and more.


See also: