Easy High Voltage

Arcing slightly over 1.5 inches! Videos at the end.

Maybe you want to make a Jacob’s ladder, or give your robot a flamethrower. This is a simple guide on how to make high voltage from 12v capable of arcing over an inch! Not only that, but my guide will also show how do this in a way which won’t break down, and it’s completely solid state!  I’m not going to dive into frequency response or the concepts behind a flyback and why it uses a ferrite core. There needs to be a high frequency (~20khz) square wave signal controlling the driver, and I’ll be using an Arduino. If you don’t want to use an Arduino, then use a 555 timer or any other micro controller.

Note: if you already have a flyback transformer removed and know how to be safe with high voltage, then skip to “The Build Plan:” This post is a tad long =/

The project will be designed around a transformer. A high voltage transformer needs to be selected, but where to start? There are a few household appliances which may be laying around the house that use a high voltage. Let’s look at a few:

A quick view of driver circuit.

Selecting transformer:

Microwave Transformer:

  • Pros: High current, easy 60hz, designed for high voltage, 2nd winding usually isolated
  • cons: Weighs A LOT!, it’s huge, and it only takes 120V to about 2-6kV

Standard Transformer with high secondary to primary turn ratio:

  • Pros: Usually small, easy 60hz, easy to find, cheap.
  • Cons: It’s not designed for high voltage, expect rapid insulation deterioration.

CRT Television/computer monitor flyback transformer:

  • Pros: Fairly small, light, designed for 15-50kV, easy to add a new primary, usually outputs DC!
  • Cons: complicated pin out and overall hard to reverse engineer, High frequency 10+kHz.

Neon transformer/oil burner transformer:

  • Pros: fairly ‘safe’, designed for 15-50Kv, designed to run/last a long time, usually easy 60Hz.
  • Cons: requires 120V, hard to modify (often inside a metal can), high current dangerous output.

Xray transformer/’Pole Pig':

  • Pros: MONSTROUS voltage/power, designed to run/last a long time, usually easy 60Hz.
  • Cons: Unless you’re a mad scientist, you probably don’t have one lying around the house. Good luck finding one cheap, huge size/weight, and you’ll kill yourself.

Listed above are some of the options that immediately come to mind. Sometimes the transformers in a laptop’s back light is an option, but they don’t tend to last long when operating in the 10+kV range. Looking at the pros and cons of various transformers, I decided to go along with a computer monitor flyback transformer. I don’t know the pinout and I’m guessing the flyback’s primaries are designed for higher voltages, not the 12V we want to use. Let’s add a new primary to simplify things.

Removing the flyback:

If you’re a reader who wants to actually do this on your own here’s the rules for safety. If you don’t want to read, here’s a good video guide on how discharge: http://www.youtube.com/watch?v=bDAiLtTDuf4

  1. Unplug the monitor and make sure it is not touching anything metal or conductive — Glass face down.
  2. Most importantly only use one hand, preferably your right, when touching ANYTHING! NEVER use both hands, so if you were to get shocked the electricity wouldn’t travel from one hand to the other. If electricity went from your right hand to your feet, your heart *should* not have too much current running through it.
  3. Stand on something plastic at least two inches thick and don’t touch anything metal or conductive.
  4. Common insulators will fail at these voltages. Treat all wiring as if there is no insulation on it.
  5. Wear safety glasses, ear protection, and a thick long sleeve shirt. This is a large glass tube with a vacuum inside. If it popped there may be shrapnel. The front is very thick and extremely safe, but the tube is not designed to be safe at the back end.
  6. Don’t do this if you’re using any sort of electronic life sustaining gear: pacemaker, insulin injector. Find someone else dumb enough to do it for you
  7. Understand that you’re doing this at your own risk, and I don’t guarantee safety. I will not be liable for any computer/equipment damage or injury/death. I’ve been shocked by high voltage capacitors in the past and probably would not be here right now if I didn’t follow the rules above. Do not shock yourself even in nonlethal ways! you can still do nerve damage just shocking your hand!

The CRT monitor has two main high voltage capacitors: the flyback’s internal capacitor, and the glass tube itself acts like a capacitor. When you open the monitor there will be bare — no insulation — grounding wire running around the perimeter of the glass tube (near the screen viewing side), and the frame for the electronic boards should be metal too. Get some wires with alligator clamps at the ends and connect the tube frame’s bare ground wire and the electronic board’s frame. Now get a third alligator wire and clamp it to the grounded frame, and the other end to a flat head screwdriver. This screwdriver should have a thick plastic grip without any cracks! Hold the plastic screwdriver by the plastic end — keep away from anything metal — and wobble it under the suction cup electrode on the glass tube. You will eventually hit metal, if the monitor was recently on, possibly hear an electrical pop. Put down the screwdriver and pinch the back of the suction cup and pull it off. Remember to do this with a hand tied behind your back. Once it’s off, touch the metal again with the screw driver and then connect the frame grounding alligator wire to the metal electrode. Now prod around the circuit board with another wire connected to the frame’s ground to make sure nothing else is charged. After you feel as though you’ve poked the poor motherboard enough, congrats! it’s *hopefully* discharged! Now cut all the wires connecting the motherboard to the monitor, and I suggest you tie a frame ground to the pliers. Wriggle the motherboard out of the monitor and close up the monitor with just the glass tube inside and carry it to the trash.

So here we can see part of the motherboard for the monitor. The big black box front and center is the flyback transformer, as you probably guessed.

where to cut the PCB with a pliers

I find it easier to get some heavy duty pliers and cut around the transformer. Once the transformer is out on it’s own little PCB section, try to cut sections in between the pins. The PCB will tend to crack, but we can use this to our advantage.

Once there are little PCB islands with only 1 or 2 transformer pins, de solder the sections.

The build plan:

  1. Wire the new primary coil
  2. design a circuit to drive our new primary coil
  3. write the software for the micro controller managing everything
  4. test it! (safely)

Wiring a new primary coil:

This is usually very easy and you can start off with some thin wire just to test the transformer and driving circuit. The ferrite core is often exposed quite a bit and easy to wrap a new coil around. I wrapped a thin layer of masking tape, then a layer of electrical tape. I then used four layers of copper tape normally used for stained glass, and I was sure to solder the ends together.

Image from Wikipedia

Why did I use copper tape? Mainly due to the skin effect. Electricity tends to prefer the surface of a conductor at higher frequencies. This is why a Tesla coil operating around 1Mhz will mainly burn and not electrocute. This is also why some high frequency lines are pipes lacking any sort of core!

even a quick wiring works, but gets hot!

older non rectified flyback

Image from Wikipedia

I looked over the equations and constants used and they agree with my physics book: Essential University Physics by Wolfson Volume 2. It’s also wise to check an ensure that graphs match up with the equations when looking at questionable online sources, which in this case, the graph and equation did and were from Wikipedia.

That pin is a capacitor connected to the red high voltage output

What a nice primary! A little hot glue to hold it in place.

Designing the circuit:

There are many different ways to build a flyback driver. Mine uses a micro controller, in this case an Arduino,  and a high power N channel MOSFET. This makes the circuit extremely simple to build and only has a few components. We’re going to be running this circuit at around 20kHz with a lot of current. To make things simple I’ll be using a Mosfet Driver, and this will allow us to easily achieve 12v gate-source voltage differential to minimize drain-source resistance, and the driver will quickly charge and discharge the gate-source capacitance, since it’s a high current half bridge.

Mosfets I’ve had great luck with:

  • IRFP260N  – N Mosfet, buy at jameco.com (best for this project)
  • RFP30N06LE – N Mosfet, sparkfun.com — Will function decently without a Mosfet driver

Mosfet Driver:

For a larger list, please visit my Guide to the MOSFET!

  • MIC4422 -Driver, jameco.com discontinued, type “MOSFET driver” into jameco’s search. Farnell carries it!
  • TC4420 –  Has the same pinout as the MIC4422 and features great ESD protection. A direct replacement for the MIC4422.

driver schematic (click to enlarge)

Note: the ground of the Arduino and the driver circuit are also connected.

minimum layout on breadboard. Large capacitor on 12v line

Now for anyone experienced with Mosfets, you’ll see I’m adding capacitors where they really shouldn’t be located. This will decrease performance ever so slightly, but from experience, will help protect the Mosfet and the driver. You may also want to wrap the connected ground and signal coming from Arduino around a small choke too.

completed circuit board with a small heatsink

entire circuit

Test Code:

This will slowly increase frequency. Voltage may be measured by the arcing distance. Use an old computer for this or increase delay time in setup(); which will give you time to unplug your computer from the Arduino. If you need to see the frequency, use an LCD screen for the Arduino. I haven’t had issues with this, but I wouldn’t recommend using an expensive computer for this project! Notice how I’m using a cheap netbook running from the battery.

Frequency sweep (pdf)

Final Code:

Once you’ve found a good frequency, just use the tone generating function.

flyback driver program (pdf)

Remember that your flyback transformer contains internal capacitors and needs to be discharged after use!

Word of Advice: Pulsing this circuit tends to have an EMP effect. If the Arduino crashes, it’s usually right when it was setting the registers/timers to output the signal. The computer on the Arduino will crash, but the registers may continue to output the signal which drives the flyback. Be careful of this! Components may over heat! The low voltage side may gain a net charge too which may shock you a bit when touching it. From experience this shock is usually mild, but you may want to earth ground everything if you’re worried… If the output voltage isn’t very high, try reversing the polarity of the primary coil since the transformer has an internal high voltage diode.

Want to measure the voltage? This is a tad bit difficult since the flyback’s output is extremely noisy. I would suggest building a voltage divider with 5 or so 10Mohm resistors in series and a 10k connected to ground. Have the voltage divider output connected to a capacitor. Run the flyback and then when it’s off measure the voltage on the capacitor to calculate the flyback voltage.

Some terribad quality videos!

14 Responses to Easy High Voltage

  1. Pingback: High Voltage: Controlling a flyback transformer with an Arduino - Hack a Day

  2. Pingback: High Voltage: Controlling a flyback transformer with an Arduino

  3. majdi says:

    Hello, can this been modify for dc-cdi system?

  4. Well done! I really like the design and videos. Very good for experiments with high voltage.

    • Moser says:

      Be super careful! That flyback driver pulled 80 – 100 (when arcing) watts at around 22khz when powered with an old xbox360 psu. That’s a TON of power for something like that. That’s death or severe burns if you make a mistake

  5. Brandon says:

    Very well-written and easy to follow!

    Is the high-voltage output from the flyback transformer also at 22kHz?

    (pardon my ignorance: a chemical engineering trying to understand how one might build a cold plasma driver @ ~20kHz, ~20kV)

    • Moser says:

      will be DC unless you’re using an extremely old flyback. AC flybacks generally look like this

      • Brandon says:

        From Wikipedia (http://en.wikipedia.org/wiki/Flyback_transformer):

        “In older television designs, the transformer produced the required high voltage for the CRT accelerating voltage directly with the output rectified by a simple rectifier. In more modern designs, the rectifier is replaced by a voltage multiplier. Color television sets also have to use a regulator to control the high voltage. The rectified voltage is then used to supply the final anode of the cathode ray tube.”

        “In modern displays, the LOPT, voltage multiplier and rectifier are often integrated into a single package on the main circuit board.”

        What’s coming out of the wire to the CRT’s anode has most likely gone through a rectifier AND a regulator. Shoot, I guess I’ll have to look elsewhere for a 20kV, 20kHz source!

        Thanks for your help!

  6. kd says:

    Hi Moser

    Could you elaborate on the ways in which the extra caps and resistors protect the circuit?

    Also is it necessary to have a MOSFET Driver?

    RIght now I have an Arduino connected to the gate of a mosfet, The mosfet has its source drain powered by a 6V lead acid battery. Is there an extra functionality of the mosfet driver?

    • Moser says:

      The mosfet driver mainly improves switching efficiency and in most cases improves Rds. Depending on your mosfet and current Vgs =5 is just fine.

      Remember that the mosfet appears to be a capacitor. If that capacitance is large you can add a resistor to make it easier on the arduino. You’ll need to look at atmega data sheet if it’ll be a long term installation or if failure is really bad.

      For protection it all depends on what type of load. What are you driving and how much current?

      • kd says:

        Thanks a bunch Moser!

        I’m looking to draw about 30W across an arc. I’m curious what limits the current in these flybacks that I see arcing. Is there a resistor somewhere in line with the primary coil? Because from intuition, my thoughts tell me that a flyback that is shorted as in arcing, would simply drive as much current through as is available from the primary circuit, and this current would proceed to likely blow the hair-thin secondary wires.

      • Moser says:

        I never went into it that detailed. You should vary the duty cycle to limit power. Increasing the frequency should also limit current, but the transformer will have sweet spots where it may draw a lot of power at certain high frequencies

      • Moser says:

        I thought this was a different post. Yeah attiny will work just fine here. Use a mosfet driver to increase efficiency

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s