Multi Component Relay Schematic part

I would like to make a couple different relay parts. They consist of the coil and a set or multiple sets of contacts. What would be the be correct way to do this. When I make the part in the editor and try to use it in the schematic, I can not move the parts seperately, ie coil and contacts all move as a group. I was going to attach a picture but I guess I cant as a new user.
Thanks
Brandon

I think what I want to do is make the coil as unit A, and the contacts as additional units depending on how many the relay has. This doesn’t seem to work. When I delete the coil from say unit B it is removed from unit A as well. I have the check box “all units are not interchangeable” checked but that doesn’t seem to help. Also tried the steps in this post Making Non-Identical Units Within a Part with no success.

Hi Brandon,

You also need to consider how you are going to associate the schematic elements to the PCB footprints.
If you make the coil as a separate part from the contacts then you are going to have to associate these to two different PCB parts.

I would suggest you just go ahead and make a schematic part for each relay you are expecting to use.
You should be able to design one and then open it and do a SAVE AS to give it a new name and then edit it to add the next set of contacts and keep doing this for each one you expect to use.

Hi Dwight,
First off, thanks for the reply. I am not planning to use the schematic for a PCB, it is for a wiring diagram only. I created a part in my library of a Omron 4PDT relay. It has the coil and the 4 switches all with different pin numbers corresponding to the terminal numbers of the socket it will sit in. The problem I am having is in the schematic I can not place the coil and contacts in different parts of the schematic. I could make a coil as a part and the contacts as a separate part, but I thought I could make it one part with multiple components that I then could place in different parts of the schematic. It would save having to rename the pins on the contact and prevent using the same set of contacts twice by accident. Is this possible of am I going about this the wrong way?

Thanks
Brandon

I haven’t done this with relays, but I have done ICs in a similar way with gates (or as KiCAD calls them, Units). I’ll try to do what I imagine you intend and describe my method here. First I looked up a Omron 4PDT on octopart and found this datasheet.
Looking through it quickly I found the LY4 pinout on page 6, so I chose to use those pin numbers. Note that the coil has the highest pin numbers so I’ll elect to have that as my last unit.

On to KiCAD. I opened the schematic library editor, chose a libray and selected the create a new component tool bar item.
Here I entered the component name, changed the default reference designator to K for relay. Knowing that I want 4 switches and 1 coil I change the number of units per package from the default 1 to 5. Then I select units are not interchangeable and leave everything else to the default by selecting OK. Now follow these steps:

  • Drop in the 3 pins numbered 1, 5, and 9 as passive electrical types and then draw my graphic.
  • Then drag select all the graphics and pins and copy the block in empty space below.

Now comes the tedious part.

  • Edit the properties of all the original graphic parts and pins (the ones where you originally drew them) and for each graphic part de-select the “Common to all units in component” check box. If you look at other units while doing this you will see those parts disappearing, but the copied block will remain. Go back to Unit A and finish de-selecting the common to all attribute.
  • Now go to Unit B, drag select the copy of the graphic parts and pins and copy the block to where they belong. Go through all the newly copied graphic parts and deselect the common to all attribute while adjusting the pin numbers for Unit B to be 2, 6, and 10.
  • Repeat for Unit C (pin numbers 3,7, and 11).
  • Just move the copy of parts and pins to the correct place on Unit D and then deselect the common to all attribute while adjusting pin numbers to be 4,8, and 12.
  • On Unit E (which will be your coil), select the tool on the right end of the tool bar that has the popup help that reads something like “Edit pins per part or body style” so it looks pressed in. Then drop pins 13 and 14 (making sure that the common to all attribute is not selected) and draw your graphic.
  • Check the other Units to make sure what you drew on the last Unit didn’t appear on any of the first 4 Units.

The only thing that I haven’t been able to customize unit-by-unit with this technique at the library level is the initial placement of the part attributes (reference, value, footprint, etc).

If I can attach a file, here is what I came up with while making the above instructions for you to look at and pull apart. omron_ly4.lib (1.6 KB) Import this part into the library editor to look at it.

Note, unless you add some graphics to your schematic, this technique will break a common notation in schematics. When parts of a unit (or even different units) are ganged together (like action of the contacts in the 4PDT relay are) then they should all be connected with dotted lines.
So, just remember to connect all the moveable parts of the relay contacts with dotted lines when you draw your schematic.

I can definitely see where this would be useful in the instance of a Relay as you explained.

I’m all for making a schematic more readable by putting the contacts closer to the part of the circuit that they affect.

Applies also to a multi-pole switch and probably some others that I cant think of right now.

I suspect that SembazuruCDE has a pretty good solution as detailed above.

good luck
dwight

Thanks SembazuruCDE. This is exactly what I was trying to do. The only issue I have now is the naming convention. Ideally, I would like the coil to have the K? designation, and the contacts to follow the K?.X, with X being 1,2,3,or 4 depending on the contact. I couldn’t do this in the parts editor, but thought I may be able to edit the .sch directly to get the convention I wanted. No such luck . The component listing from the .sch.

$Comp
L Omron_LY4 K1
U 2 1 551804AE
P 2650 2650
F 0 "K1" H 2650 2850 60  0000 C CNN
F 1 "Omron_LY4" H 2650 2450 60  0000 C CNN
F 2 "" H 2550 2750 60  0001 C CNN
F 3 "" H 2650 2850 60  0001 C CNN
	2    2650 2650
	1    0    0    -1  
$EndComp

I don’t see a reference to the text for the unit label (‘A’, ‘B’, ‘C’ etc). so I’m not sure how that is added. For now I ended up making 5 different components, it was tedious making all the references correct, but fortunately it was a small enough (5 pages) drawing.
As for connecting all moveable parts, that is not a very common for relays, at least not in my field. Our drawings may be 70 pages long and are typically grouped by function, with contacts from relays being across multiple pages. There is usually a road map at the back listing all relays and the locations of coils and contacts for a quick lookup. I do usually see the connection made for switches with multiple contacts though.

Again thanks for the help.
Brandon

I don’t know if that is possible in KiCAD. The trick I showed you is repurposing (abusing?) something that is designed for multi-gate ICs.