Modern PCB Designer

How to create libraries, deploy and use

In this tutorial we will talk about how to create libraries, how to deploy them and how to use them.
We will talk first about how to create a library project and add references to it. After that we will talk about how to deploy our library and then how to consume, how to use this library.
We will not get into details about how to create library items themselves (these are the symbols, footprints, models and components), but about more generic stuff, and how things are organised and the thought in creating a library, deploying and using.
Creating library items is described here

How to create a library

So, we will start by creating a new project. Open Modern PCB Designer Studio, click on ‘New Project’ and choose ‘Library’ as type of project; type the name of the project and click OK.
Notice you have a solution node and your library project. You may choose to have only this library in your solution, or (and this is cooler because there is no feature in other CAD software like this), you may add yet another library project to this solution. You can add as many library projects as you want.
When you will be building the solution (that is from Solution tool window, right click on solution node and choose ‘Build’) there will be creating an output file for each library project. These will be the files that you need to deploy them as built libraries.
Can you see how this is working? If you are a programmer and you come from the world of c++ or c# or whatever, you would have many files as classes and after you build them would result in a single .dll file. This is called compiling.
    Modern PCB Designer Studio works the same way: you have the ‘source code’ represented by any entities (symbols, footprints, components, models) and when you build it you have a single output library file. This library file has an open format: XML; we consider this file the ‘compiled’ library.

How to deploy a library

The library files we’ve built previously need to be deployed somewhere, in a folder that Modern PCB Designer Studio knows about. In Settings you have an area where you can define folders for libraries that Modern PCB Designer Studio will search in.
Copy all these files you want to deploy in one of these folders. For example, one is under [Documents]\Modern PCB Designer Studio\Libraries. Overwrite if you are being asked by Windows Explorer.

How to use a library

You use a library by adding a reference to it. In your project, add a reference to the desired library by using Solution tool window, right-click on Reference node under a project, and choose ‘Add Reference’ from the context menu. In the window that will appear, use the interface to add references to libraries you want, then click OK

Here is the cool thing! You can also reference a library in a library project.
This means that if you want to create a components library, for example, you can use symbols from another library (let’s call it ‘MySymbols Library’), models from yet another library (‘MyModels’), and footprints also from a different library (‘MyFootprints’).
There is more, you can add references from deployed libraries and also from library projects existing in the solution. This way you can reuse any library item.
    After adding a reference to a library, when you will browse for library items, you will be able to add from these referenced libraries as well. For example, in a component editor, you will browse for a symbol, a list of symbols will show up from the ‘MySymbols Library’ as well.

Updating or refreshing libraries

You might be wondering: what happens when I update the deployed library, but I am not ready to update to the new version of the deployed library?
Modern PCB Designer Studio supports this scenario. When you added the reference to the library for the first time, a copy of the library is made under a References folder under the project’s folder. It is the same library file with the extension changed : ‘.libref’
Now if you update the deployed library to a new library, you will have to update this reference manually. In Solution tool window, in your project, under References node, you will find the list of all references for the project. You can select the reference (or references), right-click and choose ‘Update reference’. You can also right-click on References node to update all references, if you want to.

Take this advice with you

Don’t be afraid to create your own libraries; design your own symbols, footprints or models. This is how you will learn about engineering, mechanical space, this is how you gain experience and it will make you a better professional, and you will earn more money.

Here is what you should consider when you design any footprint:
Use the internet as your first source;

  1. Use the internet as your first source;
  2. Use a similar footprint that was designed previously in another project that was done by you or somebody else;
  3. Use the datasheet of the part you want to use. In the datasheet you will find a section that reads something like ‘Recommended landing pattern’ or similar. If not, estimate some pad sizes that you will take from the dimensions that are describing the part, print the board on the paper (see below at 4.) and check the fitting. Adjust dimensions and repeat as needed.
  4. Now, no matter what source you’ve taken to create the footprint remember the following rule: ALWAYS verify your footprint. If you’ve taken for granted the footprint sizes, it will most likely not fit for you; for example you won’t be able to solder the part, or the part will just not fit on the footprint. You can do this verification even from early stages when you created the board, by just printing on paper this board that contains these parts, and then physically take out the part from your parts bin or from the cut-tape and check if it fits on this printed paper, and if you can solder it, if your soldering iron can reach the pads, and so on.

Modern PCB Designer Studio is targeted for hobbyists and non-professional designers, but here is a professional advice from me: create a component for any physical part that has a different manufacturing number (MFN), but reuse any symbols, footprints or models. This might seem like it makes you do more work, but it helps a lot when you will be deciding to change that particular component with another one, when you will do re-design to your schematic and so on.
So, let’s say we want to define another component, in our case a resistor, that has a different value, other properties, so this is another part on your board. You will have to buy another part, another resistor for this.
So, you add another component like you did previously, you add the same resistor symbol, the same footprint. In this way you reuse the same symbol and footprint.
Next, define the properties, the prefix, save, and you’re done.

Leave your comment