In automotive environment, it’s common that only single voltage power outlet is available. Using the very popular LM317 voltage regulator IC, we can build a general purpose DC adapter to adapt car’s power outlet voltage (12-14 Volts) to supply small DC devices requiring lower voltage level. On the following schematic diagram for the car power adapter, we can see that the output voltage depends on the value of R1, which is manipulated by connecting R3 or R4 via switch to program
the output. When connected through the switch, R1 will be in parallel
with the selected resistor so the total resistance changes to affect the
output voltage.