LTspice modified relay models

Thread Starter

crutschow

Joined Mar 14, 2008
34,418
I modified the LTspice models I have for SPDT and DPDT relays to make their coil operation non-polarized (typical of most standard mechanical relays), and added hysteresis to their energized coil voltage (≈74% of rated voltage), and de-energized coil voltage (≈25% of rated voltage).
As before, the coil voltage and coil resistance can be specified by right-clicking on their symbol in the circuit.
Not modeled is the coil inductance.

Their model and symbol files are attached.
The .sub files go in the \sub folder, and the .asy files go in the \sym\misc folder.

Edit: I just realized there is a problem when a fixed voltage is applied to the top coil terminal and the bottom is switched. :oops:
Working on a solution.
Edit2: Ok the modified files are attached.
The coil terminals are isolated from ground and now respond only to the absolute value of the differential voltage across them.
Let me know if you spot any other problems.
 

Attachments

Last edited:

Thread Starter

crutschow

Joined Mar 14, 2008
34,418
Thanks should not be so hard to find spices for such simple things!
Maybe, in an ideal world.
But someone has to generate the model for Spice simulations, and if you want good simulation results. the Spice models are generally not simple.
For example, I had to significantly change the original simple relay model design, to make the control input isolated and non-polarity sensitive, while adding operating delay and hysteresis to its operation, to more closely simulate a real mechanical relay.
Even then, I left out the coil inductance, which can also affect relay operation.
Even a simple device, such as a relay, has many operating characteristics that require complexity to properly simulate.

It's those subtle, non-ideal operating characteristics in most electronic devices that newbies often ignore, and then wonder why their circuit doesn't work. :rolleyes:
 
Top