Linear 5 V regulator
MCU are supplied from 5 V sources (some using 3 V), 12 V power supply requires regulator for microcontroller. Simple regulator
is 7805 IC.
Left terminal is input, right one is output. Ground is middle, it goes to negative power supply wire.
If 5 V circuit requires more than 300 mA, mount 7805 on heat sink. Use thermal conductive compound.
Ceramic capacitors are suppressing power surges. Also, electrolytic capacitors are required for voltage ripples compensation.
Their capacitance stay in 100-2000 uF, working voltage - 16 V or more.
There are variety of these regulators: 7809 for 9 V, 7812 for 12 V and so forth. Also, there are negative voltage reglators:
7905 for -5 V, 7909 for -9 V and so forth. In all cases, input voltage should be at least 3 volts greater than output voltage.