I am using an USB port as a power supply. Is there a way I can take the weak 5V of a regular laptop USB and transform if to 100V+ while begin in the smallest package possible. I've heard of boost converters but they are usualy too big. I want something that has the size of like a normal USB key.

What I want to do is to charge up around 5 capacitors at 100+V and then discharge them later. Power efficiency not a concern for me.

It would be helpful to include a schematic of the circuit.

  • \$\begingroup\$ As in USB Killer? \$\endgroup\$
    – Ghanima
    Commented Oct 29, 2016 at 22:40
  • \$\begingroup\$ @Ghanima Exactly, I'm trying to build my own DIY cause they cost very expensive (yeah, 50$ is expensive). \$\endgroup\$
    – Dat
    Commented Oct 29, 2016 at 22:45
  • \$\begingroup\$ Read some of the comments here: electronics.stackexchange.com/questions/266409/… \$\endgroup\$
    – jonk
    Commented Oct 29, 2016 at 23:44
  • \$\begingroup\$ There is some big nice answer there, i can't compete with it. But i think, worth considering- a flyback supply. Actually with transformer you can go as high as tens of kilovolts, but hundreds are almost trivial. \$\endgroup\$
    – user76844
    Commented Nov 3, 2016 at 9:53

2 Answers 2


Boost converters can be made small. And there isn't many other choices there. A charge pump would be bigger, and a transformer isn't even worth mentioning.

So, let's make a small boost converter that would be appropriate for this application. There are a few things different from the typical boost requirements, though: The current drawn from the USB must be within specs (500mA, or the computer may eventually disconnect your key's supply), and you don't care about voltage accuracy, load regulation, supply rejection ratio, or anything usually important for typical regulators. Also, the startup time is unimportant (hopefully, because at 5V 500mA max, it takes quite some time to charge a big capacitor at 100V).

One last thing: the number of capacitors you want to charge (you said 5) is, of course, irrelevant. What you should have told us is the total capacitance (I'll assume 4.7µF, which is about the capacitance on the USB killer, I think, since it apparently is what you want to do).

Here is the circuit (yes, it's almost a full design I made... full-design questions aren't always welcome here, but in this case, it's been fun):

enter image description here

Here is the pastebin for simulation on LTSpice (simulation takes a lot of time with such a big C4 reservoir cap - you can lower C4 to about 100nF to make it much faster, but keep the "IC=0").

Here is how it works. The circuit is slipt in two parts:

The voltage boost part

Because, as I said, the requirements are different than typical boost supplies, I chose not to use a standard boost regulator IC, but a simpler scheme. This also makes the design smaller.

The aim is to charge C4 continuously. We actually monitor the current through the inductor (through R3), and, using a simple comparator (U1) with hysteresis, proceed as follows: turn M1 on and wait for the inductor current to reach about 600mA (we actually go past 500mA, but the average current is below). Then M1 is shut down and the inductor discharges through C4, therefore increasing its voltage. When the current through the inductor drops below 100mA, we repeat. That will charge C4 little by little. You can actually reach any arbitrary voltage with this, provided you stay under the ratings of the chosen components (but it becomes of course harder and harder to charge C4 as its voltage raises). It takes about 30ms to reach 100V with a 4.7µF cap (if the cap is smaller, it takes less time).

The discharge part

This part is also using a comparator with hysteresis (U2). When the voltage reaches about 100V, the comparator triggers the discharge PFET (M2) and maintains its gate voltage down until the voltage has dropped to about 25V. It then stops and the process potentially repeats, with C4 being charged again by the boost (as long as the 5V supply is there). You can therefore discharge the accumulated voltage to any signal path you want (probably D+/D- of the USB).

Component choice

The component choice is critical. Of course, L1, C4, D1, M1, M2 and Q1 should withstand more than the target voltage (maybe at least 120V - 150V). Regarding C4, note that it is hard to find such a high voltage capacitor in the few µF range in SMT with small dimensions. Probably the smallest is actually to use an electrolytic (rather than 5 SMT ceramics). The inductor has here been chosen with a low value (10µH) to keep its dimensions small. Note that a small value is not a problem in itself, but it requires the U1 comparator to be faster (the charging needs to be made at a higher frequency to stay under the USB rated current). With the current inductor value, the U1 comparator is actually critical. Simulation works with LTC6752, but cheaper alternatives may exist (MCP656x, maybe?). If you use a 100µH inductor, you'll certainly have much more choice. Also, the comparator input voltage range must include ground. And the output must be high enough to be able to trigger the FET. There are less constraints for the U2 comparator (of course, using a single chip for both comparators would make the solution smaller). Both comparators must have push-pull outputs.

Last thing: small SMT inductors usually don't have voltage ratings. That's sad. Here are stackexchange answers on that:


This design is not bullet-proof. There are multiple things that should be improved:

  • The boost part continues to work even while the discharge PFET is turned on. This has unwanted effects, the main one being that this creates a big current draw from the USB 5V (several amps) while discharging. The risk here is that the computer shuts down the USB supply and you can't go any further.
  • For the same reason (boost part continues to work), if there is no discharge path (e.g. the D+/D- wires are broken), the reservoir cap voltage will continue to raise indefinitely, blowing up your own USB key at some point (suicide!).
  • If you actually successfully destroyed stuff on the host computer, it is possible that the 5V USB supply will be shut down by the computer anyway, thus shutting down the discharge PFET and preventing you from potentially damaging more things (want more damage! want more damage!). There should be some big 5V reservoir to maintain the discharge opamp supply for additional time even if the main 5V goes away.
  • Your circuit itself isn't protected on the 5V supply. Since you're injecting high voltage you-don't-know-where, maybe it will go back to you, killing your own USB key. An overvoltage protection (the least you should do is a zener) should be added.
  • All voltage references used on comparators are derived from the 5V USB supply. That may not be very wise, especially if the 5V can potentially blow out.
  • Probably many other things... The main flaw being: why on earth would you wanna do that?. Oh, well...
  • \$\begingroup\$ Im just trying to learn electronics. I know already a good bit so I'm trying to learn by reverse-engineering things I find. Don't worry, I wont be using it on anyone's computer! All test will be done with multimeter and dummy USB port. \$\endgroup\$
    – Dat
    Commented Nov 3, 2016 at 11:51
  • \$\begingroup\$ While a boost converter can be made to do this, a flyback is also totally appropriate, and would be used in many real world situations like this. A boost converter isn't wrong, but dismissing using a transformer with "isn't even worth mentioning" is bad engineering at best. At over 100 V out, just the isolation alone may make a transformer worth while, let alone the high step-up ratio it can easily achieve. \$\endgroup\$ Commented Nov 3, 2016 at 16:34
  • \$\begingroup\$ @Olin OP explicitly mentioned small size, that's why. And isolation is not useful here. I'm not saying flyback wouldn't be more appropriate with different constraints, though. \$\endgroup\$
    – dim
    Commented Nov 3, 2016 at 17:47

At this relatively high stepup ratio (1:20), I'd start by looking at a flyback converter. This has the secondary advantage in that the output is inherently isolated from the input. That's useful when that output can seriously hurt someone, as 100 V can.

In a flyback converter, a transformer is used to transfer power from the input section to the output section. The transformer is really used as two coupled inductors since the primary and secondary don't conduct at the same time.

The input side connects the primary of the transformer to the input voltage for a fixed time. A diode in series with the secondary is oriented so that no current flows there during this time. The primary therefore is just a inductor to the driving circuit. The pulse time is whatever it takes to charge up the inductor to near its maximum.

The primary current is then abruptly shut off. The voltage produced by the secondary now flips, and the diode in series with it can conduct. The secondary now looks like a inductor, but one that is fully charged up. A pulse of current goes thru the diode and charges up a capacitor. The pulse starts out high, then decays exponentially as the inductor discharges. When this output pulse stops, the whole process is repeated.

Part of the high voltage on the output relative to the input comes from the transformer turns ratio, which can be made relatively easily over a wide range. This ratio is not available in a simple boost converter, which is why flyback converters can be made more easily with high voltage ratios.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.