HTCC (Hydra Tesla Coil Controller)

Goodchild, Tue Dec 31 2013, 06:30AM

So I was getting feed up with all these different controllers laying around for different types of coils QCW, DRSSTC, SSTC, and the list goes on. Not to mention new ones we may have not even thought up yet (I have a couple ideas brewing *wink wink*).


So I set out to design a configurable Tesla coils controller. The forum talk a while back and my recent activity at work with FPGAs prompted me to put an FPGA at the core of my design. Why you may ask? Configurability, power, and compactness. I opted to us a Xilinx Spartan 3AN series part in a BGA-256 package. Mainly because it was non-volatile, cheap, easy to use, and had lots of head room for large future designs.

And whats an FPGA without a way to talk to the world of analog? So I also add a Maxim 105Msps 10-Bit differential ADC. This ADC will be used to track the tank current, base current, or whatever is to be used for feedback in the system. Additional I plan to have a lower speed AUX ADC for sampling a second signal like an audio source.

Gate drive was also important, so I designed a new compact dual independent GDT driver. This drive should be capable of driving full bridges-half bridges or whatever in a variety of modes like pulse-skip,ZVS ZCS, etc.

I currently have VHDL code written and working for a couple different operating modes including a regula DR with digital phase lead!

All power supplies on board are switching so no heat smearing linears. Also featured on board is power-on-reset and UVLA for all supply rails.

To top it all off the board is the same exact form factor as Steve wards popular UD2 right down to the fiber placement, making it a drop in replacement for already built coils.

I'm currently in the process of laying out the PCB and with any luck it will be done some time soon. I will try and update this thread with progress now and again.

Well I'm beat and it's time for sleep!

11662596656 23e4667d81 C


UPDATE 1/3/14

Today I finished the board layout corrected it for DCR errors and checked all the pads for sizing. The next step is to have a couple prototype boards fabricated. After that it will be small scale testing time on one of my small DRSSTC.

After my initial alpha testing is complete I would be happy to see what the 4HV community could do with the controller.

As I said before it is the same exact form factor as the UD1 and UD2, with the same fiber placement. With the addition of a fiber transmitter for sending serial data back to a micro or computer over a fiber interface. Both pads are provided to populate the board with ST style or industrial fiber-optics style RX and TX units.

Final board Specs:



11741611325 03511bdbe7 C

11742006954 Dd0cd4995b Z
Re: HTCC (Hydra Tesla Coil Controller)
Sigurthr, Tue Dec 31 2013, 08:09AM

Awesome! I love seeing new developments like this! Will the mode selection be done by hardware or software? (Would the user have to reprogram to switch modes or parameters?)
Re: HTCC (Hydra Tesla Coil Controller)
Sulaiman, Tue Dec 31 2013, 10:13AM

WOW !

a long way from a cap and a gap !

may I suggest one addition, a DC Bus current monitor.
for industrial motor drives the current sensors save a lot of silicon,
not foolproof but probably worth the little extra,
especially during development to save those OOPS! moments.

just out of curiosity, can you fit it onto a double-sided pcb or is it multi-layer?
(I hate fault-finding multi-layer pcbs, make the inner tracks extra wide)
Re: HTCC (Hydra Tesla Coil Controller)
Goodchild, Tue Dec 31 2013, 02:52PM

The mode of operation is currently changeable via a firmware change, however it would be a simple task to change it so that the mode was switchable without re-uploading the firmware. The FPGA has plenty of head room; a regular DRSSTC driver (no phase lead) only uses about 1% of its recourses.


I was already planning on having an AUX ADC with maybe 8 channels or so for this very purpose, audio input, temp monitoring, v- bus I-bus you name it. It can be very application specific, but the hardware will be available to use on board.

The first version of the board doesn't have this feature because it's more of just a test bed for the FPGA and legacy hardware. The second rev however will included the multichannel ADC and also a fiber TX unit for sending data back to a computer or controller of some kind for display.

I will most likely put some boards up for sale after they are complete so that people can develop their own application firmware or they can modify some of my base software.

If anyone has any suggestions or futures you think might be useful please add them here! This is the time to add them before I set the board in stone (or rather FR4).


It for sure has to be 4-layer It has 4 different voltage rails and high speed parallel bus running in the 10s of MHz. Not saying it couldn't be done on 2 however I rather just spend the extra $30 a board and save myself the headache later.
Re: HTCC (Hydra Tesla Coil Controller)
Shrad, Tue Dec 31 2013, 05:40PM

a nice thing to use your 10 channel ADC would be some programmable logic blocks between values, so you can implement custom logic for some combinations of values, by plugging it into a usb port? I don't know whether it would be useful or not in TC use, but it could be a nice idea
Re: HTCC (Hydra Tesla Coil Controller)
Goodchild, Sat Jan 04 2014, 01:37AM

I updated the thread with some more details in the original post.
Re: HTCC (Hydra Tesla Coil Controller)
Dr. Drone, Sat Jan 04 2014, 05:54PM

shades
Re: HTCC (Hydra Tesla Coil Controller)
Mads Barnkob, Sat Jan 04 2014, 07:55PM

That is one beautiful board and feature rich for that sake!

But oh do I fear having to trouble shoot on a 4 layer board with a FPGA programmed in something I do not understand or have installed ;) There is a reason for me sticking with throughhole components.

Re: HTCC (Hydra Tesla Coil Controller)
Goodchild, Sun Jan 05 2014, 03:03AM

Mads Barnkob wrote ...

That is one beautiful board and feature rich for that sake!

But oh do I fear having to trouble shoot on a 4 layer board with a FPGA programmed in something I do not understand or have installed ;) There is a reason for me sticking with throughhole components.




If it makes you feel any better, only the power and ground layer are internal.
Re: HTCC (Hydra Tesla Coil Controller)
Hydron, Sun Jan 05 2014, 09:30AM

Mads Barnkob wrote ...

That is one beautiful board and feature rich for that sake!

But oh do I fear having to trouble shoot on a 4 layer board with a FPGA programmed in something I do not understand or have installed ;) There is a reason for me sticking with throughhole components.



While BGAs etc are a massive pain to debug or DIY, don't be afraid of the larger SMD parts. I find anything down to SOIC/0805 size _easier_ to deal with than throughhole, as there are no wires to bend, snip, drill holes for etc, and they take much less room. I've even had good results down to TSSOP/0603 size on home etched boards, though that requires more care and better eyes/magnifiers.

As for FPGAs, they are fantastic devices for certain applications. I'm lucky enough at work that our products are cost insensitive enough for us to be able to use them extensively, giving us a ton of flexibility to implement and change product functionality after the hardware design stage. Coding for them is also not too bad once you adjust to the different paradigm of parallel hardware vs sequential software operation, though there are many little pitfalls, especially with regards to signal timing. I highly recommend people having a play with them if they get the chance, though unfortunately they aren't readily available in hobbyist packages/dev kits as many microcontrollers are these days.
Re: HTCC (Hydra Tesla Coil Controller)
Goodchild, Sun Jan 05 2014, 07:20PM

Hydron wrote ...

Mads Barnkob wrote ...

That is one beautiful board and feature rich for that sake!

But oh do I fear having to trouble shoot on a 4 layer board with a FPGA programmed in something I do not understand or have installed ;) There is a reason for me sticking with throughhole components.



While BGAs etc are a massive pain to debug or DIY, don't be afraid of the larger SMD parts. I find anything down to SOIC/0805 size _easier_ to deal with than throughhole, as there are no wires to bend, snip, drill holes for etc, and they take much less room. I've even had good results down to TSSOP/0603 size on home etched boards, though that requires more care and better eyes/magnifiers.

As for FPGAs, they are fantastic devices for certain applications. I'm lucky enough at work that our products are cost insensitive enough for us to be able to use them extensively, giving us a ton of flexibility to implement and change product functionality after the hardware design stage. Coding for them is also not too bad once you adjust to the different paradigm of parallel hardware vs sequential software operation, though there are many little pitfalls, especially with regards to signal timing. I highly recommend people having a play with them if they get the chance, though unfortunately they aren't readily available in hobbyist packages/dev kits as many microcontrollers are these days.


I agree, FPGAs, are not common in hobbies friendly packages. The only FPGA in the spartan 3 series that is in a non-BGA pack was to small (logic wise) to properly implement this design.


However if used properly they can still be very easy to debug. BGA is electrically superior to other large multi-pin SMD packages.


In honesty I think BGAs just seem difficult to most hobbyist who have not tried them. They are simple to solder with ether a hot air station or toaster over re-flow.
Re: HTCC (Hydra Tesla Coil Controller)
Goodchild, Sat Jan 25 2014, 02:24AM

So update, boards came in and I'm now assembling them. So far I have all the power supplies up and working. The POR is also functioning as expected.

POR operation
12126803973 C539b6028c Z


12126518165 A5ee404960 Z

12126913674 9dec2253c7 Z

More to come after I get the FPGA soldered on.
Re: HTCC (Hydra Tesla Coil Controller)
Mads Barnkob, Thu Apr 17 2014, 06:18PM

It would be nice to get updates on this project, if you have had time to work on it that is :)
Re: HTCC (Hydra Tesla Coil Controller)
Goodchild, Fri Apr 18 2014, 04:22PM

Well, I have not had much time to work on it lately with finals creeping up. I did manage however to get a FIR (finite impulse response) filter implemented and working. The FIR is used to produce the phase leaded signal digitally inside of the FPGA.

FIR filters can mimic most hardware filter typologies. Mine is 4 tap and works using the built in hardware multipliers. I have tested the filter in both simulation and hardware and it works very well! Much easier to tune than the old hardware approach. A pot and ADC can be used or it can be set digital via a communications interface.

I will update more on this project when finals are finished and I get some time to work on it.
Re: HTCC (Hydra Tesla Coil Controller)
Steve Conner, Sat Apr 19 2014, 11:17AM

Very cool! :D As I mentioned before, I am willing to buy one and contribute to development.
Re: HTCC (Hydra Tesla Coil Controller)
Goodchild, Sat Apr 19 2014, 03:54PM

Steve Conner wrote ...

Very cool! :D As I mentioned before, I am willing to buy one and contribute to development.


Sounds good Steve, do you have a way to solder BGA? If not I can solder the BGA on. I do however need to make a couple revisions to the board. Maybe after I finish finals up I will get back into the project some more. If you want to put up with some minor errors in the board and solder on your own BGA I have an extra board that I could send you to experiment with in the mean time.

I'm considering moving down to the QFN-100 package Spartan 3AN, because of the excessive amount of power this one has, it's not really necessary to have 200k gates for this type of controller.
Re: HTCC (Hydra Tesla Coil Controller)
Thomas W, Sat Apr 19 2014, 04:49PM

Goodchild wrote ...

Steve Conner wrote ...

Very cool! :D As I mentioned before, I am willing to buy one and contribute to development.


Sounds good Steve, do you have a way to solder BGA? If not I can solder the BGA on. I do however need to make a couple revisions to the board. Maybe after I finish finals up I will get back into the project some more. If you want to put up with some minor errors in the board and solder on your own BGA I have an extra board that I could send you to experiment with in the mean time.

I'm considering moving down to the QFN-100 package Spartan 3AN, because of the excessive amount of power this one has, it's not really necessary to have 200k gates for this type of controller.

How much cheaper would that be out of curiosity?
Re: HTCC (Hydra Tesla Coil Controller)
Goodchild, Sun Apr 20 2014, 05:35PM

Thomas W wrote ...

Goodchild wrote ...

Steve Conner wrote ...

Very cool! :D As I mentioned before, I am willing to buy one and contribute to development.


Sounds good Steve, do you have a way to solder BGA? If not I can solder the BGA on. I do however need to make a couple revisions to the board. Maybe after I finish finals up I will get back into the project some more. If you want to put up with some minor errors in the board and solder on your own BGA I have an extra board that I could send you to experiment with in the mean time.

I'm considering moving down to the QFN-100 package Spartan 3AN, because of the excessive amount of power this one has, it's not really necessary to have 200k gates for this type of controller.

How much cheaper would that be out of curiosity?



I only currently have one extra and Steve expressed interest in it first. I want to get the bugs worked out before I release a board to the public. As soon as I make the revision you guys are more than welcome to have a board to experiment with.

As I mentioned I want to switch it over to a QFN type package to aid with soldering.
Re: HTCC (Hydra Tesla Coil Controller)
Thomas W, Sun Apr 20 2014, 05:58PM

Goodchild wrote ...

Thomas W wrote ...

Goodchild wrote ...

Steve Conner wrote ...

Very cool! :D As I mentioned before, I am willing to buy one and contribute to development.


Sounds good Steve, do you have a way to solder BGA? If not I can solder the BGA on. I do however need to make a couple revisions to the board. Maybe after I finish finals up I will get back into the project some more. If you want to put up with some minor errors in the board and solder on your own BGA I have an extra board that I could send you to experiment with in the mean time.

I'm considering moving down to the QFN-100 package Spartan 3AN, because of the excessive amount of power this one has, it's not really necessary to have 200k gates for this type of controller.

How much cheaper would that be out of curiosity?



I only currently have one extra and Steve expressed interest in it first. I want to get the bugs worked out before I release a board to the public. As soon as I make the revision you guys are more than welcome to have a board to experiment with.

As I mentioned I want to switch it over to a QFN type package to aid with soldering.


Its not so much that i wanted one (though i do, but i wouldn't be able to use it as of now) it was just more to do with how much cheaper it would likely be with that chip rather then the other.
Re: HTCC (Hydra Tesla Coil Controller)
Hydron, Mon Apr 21 2014, 12:51AM

The $10 difference in FPGA price is pretty insignificant in the bigger scheme of things. More important is how DIYable it ends up - avoiding a big BGA which can't be inspected after soldering is worthwhile.

Out of interest, are 100-QFN Spartan 3ANs even available? A quick check on digikey/xilinx sites showed a 144TQFP as the lowest pin-count package, no QFN to be seen. QFP would probably be a bit kinder anyway to those without hot air/reflow ovens, but is a bit bigger (22x22 vs 17x17 mm footprint for the BGA).
Re: HTCC (Hydra Tesla Coil Controller)
Goodchild, Tue Apr 22 2014, 03:05PM

Hydron wrote ...

The $10 difference in FPGA price is pretty insignificant in the bigger scheme of things. More important is how DIYable it ends up - avoiding a big BGA which can't be inspected after soldering is worthwhile.

Out of interest, are 100-QFN Spartan 3ANs even available? A quick check on digikey/xilinx sites showed a 144TQFP as the lowest pin-count package, no QFN to be seen. QFP would probably be a bit kinder anyway to those without hot air/reflow ovens, but is a bit bigger (22x22 vs 17x17 mm footprint for the BGA).



ahh you are correct the 144TQFP is the smallest one, for some reason I thought it was in a QFN100. The plan is to move down to the XC3S50AN (144 TQFP), however under further observation it only seems to have 3 multipliers. My current phase lead FIR filter design uses 4 taps (4 multipliers). It will probably still work with 3 but I hate to degrade performance.

And yes price is not the driving factor, using the smaller part makes it solderable via iron or hot air, a lot more common than the big old IR reflow ovens/BGA rework station needed for BGA work. The last reason is that the other part is very much overkill, I'm currently utilizing less than 2% of the gates on the 200AN.

13970874794 A79cfc21d0 C
Re: HTCC (Hydra Tesla Coil Controller)
Steve Conner, Tue Apr 22 2014, 04:27PM

Could you use some sort of state machine to make one multiplier compute several taps?
Re: HTCC (Hydra Tesla Coil Controller)
Hydron, Tue Apr 22 2014, 10:44PM

Steve Conner wrote ...

Could you use some sort of state machine to make one multiplier compute several taps?
Hah, it's much easier than that! You just use too many multipliers and the logic synthesis tool will transparently make more out of standard gates.

I once made a colour space (gamut) converter in an Altera Cyclone 2 5k logic element FPGA which required 18x 18-bit multipliers running at ~150MHz. Despite only having 13 in hardware it synthesized and ran fine, just used a decent chunk of logic to make the rest. I can't recall exactly how much it used but I had easily enough space. I was however surprised they ran quick enough, even when optimizing for speed rather than size. You could easily test if your 4-tap design would fit in the smaller Spartan 3AN by compiling your existing design for the smaller chip.

Do you have any design info you'd be willing to share at this stage? I'm currently designing a new (DR)SSTC driver largely based on Steve Conner's PLL circuit, but all the FPGA talk is inspiring me to ditch all the discrete logic and put in a CPLD/FPGA, so I'm interested in how you're doing yours. All good if you're not ready to release anything, I know what I'm doing and my design would be substantially different anyway.
Re: HTCC (Hydra Tesla Coil Controller)
Steve Conner, Wed Apr 23 2014, 08:05AM

As it happens I am also interested in "porting" my PLL driver to a FPGA. smile The PLL can be done on a microcontroller, it doesn't really need the power of an FPGA, but I think the FPGA is the way forward generally.

I'd like to see different kinds of drivers available as open-source IP cores for hobbyists to modify and tinker with.
Re: HTCC (Hydra Tesla Coil Controller)
Hydron, Wed Apr 23 2014, 12:10PM

Steve Conner wrote ...

As it happens I am also interested in "porting" my PLL driver to a FPGA. smile The PLL can be done on a microcontroller, it doesn't really need the power of an FPGA, but I think the FPGA is the way forward generally.

I'd like to see different kinds of drivers available as open-source IP cores for hobbyists to modify and tinker with.
The more I look at this stuff the keener I am to have a play with it. Given that we're unlikely to be playing with frequencies higher than a few hundred kHz, all the crusty analogue/4000 series stuff should be replaceable with a bunch of glue logic in the FPGA and an all-digital PLL made of a phase detector, digital filter and a numerically controlled oscillator. A PLL based driver doesn't even need a fast ADC like Eric's (though it's probably worthwhile to add for implementing current limiting etc and general flexibility). Obviously there are some limitations like the lack of phase lead on the first few cycles (I'm assuming the PLL takes a while to lock into perfect zero-crossing switching), but the flexibility of the digital implementation should let us do stuff on the fly that's impossible with trimpots etc.

I can guarantee there will be some gotchas along the way (and a fair bit of work), but I think I'll put off building an analogue/4000 series driver and have a play with some FPGAs first.
Re: HTCC (Hydra Tesla Coil Controller)
Steve Conner, Wed Apr 23 2014, 01:03PM

Yes. My Mk2 PLL driver is 8 years old, well due for a redesign, and FPGAs are much more accessible now.

From what I hear, Steve Ward has now gone over to a digital PLL implementation for the Arc Attack coils and likes it. He did it exactly the way you said, except using a microcontroller. The NCO is one of the timers, and the digital loop filter is done in software.

The Prediktor style phase lead drivers also suffer from hard switching on the first few cycles.

I found that I could tune out the hard switching with the PLL, but at the cost of making the system unstable. When tuned for no hard switching on the initial cycles, it starts out balanced exactly between the two pole frequencies and can't decide which one to settle onto.

I think the same limitation applies to the Prediktor even if the phase lead circuit were mathematically perfect. It's not an issue in practice because the primary current is low during the first few cycles.
Re: HTCC (Hydra Tesla Coil Controller)
Goodchild, Wed Apr 23 2014, 03:09PM

I have found that will a FIR filter the first cycle is no longer an issue. The driver will lock into phase lead near instantaneously. The other nice thing about the FIR is that it’s inherently stable, however this comes at the cost of large hardware implementation due to the big multiply/accumulates needed. This is typically why you don’t see them implemented in MCUs, rather you see it's cousin the IIR filter instead.

I could implement the FIR with 3 taps and have it work without issue most likely. Pipelining could also be added at the cost of speed.
In regards to the ADC, the FIR that can also tolerate a much slower ADC than what I’m using now. I may downgrade to maybe a 10Msps ADC from the 100Msps. This would help with cost significantly as my current ADC is about $24 per unit.
Re: HTCC (Hydra Tesla Coil Controller)
Wolfram, Thu Apr 24 2014, 08:34AM

Excellent project! I can only start to imagine the things which will be possible with such a flexible controller.

Have you looked at the Lattice MachXO2 series of devices? Like the Spartan 3AN, they come with built in configuration flash, and they are available with up to 2k macrocells in TQFP100 and 7k macrocells in TQFP144. It's difficult to compare FPGAs across different families, but I believe these chips are similar in capacity to the XC3S50AN and the XC3S200AN respectively, in a smaller package. They don't seem to have built-in multipliers, but they have almost twice as many macrocells, which should make up for that. They also come with a built in oscillator, and the -HC ones have the core voltage regulator internally as well.

I've bought a couple of very cheap developement boards with these devices mouser.com/ProductDetail/Lattice/LCMXO2-7000HE-B- EVN/?qs=sGAEpiMZZMsnjpsy% 2frzfANGJheEjgAAzmuF4C2z9mA0%3d . I've done some quick tests with them, and the free version of the toolchain seems to be quite similar to ISE and Quartus.

Out of interest, how many taps do you use for the phase lead FIR filter? I would be very interested in looking at the HDL and checking how much resources it uses on these FPGAs without dedicated multipliers, if you're willing to share the code.