Because most of the sound-reactive and control circuitry on this project borrows heavily from my DJ Jacket, I'm focusing most of this section on the power electronics portion of the circuit.
Building a Transformer
Finding a transformer that suited my needs was no easy task. Most transformers have winding ratios that rank up to maybe the 1:8 range, but nothing close to the 1:20 range that I needed. This meant that I would have to wind my own transformer.
Selecting a Core
To create my transformer, I would first need a core. I decided to go with a E-core topology for this design because it provides an easy method for doing a lot of windings and offers very good coupling between the primary and secondary.
I was a little bummed to find that Digikey and Mouser have a paltry at best selection of ferrite inductor/transformer cores. I think these kinds of parts are sometimes best to order straight from manufacturers like Micrometals, but I was in a hurry and wanted to order them from a proper store. I ended up settling on Newark. They had a paltry but not nonexistent selection of E-cores.
I was trying to find a mid-range sized transformer core because I didn't want it to be too small like the puny EL wire transformers that I had before and suffer saturation issues, but I also didn't want it to be too bulky to carry around. I really didn't have much to choose from, so I just picked the ETD-29 size core and bought a bobbin to go with it. The idea is that you wrap the wire around the bobbin and then insert an E-core into either side.
Here's a photo of a similar configuration with their ETD-39 model (it's a little larger):
The bobbin makes winding the transformer much faster as you don't need to feed the end of the wire through any kind of hole like you would with a toroid topology. The E-cores joined together should provide a lovely low reluctance path for the magnetic flux. If you're interested in how this works, check out this post.
If you plan on buying transformer cores from Newark, let me warn you. Make sure you specify during check out that you want special packaging for your cores. I didn't do this the first time and got this in the mail:
They were protected well from outside threats, but there was nothing protecting them from each other. Newark was very accommodating and sent me a new pack free of charge.
Winding the Core
Before winding the core, you have to determine how many windings you will need. I know that my secondary will need about 20x as many as my primary, but I don't know what my primary needs.
If you remember from before, I need a primary transformer inductance of at least 170H. Looking at the datasheet for my new core, I found a table on page 2 that specifies with units of nH (my core is made out of the 3C90 material).
I had to look around to find out what signified, but I found it to be a ratio of the inductance of the coil relative to the number of windings squared. It makes sense to determine it this way as you'll remember from before that inductance is proportional to . So let's figure out how many windings we'll need.
So I need 8.5 turns on my primary, and 20 times that on the secondary. Just to be safe (and when you take into account my previous blunder on transformer size requirements, I'm being very safe here), I rounded up to 15 turns for the primary. This works out to a required 300 for the secondary.
I used 24AWG enamel coated magnet wire to wrap my core. This is a fairly thick wire especially considering I'd be doing 300 turns on the secondary winding, but because I had so much extra space on the oversized core, this didn't really present a problem.
I did end up falling a little short on space though. I ended up using just 270 or so turns on the secondary. This isn't a huge problem, it just requires a slightly higher duty cycle to reach the desired output voltage.
I borrowed the Agilent LCR meter again and took some measurements of my transformer windings. Here's the primary:
This number is a little concerning. According to the data sheet, 55.4H on the primary equates to:
4.85 turns! That's terrible! Okay, so it's technically enough to work. Remember how I only technically need around 31.7H on the primary? I'm getting well over that here. Further adding to that, I actually took all of these inductance measurements after taking the transformer off of my completed and functioning circuit, so it's clearly not the end of the world. It still seemed odd that I was getting values so low.
That's when I noticed this part of that table:
My cellophane tape clearly wasn't applying anything close to 40 Newtons of force to the two halves. The small air gap between them was adding a huge amount of reluctance to the magnetic circuit and reducing my inductance by a large margin. Adding some tighter electrical tape helped out a lot:
And applying additional force with my hand gave me this:
Wow! that's a big change. Using this number:
14.29 turns is much closer to the 15 turns I was looking for. Sow how is this supposed to work? Did I assemble my core incorrectly? The answer is yes. Newark also sells a metal clip that holds the halves of the E-core together with quite a bit of force.
I knew these clips existed. I just didn't quite realize how much force was needed. I guess that's the one downside to an E-core over a toroid or other topology. If I were to design this again, I would use the clip, but for the time being, my transformer is fine.
There is something of a science to winding transformers. The goal is to keep everything very neat and very tight. Why is this? Firstly, it enables you to fit more windings on the core. Secondly (and more interestingly), it's to prevent leakage.
In an ideal transformer, all of the magnetic flux generated by the primary winding makes it to the secondary winding. In reality, some of this flux will leak out between the coils and cause the transformer to behave differently. If some of the flux from the primary winding doesn't make it to the secondary, then you can think of that flux as contributing to the "leakage inductance" of the primary. Essentially, it's like you have a totally separate inductor on the primary that in no way affects the secondary.
Here's a doodle of an exaggerated example of leakage inductance that might help explain it:
Nobody is going to wind their transformer that poorly, but you can imagine how little gaps here and there on a normal transformer can contribute to magnetic fields leaking out (pink arrow) and not passing through the secondary. It's important to note that in a lot of cases, the magnetic fields that leak out are not passing through the transformer core so the energy stored in them will be orders of magnitude less than the energy actually making it to the secondary winding.
Measuring the leakage inductance is easy. By shorting out the secondary winding, you can ensure that the current induced in the secondary winding will very nearly cancel out all of the magnetic field built up by the primary. This essentially negates your whole transformer and all that's left is the leakage inductance that is not affected by the secondary.
Attaching an LCR meter after shorting the secondary allows you to directly measure the leakage of the primary.
6.2 isn't that bad. Now, here's the really cool part. After tightening up the E-core halves in the above section using electrical tape (which increased my inductance by a factor of 4), I took another measurement of the leakage inductance:
Almost zero change. This is evidence that all of my leakage inductance is due to magnetic fields that are passing outside of my magnetic core as predicted and are unaffected by the changing core topology. SCIENCE!
There isn't a whole lot to be said for the output cap. I just had to make sure I bought some that could take the voltage. I ended up using a few .01uF/200V caps in parallel.
Now we can finally move on to putting it all together!