The LM317 linear voltage regulator is the top pick for a variable DC power supply. See its pinouts, circuit calculator, and example circuits.