London Power ad

[-]
Search the Forum








(Advanced Search)

Library parts
#1
Hi guys

In Eagle and other PCB layout software, the components are stored in a parts "library". Eagle comes with some libraries developed over the years by its developers, and to which you can add your own parts. It is your choice whether to use the default libraries or to make your own for things that you use all the time, as this can save a lot of scrolling through the existing libraries.

Note that the libraries are listed alphabetically in the library directory. If you create your own directory it is convenient if it shows up at the top of the list. To force this, use numbers at least as the first part of the library name, or as the entire name. I use a couple of libraries named this way: one for laying out schematics, and another for laying out mechanical drawings for chassis and face plates.

Each component is called a DEVICE. A DEVICE is comprised of a SYMBOL that goes on the schematic and a PACKAGE that goes on the board. Each device can have s many packages as you wish, and some devices might actually require more than one symbol to be complete. For example, a resistor has only one functional element and thus has only one symbol, but because the resistor can be many different physical sizes, it can have many packages. A dual-triode, like a 12AX7, has three functional elements: two triodes and a heater. If the DUAL-TRIODE device is made correctly to assure proper schematic flow, the DEVICE will have three symbols and then one or more packages as required. Ideally, the 12AX7 should have two packages: one for mounting on the top side of the board and one for mounting on the bottom side. Alternatively, you can have one package and use the MIRROR tool once the package is placed on the board.

You can go in to the library directly, but it is usual to have a schematic open before invoking the Library directory.
Reply
#2
Drawing Symbols in Eagle
With the Library open, a window is present that has all the DEVICES listed. At the bottom of the window are three buttons to select between DEVICE, PACKAGE and SYMBOL. If you left-click on each in turn, you will see the appropriate list of devices, packages and symbols. Click on SYMBOLs. Between the three buttons and the list is a small window called NEW. Type in the name of the symbol you wish to view, or the name of the new symbol you wish to create.

For a new symbol, Eagle asks: "Create new symbol (mane you typed in)?". Select OK and the library editor window opens.

The layers available for the symbols are:
91 - nets
92 - Busses
93 - Pins
94 - Symbols
95 - Names
96 - Values

Nets and Busses you generally do not use.

Pins are the exact points on the symbol where schematic connections are made and these MUST BE ON 0.1" (100-mil) GRID.

Names are the geographic designator: R1, R2, etc

Values is the part value: 100, 1k43, 470nF, 2N3904, etc

Make sure the bottom four layers are ON (93,94,95,96)

You can draw the symbol using the WIRE tool down the left-hand menu. When you left-click on WIRE, the top tool bar will show how the wire will bend, its width and its style. The default width is 0.01" (10-mil) and bend is 90-degrees.The default GRID is 0.1" which is too large to draw most symbols unless we want very large schematics! Reset the grid to 0.05" (50-mil) or smaller. You will have to reset the grid smaller or larger when performing certain functions, or drawing different shapes.

Suppose we are drawing something simple like a capacitor. We need two parallel lines with perpendicular lines coming out of the centre of each of the parallel ones. Or, we could see it as two Ts in a mirror-image placement.

Note where the origin (0,0) for the space is, generally right in the middle. As you move the cursor around, you will see its X-Y position in the box beside the command line, which shows the grid selected also. Wherever you stop the cursor and left-click will begin drawing the symbol. The wire stuck to the cursor is hollow and becomes a red wire on the symbol layer when you left-click again. Move the cursor again and another segment of the wire will be dropped. To end the wire draw, click a second time at the last end made. You can move the cursor to a new location, left-click and begin a new wire.

Cursor over the ends of the capacitor symbol that represent the leads for the part. make sure they fall exactly on the 0.1" grid. If they do not, you can use the MOVE tool to move them to the correct position. Cursor to the MOVE icon, left-click, then cursor over the end of the wire to be moved. Left-click and the wire is attached to the cursor; left click where the end should be dropped.

PINS are needed for the connections to be made. Left-click on the PINS icon on the left menu. A hollow circle will be attached to the cursor and a pin-length selection will appear on the top tool-bar. Click on POINT, which is about halfway along the row, then cursor on to the editor space and drop the pin at the lead end. The hollow pin is still attached to the cursor allowing you to drop more pins as required, so drop a second pin at the other end of the capacitor symbol. To stop laying pins, cursor up to the STOP SIGN and left-click. The hollow pin will disappear. Then press SAVE.

Remember to SAVE frequencly.

Each pin will have text around it: "I/O 0" and "P$1" The first represents the pin function and its "swap level". The second represents the geographic name of the pin, and they are number in sequence as they are dropped, P$1, P$2, etc. For a non-polarised capacitor we can leave the function and names as they are, but we do not want to see these on the schematic. Left-click on the CHANGE icon (wrench) then scroll down to VISIBLE - left-click - then to OFF - left-click. Now cursor to the pin and left-click and see P$1 disappear, then cursor to the next in, left-click and see P$2 disappear. Go to STOP to end this function.

Select the TEXT icon and type ">NAME" (without the quotes) into the window that appears. This text will be attached to the cursor. Move the cursor up tot the SELECT LAYER window, click the 'down' arrow then click on NAMES. Cursor over to the SIZE window and scroll up to 0.05" and click on that. Now cursor to where you want to place the name of the part beside the symbol.

Repeat the above for to place ">VALUE" beside the part on the VALUES layer.

To make the symbol look nicer, you can change the grid and move the >NAME and >VALUE closer to the part, or however it looks best to you.

If the capacitor is supposed to be polarised, we should change the names of the pins. Go to the NAME icon, left-click, then cursor to the bottom pin, left-click and the text box will open with P$1 highlighted. Type in "M" (for minus), or "NEG" for negative. Press OK. Then cursor to the second pin and left-click, the text window appears again with P$2 highlighted, type in"P" for plus, or "POS" for positive. Then OK. Then SAVE. Select TEXT and enter "+", then OK, then cursor to the layer and select SYMBOL, then over to SIZE and select 0.07, left-click, then cursor to where you want to drop the plus-sign. Change the grid to move it to a good position relative to the symbol, as required.

Note that at any time later you can go back in to the library and edit the symbol. SAVE the symbol before exiting the library editor or before going to another device, symbol or package. Eagle should ask you if you want the file saved before you close it.
Reply
#3
Hi Kevin, I don't know if I'm flying solo, or if other forum members are equally off-program, but I'm going to need more assistance with adopting PCBs.
I tried to download the free version of Eagle, but got nothing useful. Could you assist with how I might get myself to the point of having useful Eagle software please?
Reply
#4
Library Parts: Packages (Part-1)

Electronic components are manufactured in different shapes and sizes of casings with terminations or leads for the connections, all of which is called a PACKAGE. Some components have only one package where others might come in a range of sizes. The Eagle library has many standard parts of different kinds, like transistors, resistors, diodes, capacitors, and ICs, to list a few. We all know that resistors come in a range of power ratings and each has its own size and shape - a 1W resistor is larger than a 1/2W, but smaller than a 5W part. The Eagle library contains a range of these packages, but there will be times when we must create our own.

We begin either with a mechanical drawing of the component supplied by the manufacturer of the part, or we have the physical part already and make our own measurements. If we are doing the latter, it is important to make as accurate measurements as possible. Ideally, we use an inch-scale marked in tenths, or a metric scale in millimetres, or we use a caliper.

In Eagle, we are always looking at the top of the board and see through the board to the bottom traces. The footprint for the component must be as viewed from the top, as well, which means we have to "see through it" to where the pins are. We can get to that end in many ways.

Some mechanical drawings already show the footprint as it should be for the PCB layout, since any component designed for PC-mounting is likely to end up an a PCB. Other drawings show you exactly what you see when you look at the bottom of the part at the pins. Hopefully in both cases there is a note stating explicitly what the view is: "Bottom view" or "Top view". When you have the part in hand it is clear what view you have.

Make your drawing by hand on paper at first and make it large. Draw the pin locations but do not be super critical about aligning them. Instead, draw a line through rows of pins that are in a line even if it is a crooked line on your doodle. measure the distance between the pins and note this beside one of the gaps between the pins. Measure the distance between the rows of pins (if this applies) and note the dimension. Measure the overall width and length of the part. measure the distance between the pins and the edge of the part. You could end up with some redundant measurements here, so it is often good to pick either a pin or a corner of the package as a reference, then measure everything from there. However this evolves should be obvious from the nature of the component shape. The reference point is called the ORIGIN for the part.

A circular component has fewer dimensions to note: the diameter and the pin spacing. If it is a two-pin capacitor, the pins will be on a centre-line through the circle and equally spaced from the centre of the circle. The centre of the circle will be used as the ORIGIN for the part.
Reply
#5
Library parts: Packages (part-2)

With either the mechanical drawing or the component in hand, we can proceed to making the package in the Eagle parts library.

You can open the library through various routes:
Open a schematic, then go to the Library menu on the top toolbar, left-click, then select OPEN. A window opens and you see a list of libraries. Select the one you wish to open and a new window opens which is the "library editor".

In the top tool bar are icons for: File, Save, Device, Package, Symbol, Script, Ruin, Zoom functions (Fit to window, in, out, redraw) back, Forward, Stop. Left-click on Package and a window opens. You can select an existing package or choose to create a new one.In the window beside the word "New", type in the name of the package you wish to draw, then left-click on 'OK.

Eagle will ask you: "Create new package (name you typed in)?"
Left-click on OK

A window opens up that is the package editor which looks exactly like the board editor window with all the same functions. The ORIGIN is dimension (0,0) in whatever scale or measure you have chosen for the GRID. Note that if you normally work in inches on your PCB, it is convenient to do the same here. However, it is not necessary to do so. Most components are made to even millimetre dimensions, so it might be easiest to switch the GRID here to mm. There are many parts that are designed in the tenth-inch scale and have dimensions that are multiples of 2.45mm - a dead give-away! It is sometimes convenient to switch the grid to an odd dimension if you are laying down pins for an odd-size connector or device.

For example, there is a connector series that has pin spacing of 0.156" - a pretty odd value but the decimal equivalent of 5/32" from the time when inch-scales divided by eight were "the rule". In Eagle, we can set the grid to 0.156", lay down the pads for the connector, then switch back to something more friendly, like 0.05" to lay down the outline and position any required text.

We use the LINE DRAW function on the left-hand menu to draw the outline. If it is a capacitor with a round case, we would use the CIRCLE tool. For both of these, we choose the smallest line width but NOT ZERO. If we select "0" then the inside of the circle or rectangular shape will be filled in black. On the board, this means the entire footprint is coloured with silk screen. To make a rectangle, we select the LINE function, then choose an angle function from the top toolbar that appears, if we do not want to use the default of right angles. Left-click in the editor field where you want to start the shape, then cursor to where the first corner is; left-click, then cursor to the next corner; left-click, until you have come back to the starting point, then double left-click to stop the drawing function

To make a circle, select the CIRCLE function then cursor to the origin; left-click; pull the cursor sideways and watch the cursor position indicator beside the GRID icon. Stop when you get to the radius of the circle (half the diameter) and double-click.
Reply
#6
Library parts: Packages (part-3)

To lay the pads of the part, go to the PAD icon on the left-toolbar and left-click. A default virtual pad will be stuck to the cursor and a pad-shape toolbar will open along the top of the window. There is a choice of pad shapes:
square
round
octagon
long
offset

Then a Diameter option, a Drill-size option and an Angle option.

Suppose we select Lon as the shape by Left-click on Long, then cursor over to Drill and scroll down to the size of hole needed to clear the pin by at least 7-mil; left-click; then cursor to where we want to drop the first pad; left-click; cursor to where we want the second pin; left-click, until we have as many pads as there are pins on the package; double-click and the virtual pad disappears from the cursor.

While the virtual pad is on the cursor, if you right-click you will see the pad rotate. In the Angle window on the upper toolbar you will see the angle change by 90-degrees each time you right-click. You can use this to orient the pads in different ways as you drop them. if the pads need to be rotated after they are dropped, you simply use the ROTATE function or the MOVE function, both in the left-hand toolbar.

Each pad is given a name by Eagle as P$1, P$2, P$3, etc. You can rename the pads to be more meaningful to you or to others looking at the parts. For an IC or something with many pins, the pads may simply be left as they are if they happen to be dropped in the numerical sequence of the component leads as named, i.e., 1,2,3... or, you may wish to name the pads by function. For a transistor, E,B,C are useful, denoting emitter, base, collector, or if it a relay, C,NC,NO,LP,LM, for Common (movable contact or wiper), normally-closed, normally-open, coil-positive-end, coil-negative-end.

Use the TEXT function and type >NAME into the text window, then OK, then cursor up to the Layer window and select the
24-tnames, left-click; then cursor over to the Size window and scroll to 0.04; left-click, then cursor to where you want to drop the text; left-click; then cursor over to the Text icon again; left-click; type >VALUES into the text window; then click on OK; then cursor up the Layers again and select 27-tvalues; left-click; then cursor to where you wish to drop the text - the size will be same as selected for >NAMES - left-click; cursor up to the Stop sign and left-click. The virtual text will disappear.

Just as we saw with the long pad, if we right-click while the virtual text is on the cursor we see it rotate.

Remember to SAVE along the way.
Reply
#7
Library parts: Package (part-4)

In the example above, we selected "long" pads and their rotation can be easily seen. It is important that the component lead will fit in the hole, so we must assure that the DRILL size is correct and this will affect the DIAMETER. When we made or acquired the mechanical drawing for the part, the lead size or pin diameter is an important measurement to note; diffucult to do accurately without a caliper.

When we have the virtual pad on the cursor, we can select the DRILL size in the top toolbar by Left-clicking on the scroll-arrow in the DRILL window, then on the drill size needed; then lay the pad on the package editor field.

The diameter of the pad is obvious if it is circular, but as a Long or Offset pad diameter = length. If you select the CHANGE (wrench, spanner) tool in the left-hand toolbar, a menu opens with parameters that can be changed in the package editor. Scroll down to Diameter; left-click; scroll to size you wish to try; left-click; cursor to the pad you wish to change the diameter of; left-click and its diameter will change to the new value. You can left-click on any other pad and its diameter will change to the new value. To stop this change function, left-click on the STOP sign in the top toolbar.

You can change the drill size using the CHANGE function, as well.

It is important that the hole for the lead or component pin be a bit larger than the pin diameter so there is room for solder. generally, 76-mil is recommended and this is a minimum for hand-soldering and considered an optimum for wave soldering. It is always better to err on the hole being too large than too tight.

Similarly, when we are soldering the component to the board, it is important that there be enough pad area for the solder to flow outward and wet in the right shape, with a concave surface. The AUTO diameter results in small-ish pads that are fine for very tight spacings and the use of a fine pencil-tip on the iron. For mere mortals, it is better to have larger pad diameters and this improves the reliability of the connection, as well, as larger solder connections last longer.

Where it is best to get these parameters "right" when we initially make the package, we can always go back into the library and change things if we find we made an error. Hopefully this is before boards have been made but in most cases that was how we found the error.
Reply
#8
Library parts: Devices (Part-1)

The DEVICE is what we actually look up in the library when we are dropping parts onto the schematic. Once we have the symbol and the package we can create the device. Open the library as described above, then left-click on the Device icon (group of four logic gates) and a window will open with a list of the devices already in the library.

In the window labelled New, type in the name of the device you wish to create, then OK. Eagle will ask "Create new device (name you typed in)?"; click OK and a Device editor opens. In the left-hand toolbar, left-click on the ADD icon (logic gate) and a window opens with the symbols available in the library. Scroll down to the symbol you created; left-click; the symbol is on the cursor; cursor to the origin on the symbol field and then left-click where you want it to be. It is preferred not to have the origin of the symbol aligned with any of the pins of the symbol, but sometimes that is how it must be if the symbol is very small.

The default grid for the symbol window is 0.1" and this may not provide the resolution required to accurately drop the symbol. While the virtual symbol is on the cursor, you can change the grid and/or ZOOM in closer, as needed.

REMEMBER: The pins of the symbol MUST fall on the 0.1" grid or the schematic editor will not be able to connect to them.

While the virtual part is on the cursor, you can right-click to rotate it. Left-click to drop the symbol. If the device is actually comprised of multiple sections, you can drop multiple symbols with easc left-click. Left-click on the STOP sign to end the ADD function. Left-click on the NEW button on the right side of the Device editor. This will opena window of available packages. Scroll down and select the package you created for this device; left-click and the package name appears in the Package window. Beside its name is a quotation mark under the word "Variant", then there is an exclamation mark in a yellow circle.

Right-click on the package name and then select RENAME; left-click. A text box opens called "Rename package variant"; type in the name of the package. here, you normally type in the name that is already used, but if there are variations you wish to use, type in this alternate name; left-click on OK and the rename appears beside the original name in the list of packages for this device.

Click on the CONNECT button and the Connect window opens. There are three columns showing the Pins of the symbol, the Pads of the package, and the Pin-Pad connections The first Pin is highlighted and the first pad has a virtual highlight. Click on the pad that you want to connect to the highlighted pin. Then left-click on CONNECT. If it happens that all the Pins and Pads are in the order they should be connected to each other, then simply click on CONNECT and each Pin-Pad pairing will appear in the Pin-Pad column.

You can use the DISCONNECT button to change any of the pairings made. Left-click on DISCONNECT, and the highlighted pairing will disappear from the Pin-Pad column and the Pin and Pad will reappear in their respective columns.. Once you are finished connecting the Pins and pads, left-click on OK.

On the schematic, the symbol must have a geographical designation, called its "name". The name for different component types should have a unique prefix letter or letters, as in "R" for resistors, "L" for coils, etc. Left-click on PREFIX and enter the letter that you wish to be the beginning of the geographic designator for this type of component. The prefix can be more than one letter, for example "SMPS" for switch-mode-power-supply modules.
Reply
#9
Library parts: Devices (Part-2)

When you are making a complex device like a dual-triode, there is more than one symbol element required even though there is only one package. In this case, we ADD the triode symbols to the symbol,field of the Device editor, by selecting ADD with a left-click; scrolling to the Triode symbol in the list of available symbols; left-click, then the triode virtual symbol is attached to the cursor. left-click on the symbol field, then cursor to a new spot and left-click again to add the second triode. left-click on STOP in the upper toolbar.

Go to ADD again, repeat the process for the heater portion of the tube.

As you add each symbol, beside each will be the word "Add=Next" and below that "Swap=0". These are the defaults in the Device editor when multiple identical symbols are added to the symbol field. The Add level means that when you are drawing the schematic and select "Dualtriode" in the list of symbols, that each left-click will drop a triode onto the schematic. Each pair of clicks represents one dual-triode, but you can drop as many triodes as there are in the amp, say six triodes for a typical plexi circuit with three dual-triode tubes. The schematic editor is calling up the first section of the first dual triode, then the second section next, then the first section of the a new dual triode next, and the second section of that dual triode next, and so on.

The 0" in the Swap level means it cannot be interchanged or swapped with any other element. We want to change this to "1" so that any section of the part can be swapped with any other functionally-identical section in that part. You can also swap functionally-identical sections of different packages where there are multiple identical packages. This means that if it were convenient for the physical layout to do so; for example, you could swap the circuit order for the connection of the first sections of two dual triodes.

For the heater, since there is only one symbol of this type in the Device symbol field it shows "Add=request" and "Swap=0" and we leave the Swap level at zero. It cannot be swapped with any other element of any package, even if there are multiple identical devices in the circuit.

You can change the Add and Swap levels as required.

Beside each symbol on the symbol field is the name and value of that section. Here is a slightly tricky part of Eagle. Where you might think, "This is a 12AX7", we are in the Eagle Device editor and the Symbols already have >NAME and >VALUE beside the first section, and G$2 and >VALUE beside the second section. If we were making a triple triode, the third section would have G$3 and >VALUE beside it. For all of the identical sections, we need to change the Name.

Left-click on the NAME icon in the left-hand toolbar, then left-click on the first triode symbol; a text box opens called "Name"; "G$1" appears in the text window and is highlighted; enter "A" (which replaces G$1) then click on OK. "A" appears beside the first section. Left-click on the second section, the text box opens again; enter "B" then OK. Click on STOP in the upper toolbar to end the NAME function.

Go to the CHANGE icon in the left-hand menu and scroll to Swap Level; left-click; cursor to the first section; left-click and the text box opens named "Swap level"; enter "1" in the field, then press OK; "Swap=1" replaces "Swap=0" beside the first section; cursor to the second section and repeat. Go to STOP to end the Swap change function.
Reply
#10
Library parts: Devices (Part-3)

When we add the heater symbol to the dualtriode Device editor, we use the NAME function to call it "H". You can leave the Add=Next and then as you drop the triodes onto the schematic, each left click will result in triode, triode, heater, triode, triode, heater, and so on. This is a sure way NOT to forget to connect the heaters on your board !

Alternatively, you can change the Add level of the heater to Add=Request. In this case, dropping triodes onto the schematic results in ONLY the triode portions of each package to be added. If you want to add the heaters, you go to the INVOKE icon on the left-hand toolbar of the schematic editor, then left-click on one of the triodes. A window opens showing all the element sof that device, with the already added portions in normal text and the yet-to-be-added portions in bold. left-click on the bold heater portion and now this virtual symbol is on the cursor; left-click where you wish to add it to the schematic.

Why would you do it this way? Schematics have a way of "getting out of hand", requiring much more space that you initially envision. It is a good idea to try to maintain a schematic size that will print out on letter-size paper and be readable without a magnifying glass ! To do this, we often have to split the schematic into several "sheets" In such a split, it is convenient if the audio path is on one sheet and the power supply is on another, making the Add=Request for the tube heater a time saver in the schematic rendering. here is where making the Device and drawing future schematics overlap and the development of one affects the other later.
Reply
#11
Library parts: Devices (Part-4)

In the dualtriode example above, have no fear that we cannot name the device "12AX7" on the schematic even though we have named the triodes "A" and "B" and the heater "H". When we add the triodes to the schematic, They will have the Prefix "V that we gave them and Eagle will automatically call the first two triodes "V1A" and "V1B", then the second package "V2A" and "V2B", and so on.

REMEMBER - the "name" is the geographic position on the board. We can click on the VALUE icon in the schematic editor left-hand menu to give the part-type designation "12AX7", or "12AT7", or "Bob", whatever we wish. In this particular case, there are a number of functionally equivalent real tubes that will plug-and-play in the physical socket.

If we used Add=next for the heater in the dualtriode device, we may wish to move the heaters from one sheet of the schematic to another. Unfortunately, Eagle does not allow this - at least in older versions. The universal fix is then to REMOVE the heater symbols from where they are, by selecting the REMOVE icon (X) in the left-hand toolbar of the schematic editor, then left-click on each heater symbol; then use STOP to finish the remove function.

Then we select the schematic sheet we wish to add the heaters to, using the Sheet window in the upper toolbar. On the new sheet, we use the INVOKE tool to acquire each heater and add it to the sheet.

The alternative to this, using the Add=next for heaters, is to use "interconnectors" that allow an electrical node of one sheet to be connected to a node on another sheet. To make such a Device is quite simple as it only requires a symbol. In the Symbol editor, we draw and arrow, a circle, or whatever symbol we wish to use to show a "flying connection". We add text in the Names layer to indicate the unique connection, such as "A","B","C, etc. When we add the PIN, we select the DIRECTION in the upper toolbar as "Sup", drop the pin, then NAME it as we wish. We create a Device of the same name, adding just this symbol and not selecting a package, prefix or value. Since the heater has two ends, e need at least two of these unique interconnection symbols.

On the first sheet where the heater symbols are, we link the end of the heater to one of the supply symbols we created. We link the other end of the heater to a different supply symbol. On the sheet of the schematic that has the actual power source for the heaters, we drop the two supply symbols and tie them to the rest of the heater circuitry.
Reply
#12
Library parts: Devices (part-5)

When we are finished making the device, we save it. If we would like to add a description of the device, we can go to EDIT in the top toolbar of the Library window, then select "Description" from the drop-down menu. A window pens that we can enter text into, just a brief description of the part, the actual manufacturer's part number, or whatever reminds us of what the device is. This description will appear beside the device name when we look at the expanded library listing in the directory for Eagle.

We can use the same Edit description path to provide descriptions for libraries, projects, devices,packages, and symbols.
Reply


Forum Jump:

[-]
Come in where it's warm!
A warm welcome to tube amp modding fans and those interested in hi-fi audio! Readers of Kevin O'Connor's The Ultimate Tone (TUT) book series form a part of our population. Kevin O'Connor is the creator of the popular Power Scaling methodology for amplifiers.
Please remember these three principles: respect, sharing, community.
Not familiar with The Ultimate Tone book series? See discussion topics, or click here to visit London Power/Power Press Publishing.

[-]
Tube Amp Forum Hosted by London Power
London Power logo