Because Horizon’s part management is based around a single pool, all parts need to follow a clear convention for a consistent look and feel. If you want to add a part to the official Horizon pool, check this convention first before submitting a pull request.
Note that, however, this convention is a very rough draft and far from
complete. Suggestions for rules are very welcome! You’re also invited to
take part in the discussion in the convention’s repository’s GitHub issues <https://github.com/horizon-eda/horizon-pool-convention/issues>
__.
File names
1. File names are adapted versions of the pool entry’s name:
- Replace each space in the name by a underscore ``_``, except for
the space before a unit: ``LED 5 mm`` becomes ``LED_5mm.json``
- Keep the name’s capitalisation, except for the capitalisation of
the first letter: ``DO41`` becomes ``DO41.json``, but
``Very special connector`` becomes ``very_special_connector.json``
- Omit parentheses: ``Resistor 0402 (manual soldering)`` becomes
``resistor_0402_manual_soldering.json``
2. In general, use only characters from the following sets:
- Alphanumeric characters (``a`` to ``z``, ``A`` to ``Z``, ``0`` to
``9``)
- Underscore ``_`` and dash/hyphen ``-``
- Period/dot ``.``
General naming and organisation
diode
and not diodes
..
as a decimal separator. Do not use a thousand’s
separator.Value
field does not necessarily contain the full MPN. It
should be clear from the value what the part is without occupying too
much space in the schematic. For example, for a general purpose
resistor the resistance is generally enough for the schematic and a
INA219AIDCNR
can be shortened to INA219A
.Naming and folder structure
Names follow a simple structure, which is best observed with some
examples:
- ``DIP8, 7.62 mm lead span, 2.54 mm pitch``
- ``DIP16, 7.62 mm lead span, 2.54 mm pitch (with socket)``
- ``TO220, 5 pins (staggered pins, horizontal)``
- ``Pin header, 10 pins, 2 rows, 2.54 mm pitch``
- ``Pin header, 10 pins, 1 row, 2.54 mm pitch (horizontal)``
They are composed of:
1. A primary identification feature (like ``LED`` or ``DIP8`` or
``TO220``). Note that there is no dash included (``SO8`` instead of
``SO-8``, etc.).
2. An optional comma-separated list of quantitative specifiers
- These should be in order of decreasing importance/frequency of
usage.
- If the have a unit, include a space before the unit. Metric units
are preferred when appropriate.
- The same set of quantitative parameters must be included for all
footprints of a certain type to avoid ambiguity.
- Follow the format ``<number> [unit] <parameter name>``.
3. An optional comma-separated list of qualitative modifiers in
parentheses
- Modifiers which are standard throughout the pool must not be added
(``IPC compliant``, ``reflow soldering``, etc.).
- If the only difference a modifier makes is the 3D model of the
part, it should probably not be a separate package and instead a
alternate 3D model within the same part. For example
``LED 5 mm (green)`` and ``LED 5 mm (red)`` would have no
difference in any PCB layer.
The following general rules apply:
1. For a manufacturer-specific footprint, use the respective subfolder
in ``manufacturer``. Use the exact name of the package from the
package or device datasheet.
2. If manufacturers disagree on some dimension of the package body or
land pattern for a package of the same name, consider the package
manufacturer-specific and place it in the ``manufacturer`` subfolder.
If the majority of other manufacturers agree, their variant can be
considered a generic footprint (with the same name). For example,
there can be both ``manufacturer/stm/TSSOP20`` and
``ic/smd/tssop/TSSOP20`` if STMicroelectronics’s TSSOP-20 drawings
are different from all other manufacturers’.
3. When naming, be verbose: do not abbreviate parameters with single
letters or symbols, instead write them out.
4. No redundancy: When quantitative or qualitative parameters are
reflected in the part number within the package’s name (for example
for connectors where the MPN distinguishes between vertical and
right-angled-variants), the specifiers must not be included.
General package conventions
The origin of the package should be in the middle of the component body for both SMT and THT packages. Exceptions to this are:
Silkscreen
1. All silkscreen text and drawings should have a line width of 0.15 mm.
Text should have a size of 1 mm.
2. The silkscreen layer must contain a reference designator (``$RD``)
near pin 1 of the package. This should be the only text on the
silkscreen layer.
3. Silkscreen must not intersect with pads or package. All silkscreen
has to be visible after assembly.
4. Silkscreen text and drawings must have a clearance of 0.2 mm to
package outline and copper layer.
5. A pin 1 indicator is established by extension of an existing outline
or by omitting a line. Do not use a dot or text or any other marking.
Courtyard
Package layer
1. The package layer has to contain the physical size of the part as a
polygon.
2. Further annotations must not be added.
3. Use a line width of 0 mm.
Assembly layer
$RD
. This text should be rotated along the
component width. The text’s origin should be placed on a line along
the component’s height in the assembly layer, preferably across from
the pin 1 marker. The text should have a size of 1 mm, except for
small packages, where the size should be decreased in 0.1 mm steps
until a reference designator with 4 numerical digits fits within the
assembly polygon.Copper
1. Use the recommended footprint from the manufacturer’s device or
package datasheet.
2. If there are multiple recommendations, e. g. for different soldering
methods, create alternate packages.
3. For THT components, an alternate package can be created featuring a
square/rectangular pad for pin 1 identification. The main package
should have identical pads as far as reasonable.
Padstacks
---------
If you create a package, chances are that you don’t need a new padstack,
as the existing general padstacks are parametrised. If you do need to
create a new padstack, take the following rules into account:
1. If the package you’re creating requires a padstack for a special pad
geometry, the JSON file should be placed in the package’s
``padstacks`` directory and not in the root ``padstacks`` directory.
The latter is reserved for generic padstacks and shouldn’t be
cluttered with rarely-needed padstacks.
2. Draw the necessary shapes/polygons in all layers, not just the copper
layer.
3. Use parameter programs to make the padstack as generic as possible.
As a minimum, solder mask expansion and paste mask contraction must
be parametrised.
Entities
--------
1. Name the entity for the most general part it applies to. For example,
do not create a entity ``ATtiny24`` which is implicitly also used for
the ATtiny44 and ATtiny84 microcontrollers. Instead, use a name like
``ATtinyx4``. Unneeded suffixes can just be left out, while
characters elsewhere must be replaced with a lower-case ``x``.
2. Entities should be split up into multiple units if
- they have more than 100 pins (e.g. split up FPGAs into IO banks,
but not smaller microcontrollers into IO ports),
- it is mostly of little importance which physical IC a gate is in
(e.g. split up multi-gate logic ICs), or
- separate placement of units often greatly improves schematic
clarity (can e.g. make sense for electro-mechanical parts).
3. For entities with multiple gates, make sure that exchangeable gates
remain exchangeable in the schematic. Don’t use different symbols for
the same type of gate in order to include some additional pins that
could have been their own gate.
4. If a entity has multiple gates, make sure that each pin is only
available via one gate. For example, a quad opamp’s 4 opamp gates
must not include the power pins of the package because of this.
5. If there is only a single gate, name it ``Main``.
6. A power gate should be named ``Power``.
Prefixes (reference designators)
====== ======================================== Prefix Symbols ====== ======================================== A Sub-assembly or plug-in module AT Attenuator, isolator B Blower, Motor BT Battery C Capacitor CB Circuit breaker CN Capacitor network D Diode, zener diode, TVS diode, DIAC, LED DC Directional coupler DL Delay line DS Display, lamp F Fuse FD Fiducial FL Filter G Generator, oscillator H Hardware (mounting screws, etc.) HY Circulator J Connector JP Jumper, solder jumper K Relay, Contactor L Inductor, coil, ferrite bead LS Loudspeaker, buzzer M Meter MG Motor-generator MH Mounting hole MK Microphone MP Mechanical part (SMD spacer, etc.) PS Power supply Q Transistor, thyristor, TRIAC R Resistor RN Resistor network RT Thermistor S Switch T Transformer TC Thermocouple TP Test point U Integrated circuit, inseparable assembly V Electron tube W Wire, cable, cable assembly Y Crystal, ceramic oscillator ====== ========================================
$REFDES
and one $VALUE
. They both
should be sized 1.5 mm.$VALUE
is displayed without overlapping.Discrete components
General symbols (ICs, etc.)
n
or /
in front, overbar, etc.)$REFDES
text is to
be placed above the border, $VALUE
below. All other text must be
within the border.