Assigning different footprints in otherwise identical hierarchical sheets


#1

Hi all,

I have two functionally identical blocks in my circuit, and these two blocks are “abstracted” into two hierarchical sheets with a single source file. So far, so good. Now, I would like to assign different footprints to some components in one sheet, so that in one block I have footprint A, while in the other block footprint B for the same IC. (The pinouts are identical, only the package sizes are different.) The problem (and the advantage) of hierarchical sheets is that they are linked, so if I change anything in one sheet, the changes will propagate to the other. Is there a way of breaking this link for the footprint only, so that other modifications in one sheet would still be updated in the other?

Thanks,
Zoltán


#2

Not possible.
It is possible a workaround in the layout: you’ll be able to change the footprints individually in pcbnew.

BUT be careful at any further reload of the netlist. The keep/change footprint option is global. I mean, if you want to keep some footprints but update some others, you’ll have a problem.


#3

You can always change individual footprints in PCBNew, just don’t try to do it while reading the netlist.


#4

OK, thanks for the comments! This solution is not the most ideal, but I also see that the concept itself is self-contradictory to a degree.


#5

I meant, after you have changed an individual footprint (for example R1) in the layout you can change something in the schematic, in other part of the circuit, for example U1.

R1 new footprint cannot be updated in the schematic.

Next time you reload the netlist you’ll face the problem of updating the last changes (U1), what would revert R1 to the original footprint.


#6

Is this actually a true statement?

So long as the IC’s have different reference designators, I don’t understand the problem.

Re-annotate the schematic, assign the different footprint, and re-run the Netlist.


#7

Does not work if the same hierarchical sheet is linked multiple times.


#8

Hierarchical sheets have one and only one source, and what you see in the schematic editor is simply a link to that single source.


#9

Oh, I did that once… did not end well.


#10

I’m not certain this is quite true either.

Am I understanding that you copied a sheet as such to have a duplicate sheet?

If so, I would not recommend doing that!

What I have done, to use the same schematic in multiple sheets was to add a new hierarchical sheet, or 4. Then used a text editor to copy the schematic elements into the “blank” new sheets.

I forget the details of the why of it, but I remember the simple copy and paste of sheets ended up wasting quite a bit of my time and the end result was starting over.


#11

If you know what instantiating something multiple times means it works.

I use it often. (But i am thinking like a programmer not like an electrical engineer.)
An example where i use it is this project.


#12

If you know what instantiating something multiple times means it works.

I use it often. (But i am thinking like a programmer not like an electrical engineer.)

Exactly. I think, I have read somewhere that hierarchical sheets are the equivalent of classes. I really don’t know what else one should do, if there are a number of functionally identical blocks in a circuit.


#13

Am I understanding that you copied a sheet as such to have a duplicate sheet?

Yes, that is the case. Or, you can also simply create a new sheet, and then point its source to the file that you already have.


#14

Now that you mention it, I do remember trying that method also.

Anyways, I had difficulties, and I can’t recommend it based upon my experience.

Good luck!


#15

@Sprig An image is worth more than 1000 words

This is an example of 4 instances of the same sheet and one component Ux02, being “x” the sheet number.

$Comp
L IR2111 U502
U 1 1 540DFF2B
P 4550 3100
AR Path="/5305F219/540DFDA3/540DFF2B" Ref=“U502” Part=“1”
AR Path="/5305F219/540E0B88/540DFF2B" Ref=“U602” Part=“1”
AR Path="/5305F219/54466C0C/540DFF2B" Ref=“U702” Part=“1”
AR Path="/5305F219/5446A372/540DFF2B" Ref=“U802” Part=“1”
F 0 “U802” H 4550 3400 60 0000 C CNN
F 1 “IR2111” H 4550 2800 60 0000 C CNN
F 2 “DaisaStep-Wrl:PT-PDIP8” H 4550 4000 60 0001 C CNN
F 3 “” H 4550 4000 60 0000 C CNN
1 4550 3100
1 0 0 -1
$EndComp

All four components share the same footprin PT-PDIP8. No way of assigning individual footprints.


#16

@Pedro However, if one uses a Text Editor (after adding the new blank sheets) to edit the blank sheets with a copy of the first hierarchical sheets, then different footprints can indeed be assigned.

Sheet 2 3

$Comp
L D D2
U 1 1 59EFBE0C
P 6150 3400
F 0 “D2” H 6150 3616 50 0000 C CNN
F 1 “D” H 6150 3525 50 0000 C CNN
F 2 “Diodes_THT:D_A-405_P7.62mm_Horizontal” H 6150 3400 50 0001 C CNN
F 3 “” H 6150 3400 50 0001 C CNN
1 6150 3400
1 0 0 -1
$EndComp

Sheet 3 3

$Comp
L D D3
U 1 1 59EFBC1D
P 6150 3400
F 0 “D3” H 6150 3616 50 0000 C CNN
F 1 “D” H 6150 3525 50 0000 C CNN
F 2 “Diodes_SMD:D_1206” H 6150 3400 50 0001 C CNN
F 3 “” H 6150 3400 50 0001 C CNN
1 6150 3400
1 0 0 -1
$EndComp

Just LOST 13 hours of work … Horrifical Level Sheets… LOL:


#17

However, if one uses a Text Editor (after adding the new blank sheets) to edit the blank sheets with a copy of the first hierarchical sheets, then different footprints can indeed be assigned.

But this defeats the purpose: you can’t automate the work, you will always have an extra trip to the text editor. I think this is probably worse than having to reassign the footprints by hand in pcbnew.


#18

Please, give the sheets reasonable names and reference designators!


#19

I simply still maintain the position that if one is not 100% certain, that KiCad is not yet refined enough to keep users from having future difficulties when using the same file for multiple sheets.

It will be interesting to see if you post your end results after finishing the project in PcbNew.


#20

I’ve used multiple instances of a single sheet in both Eeschema and Pcbnew and it has worked out fine. Ive done it with a few projects now.

I haven’t had a need to mix footprints between channels tho.

I would like to see some kind of fixed layout per channel in Pcbnew someday.