This was a hardcore learning project, and turned out to be essentially a study in magnetics, SPICE, and research methods. Parts of this post are a bit naive in retrospect, but are included anyway to demonstrate the learning process. I will have other blog posts that don't include quite so much of my own thought processes.
Introduction & Inspiration
There's a guy on Twitter - Rue Mohr - who does a lot of interesting little projects and posts about them in threads. One of his endeavors in particular caught my eye since it involved using an interesting property of magnetic cores to make an oscillator. He was using it to make a voltage converter with a respectable 24W power output, voltage converter and oscillator all-in-one. I wanted to build one in order to better understand magnetic principles, since I've been relying on essentially heuristics up till now when using different cores. I also just hadn't heard of that kind of oscillator that could run a load all by itself before, and as it turns out they are a very useful circuit.
Anyway. I'm new to them, but as far as I can tell the basic principle of a Royer oscillator is that when the magnetic core of a transformer enters saturation it stops being a very good transformer - allowing you to sort of back-drive it. The secondary winding loses its ability to maintain a certain current, and that property can be used to switch the gate or base of a transistor. Another way to say this is that there is a temporary positive feedback fed to the switching elements. Magnetic saturation depends on several factors, but the basic concept relies on the magnetic flux density reaching a point that the magnetic core can't "hold" any more.
Testing
The first core I'm playing with is a "binocular" core, I think typically for RF applications. They have a very high inductance, higher than what you often get for normal toroidal inductors. This test core is a BN43-202, and the first windings I've put on it are just 18 turns (18T). In the image below, the core is fed a "square" wave from a IR2011 driver, at roughly 10kHz. The point at which the blue voltage (representing the current, since it's the voltage over a 1 ohm resistor) starts to rise exponentially is where the inductor has entered saturation. In this case, it's about 100mA. From the start of the driving waveform to saturation is about 30us.

Rue Mohr uses a sort of normalized variable, he says "its sort of the inverse of the saturation flux times the area". This will be called
For me, N=18, t=30us, and V=0.1 I think. I don't understand this yet, and so will try and go into it further. The basic idea is still to figure out when the core saturates, or essentially the maximum amount of magnetic flux that the core can 'hold'. I think this can also be expressed in flux density, which is "the measure of the number of magnetic lines of force per unit of cross-sectional area". I know some manufactures of cores actually put these values in the datasheet, or at least values that make it possible to calculate the maximum flux density. I found a couple places to look, notably Rowaves has the same core and links to fair-rite for values. Something to examine in the future would be Micrometals it looks like, they have a lot of different core materials that I don't recognize.
As a reminder,

Theoretically, the maximum gauss that the core can sustain is about 2200, before it flattens out. I'm greatly regretting picking the binocular core as an example piece to work on, since it doesn't provide normal and easy to follow magnetic paths. Easy for me to follow, that is.
Trying to Figure Out The Physics
I worked on this problem with my brother-in-law Josh Barksdale for a bit, he's generally better at math and figuring out how equations can be made to describe the physics I'm trying to figure out. Our first approach was to use the solenoid equation from "icalculator" - example 4. It gives the equation for the gauss the center of a loop of wire to be:
Notice that this uses the permeability of free space (
Some experiments were done, trying to figure out if a few different cores would saturate when predicted. They did not. And actually the test circuitry for measuring saturation is a challenge in and of itself. I will cover some notes on that in a section below.
After figuring out the first approach was probably doomed, we moved on with further research. In example 5, a solenoid, the equation is given as:
Note that the radius variable is now gone, which I believe implies that the magnetic field density is about constant in the center of the solenoid. I'm not sure why this is, but this is probably a bit more relevant for our project which involves wires wrapped like a solenoid around toroidal cores (aka donut shaped). Not all cores are toroidal though, and I would sort of like to know the equations that you use to figure out the equivalent gauss in complicated cores. I'm sure integrals would be involved.
I also happened to receive a relevant book as a Christmas gift, which turned out to have most of the answers. The book is one of the holy grails of electronics, "The Art of Electronics: The X Chapters"! Their section on inductors covers saturation, and gives this handy equation for saturation (at DC, eq. 1x.16, see [1]):
The magnetic path length
For easier calculations and simulations I found an FT50-43 core, a fairly common one in my experience. It's a bit easier to find the magnetic path length for this guy, and hopefully it will be fairly saturable. It's the same material as the previous test core, but instead of a binocular core it's a toroid.
From the book,
I feel like this video deserves to be mentioned here - he makes some things clear that weren't clear to me before. First off, he concludes that the flux inside of the toroid would be
More Physics
For me, and I suspect many other people, the best way to understand how to design circuits is to really understand the related physics principles as much as possible. For this research project I would really love to be able to examine flux density in various core configurations, and how it relates to current and other variables. This might be possible with a lot of elbow grease, an excellent understanding of Maxwell's equations, gross oversimplifications of the bodies involved, and many hours of work. After a bit of mind-liquefying research, it looks like there are analytical (simplified versions for specific shapes) methods out there, but a really common approach is to use some kind of numerical method. Indeed, a good search term for studying these things is "computational electromagnetics". And for open source programs that use different methods to accomplish these simulations, I found this post with a good overview.
For me, the programs of interest are primarily:
OpenEMS, it uses FTDT and you can interact with it using Octave and python. Seems like a smaller/simpler project, potentially doing a lot less work for you but being easier to understand at the same time. Lots of links are broken at the time of writing, use the wayback machine to access more tutorials. There are also examples in the github code if you look hard enough. I couldn't get the python bindings to install correctly.
ElmerFEM, uses FEM methods, has a GUI and some circuit specific tools. Also has a ton of lectures/presentations available on Youtube if you're willing to wade through them. Difficult to install on Ubuntu 22.04 at the time of writing. Examining the various manuals, tutorials, and github test code is recommended.
If I were more time-smart, and rich, I would just use one of the commercial packages. There's several available, at least one of which integrates with Solidworks and looks to be pretty easy to use.
I spent a good bit of time messing around with ElmerFEM, specifically because it has a GUI and is therefore a bit easier to stab at. I followed a few thermal tutorials successfully, and even got it to do some interesting voltage gradients, but the level of understanding required to set up magnetic simulations escapes me. I also started to run into problems with mesh creation, seemingly simple meshes would eventually crash the program as it tried to process them. I didn't get the python bindings for OpenEMS working, and so didn't really play with it.

Measuring
The biggest problem with trying to measure
Hence if
The approaches I've found that I believe are capable of measuring
Subjecting the inductor to a square wave - I did this first by using small npn/pnp transistors in a totem configuration, and then with an IR2011 MOSFET driver
Attaching the inductor to a constant voltage source and toggling a switch to ground - include a free-wheel diode to prevent massive voltage spikes when the lowside switch turns off. I've done this as well with similar results as the other method
Make a transformer instead of an inductor on the core, measure the current in the secondary and primary - increase the current in the primary until you start to see the K factor decrease. I haven't tried this yet, it would be best done with a sine-generator and I don't have a convenient one strong enough. LTSpice hints that a square wave feed would work as well.
I will be building a couple half-bridges soon, and the two kinds I have designed should be able to test just about any reasonable inductor I'm liable to run across. I will attempt to add some more core measurements when I have those constructed.
And actually it should be possible to get a rough idea of
Design Equations
This is my attempt to put together some equations to make these things easier to build.
Time it takes to reach
Solving for
That should be a half-period (inductor enters saturation twice for a given cycle), so the frequency should be:
So, with the following values for our FT50-43 test setup:
= 800 = 10 = 5 volts = 0.3 tesla = 4.8 uH = 0.0295m
... We get 591kHz, or 0.845us per half-cycle. Which disagrees strongly with both LTSpice & the real circuit. Actually we're off by essentially a factor of 10. And, according to the generic toroids calculator, with 10 turns on an FT50-43 core I should have more like 44uH. With that value, we get a frequency of more like 64.5kHz which is much closer to the realm of possibility. Actually funnily enough it's about in the middle between LTSpice and the real circuit. When I first measured the core, my inductance meter thought it was 4.8uH, but with a good ol' double check it sure enough read 43.8uH instead. Oops.
So, we hopefully now have a fairly generic design equation for this kind of oscillator, which is what I set out to make in the first place. I would like to test it some more, but don't have a lot of time as of writing this blog post! Hopefully I can revisit this again soon, and run further tests to see if my model holds out.
Results
Despite the physics, it turns out these really aren't that hard to build. I have built 2 so far, just out of some fairly high permeability cores I was pretty confident would work based on heuristics.

The oscillator constructed from an FT50-43 core ran around 76KHz, depending on input voltage the frequency would go up or down.

The EMI choke based oscillator ran at a much lower ~10kHz rate. I also noticed that at low voltages (starting around a volt or two) the frequency would be inversely proportional to voltage instead of the other way around like it normally was. The EMI choke also had a roughly 2:1 secondary winding, and in the image the second (lower) trace is from that secondary winding. The oscillator still functioned when the secondary winding was loaded (even loaded heavily), although loading of the secondary winding did result in marked changes of frequency.
What I've Learned
Again, this is always the most important part! In this project I covered a lot more stuff than I was originally intending. I learned a lot about how to read a manufacture's datasheet on their magnetic core, and I also learned about some new magnetics manufactures to look for in the future. I also learned how to simulate non-linear transformers (and inductors for that matter) in LTSpice using the 'Chan' model. I studied Maxwell's equations and got to a slightly better understanding of them and their implications. And, I learned how to build (assemble) simple Royer oscillators.
If I was to draw some more general conclusions from this project, I would say it reinforced using simulations to better grasp the concepts of a certain circuit. To that end I think I should get better at making mathematical models to use math-specific programs like Octave (or Matlab) for simulation, and I should work on improving my skills with tools like ElmerFEM. I think I could have also saved some time by directly studying the first Royer oscillator paper (if such a thing exists) and building something based on that. I spent a good deal of time messing with a flawed MOSFET circuit I had badly copied from a forum user, that probably hadn't even built a saturating magnetic oscillator in the first place. I could have saved that time by getting a better picture of possible circuits before jumping ahead to the physics.
References / Sources Studied:
[1] P. Horowitz and Winfield Hill, The art of electronics : the x-chapters. Cambridge ; New York, Ny: Cambridge University Press, 2020. [2] J. H. Chan, A. Vladimirescu, X.-C. . Gao, P. Liebmann, and J. Valainis, “Nonlinear transformer model for circuit simulation,” IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, vol. 10, no. 4, pp. 476–482, Apr. 1991, doi: 10.1109/43.75630.