This 5V to 12V DC-to-DC converter circuit is a boost converter, the opposite of the buck converter. It uses a step-up converter to convert 5V from the USB port to 12V DC.
Another point for this circuit is that it is a great way to experiment with using transistors in a switching supply circuit instead of an IC, which has become popular for its higher efficiency.

“Why bother using it?”—you may ask. Because making a simple 5V to 12V converter circuit like this one is a great opportunity to learn about the basics of transistors and other common electronic components.
Anyhow, let’s start with the basics of a boost converter.
Basics of DC Boost Converter
What is a boost converter? In simple, it is the circuit that increases low input voltage to higher output. Its structure and layout are quite similar to those of the buck converter circuit. However, because the output voltage had to increase, the switch (S) was instead connected to the ground, as shown below.
When the switch (S) is in a closed-circuit state, it causes a voltage across the coil (L) to increase to match that of the input voltage (Vin). This also linearly increases the current at the coil (L).
However, when the switch is in an open-circuit state, the current from the input source is combined with the current in the coil (L). This current flows onto the diode, causing the output voltage to be higher than the input.
When the switch (S) is opened, the electric field inside the coil (L) collapses, causing its voltage to switch polarity from positive to negative. This means that the voltages from the input source and the coil have the same phase (in phase).
It is as if we connected two batteries in series, with the positive end of the first connected to the negative end of the other, and their total voltage added together.
How This 5V to 12V Boost Converter Works
The completed 5V to 12V converter circuit below uses the same principle as the example circuit above. The main parts—L and D—correspond to L1 and D1, respectively. As for the switch (S), we replaced it with two transistors, Q1 and Q2, working as feedback for each other.
When we apply the input voltage to the circuit, the current passes through R4 and the emitter-base of transistor Q3. The +5V current then flows through R3 and into the ground.
Because transistor Q3 receives a bias current at its base, it starts to conduct current from its emitter to collector, sending the bias current to transistor Q1 and causing transistor Q1 to conduct current.
In the basic DC boost converter circuit above, transistor Q1 acts as a switch (S), so it connects L1 to the ground (negative potential) like a closed switch. Because L1 connects to both the positive supply and the ground, its voltage rises to match the power supply’s 5V.
The linear current that flows through L1 is the same as the current that flows through Q1’s collector and emitter. However, as the current of L1 increases, so does the R1 voltage, and when that voltage reaches 0.8-1.2V, Q2 will conduct the current and cut off the bias current of Q1.
Now, the transistor Q1 acts as an open switch, in the process disconnecting L1 from the ground. Causing the electric field inside of L1 to collapse and reversing the voltage potential of L1. This means that the voltage of L1 is in phase with the +5V input voltage. Which results in the output voltage being: Vout = Vin + V.
This combined voltage then flows through D1 (Schottky barrier diode) and the 10μF C1 filter capacitor to the output.
The output voltage is more or less dependent on the amount of time L1 has to store energy. The longer it is, the higher the voltage because it stores more potential energy.
Since this is a switching circuit, if the frequency is too low, it will not be able to output enough power. The frequency of the circuit need not be lower than the frequency response of L and C.
Output Voltage Setting
However, since this circuit is a switching regulator circuit, the output voltage needs to be at the constant 12V. Therefore, we add a ZD1 Zener diode to maintain the output voltage at 12V.
When the output voltage rises to 12V, ZD1 conducts current back to the base of Q2. So we can say that the working of Q2 is also dependent on this feedback voltage. This will eventually turn off the Q2, decreasing its working period and keeping the output voltage at a constant level.
Testing and Application
Then we test this 5V to 12V power supply circuit on a perforated PCB. First, we apply a 5V 1A Vin from a USB port and use a 12V LED as a load. The result is the LED glows brightly.
A measurement reveals that this circuit has a maximum output voltage of 12.6V at a current of 20mA while inputting 5V at a current of 64mA. This yielded an efficiency of approximately 77%, which is not bad at all.
The Component List
- Q1 2N2222, NPN transistor 0.8A 40V
- Q2: 2N3904, NPN transistor 0.4A 40V
- Q3: 2N3906, 0.4A 40V, PNP transistor
- C1, C3: 10μF 25V, electrolytic capacitor
- C2: 0.1μF 50V, ceramic or mylar capacitor
- R1: 3.9Ω 0.25W resistor
- R2: 470Ω 0.25W resistor
- R3: 47K 0.25W resistor
- R4, R5: 1K 0.25W resistors
- D1: 1N5819, 40V 1A Schottky diode rectifier
- D2: 12V 0.5W Zener diode
- L1: 330μH, low current inductor or Create an inductor yourself
- Perforated PCB, wires, and other parts
5V to 12V Boost Converter Circuit Using Transistor
One way to get a negative voltage from a positive power supply is to use a buck/boost converter circuit. As the name suggests, it combines both buck and boost converter circuits.
Step-up/Step-down Converter
In the circuit above, when the switch (S) is closed, current flows through the coil (L), creating a voltage across the coil (VL). Then, when the switch (S) is open, the current continues to flow to the diode (D), creating a negative output voltage (Vout).
Because this circuit uses both the concept of a buck and boost converter, it is referred to as a “buck/boost converter.” However, this does not mean that all buck/boost converters increase the output voltage; there are also ones that decrease the output voltage.
Therefore, we often call a buck/boost a step-up or step-down converter instead.
How Does This Circuit Work
Considering the circuit above, the top half containing the coil (L1a) is a buck/boost converter. When +5V is applied to the circuit, the current first flows through R3 and biases Q2. Then, the Q2 allows current to flow through its collector and emitter and biases the Q1.

The Q1 functions like a switch, allowing current from the power supply to flow to L1a. Causing the voltage across L1a to be the same as that of the power supply.
As the voltage continues to increase, it also flows through C2 and R2 to bias Q2. However, when C2 is fully charged, it cancels the bias current for Q2, causing Q2 to conduct less current, as does Q1.
This causes the polarity of L1a to reverse, from the north being positive to negative and the south being negative to positive. Causing a rectified current to flow through D1 to the output.
At the same time, some of that current induces a reverse bias at the emitter-base of Q2. Because of that, Q2 stops conducting current like an open switch and disconnects L1a from the power supply.
The working cycle of the buck/boost converter, as laid out in the basic circuit above, is now completed. Not long after, the Q2 will restart and repeat the cycle, ensuring a constant output current.
This explanation of this circuit’s workings hinged on the same principle as the basic circuit above; the difference is that this circuit is more complex and advanced.
Also, this circuit is meant to have a regulated output at -12V. We thus add the 13V Zener diode D2 to ensure that when the output voltage goes below -12V, the Q2 will stop working and bring the output voltage to the usual -12V.
Flyback Converter
However, we want this circuit to have both negative and positive output. The simplest way to do that is to apply the principle of a flyback converter.

In the basic flyback converter circuit below, when the switch is closed, the Vin flows into the transformer, causing its voltage (VL) to be the same as the Vin. At this point, the primary coil has a positive phase and the secondary coil has a negative phase.
This means that the secondary coil cannot output a VL from the circuit because its polarity is the opposite of that of the diode. The blackish-brown dot represents the electrical phase here.
However, when the switch is open, it reverses the polarity of the primary coil, allowing the D1 to output voltage (Vout).
Returning to the main 5V to 12 converter circuit, begin by wrapping the other wire L1b in the same 1:1 ratio as L1a. The Q1 acts as a switch, with the L1b acting as a secondary coil, and D3 rectifying the output voltage to +12V.
We may call the lower half circuit that contains L1b an isolated converter because it uses a separated common or ground to the input circuit.
This 5V to 12V converter circuit has an efficiency of around 60%. Therefore, the transformer should be of the El type. In other words, this is an older type of converter circuit.
Conclusion
The purpose of this 5V to 12V boost converter circuit is for us to learn the principle of a boost converter circuit in general. However, if you are looking for an actual boost converter circuit, using an integrated circuit is a more convenient and efficient option.
GET UPDATE VIA EMAIL
I always try to make Electronics Learning Easy.
Related Posts

I love electronics. I have been learning about them through creating simple electronic circuits or small projects. And now I am also having my children do the same. Nevertheless, I hope you found the experiences we shared on this site useful and fulfilling.
Hi my name is Andri.
I want to ask about this circuit, can i use q1, 2, 3 (transistors) with different types of transistor?
Thanks
Warm regards
Andri
Hi,
I am sorry, we cannot use other type of transistor. The Q1, Q2 is NPN type but Q3 is PNP type. You may use Q1 is BD139 because it is high current than 2N2222.
Thanks,
hello
Q2: 2N3904, NPN transistor 0.2A 40V
Q3: 2N3906, 0.2A 40V, PNP transistor
0.2A
I’ve built this circuit twice and I only get 6.68 Volts out of it. I’ve checked the transistors and all seem to be good. I’m kind of at a loss of what to try next.
Hello,
I am happy that you try this circuit. It is small and easy. But It can drive 12V 0.02A load only. If you can read 6.68V output. I think that the oscillator worked if no load we will read about 12V output. Please check the ZD1 it controls 12V output and check C2 and R5 again Sometimes if the frequency is not high it causes low output voltage. Sometimes we need to check Q1 if it has low gain it makes low output volt as well.
Thanks for getting back to me. I am testing without a load when getting 6.8V. I’m getting around 47Khz for the oscillator, but the Q3 collector/Q1 base/Q2 collector is staying at 0V and I’m not getting a switching action. The emitter of Q3 seems to be going to 0 volts the same time the base gets pulled down so it never saturates. What is the target frequency of the oscillator? I may try some different values of the L and C and see how it behaves at different Freq.
I am very sorry for wasting your time.
I checked the frequency at the Collector of Q1 to be approximately 80kHz to 420KHz.
From what I tested, this circuit works normally, but it supplies little current.
The voltage at many points compare with the GND
The C of Q2 is 0.6V
The C of Q1 is 5V.
The B of Q3 is 4.8V
The E of Q3 is 2.6V
Yes. I tested L1 is 68uH to 330uH, All is output to 12V without load. But if L1 is used at a low value, around 68uH, the frequency will be higher and Q1 will run faster. There is a higher current coming out.
However, this circuit was fun, with a few components.
God bless you.
However, this circuit was fun, with a few components.