Basic knowledge

LTspice-Circuit hierarchy(blocked)

In this article, we will explain how to hierarchize(block) the circuit drawn by LTspice’s schematic editor.

When circuits are large and complex, some circuits can be hierarchized(blocked) to improve the readability of the schematic.

In addition, block circuits created hierarchically can be used in multiple applications within the same schematic or in other schematics.

What is circuit hierarchy(blocked)?

In this article, we will try to hierarchize(block) the amplification part surrounded by the red frame of the “Inverting Amplifier Circuit” created in the following article.

It is hierarchized as follows, and the block circuit below the hierarchy is included in the schematic above the hierarchy.

We have prepared a schematic of “op amp inverting circuit”, so if you want to hierarchize(block) the circuit immediately, please download it by clicking the link below.

Create block circuit

1

Open the schematic(sample-circuit-lt1028.asc) of the “op amp inverting circuit” and delete all circuits except red frame.

2

Click “Label Net” on the toolbar and wire the label to each terminal as above. This completes the block circuit.

3

Click “File”-“Save As” on the menu bar to save.

4

It does not matter what storage location or name. In this article, it was saved as “inverting-amp-block.asc” in “C:\Users\USER\Documents\LTspiceXVII”.

Create symbol

1

Click “Hierachy-Open this Sheet’s Symbol” to automatically create a schematic symbol for the block circuit.

2

“Couldn’t find this sheet’s symbol. Shall I try to automatically generate one?”
Is displayed, click “Yes”.

3

As mentioned above, schematic symbols are created automatically.

4

Also, it is saved with the same name in the same folder as the schematic. In this case, it is saved as “inverting-amp-block.asy” in “C:\Users\USER\Documents\LTspiceXVII”.

5

However, since it is difficult to wire with this pin arrangement, change the pin arrangement.

See the following articles for more information, including moving pin locations.

After placing the pins, save them by “Save” on the toolbar.

How to use block circuit

1

Open the schematic(sample-circuit-lt1028.asc) of the “Inverting Amplifier Circuit” and delete all circuits in red frame.

2

Click “Component” on the toolbar.

3

Change the Top Directory to “LTspiceXVII” and select “inverting-amp-block”.

4

As above, place “inverting-amp-block” and wire each part, label and GND respectively.

5

Click “File”-“Save As” on the menu bar to save.

6

It does not matter what storage location or name. In this article, it was saved as “sample-circuit-lt1028-block.asc” in “C:\Users\USER\Documents\LTspiceXVII”.

This completes the hierarchization(blocking) of the circuit. The block circuit placed can be used as a “2x inverting amplifier”.

Parameter passing between hierarchies

The circuit has been hierarchized(blocked), but it is difficult to use it in other circuits because the gain of “2-fold inverting amplifier” is fixed.

So, let’s make it easy to set the gain in the circuit above the hierarchy by passing parameters between hierarchies.

1

Right-click of the mouse on the block circuit to open the “Navigate / Edit Schematic Block” screen.

2

Click “Open Schematic”.

3

A schematic of the block circuit is displayed. Right click of the mouse R2 and change “Resistance[Ω]” to “{gain*100}”.

4

Return to the circuit above the hierarchy, right-click of the mouse on the block circuit and open the “Navigate / Edit Schematic Block” screen.

By inputting “gain” to PARAMS, you can freely set the block circuit gain. For example, if “gain = 2”, the amplification factor will be doubled.

5

Now that parameter passing between hierarchies is complete, save the block circuit.

6

Similarly, save the circuit above the hierarchy.

You can download the hierarchized(blocked) schematic from the link below.

Don`t copy text!