If you were instead just learning about how a DC-DC step-up/down converter works, then my sincerest apologies for almost advertising ready-made diy products. I also still want to learn how an SMPS actually works, though the concepts are a bit difficult to grasp. Hopefully, I'll get around to it at some point
The key to understanding all SMPSUs is to understand that they rely on switching rapidly between two states of operation. Typically energy will be stored (usually in an inductor) during one state of operation and released during the other mode. Depending on the particular converter type some energy may also be transferred directly from input to output without being stored.
Inductors resist changes in current. The faster the current is changing the higher the voltage across the inductor V=L(dI/dt).
In the case of the buck converter when the switch is on the inductor is in series with the load. Current is transferred from source to load and the inductor is charged. When the switch is turned off current continues to flow through the inductor and into the load but rather than coming from the source it comes from the ground rail. Since the voltage on the inductor has reversed but the current is flowing in the same direction the inductor is now discharging into the load. Depending on the inductor value and load current the inductor may or may not be completely discharged before the switch turns on again.
A capacitor on the output holds the voltage across the load reasonably steady despite the constantly changing current flow in the inductor.
Control electronics adjusts the duty cycle (the proportion of the time the switch is turned on) to maintain the desired output voltage as load current and input voltage changes.
Avoid doing that – also pretty easy to protect against, use a TVS, polyfuse and series diode for any power outputs.
I wouldn't generally put a series diode on the output of a power supply because diodes can have quite a high voltage drop which will mess with your regulation and reduce you efficency. Agree on the TVS and polyfuse though.
Just to prove I'm not crazy, I spent a few minutes poking around at WeBench and some parts suppliers and came up with a design based around LM3150, 7-14Vin 5Vout @ 1.7A. Efficiency > 90% for all loads > 350mA and > 94% at > 1A. Total BOM cost for a single copy of this circuit is $5.45 (however you won't save a huge amount in quantity, it's still $4.95 at qty 100). This is all surface-mount, but accessible packages like SO8 and 0805 that anyone can do easily by hand.
Just watch the switching frequencies. Converters with a high switching frequency can have lower parts costs but they are also far more sensitive to PCB layout issues.