This switching regulator schematic was mostly copied from the Linear Technology datasheet. However, some high frequency filtering was added on the input and output to cut down on switching noise. For more information on this idea, see the Jim William application note.
This circuit is my go-to circuit for bringing 24V down to 12V or 5V. It isn’t the cheapest, but it is good for mobile applications or desktop electronic applications as it doesn’t generate much heat. It has an internal MOSFET, so the circuit is a bit simpler and more compact than some of the other regulators that I use when I need higher power.
As always, feel free to use this circuit to jumpstart your next design. Donate if you think you’ll make some money from it, or just download and use it if you’re bootstrapping. Hopefully this should save you about 4 hours of effort.