-
Status update and rebuilds
06/19/2019 at 10:57 • 0 commentsIt's been some time since I posted something on this project, and I still didn't have time to test V2 even through the pcb have arrived some time ago already. I still got motivation to work on this project through, not least because of the great feedback I got. Thanks!
Some people even were crazy enough to try rebuilding this project, and all four attempts I'm aware of succeeded with little or no help. This is great, as it means all my documentation is successive and correct.
I want to give a special shoutout to Zack Goyetche. He built not only one, but four tesla coils, and even made an awesome youtube video about additional theory and the build process.
So while waiting for some progress on this project, enjoy his video and take it as motivation to build you own tesla coil :)
-
Hardware Design Part 2
05/15/2019 at 17:10 • 0 commentsFlyback boost converter
The PWM for the switching mosfet is generated by the STM32. The STM32 thous has full control of the output voltage, allowing things like slowly ramping up output voltage to not overload USB, software-configurable bridge voltage and potentially QCW-DRSSTC operation.
Deadtime circuit
The so-called shoot-through condition happens when both switches in a half-bridge design are conducting simultaneously. This usually doesn’t happen intentionally, it rather happens as a side effect during switching: If you switch on one fet in the exact same moment you switch off the other, due to time delay mismatch it can happen that for a very short period of time, both switches are conducting, usually causing death to both fets. To counteract this unfortunate event, you can add a small amount of time where both fets are off, “break before make”, or, in EE slang, dead-time.
Even though the LMG5200 already integrate an impressive amount of circuitry, one thing missing is dead-time logic. Texas Instruments arguments that this is an advantage as it gives the designer the freedom of controlling the two individual GaN devices in the half-bridge as they wish. However, it also gives you the freedom to kill both GaN Fets if you turn them on simultaneously.
I didn’t realize that in my first attempt, and adding dead-time logic was the milestone that lead to the very first sparks from this design. The circuit is pretty easy: Two triple-input AND gates are feed with the feedback signal, one inverted, the other not. Also, enable from the STM32 is applied to both AND gates. The opto-coupler was added to separate the STM32 from the electronics for the tesla coil: As you will learn later, the GND for everything related to driving the LMG5200 is on a separate ground plane, only conneted to power ground through the LMG5200 itself. This is again because the fast switching of the LMG5200 can induce voltage spikes that can lead to unwanted behavior. The opto-coupler is there to connect these to domains without introducing noise to this separated ground plane.
The third input is the inverted output of each other AND gate: Only one of them can output high at a time, as they are blocking each other. As the signal has to pass through the inverter first to enable the output of the other AND gate, the delay time of the inverting gate is added to the signal as dead-time where both AND gates outputs are low.
Feedback Signal recovery
Is is very important for the tesla coil to operate at it’s own resonant frequency. However, this is not a fix value, it heavily changes during operation: Both the amount of metal in the surrending as well as the very arc created by the tesla coil forms an additional capacitance that decreases the resonance frequency. The easiest way to follow these changes is to operate the coil in a self-resonanting mode: The output of the coil is sensed, amplified and feed back to the driving circuit as positive feedback. This causes an undamped oscillation at the resonant frequency.
There are multiple known attempts to recover this feedback signal. The biggest difference is either it is recovered from the primary resonance circuit or the secondary coil. The easiest way is to sense the current flowing through the secundary coil using a shunt resistor in series with the earth connection. This is the method as seen in the schematic above, however, it implicitly couples RF noise from the discharge into the logic circuit, which might cause the problems experienced when touching the discharges.
Another attempt is to sense the primary current and use this signal to drive the GaNs. This methode is usually more robust and can be used and tested even completely without any secundary coil. Traditionally, ~1:100 current transformers wound to a small ferrite torus core have been used for this. For my coil, this is too big, and also I didn’t wanted to add additional inductance in the primary resonance circuit as even the short wire going through such a ferrite would add a higher inductance than my whole primary coil. Instead, I used the advantage of my high frequency design, and tried using a air-coupled current transformer. This design will be evaluated within the next few weeks. -
Hardware Design Part 1
04/22/2019 at 15:48 • 0 commentsTo overcome these issues, GaN and SiC switches require some special gate drivers (eg. with a output voltage of -6 to 10V. The negative voltage helps to bias the gate against mentioned voltage spikes during turn-off.) located as close as possible to the switch.
(http://www.ti.com/lit/ds/symlink/lmg5200.pdf)
The latest schematics of the full design can be found here: https://github.com/NiklasFauth/pcbtc/blob/master/hardware/schematic_V1.5/pcbtc.pdf
We can separate the design in five functional blocks:
- STM32 microcontroller
- Flyback boost converter
- Feedback signal recovery
- Deadtime circuit
- GaN full bridge
Revisions
(three selected design revisions. From left to right: V1.0, 2018-11-22 - no dead time, bad power layout; V1.3, 2018.12.22 - dead time, first arcs, GaNs randomly die after 1-20min; V1.5, 2019-12-04 - good performance, good reliability - still room for optimization ;)
In total, it took 6 pcb and design revisions to get the current performance and reliability. This is mostly due to the very challenging requirements that come with the use of GaN switches. Some pcb revision could have been avoided if I would have followed the recommendations in the datasheet in the first place. Usually, you can interpret design guidelines and maximum ratings as "recommendations" - this is definitely not the case when it comes to GaN and SiC design. When TI writes about placing components "as close as possible" like they do on page 10, 13, 14, 15 and 16 of the datasheet - 8 times in total! - they really, really mean it like that. "Close" does not mean "nearby". "Close" does not mean "right next to it". "Close", in terms of low parasitic inductance, means: on the opposite of the board, right under the according pads, connected with as many vias as you can stick in there.I had to learn this the hard way - I might have killed 10 LMG5200 modules because I though I knew better. But more about layout considerations, later. Let's start with the easy stuff:
STM32 microcontroller
(yes, it looks like USB DN and DP are shorted - the schematic symbol is for a USBLC6-2SC6, but I'm using a USBLC6-4SC6. I'll fix this soon but no worries, it's just graphical)
There is nothing too special about this. I used the STM32F072 for this project, one of my favorite parts from the STM32 series. The STM32F072 is cheap, has a proper ARM M0 core, and supports crystalless USB operation by using clock recovery / syncing from the USB frames. So you get a decent Micro with USB and lot's of STMs powerful timer peripherals for under $1 that requires minimal external components. I used the QFN version because I find it much easier to solder than QFP.
Also, the STM32F072 has a DFU bootloader - this means you don't need any programer to flash the firmware. For the initial flashing, you have to temporally bridge a solder jumper on the back of the pcb - the tesla coil will now enumerate as a DFU bootloader device and you can flash the firmware eg. with dfu-util. Once flashed, you can press the button on the pcb to jump into the bootloader to update the firmware.
-
The coil design
04/21/2019 at 21:32 • 0 commentsI don't want to talk too much about how tesla coils (https://en.wikipedia.org/wiki/Tesla_coil), and more specifically dual resonance solid state tesla coils (DRSSTC) work, as there already is lots of great literature on that (https://www.easternvoltageresearch.com/documents/book_drsstcpreview.pdf).
Basically, a tesla coil consists of an air-coupled transformer with a very high turn ratio. Low AC input voltage is transformed to high AC voltage, that is, in case of the dual resonance system, additionally amplified by electrical resonance effects. This high voltage is concentrated at a small tip, the breakout point, where the local field strength it high enough to ionize the air and create the arc.
We can separate the design in two parts, the passive transformer itself, and the electronics driving it. Let's start with the transformer first, as this explains some of the design choices for the driving part.
Most of you probably already have seen a tesla coil
(cc by Johannes Müllers)
These devices are usually smaller than 1m in height, but almost always bigger than 10cm. This has a very good reason: As the transformer has no core other than air, and there is some limit to the number of turns the coil can has (usually in the range 200-1000), the secondary resonance frequency (the frequency of the LC oscillator defined by the inductance of the secundary windings and the capacitance of then top electrode to ground) is only defined by geometry. For a 30cm coil, this would be in the range of 200-300kHz.
Here lies the first problem: Building bigger tesla coils is actually easier than a very small one. For DRSSTCs, the power electronics driving the transformer is usually based on IGBT switches, sometimes MOSFETs. But even with very modern Si-based switches, the switching losses increase massively at a frequency >1MHz. For reference, most motor controllers use 15-25kHz. Your laptops power supply no more than 200kHz. My coil design is at 2.6Mhz.
Usually, you use isolated magnet wire around a plastic tube for the secondary coil. This has the obvious advantage that as the voltage increases towards the top of the coil, also the distance towards the sensitive power electronics and primary windings on the bottom increases. However, manufacturing these coils is a lot of hand work. You can't just buy them in arbitrary quantities.
PCBs, however, have become super cheap. You can get 10pcs 100x100mm dual layer pcbs for $5 at your Chinese manufacturer of choice. With 5mil tracing and 5mil spacing as required by most manufacturers, this gives you 190 turns on a 100x100mm pcb.
(left: bottom side with single primary winding, right: secondary winding with 190 turns)
There is nothing special really to these coils. It's really just a huge spiral going from the outside to the inside. I placed a circle of white silkscreen in the center the increase isolation a bit. The primary winding is a single turn. I also tried two and three turns (yes, I had to order new pcbs to test this, but it's just $5 so why not?) but as the secondary turns are already so low (190), you want to get maximum transformation ration. The primary winding is connected with pads to a XT60 high current connector, and the secundary winding has a pad in the center and a plated mounting hole on the low voltage side to connect the base point to the electronics for signal recovery and grounding.
Unfortunately, I was not able to create the gerbers for this in KiCAD as it interpolates circles with very bad resolution. I tried a svg to gerber converter but that also failed. I ended up booting my Windows VM and just used Altium Designer to create the files. Luckily, I did not have to change these files a lot, and you can find the gerbers on GitHub.
I ordered my coils at jlcpcb. They rejected the design because it failed the audit. Technically the design is perfectly within spec, however it is somewhat relatable: You're requesting 33m of thin parallel wire that cannot have a single short or open connection. Eventually I was able to convince them to make the board under the condition that I will not complain about the quality afterwards. Also, they did not make a e-test. However, checking the boards yourself is pretty easy: Just compare the resistance and inductance between the boards. If the resistance is ca 180 Ohm, there is no open circuit. If the inductance is very low compared to other boards, the coil has a short winding and is unusable. From the 70 coils (10 per design revision) I bought so far, only one had a short.
I'm using two coil pcbs stacked above each other. You can also use the design with just the bottom coil, but then the maximum discharge length is shorter (only 3cm) and the resonance frequency is much higher (4MHz), causing more switching losses. The two coils are almost identical, the only difference for the top board is that it does not have the primary winding on the back.
I also tried using a single pcb for all three coils (primary on bottom, smaller secondary on bottom, large secondary on top) which I though was a pretty nice design. Unfortunately this design went up in flames because the full voltage of the bottom and the top of the secundary coil is located opposite each other only isolated by 1.6mm FR4.
Connecting the two boards with wire can also lead to issues. Still this is currently the preferred option. Make sure to use wire with good isolation. Keep it as short as possible so it doesn't touch anything. Make the solder joints on the pads perfect so the are perfectly round and have no spikes. Add some layers of capton tape as additional isolation or your coil looks like this:
(https://twitter.com/JanHenrikH/status/1116077294865481733)
The boards are separated by 8mm spacers, screwed together with nylon screws. The spacers to the power board have to be conductive and are 40mm long.
I'm using a spring pressure pin of an IC socket to plug in the wire used as the breakout point as inspired by Daniel (http://www.megavolts.nl/en/projects/tesla-coils/201-pcb-spiral-teslacoil-en).
This was the easy part and is mostly state of the art.