Electronics notes/Changing voltage
When you talk about trying to get an particular voltage level, 'voltage regulator' and 'voltage converter' are near-synonymous terms, and 'voltage stabilizer' is also related.
Some terms and properties
- Step-down: output voltage is lower than the input voltage
- Step-up: output voltage is higher than the input voltage
- Inverting - Creates a voltage of opposite polarity
- (Not to be confused with 'inverter' , which refers to DC-to-AC conversion, such as those use in cars, and solar panels that provide AC power)
- Charge pumps - designs that use capacitors for temporary storage, switching it one of a few ways to exchange voltage for current (fractionally divide/multiply one for the other)
- Charge pumps are somewhat cheaper and simpler than inductor-based circuits.
- Depending on design and use, they can be ~80-95% efficient, usually a bit less.
- low-dropout, often referring to voltage regulation step of something larger:
- A low-dropout variant requires less input-output voltage difference than is typical.
- e.g. where linear regulators often need 2 to 2.5V higher input, LDO regulators may need only 1.5V.
- note that they are often also pickier about what range they comfortably accept
- Can matter for small drops, for efficiency, for battery-powered situations
Continuous/Discontinuous mode:
- Discontinuous designs either simply discharge to zero, or rely on a short-term buffer to sustain current (e.g. capacitors)
- Discontinuous designs are often simpler and smaller.
- Continuous mode never discharge too significantly during operation (which particularly for DC-DC converters depends on load), meaning you'll always get current.
- Performance is usually better in continuous mode.
Further notes:
- In any designs that are based on feedback, stability and adaptation speed are conflicting interests.
- One distinction is whether you use a switching design (stepdown can e.g. be primarily resistive instead)
LED drivers
LED drivers are somewhat unusual, often often CC (Constant Current) or CV (Constant Voltage) - see also Electronics_notes/Diodes#LED_drivers
DC level shifting
Level shifting usually refers not to power conversion, but to making voltage signals like logic and communication work between devices that naturally run at different voltages.
The thing that makes this simpler than much of the DC-to-DC section below is that you are dealing with negligible current - just enough to move the level (with the capacitance involved, which is typically tiny).
DIYers will regularly run into
- 3.3V output to 5V input
- 3.3V logic to 5V TTL: high starts above 2V so a 3.3V high is high enough and will work as-is.
- 3.3V logic to 5V CMOS, is high above ~3.5V (70% * 5V) so 3.3V won't work.
- The recommended approach is probably a diode logic level step-up (see below). There are others.
- 5V output to 3.3V input
- If the 3.3V device, or some pins on it, are 5V tolerant, that roughly means its pins have protection diodes that can sink the difference without shortening lifespan(verify)
- This varies between devices, so unless the datasheet says it's okay, don't do a direct connection.
- The recommended approach is probably a voltage divider. There are others.
On 5V tolerance
You will see terms like "5V tolerant" around IO (and often GPIO) logic lines.
It means that you the pins themselves work at a lower voltage, but will not break with that voltage applied to them in input mode.
Most GPIO have ESD protection, which is relevant to 5V tolerance in that this is also overvoltage protection that siphons off current based on voltage.
Yet ESD protection often expects that to be transient and with so little charge behind it that it is easily dissipated. While it may happily do that for decades, that same silicon may still slow-fry if it gets a continuous 5V (depending e.g. on how large that actual silicon is).
Additionally, if that protection is snapback, it does nothing until triggered by a sufficiently high voltage. For example, an ESP8266's ESD protection triggers above 6V, so does not apply to 5V signals.
So for multiple reasons, ESD details do not answer 5V tolerance questions.
And whether that protection, and the entire I/O construction, can deal with a consistent something-more-than-Vcc depends on more than that.
We tend to go on manufacturer recommendations, which can vary per device and even per pin
...and it's not always clear how optimistic/pessimistic these recommendations are.
Related notes:
- Note that pins in output mode are more fragile
- and note that while booting, pins may be in a state you don't know (may or may not be defined), so set them as soon as you can.
- tolerance may work differently (e.g. not) while the IC is not powered
optocouple
- components: optocouple and (current limiting) resistor
- should work fine below <1MHz (order of magnitude, check datasheet)
- not the smallest, or least components, but easy
- can give isolation to boot (e.g. isolating ground between devices, which is one reason it was a nice choice in serial MIDI).
Note that most optocouples can't sink much on the output - usually a few dozen mA for most (check datasheet). For IO that's plenty, for anything else you may want to add a transistor.
voltage divider (lower voltage only)
- components: 2 resistors
- simple for a singe line, sort of annoying for more than a few
diode logic level step-up (higher voltage)
- components; 2 diodes, 1 resistor
- upsides:
- simple and cheap
- downsides
- additional footnotes about the two rails communicating
- resistor choice is a careful balance between four different things
- wastes a little power, so not ideal for battery
- some footnotes about impedance (and note the low level is raised)
- e.g.
- see e.g. its mention in 3V tips 'n tricks
IO controlling a BJT/FET
- components: transistor + resistor
- inverts the logic. If you can tweak the code, this saves a component over the diode solution (but for hardware protocols this may be impossible)
- in general you should tweak the resistor values to lower current use
- for faster cases, FETs aren't always easier. that is, specific FETs may have distinct parasitic properties to mitigate
Bidirectinal FET level shifter
- components:
IC level shifters
- IC solutions can be nice when you have a handful or more lines
- e.g. the (74hc)4050 is six non-inverting high-to-low shifters
- will output what it gets on its Vcc
- has over-voltage tolerant inputs (up to ~15V)
- or TTL logic gates (e.g. 74HCT) in general
Other level shifting notes
Some ICs, e.g. various serial adapters
- are designed to accept a Vcc in a range, like 3 to 5V on Vcc
- and will output relative to the Vcc they get
- which can make it a lot easier to interface them variably to 3.3V or 5V devices (and from the same supply)
See also:
DC-to-DC
Shunt regulator
A shunt regulator is based on a Zener diode used as a shunt. [3].
The diode is used in reverse (i.e. not in the conducting direction), because we rely on its reverse breakdown voltage - the point at which it starts conducting in reverse. (This is also why we use zeners - non-zeners have too high a breakdown voltage for use in most electronics, and break too easily)
The net effect is that above a certain voltage, current goes through the diode and won't go to the load.
Usually needs some current limiting, e.g. a series resistor. There are a number of variants of this idea, including even simpler designs, but also more efficient ways and more complex designs of shunt regulation, yet we quickly add enough components that there are better or more widely applicable designs.
Upside:
- simple to implement, using basic components
- good enough for very-low-current applications
Downside:
- low current capacity
- the higher the difference between the voltage supply and intended voltage (and/or the lower the load current), the more wasteful it is
- requires a fixed load and design
- If the zener burns out it puts the full voltage on the load
Transistor series regulator
A transistor series regulator is basically a shunt regulator fed into a transistor as a voltage follower[4].
Upside:
- Better regulation than shunt (transistor's base is a light load)
- handles more current
Downsides:
- still sensitive to load variation, sensitive to supply variation.
- Linear regulator is often better for similar price.
Linear regulator
So the more typical resistive design is the linear regulator,
- basically operates as a variable resistor, intentionally wastes the voltage difference (times the current actually drawn) as heat
- named for being a device (BJT, FET, tube) operating in its linear region - or passive device like a zener diode operating in its breakdown region.
- ...and contrasted to e.g. switching regulators
- Simple, cheap
- lower noise than switching (still has thermal noise) particularly for lower frequencies
Fixed versus variable linear regulators:
- you can change a fixed, but variable ones are more precise (and efficient) to tweak
Low-dropout regulator (LDO)
- a (typically linear) regulator which can work with a lower-than-typical voltage difference
- More power-efficient (than basic linear) for larger currents
- sometimes a practical necessity (over linear) when supply voltage is not far away (consider e.g. batteries)
Around the regulator:
- you'll want a capacitor on the input side, particularly if it's a bit away from the power supply
- a capacitor on the output side can help stability and transient response
- could be on the order of ≥1 μF (verify)
See also:
Capacitors around regulators
See also:
Switching designs
Switching designs refer broadly to any design that uses fast switching to change how storage elements (inductors and/or capacitors) are connected, and can be step-up, step-down, and inverting constructions..
Since they work with a charge-discharge cycle they will have voltage ripple in their output.
Efficiency (often something between 70% and 90%) varies with current drawn, so are typically more efficient than linear regulators (except in some low-difference situations, where LDOs may actually be more efficient).
See also:
Designs of switch-mode regulators include:
Step-down
Buck converter
a switch-mode step-down design, based on a single inductor
http://en.wikipedia.org/wiki/Buck_converter
Step-up
Boost converter
a switch-mode, step-up design, based on a single inductor
Basically charges a capacitor, and connects it so that it regularly doubles the input voltage
http://en.wikipedia.org/wiki/Boost_converter
Step-up or step-down
Buck-boost converter
(Note: distinct from the buck / boost transformer)
based on a single inductor
(inverting)
mostly used for stabilisation
http://en.wikipedia.org/wiki/Buck-Boost
flyback converter
basically buck-boost, but with the inductor split into a transformer
giving isolation, and allowing voltage multiplication via the transformer
can also do AC-to-DC
Push-Pull converter
(similar to the flyback converter)
http://en.wikipedia.org/wiki/Push–pull_converter
Forward converter
http://en.wikipedia.org/wiki/Forward_converter
Split-Pi
topology of inductors and capacitors
similar to buck-boost
http://en.wikipedia.org/wiki/Split-pi
Ćuk
inductors and capacitors(verify)
http://en.wikipedia.org/wiki/%C4%86uk_converter
SEPIC
Single-ended primary-inductor converter
inductors and capacitors(verify)
https://en.wikipedia.org/wiki/Single-ended_primary-inductor_converter
AC-to-DC
Half-Bridge rectifier
https://en.wikipedia.org/wiki/Rectifier#Half-wave_rectification
Full-Bridge rectifier
https://en.wikipedia.org/wiki/Rectifier#Full-wave_rectification
AC-to-AC
transformer
The basic transformer can be seen as a specific exchange between voltage and current.
Flyback transformer
Zeta converter
buck / boost transformer
(note: distinct from the Buck-boost converter)
capacitive dropper
DC-to-AC
Inverter
Basically anything that generates a simple waveform, and allows load worth mentioning to be drawn from it.
http://en.wikipedia.org/wiki/Inverter_%28electrical%29
Other
See also
Comparison notes
Transformers
See Electronics_notes/Inductors_and_transformers#Transformers