• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

LTspice DPDT Relay Model

crutschow

Well-Known Member
Most Helpful Member
I just generated a functional simulation model for a DPDT relay symbol I had previously downloaded (both attached).
It includes an approximate 15ms open and close delay to simulate the mechanical relay operation.
I'm posting it for others to use because I wasn't able to locate such a model elsewhere.
I've also posted it in the Yahoo LTspice Users Group.
 

Attachments

Last edited:

alec_t

Well-Known Member
Most Helpful Member
Nice.
Slight mod suggested, since not all users put LTS files in the default location:- replace the absolute path to the diode library with .lib standard.dio
 

ericgibbs

Well-Known Member
Most Helpful Member
Works OK,
For Old XP Pro users the (x86) entry in the .lib C:\Program Files(x86)\LTC\LTspiceIV\lib\cmp\standard.dio needs deleting in the sub file.
 

crutschow

Well-Known Member
Most Helpful Member
Thanks, I changed the .sub file to a relative reference for standard.dio.

I didn't include an L element since the value for that can vary widely, depending upon the relay, and this is just a functional model.
 

ClaRos91

New Member
I took it, as is, but it's not working. Am I missing something? I lack of knowledge (for now) about Spice syntax so I left the .sub file untouched (including the relative path of the standard.dio).
 

Attachments

crutschow

Well-Known Member
Most Helpful Member
What version of LTspice do you have?
Where did you put the relay .asy and .sub files?
 

crutschow

Well-Known Member
Most Helpful Member
Post a screen grab of your simulation schematic.
When I run your .asc file, the relay symbol does not show.
 

alec_t

Well-Known Member
Most Helpful Member
Each file is in the correct path (the .sub and the .asy).
By default, LTspiceXV11 looks for the .sub and .asy files in your ....... Documents/ .... path. Is that where you have them?
 

ClaRos91

New Member
Post a screen grab of your simulation schematic.
When I run your .asc file, the relay symbol does not show.
Weird. I've attached 2 screenshots. I've looked in the .sub. Vt (trip voltage for what I could understand) should be 0.36V. So, when VPulse overcome that threshold, the relay have to switch. But it doesn't actually.

By default, LTspiceXV11 looks for the .sub and .asy files in your ....... Documents/ .... path. Is that where you have them?
Yes.

I've downloaded the first file uploaded. On my side I can see the relay symbol and I don't have simulation error (except the logic relay behaviour).
 

Attachments

Last edited:

crutschow

Well-Known Member
Most Helpful Member
Cockpit error. I didn't look closely at your simulation times.
The relay model has a delay of about 14ms to simulate the operation of a real relay but you were trying to turn it on and off in 10ms.
Real mechanical relays generally don't operate that fast.

1553532066039.png
 

ClaRos91

New Member
Omg, nice catch! Thank you I didn't notice. Now it's working perfectly.

If I want to modify the delay time, I just have to adjust the R-C value right? For example, If I set the C1 value from 15nF to 5nF I should obtain a 5ms delay (my case).

Also, tipically the switch Set time is different from the Reset time. I'm wondering how I can introduce differents delay in the model...
 

crutschow

Well-Known Member
Most Helpful Member
I just have to adjust the R-C value right? For example, If I set the C1 value from 15nF to 5nF I should obtain a 5ms delay (my case).
Yes, if that's C1 is in the model.
Also, tipically the switch Set time is different from the Reset time. I'm wondering how I can introduce differents delay in the model.
You would have to modify the model so that the charge time of the cap is different than the fall time.
Perhaps two resistors with a diode in series with each, one being in the opposite direction.

But unless simulating those times exactly is important in your design, it's probably not worth the effort.
 

EE World Online Articles

Loading

 
Top