7805 Voltage Regulator Pinout
TO-220 package, printed face toward you, legs pointing down. Check your board against its silkscreen before wiring power.
Left to right: in, ground, out
With the printed face toward you and the legs pointing down, pin 1 takes the unregulated input, pin 2 is ground, pin 3 gives regulated 5 V. The metal tab connects to ground, which matters the moment you bolt it to a shared heatsink.
It runs on waste heat
A linear regulator burns the difference between input and output. Feeding it 12 V while drawing 500 mA means dissipating (12 - 5) × 0.5 = 3.5 W as heat, which needs a real heatsink. A switching module does the same job cold, when efficiency matters more than simplicity.
The two capacitors
Put 0.33 µF on the input and 0.1 µF on the output, as close to the pins as you can manage. The datasheet asks for them, and without them the regulator can oscillate in ways that are entertaining on a scope and annoying everywhere else.
Sources and datasheets
This diagram was cross-checked against the manufacturer documentation below plus at least two independent references before publishing. When they disagreed, the manufacturer won.
More boards and plugs live on the pinouts index.