2.4.3. Component
The next element you need to create is the Component for a single OpAmp. Because it is still very generic (beside the LMV321LILT there are many other OpAmps with exactly the same functionality), so you should enter a generic name like Single OpAmp. In addition, it’s really important to choose a Category for the new Component, otherwise it’s hard to find it in the library when you want to add it to a schematic.
Then you’re asked to specify some properties of the Component:
Schematic-Only: This should be checked if the Component must not appear on a board, but only in the schematics. This is typically used for schematic frames (yes, they are also Components).
Prefix: When adding the Component to a schematic, its name (designator) is automatically set to this value, followed by an incrementing number. So if you choose the prefix R, components added to a schematic will have the names R1, R2, R3 and so on. The prefix should be very short and uppercase.
Default Value: In addition to the name, Components also have a value assigned to it, which is typically also displayed in the schematic. For example a capacitor has its capacitance (e.g. 100nF) set in its value. When adding a Component to a schematic, its value is initially set to the value specified here. The value can also be a placeholder, for example
{{PARTNUMBER}}
,{{RESISTANCE}}
or{{CAPACITANCE}}
. If you are unsure, just leave it empty, you can still change it later.
Now you need to choose the Symbols which represent the Component in schematics. Most Components have only one Symbol, but you can also add more than one, for example an OpAmp can have separate Symbols for power and amplifier.
After adding the OpAmp Symbol, it should look like this:
The next step is to define all so-called Signals of a Component. Signals represent the “electrical interface” of a Component. For example a transistor consists of the Signals base, collector and emitter. For a Component it’s irrelevant whether the “real” transistor has multiple emitter pads, or an additional thermal pad and so on, the Component only specifies the three Signals.
LibrePCB automatically extracts the Signals from the Pins of the specified Symbols, so often we don’t have to do this by hand. But sometimes you still should adjust the names or properties of these Signals. For the OpAmp, we check Required for all Signals, so the ERC will show a warning if these Signals are not connected to a net when the Component was added to a schematic:
These Signals now need to be assigned to the corresponding Symbol Pins, but as they were automatically generated from the Pins, you can just click on the button below to automatically assign all Pins to their Signals:
That’s it, the Component is now ready to be used:
For this simple example, this procedure may feel complicated. This is due to the broad flexibility of the librepcb library approach. The Component which we created actually only uses basic library features, but as soon as you understand the our library concepts, you will be able to easily create much more powerful library elements. We’re sure you will love the flexibility of the library concept ;) |
Following are the most important rules to create reusable Components:
|