I made a simple constant variable voltage generator for my experiment almost 2 years ago. I used AC-DC switching converter and regulator IC LM338. It is available to adjust fine voltage by a 15 revolutions trimmer. The voltage range is 1.8V to 10.5V. The shassis has heat sink function using 1mm ( 0.04in ) thick aluminum plate. The area of the heat sink is 74 cm² ( 11.5in² ). The ac-dc converter has 12V 0.25A capacity. The dimensions of my tiny tool is W102 x D55 x H62 mm ( W4.0 x D2.2 x H2.4 in )