If you have any questions or feedback, pleasefill out this form
This post is translated by ChatGPT and originally written in Mandarin, so there may be some inaccuracies or mistakes.
Introduction
The generation of electricity stems from a simple fact: electromagnetic induction. When there is a change in magnetic flux within an induction coil, electricity is produced.
Although this is taken for granted in modern times, it took Faraday a considerable amount of experimentation to discover this wonderful principle derived from nature. Later, Tesla utilized the principle of electromagnetic induction to invent the structure of generators, which is a crucial foundation for modern power generation.
Only a change in the magnetic field can generate electricity. To induce this change, kinetic energy is required (though it can be achieved through other means as well). Power plants boil water using coal, natural gas, or nuclear energy to produce steam, which drives magnets to rotate, thereby generating electricity. This is a vital foundation that supports human civilization.
To me, it is fascinating that what seems to be a complex phenomenon of electricity actually originates from a simple fact: electromagnetic induction.
AC and DC
In Taiwan, the electrical outlets provide power at 110V/60Hz. If this electricity were directly fed into electronic devices, they would immediately break down. Not only would the 110V voltage burn out most components, but the constantly fluctuating potential of AC would also make the distinction between 0 and 1 inaccurate. Therefore, we need to convert AC into stable voltage DC for proper operation.
If the voltage of AC is always changing, then what exactly is 110V? This 110V refers to the effective value of the AC. It is defined as the wattage produced by the AC across a resistor being equal to that produced by a DC voltage of 110V. Using the effective value as a general term is quite natural, as what we care about when using electrical appliances is the wattage.
Typically, the operating voltage of electronic products ranges from 3.3V to 12V (depending on the product). How do we convert AC into DC?
The process of converting AC to DC involves several stages:
- Voltage Transformation
- Rectification
- Voltage Regulation
- Voltage Reduction
Voltage Transformation
Traditional transformers are relatively large, such as early laptop chargers or transformers used for monitors. The principle behind transformers is based on electromagnetic induction, using two sets of coils with different turns to either step up or step down the voltage of AC. Transformers are usually the largest components inside chargers, so reducing the size of the transformer is key to lightweight chargers.
According to Faraday's law of electromagnetic induction, the induced voltage can be calculated using the following formula:
- Where E is the average voltage through the coil
- f is the frequency of the current
- N is the number of turns in the coil
- A is the cross-sectional area of the space (iron core) inside the coil
- B is the magnetic field passing through the space (iron core) of the coil
From this formula, we can see that the number of turns, area, and magnetic field all influence the size of the transformer. If we want to reduce the area of the transformer, the most effective method is to increase the frequency. However, the input frequency of standard AC is usually fixed at 60Hz (for Taiwan, as an example). So, what can we do?
Rectification
The voltage after stepping down remains AC, so it cannot be directly used in electronic products; further rectification is needed.
The process of converting AC to DC is called rectification, which can be divided into full-wave rectification and half-wave rectification.
Due to the superior conversion efficiency of full-wave rectification, a common method is to implement it using a bridge rectifier. The main principle of the bridge rectifier is based on the unidirectional conduction characteristic of diodes. When AC passes through the bridge rectifier, the originally negative half-cycles are converted into positive ones, resulting in the following waveform.
Although it is now DC, there are still several issues to address:
- The voltage has significant fluctuations, failing to represent ideal DC voltage.
- The voltage after transformation is still too high, approximately around 140V.
We can smooth the output voltage and reduce ripple by adding a capacitor. Capacitors have the characteristic of charging and discharging, which can slow down the rate of voltage drop when the output voltage reaches its peak and begins to decline, helping to stabilize the output voltage.
Even so, the voltage is still quite high. How do we reduce the voltage?
Voltage Reduction
To step down from 140V to 5V, we must rely on a transformer. The main principle of transformers is realized through electromagnetic induction, so we need to convert the freshly rectified DC back into AC.
Thus, the entire process becomes AC → DC → AC → DC? Yes. The underlying goal of this approach is to minimize the size of the transformer as much as possible.
On Wikipedia, there are transformation formulas related to transformers. Although they may seem a bit complicated, the formula reveals a crucial fact: the higher the frequency of the input voltage, the smaller the area can be, given a fixed magnetic field.
Therefore, we just need to find ways to increase the input voltage frequency as much as possible to reduce the size of the charger. However, since we mentioned the input is DC, how do we convert it back to AC? The answer is to constantly switch it on and off; since the current changes, electromagnetic effects can certainly be generated.
By utilizing the switching characteristics of MOSFETs or BJTs, we can achieve switching frequencies of up to 100KHz per second or even higher. By continuously toggling, we can transform the originally DC waveform into AC. This type of circuit is also known as a Flyback Converter (Wikipedia).
After the Flyback Converter converts it back to AC, we can use a smaller transformer for voltage reduction. To convert the output back to DC, we need to add diodes and capacitors for rectification once again.
Previously, we mentioned that while standard diodes can conduct unidirectionally, the time taken to switch from conducting to non-conducting can be relatively long. When the frequency reaches several kilohertz, this may become inadequate. To address this high-speed switching characteristic, special diodes—Schottky diodes—are commonly used for rectification.
Another method of rectification is active rectification, also known as synchronous rectification, which involves using the switching characteristics of transistors for rectification. The major advantage of using transistors for rectification is that the conversion losses are lower than those of standard diodes, but this requires IC control and the addition of more components, making it more complex and costly compared to using Schottky diodes.
This year's trending topic, GAN chargers, leverage the properties of gallium nitride to achieve higher frequencies than standard transistors, meaning that transformers can be made even smaller—an important technology worth noting.
Charging and PD
The charger can finally output 5V! However, in addition to the previously mentioned complexities of converting AC into a stable 5V circuit, we also need to implement control at the output end. For example, to communicate with the smartphone's charging port, to decide whether to enable fast charging, monitor temperature, or detect short circuits, a microcontroller is also included in the charger to handle these logics.
Typically, when we refer to fast charging, we usually mean Power Delivery or QC, and here we will focus on Power Delivery. Since Type-C has multiple transmission channels, we can transmit some necessary charging information through the cc pin, such as whether the phone supports fast charging and what voltage it can support, allowing the charger to output the corresponding voltage based on this data.
Implementing the complete Power Delivery protocol is not a trivial task; thus, it is common to use integrated ICs to achieve these functionalities directly.
On the smartphone end, there are usually protective circuits and circuits optimized for charging. For instance, when a lithium battery is nearing full charge, the charging current should start to decrease, and charging should stop once fully charged.
Conclusion
This article provides a broad overview of electricity, focusing on how modern electrical usage converts AC into DC for electronic products:
- Rectification of AC through a bridge rectifier
- Using capacitors (or pi-type rectification) to increase effective voltage and reduce ripple
- Voltage reduction using a transformer (Flyback Converter)
- Converting AC back to DC using synchronous rectification or Schottky diodes
As a software engineer, I indirectly rely on electricity for my livelihood, yet I realize I know little about this gift from nature.
Converting AC to stable DC, and considering how to minimize size, reduce losses, and enhance safety from a product perspective, ultimately relies on foundational scientific principles; this embodies the essence of engineering.
If you found this article helpful, please consider buying me a coffee ☕ It'll make my ordinary day shine ✨
☕Buy me a coffee