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?
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.
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.
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.
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.
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.
@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
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.
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.
x is actually assigned by kicad, if you set the annotation choice to “Start to sheet number100 and use first free number" or "Start to sheet number1000 and use first free number”. I see absolutely no problems with that.