I know it's been a while, thanks for helping out with this thing, the simulation was key to make the sensor work! Also a variation of this made a nice fluxgate magnetometer that picks up earth's field pretty well, useful in a compass application. Would you be able to explain how you coupled the inductors via the .subckt statement? I've tried to draw the V1, E1, F1 sources with their connections as per the statement but still really confused by it..
Let me try and build it up.
The coreBwinding Model![Arbitrary (saturable) coupled inductors in LTSpice](https://www.eevblog.com/forum/index.php?action=dlattach;topic=194925.0;attach=881404;image)
This is what the circuit looks like described by these directives:
![Arbitrary (saturable) coupled inductors in LTSpice](https://www.eevblog.com/forum/index.php?action=dlattach;topic=194925.0;attach=881386;image)
params: n=1 is the default number of turns. The default is one turn.
n is the number of turns on that winding.
.global coreBThis is essentially a global variable that is shared between all the sub-circuits. This how the windings are coupled together.
This circuit is an ideal transformer winding. The left side is a single turn winding. The right side is n times bigger in amplitude. F1 draws n times the current from the single turn side.
WBxThis is used to define a winding using the coreBwinding subckt.
![Arbitrary (saturable) coupled inductors in LTSpice](https://www.eevblog.com/forum/index.php?action=dlattach;topic=194925.0;attach=881390;image)
The parameters include setting n, the number of turns and series and parallel resistors.
Winding model![Arbitrary (saturable) coupled inductors in LTSpice](https://www.eevblog.com/forum/index.php?action=dlattach;topic=194925.0;attach=881394;image)
The model includes the parallel and series resistors as shown above.
Two winding transformerYou can build a two winding transformer like this:
![Arbitrary (saturable) coupled inductors in LTSpice](https://www.eevblog.com/forum/index.php?action=dlattach;topic=194925.0;attach=881400;image)
This transformer is 1:1 and is placed in a test circuit. The symmetry is obvious. The model will work equally well if the primary and secondary are swapped.
Non-LinearityAs shown so far the model does not include any non-linearity and has no core saturation.
The core can be added by connecting the non-linear inductor between coreB and ground.
Regards,
Jay_Diddy_B