That can be done with a single chip. What’s actually complicated here is the switch-mode power supply itself.
It’s how you get a 90% efficiency vs a 10% efficiency from linear power supplies (transformer, full bridge rectifier, and a big ass-capacitor, then if you need a stable voltage, a voltage regulator, which makes things even less efficient). The benefit of linear supplies is that it’s very easy to produce very clean power for analog electronics, but digital electronics have a lot more wiggle room for noise in the power. Well designed SMPS have both low noise levels and also hogh efficiency. Those are more expensive :P.
There’s a field of engineering specific to power electronics. It can get super complicated. I don’t understand a lot of it myself.
Check out bigclive on YouTube, he takes apart lots of electronics and breaks down the circuits. He investigated lots of cheaper, dodgier stuff too. Like lamps with usb ports that are mains voltage when the lamp is plugged in to recharge. Fun times.
Or electroboom if you want to see what happens when you lack care around those same electronics
After looking at RAM, clock speed, program storage space, and a few other components, Heller concluded that today’s USB-C chargers are more or less 563 times faster than the Apollo computer.
Never knew those lads were so… complicated?
There’s a whole protocol for talking to supported devices so they can negotiate power delivery.
That can be done with a single chip. What’s actually complicated here is the switch-mode power supply itself.
It’s how you get a 90% efficiency vs a 10% efficiency from linear power supplies (transformer, full bridge rectifier, and a big ass-capacitor, then if you need a stable voltage, a voltage regulator, which makes things even less efficient). The benefit of linear supplies is that it’s very easy to produce very clean power for analog electronics, but digital electronics have a lot more wiggle room for noise in the power. Well designed SMPS have both low noise levels and also hogh efficiency. Those are more expensive :P.
There’s a field of engineering specific to power electronics. It can get super complicated. I don’t understand a lot of it myself.
Check out bigclive on YouTube, he takes apart lots of electronics and breaks down the circuits. He investigated lots of cheaper, dodgier stuff too. Like lamps with usb ports that are mains voltage when the lamp is plugged in to recharge. Fun times.
Or electroboom if you want to see what happens when you lack care around those same electronics
https://www.popularmechanics.com/technology/a30916315/usb-c-charger-apollo-11-computer/