KICAD tip 1 :

Php script to easily duplicate sch sheets for hierachical usage :

  BEFORE : (What you draw)   AFTER (What you get)
  empty adc empty   adc adc adc
  empty root empty ==> Php script ==> adc root adc
  empty empty empty   adc adc adc

In this example, the project consists of 8 dual 10bit ADC. The ADC output are tied to an 80 bit bus, and ADC channels 0 to 7 are multiplexed with channels 8 to 15.


Structure of the project :


Adc Root.sch   Root Sheet for Channels 0 to 15
Adc0001.sch   Sheet for Channels 0 and 1
Adc0203.sch   Sheet for Channels 2 and 3
Adc0405.sch   Sheet for Channels 4 and 5
Adc0607.sch   Sheet for Channels 6 and 7
Adc0809.sch   Sheet for Channels 8 and 9
Adc1011.sch   Sheet for Channels 10 and 11
Adc1213.sch   Sheet for Channels 12 and 13
Adc1415.sch   Sheet for Channels 14 and 15

Only one Adc Sheet (Adc0001.sch) has been drawn. In this example, components are numbered R200xx, C200xx ... for channel 0 and R201xx, C201xx ... for channel 1.
The script will build the other sheets (Adc0203.sch to Adc1415.sch). Components are automaticaly numbered Rnnxx, Cnnxx and so an, where 'nn' is the channel number.

See PDF files Before and After, and Kicad files Before and After.


Download the script.

You have to set the variable ''$directory'' to where your design is, set the sheet count (for ....), and adapt the script to your numbering method (see the 'ereg_replace'), replace '\\' with '/' in pathnames for Linux.


Good luck !