LT Spice -
Create New Symbols

Please Note: All the information presented here is my own work and not from Linear Technology. This advice does not replace the information given by Linear Technology, the LTWiki or the Yahoo LTspice User group. Please also read my sites general disclaimer.

Creating New Symbols
LTspice comes with a wide range of symbols. You can create new symbols, both as functional or non-function parts or even edit the existing symbols. New symbols are often contributed to the yahoo LTspice user group so it is worth checking first to see if there is already a suitable symbol.

LTSpice Library Files
If you are running Microsoft windows then the library files in LTSpice are stored at C:\Program Files\LTC\LTspiceIV\lib\
The "lib" folder, (screenshot below) contains 3 sub-folders called sym, lib, and sub. You can bookmark this location for future use. Click Favorites and add a suitable name.

Folder Details
cmp Contains standard model data for passive components, diodes, transistors, FET's etc
sub  Contains subcircuit data. Files are ASCII text and end in .mod .sub or .lib
sym Contains circuit symbols ending in extension .asy

Creating a New (Non-Functioning) Schematic Symbol
Please note, all subsequent screenshots are taken from LTspice running on Linux. Appearence may look slightly different, but all steps are the same, independent of the platform used.

The example below shows how to create a non-functional "meter symbol. Begin by starting LTspice and click on File, New Symbol:

Figure 1

In Figure 1 the circle with the cross is the symbol origin. When inserting the symbol into a schematic the symbol will be rotated about the origin.

Figure 2

Now we'll add a circle (figure 2). All the drawing elements also have shortcut keys, pressing "c" will draw a circle. Click the left mouse button to start the circle, move the mouse to size the circle and left click again to complete the circle. The two dots or "anchor points", show where the element starts and ends.

Figure 3

A right mouse click shows the edit functions. As shown in figure 3, each function also has a shortcut key, F5 is the delete function, and F9 is undo.

Figure 4

I have deliberately created an unwanted line. To remove the line in Figure 4, press F5 or right click and select delete, the cursor will change to a pair of scissors. Click on the line, not red anchor points, to delete it.

Figure 5

Now we'll add a pin to our symbol. From the edit menu, select Add Pin/Port or press "p". Left click where you want the first pin to appear. I have clicked over the origin and a sqaure box is drawn around the pin (Figure 5).
Note If the first pin is fixed to the origin, then the symbol will be rotated around this point, this is useful for any component that is drawn at 45 °, as they can be rotated to form a bridge.

Figure 6

The first pin is given netlist number 1. The label of the pin can be set to any name. I could have chosen "+" and "-" but as this component is non-functional, the default name is "A". If creating a symbol for a part that has subcircuit data, then the order of the pins must follow the same order as the subcircuit data. The pin label can be displayed at the top, bottom, left or right of the pin. The text can also be displayed vertically or not shown at all.

Figure 7

Now a connecting line is drawn between the first pin and the circle. It is easier to use the zoom function to make more accurate placement of lines. The zoom function is the magnifying glass with a "+" symbol, just below the view menu.

Figure 8

Now the second line is added. However because it is the same length as previous line, we can use a shortcut. Press F6 or use the edit menu and click duplicate. The cursor changes to two pieces of paper (a copy) and then click over the previous line segment. The line is now drawn in black as shown in figure 8 and follows the mouse.

Figure 9

When the segment is aligned below the previous line, left click, and it will be permanently attached. If you make a mistake press F5 or delete and either copy again, or draw a new line. The grid helps to make accurate placement. Once positioned, use the edit menu or press "p" and add another pin, see figure 9.

Figure 10

The second pin can now be labelled, as before. I chose the default name of "B" and chose not to display the pin.

Figure 11

Now it's time to create a pointer for the meter. Just chose "L" or select line from the edit menu and place a new line inside the circle (figure 11). If you dont like its appearance, delete it and draw another.

Figure 12

Now create an arrow head for the pointer. Add a single line with 3 sections, or just create 3 small separate line segments, as shown in figure 12 above.

Figure 13

The meter symbol is now complete. When displayed in a schematic it may be useful to include a reference to the symbol. Meters are sometimes displayed as M1 for meter 1, M2 if there is a second meter in the circuit. To create attributes, first click the edit menu, then the attributes window will appear as shown in figure 13. The "prefix" attribute will set the component reference. Double click the value field, then enter "M". You can enter a description as well if desired.

Figure 14

Click ok in the attributes box and the symbol prefix can now be clicked in position, shown as "Mnnn" in figure 14. The first use of the symbol in a schematic will be assigned M1, subsequent placements will be assigned M2, and so on. The position of the prefix can also be moved, just click the edit menu and choose move or press F7 to move to a new position.

Figure 15

The symbol is now complete. As the symbol is not included with LTspice it is advisable to make a backup of your work. I just create an LTspice folder, with sub-folders called my_symbols, my_ccts. To save the symbol, go to the file menu and choose "Save As" (figure 15). Use a descriptive name, and all symbols in LTspice must end with the extension .asy

Adding your symbol into LTspice
To include your symbol in LTspice, save it in the LTspice library. For windows users the location will be
C:\Program Files\LTC\LTspiceIV\lib\sym

The image above shows location C:\Program Files\LTC\LTspiceIV\lib, clicking sym folder contains all the schematic symbols.

Warning Each symbol MUST have a unique name, otherwise the existing symbol will be replaced.
Also note: If you create a schematic using a custom symbol and send it to someone else, then you MUST also include the new symbol with the schematic. If you forget, then the missing symbol will show as empty space.

Using your symbol in new schematics
Closing LTspice, (if open) and restarting will cause the program to read the new symbols. Pressing F2 brings up the component browser, and your new symbol should now be available for use.

A note about Drawing Scale
After designing a new symbol, you may find that it is disproportionate large or smaller than other components. There is no way to scale components, so it will need to be redrawn. However, if you copy an existing symbol from the LTspice symbol directory, and rename it, you can use the symbol elements, (circles, lines, rectangles etc) as a guide, to create your new component.

Creating New Symbols with Spice Prefix Data in LTspice
In this example I have drawn a new symbol for an electrolytic capacitor. First the edit attributes menu is accessed, either via the edit menu (screenshot below) or by pressing Ctrl+A

The edit attributes table is then displayed with the symbol (figure 16). The spice prefix (prefix) determines the type of circuit element.

Figure 16

Entering "C" in the prefix field, associates the symbol with a capacitor, entering L associaties the symbol with an inductor. The value field sets the default value. A list of spice prefix characters is shown in the table below :

Spice Prefix Table
A XSpice Model
B Nonlinear Dependent Voltage Sources
C Capacitors
D Junction Diodes
D Zener Diodes
E Linear Voltage-Controlled Voltage Sources
F Linear Current-Controlled Current Sources
G Linear Voltage-Controlled Current Sources
H Linear Current-Controlled Voltage Sources
I Independent Current Sources
K Coupled (Mutual) Inductors
L Inductors
O Lossy Transmission Lines
Q Bipolar Junction Transistors
R Resistors
S Voltage Controlled Switches
T Lossless Transmission Lines
U Uniform Distributed RC Lines (Lossy)
V Independent Voltage Sources
W Current Controlled Switches
X Subcircuits

Setting a default value. If not changed, the capacitor will be assigned the value "C". Each component will have to be changed on the schematic. However you can assign a default value which will appear on the schematic. Choosing a popular value such as 100uF, will set every new capacitor symbol to 100uF. This may save time drawing a schematic, as you only have to alter non 100uF capacitors. To set a default value, either right the value on the symbol (see figure 17), or bring up the edit attributes window, by pressing ctrl+A and change the value field.

Figure 17

Save the component. If you choose a name like cap2.asy, you can have the choice of using existing symbols in LTspice or your new symbols. Once again the component needs to be saved in LTspice library files under symbols. The location is:
C:\Program Files\LTC\LTspiceIV\lib\sym ()for windows users).

Figure 18

If you run LTspice from linux then the location will be :
/home/username/.wine/drive_c/Program Files/LTC/LTspiceIV/lib/sym
Windows explorer, nautilus or dolphin (linux) allow all the symbols to be browsed. Figure 18 shows the components displayed by konqueror file manager.

Figure 19

Using your symbol in new schematics
Closing LTspice, (if open) and restarting will cause the program to read the new symbols. Pressing F2 brings up the component browser, and your new symbol should now be available for use. If you assigned a default value, then the component will be displayed with this value. It can be changed of course, with a right click.

New Symbols for LTSpice
I have created a range of new symbols, that I use in Circuit Exchange, shown in the image below:

The top two lines, are schematic only symbols and non-functional. Starting on the third line, all capacitors have spice prefix character C and are therefore functional, as this the 45° diode symbol. F1 is a non-functional fuse symbol. The bottom line is a Norton current generator, followed by a European symbol for a resistive preset. The last 4 symbols are SPST switch, SPDT switch, NO push button, and NC closed push button.

Download My New Symbols
You may use my new symbols, in your own work. They are free to use for both commercial and non-commercial use. If you have a website, you may want to link back to this page, as I often create new components.
Click here to download my symbols.
As stated previously, if you plan to share any schematics that use new symbols, then you must also include them with the schematic. The recommended method by the LTSpice User group is to create separate directories for every circuit. The symbols, subcircuit data, and new models can then be stored with the schematic.

Shell Script for linux Users
The following bash script is designed to make life easier when adding new components to LTspice. It is a simple shell script that can be modified and places all component, library, model and subcircuit files into the relevant directory in LTspice. My download location is /media/share/electronics/ltspice  Just replace this with your download location for your system.
Transfer shell script
Just download the script and execute it with ./