Difference between revisions of "Electronics notes/Diodes"

From Helpful
Jump to: navigation, search
m (Schottky diode (type))
m (Bypass diode / flyback protection diode (application))
 
Line 173: Line 173:
  
 
Examples:
 
Examples:
* In a series of solar cells, shading one cell among multiple leads that one cell it to be reverse biased relative to the others, meaning it gets fed current from the others, which would heat it and may eventually damage it.
+
* inductors in general can store energy (in an magnetic field)
: A bypass diode in parallel with each cel llets the current-in-the-wrong-direction pass alongside the cell instead.
+
: some because sudden changes (e.g. solenoid disconnecting)
 
+
: and larger things that move (solenoids, motors) a little more so (movement that translates back to magnetic field)
 
+
* inductors in general can store energy - and specifically moving ones of human-scale use (relays, solenoids, motors)
+
: so can create noticable voltage spikes in the wrong direction, e.g. when a relay disconnects, a solenoid or motor stops actuating, because there's still energy in the magnetic field that still needs to go somewhere.
+
 
: They can often easily deliver a few times the voltage they usually operate at (varying with case). This can seriously stress the circuit components directly around it, depending on design.
 
: They can often easily deliver a few times the voltage they usually operate at (varying with case). This can seriously stress the circuit components directly around it, depending on design.
 
: The use of a diode in parallel, reverse-biased to how you drive it, is one easy way to bleed this short-lived current
 
: The use of a diode in parallel, reverse-biased to how you drive it, is one easy way to bleed this short-lived current
Line 190: Line 187:
 
-->
 
-->
 
: https://electronics.stackexchange.com/questions/110574/how-to-choose-a-flyback-diode-for-a-relay
 
: https://electronics.stackexchange.com/questions/110574/how-to-choose-a-flyback-diode-for-a-relay
 +
 +
* In a series of solar cells, shading one cell among multiple leads that one cell it to be reverse biased relative to the others, meaning that panel gets fed current from the others, which would heat it and may eventually damage it.
 +
: A bypass diode in parallel with each cel llets the current-in-the-wrong-direction pass alongside the cell instead.
  
  

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

Basics

Types and materials

Silicon diode

Common, cheap.

Forward voltage drop of about 0.7V.

Germanium diode

Forward voltage drop of about 0.3V.



Zener diode (type/behaviour)

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)

Context:

Reverse breakdown refers to diodes/transistors conducting in reverse, which happens at a specific breakdown voltage (the potential that overcomes the p-n junction tendencies).


All diodes have a zener voltage, and what's called a reverse breakdown region right above it where that reverse flow will happen.

Most circuit want to avoid it working in this region, and basic diode sare not designed to work in this region (the region is narrow and hard to use, varies with production(verify), and will usually damage it, in part because it's at fairly high voltage - dozens of volts at least)

So in general, you choose/spec a diode with your supply voltage in mind, so that you don't have to worry about this behaviour.


A Zener diode

  • in forward bias acts like a regular diode, with similar voltage drop (usually roughly 0.6V .. 0.7V drop, sometimes lower(verify))
  • ...but the point of it is that it has a zener voltage engineered to be at a lower level, more practical in typical low-voltage electronics (often between 2.4V and 7V, apparently up to 33V), a fairly wide reverse breakdown region, have that behaviour well characterized, and fairly robust in it.


The well defined behaviour make this region/behaviour exploitable in its own right, e.g.

  • simple, shunt-style regulation (not efficient, for more than a little current you want other regulation)
  • fixed voltage references
  • voltage clamping protection (and other purposes where they effectively act as a sort of relief valve)
e.g. say you have a 5V-powered device, and added a 5.1V zener. A transient spike in the input will be suppressed to a good amount (and because it's transient will not cause temperature issues)
  • clipping signals, quite possibly a pair of opposed zeners to clamp, to clamps an AC signal
in audio for distortion (see fuzz boxes)
e.g. avoiding op amp phase inversion


Zener current and heat dissipation varies, often range of milliwatts for voltage reference, a few hundred milliwatts for simple regulation, up to a Watt or so.

Since you rarely want to move a lot of current in reverse bias, so you'll often see some current limitation (a resistor or such).


Lower-than-2.4V Zeners are actually imitations of Zener behaviour and their behaviour is a little different from true Zeners(verify))



See also:

Avalance breakdown (behaviour) / avalanche diode (spec/type)

Avalance diodes usually refer to diodes that are made to imitate Zener behaviour, yet will work for higher voltages (100 ~ 300V) than true Zeners can.

Avalance diodes may be found categorized as (or referred to) as Zener diodes.

See also:

Schottky diode (type)

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)

Forward voltage drop on the order of 0.15V .. 0.45V rather than the more typical 0.6V .. 0.7V.


Nice when you want to avoid wasting power when protecting something capable of a bunch of current, or want to avoid a voltage drop that is significant to your application, or for faster switching.

It also has some uses filtering higher frequency.


They have limited reverse voltage ratings (reverse saturation happens more quickly), so are not as useful for certain protection, and have more reverse leakage current.

See also:

Current regulating diode (type)

Signal diode, switching diode (spec)

Applications

Bypass diode / flyback protection diode (application)

A bypass diode is a diode used to protect something against reverse biasing - against voltage going the wrong way.

Also known as flyback diode, kickback diode, catch diode, snubber diode, freewheeling diode, suppressor diode, commutating diode, and more. Some names refer more specifically to more transient reverse biasing , or the causes behind that.


Examples:

  • inductors in general can store energy (in an magnetic field)
some because sudden changes (e.g. solenoid disconnecting)
and larger things that move (solenoids, motors) a little more so (movement that translates back to magnetic field)
They can often easily deliver a few times the voltage they usually operate at (varying with case). This can seriously stress the circuit components directly around it, depending on design.
The use of a diode in parallel, reverse-biased to how you drive it, is one easy way to bleed this short-lived current
yes, you're essentially making a one-way short-circuit, which is why it also affects the braking behaviour of coil-style actuators: the collapse of the magnetic field is usually slowed(verify)
on the spike shape:
https://electronics.stackexchange.com/questions/110574/how-to-choose-a-flyback-diode-for-a-relay
  • In a series of solar cells, shading one cell among multiple leads that one cell it to be reverse biased relative to the others, meaning that panel gets fed current from the others, which would heat it and may eventually damage it.
A bypass diode in parallel with each cel llets the current-in-the-wrong-direction pass alongside the cell instead.


Notes:

  • If the load is bidirectoinal (e.g. bidirectional motor driver) then the flyback can happen in either direction, and you can't protect it in the way described above
For example, in the case of a H-bridge driver, you need four diodes for protection in both directions
  • Protection diodes should be able to take a decent load - may well be a few amps for a short while (depends a lot on the load)
  • Protection diodes should have a voltage rating of at least the voltage you are applying
whenever significant energy can get stored (e.g. in case of coils), leeway is a good idea
  • Protection diodes should be robust to reverse biasing (themselves)
  • You may have preference for a fast-acting diode (e.g. Schottky) to minimize the time the reverse bias is applied (though note they have lower reverse-bias ratings)
  • Sometimes you may also care about low voltage drop (which can matter e.g. in solar and battery applications, minimizing loss).
  • If reaction time is not so important (or low cost is considered more important), cheaper general-purpose diodes such as the 1N400x series can be used.


-->

See also:

Clamp diode (application)

Clamper circuit

Somewhat related is a clamper circuit, which tries to offset a signal to take the DC component out of an AC signal. One way to do this is a diode and capacitor - which is called a diode clamp.


See also:


-->

Rectifier bridge (simple design)

LEDs

LEDs convert a lot more of the energy going through them to light than, say, classic lightbulbs, where a lot of the energy becomes heat (IR radiation).


That sounds awesomely efficient, but note that it takes more electronics to power LEDs them from regular mains, though, and most cheap/small power supplies waste power, so depending on the way you use LEDs, and the scale, it's not necessarily much better.


LEDs do act as diodes ('Light Emitting Diodes', after all), in that they conduct/work only in one direction. Their ratings as diodes is pretty poor, though. They are slower, and their reverse breakdown is close, so in many situations you'ld want to add a serious diode.


LED of different types usually need something like 2V or 3V forward voltage before they start emitting light. (The extremes, including some less usual types, seem to be 1.6V and approx. 4.4V)(verify).


Driving

LEDs have an I-V curve that is not only nonlinear, but also very steep exactly near the point you want the operate them at, particularly if you want to drive them at decent brightness but also have them live long.

they have a threshold below which they do nothing
a fairly flat bit of still low current (and they will be relatively dim here)
quick-and-dirty uses operate them here, e.g. by using a somewhat large resistor.
and then shoots up, from little current to too much, over a volt or two

The exact curve varies with

  • LED type (that search shows different curves for the different classic LED colors),
  • environment temperature - itself largely determined by the current currently going through it
  • production line variation


Indicator LEDs tend to be specced for a continuous current of ~10mA. Superbright for perhaps ~20mA, and low-current LEDs perhaps 2mA.

Keep in mind that these are continuous-use maximums. Both in that most LEDs already give off some light at 1mA. (And also that you can often pulse higher currents on a low duty cycle. Check spec sheets)


All that makes it very hard to create a universal LED driver that is entirely plug and play.

This is roughly why the current-limiting resistor approach is such a typical approach, because it which works fine on things like indicator LEDs where we care more about lifetime and basic visibility than maximum brightness or maximum efficiency.

When driving powerful LEDs, though, we do care (also because of waste heat), and will generally use a current-limiting LED driver, for which there are now plenty of ICs, and supplies centered around them.


LED response time
Current limiting resistor

Short version:

A LED draws current but not because it has resistance, so something with only a LED will not limit current at all.


Adding a resistor in series will be the most limiting current.

For most LED and typical PCB voltages this works out on the order of 100 ohm to 1kOhm.


The upside is that it' very simple to do.


The main downside is that since it will pass the same current as the LED, it will also use similar power (particularly when used for just one LED), putting it into heat instead of light.

...that said, if you have a few indicator LEDs drawing a few dozen mA total, then it's often not worth it energy-wise or component-wise to drive them more efficiently. Yet when producing a lot of light, there are certainly better ways.



Details:

Being a diode, the LED drops a fixed voltage, its Vf.

...but does not limit current so in current terms it might as well not be there. Your calculations aim to have just the resistor drop drops enough of the (leftover) voltage that the current through it and something in series with it is at/below some target current.

...in this case the specific LED's rated maximum continuous current - or rather something a bit below it with a slightly higher-valued resistor.


Often your givens are the supply voltage, the LED's voltage drop Vf, and the LED's maximum continuous current rating you want to stay under.

You'll usually use:

     Vin - VLED
R = -----------
        ILED


Chances are you'll grab the next-highest standard-valued resistor. If you want to know the current for it, the following reformulation is useful:

ILED = (Vin - VLED) / R

For example, to drive a ~2.2V red LED, aiming to stay under 20mA, and using standard-value (e.g. cheap carbon 5%) resistors, you might choose:

  • on 3.3V: 100Ω for 11mA, maybe 220Ω for 5mA
  • on 5V: 220Ω for 12mA, maybe 330Ω for 8mA or 150Ω for 19mA,
  • on 9V: 470Ω for 14mA
  • on 12V: 560Ω for 17mA, or 1kΩ for 10mA, or maybe 470Ω for 21mA.


Side note: A LED's max-current rating is for a good part limited by the ability to sink the generated heat, and assumes continuous current. When you're only ever pulsing the LED with a lowish duty cycle, you can get away with higher currents. For example, TV remote IR leds can do this because their pulsed protocols are implicitly low-duty-cycle. And you might do it for visible LEDs because when using something like PWM, for part of the curve current drops off faster than the human-apparent intensity.

LED drivers

At some point (often above a few hundred mA, for something that is on a lot), it becomes worth it energy-wise to invest in components to drive the LED more efficiently.


Since this often means a cleverer, more controlled circuit, it usually also means we can more safely aim for a current that is nearer its maximum brightness, just because there is less risk of burning it.


There are two basic approaches:


Constant-current LED driver
Constant-voltage LED driver
Multiple LEDs
Common cathode versus common anode
Series versus parallel

Dimming

LEDs can be dimmed, in two basic ways:

  • Control the current
The amount of light isn't linear, but when humans adjust a knob, they tend to be practical about it, and if digital you can compensate.
The simple analog circuit requires little more than a transistor (being a current amplifier) and a voltage divider with a potmeter to control it, plus some fine tuning for the transistor's gain
...plus some thought on how to never drive it with too much current


  • Blink it very fast, typically using PWM, or possibly a relatively analog oscillating circuit.
If it's perhaps 100Hz or faster, we humans only really perceive the average amount of light that comes out. When you have a microcontroller this tends to be fairly easy. There are some cheaper ICs that can do much the same.
note that the current drops off faster than the intensity apparent to humans, meaning you can save a little power
...and/or get a little more lifetime out of a LED, as it's heat (more than anything else) that destroys LEDs


It also means that on lower duty cycles you can drive them a slightly higher currents than you would use for continuous driving. But since LEDs typically heat up faster than they cool down, this is not "half the duty cycle means twice the power" stuff. Datasheets may spec some of these details, and there are some rules of thumb you can follow if they don't.

Also, it's not really worth it to do this for apparent brightness, because you need to lower the duty cycle.

Still, it's useful for things like an infrared TV remotes. Because the protocols used are quite low duty cycle (typically simple bit-trains, where highs are themselves a 38kHz blockwave rather than continuous, and with relatively large intervals between repeated commands, so in this use are guaranteed to have a pretty low duty cycle), you may be able to drive them at a few times their rated continuous current, which means they carry further.


http://www.ledsmagazine.com/features/4/8/1


LED designed made for room lighting are designed to deal with hundreds of mA or more. Often because they're a large area or LEDS side by side (and often in part in series, allowing (or forcing) us to use higher voltages).



See also

Thyristors

Silicon-controlled rectifiers (SCR)

TRIAC

DIAC

Others

See also


Unsorted

LED strings

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)

These combine a small (often 3 channels, 18mA-per-channel) driver chip and a (often 5050-sized) RGB LED.

The chips can hold one color to put it out to the LED (or rather, three different values onto an RGB LED, via PWM except in a few cases of on-off control), and can be told to shift that color to the next one in line.

This daisy chaining gives you a good imitation of individual control without the need for complex addressing or a lot of wires - you can update the entire chain fast enough to not notice it's actually shifting.

(If you want to think big, say, make a hundreds-of-pixels display, you'll run into bandwidth and latency details, and you'll probably want multiple controllers. Updating requires little more than the capability to receive data and speak SPI or something similar, so you can probably use some of the cheapest microcontrollers you can find (but note minimum rate on some, e.g. the WS*) while still keeping update latency lower than your eyes can notice.)


There are perhaps a dozen variations of the ICs in relatively common use.

Most of them (noted if it differs)

  • Have 256 levels(verify) (8-bit) per channel (some try to gamma-correct, which does rather matter to mixing)
  • control 3 channels (for R,G,B)
  • put out ~18mA per channel, so around ~50mA to get white out of a LED (so ~2.5A for fifty pixels). Many color colors are more like 20-30mA. (So 1A to 1.7A for fifty pixels)
  • You can often use a lower voltage
but they'll be dimmer
at some point no longer show the right color (because the different colors have different minimum voltages)
and below that fail to light at all.
  • 3.3V-level logic won't work with things expecting 5V logic, but there are several tricks available


Somewhat common ICs include:

  • WS2801 - SOP-14 or DIP-14
    • 3-5V
    • shift up to 25MHz (verify)
    • chains with 4 wires (Vcc, Gnd, Data, Clock)
    • More-channel-per-chip variants include WS2803 (SOP-28, DIP-28) for 18 channels (up to 6 RGB LEDs)
    • WS2801 datasheet


  • WS2811 - PLCC6 (integrated in LED), or separate DIP-8 or SOP-8 chip
    • Vcc is ~6V, VLED up to 12V(verify)
    • chains with 3 wires (Vcc, Gnd, Data) - uses specific timing instead of a clock (...but this puts more constraints on the controller)
    • WS2811 datasheet


  • WS2812, WS2812B - PLCC6 (integrated in LED)
    • 6-7V
    • slight improvement over WS2811 based LEDs, identical to control (verify)
    • chains with 3 wires (Vcc, Gnd, Data) - uses specific timing instead of a clock (...but this puts more constraints on the controller)
    • WS2812 datasheet


  • LPD6803 - SOP-16 / QFN-16
    • 5-7V
    • shift up to 15MHz (verify)
    • LDP6803 datasheet
    • chains with 4 wires (Vcc, Gnd, Data, Clock)
    • variants include LPD8806, LPD8809


  • LPD8803 - SOP-16, others?(verify)
    • Vcc is 2.7-5.5V, VLED is 3..12V
    • shift up to 20MHz (verify)
    • chains with 4 wires (Vcc, Gnd, Data, Clock)
    • variants include LPD8806, LPD8809


  • HL1606 - SOP-16, others?
    • 3-5V
    • SPI - needs 4 data wires (2 more than most of the others), 6 in total
    • Some sources note it doesn't do PWM, others say it does. I've not looked up what's going on there


I've also seen mention of:

  • More-channel variants of LDPs, e.g. LDP6806 and LDP8806 (6-channel), apparently LDP8809, and probably more.
  • TM1803
  • TM1809
  • LPD1109
  • SM16716
  • TLS3001


Notes:

  • It seems the LPD6803 and WS2801 are decent tradeoffs between speed and price. There's faster, and there's cheaper, but for many purposes these are nice.
  • WS28*'s 2-wire communcation (in comparison to LDP*, which are more SPI-like) means more restrictions on the timing of communication (you may need a fastish uC for reliable control), and a little less bandwidth. The distance possible between pixels seems higher, and it seems to work out cheaper.
  • most LDP variants are identical to control, most WS variants are similar to control
  • On voltage:
    • Some chips can work with and put out at most ~5V (and may start working around 3 point something V).
    • Some will fry if you give them more than ~6V
    • Some can drive up to 12V and are fine with 5-12V.







zero cross circuit