It's easier to generate DC from AC mains supply using a transforme and some diodes but the difficult part comes when we need to regulate the supply to feed sensitive devices such as mobile phones. Here's a versatile DC to DC coupler that 'll give you regulated fixed dc output voltages like 5V to charge mobile phone, 12V for external hard drives etc. You may use a 19V laptop adapter to route various voltages such as 5V , 6V, 12V from it.
|Simple Adjustable DC - DC Converter circuit diagram|
The circuit utilizes the well known adjustable dc voltage regulator IC LM317, BC 547 transistor and very few discrete components. By referring the circuit, variable voltages can be obtained by adjusting the preset VR1. The output voltage is read using a 0-100µA ammeter which has a series resistance necessary to cover the full working voltage range. For full-scale deflection (FSD) current of the meter is 100 µA and you need an output voltage of up to 15V, then R* = 15/0.0001 = 150 kΩ. The desired value of R* is obtained by using 150-kilo-ohm preset VR2. Other circuit details are self explanatory from the figure.