CircuiTikZ 1.3.7-7bde82f - Manual

Transcription

1920CircuiTikZ12345678910111213Massimo A. Redaellim.redaelli@gmail.comStefan Lindnerstefan.lindner@fau.deStefan Erhardtstefan.erhardt@fau.deRomano on 1.3.8-unreleased-82ae151 (2021/06/08)Massimo A. Redaelli (m.redaelli@gmail.com)Stefan Lindner (stefan.lindner@fau.de)Stefan Erhardt (stefan.erhardt@fau.de)Romano Giannetti (romano.giannetti@gmail.com)June 8, 2021

Contents1 Introduction81.1About . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .81.2License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .81.3Loading the package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .81.4Installing a new version of the package. . . . . . . . . . . . . . . . . . . . . . . . .91.5Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .91.6Incompatible packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .91.7Known bugs and limitation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .101.8Scale factors inaccuracies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .101.9Incompabilities between version . . . . . . . . . . . . . . . . . . . . . . . . . . . . .101.10 Feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .121.11 Package options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .122 Tutorials162.1Getting started with CircuiTikZ: a current shunt . . . . . . . . . . . . . . . . . . .162.2A non-inverting op-amp amplifier . . . . . . . . . . . . . . . . . . . . . . . . . . . .192.2.1Reusing the circuit: the easy way . . . . . . . . . . . . . . . . . . . . . . . .212.3A transistor-based amplifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .222.4A logic circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .273 The components: usage3.1Path-style components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .303.1.1Anchors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .303.1.2Border anchors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .313.1.3Relative coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .313.1.4Customization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .323.1.4.1Components size . . . . . . . . . . . . . . . . . . . . . . . . . . . .323.1.4.2Thickness of the lines . . . . . . . . . . . . . . . . . . . . . . . . .343.1.4.3Shape of the components . . . . . . . . . . . . . . . . . . . . . . .34Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .34Node-style components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .353.2.1Mirroring and flipping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .363.2.2Anchors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .363.2.3Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36Styling circuits and components . . . . . . . . . . . . . . . . . . . . . . . . . . . . .373.3.1Relative size. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .383.3.2Fill color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .393.3.3Line thickness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .403.3.4Style files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .413.1.53.23.3301

3.3.53.4Style files: how to write them . . . . . . . . . . . . . . . . . . . . . . . . . .42Subcircuits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .433.4.1Subcircuit definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .433.4.2Using the subcircuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .443.4.2.1Scaling, flipping and rotating subcircuits . . . . . . . . . . . . . .44Parameters in subcircuits . . . . . . . . . . . . . . . . . . . . . . . . . . . .453.4.34 The components: list4.1Grounds and supply voltages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .464.1.1Grounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .464.1.1.1Grounds anchors . . . . . . . . . . . . . . . . . . . . . . . . . . . .464.1.1.2Grounds customization . . . . . . . . . . . . . . . . . . . . . . . .47Power supplies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .474.1.2.1Power supply anchors . . . . . . . . . . . . . . . . . . . . . . . . .474.1.2.24.1.24.24.3Power supplies customization . . . . . . . . . . . . . . . . . . . . .47Resistive bipoles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .484.2.1Potentiometers: wiper position . . . . . . . . . . . . . . . . . . . . . . . . .504.2.2Generic sensors anchors . . . . . . . . . . . . . . . . . . . . . . . . . . . . .504.2.3Resistive components customization . . . . . . . . . . . . . . . . . . . . . .514.2.3.1Geometry. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .514.2.3.2Thickness. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .514.2.3.3Arrows. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .51Capacitors and inductors: dynamical bipoles . . . . . . . . . . . . . . . . . . . . .524.3.1Capacitors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .524.3.2Capacitive sensors anchors . . . . . . . . . . . . . . . . . . . . . . . . . . . .534.3.3Capacitors customizations . . . . . . . . . . . . . . . . . . . . . . . . . . . .534.3.4Inductors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .534.3.5Inductors customizations . . . . . . . . . . . . . . . . . . . . . . . . . . . .544.3.5.1554.3.64.44.546Chokes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Inductors anchors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .554.3.6.1Taps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .554.3.6.2Core anchors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .55Diodes and such . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .564.4.1Tripole-like diodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .584.4.2Thyristors anchors and customization . . . . . . . . . . . . . . . . . . . . .614.4.3Diode customizations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .61Sources and generators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .624.5.1Batteries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .624.5.2Stationary sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .624.5.3Sinusoidal sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .634.5.4Controlled sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .642

4.5.5Noise sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .654.5.6Special sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .664.5.7DC sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .674.5.8Sources customizations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .674.5.8.1Size. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .674.5.8.2Waveform symbols. . . . . . . . . . . . . . . . . . . . . . . . . . .684.5.8.3Polarity symbols. . . . . . . . . . . . . . . . . . . . . . . . . . .684.5.8.4Three-phase symbols. . . . . . . . . . . . . . . . . . . . . . . . . .68Instruments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .694.6.1Instruments customizations . . . . . . . . . . . . . . . . . . . . . . . . . . .704.6.1.1Oscilloscope waveform. . . . . . . . . . . . . . . . . . . . . . . . .704.6.2Rotation-invariant elements . . . . . . . . . . . . . . . . . . . . . . . . . . .714.6.3Instruments as node elements . . . . . . . . . . . . . . . . . . . . . . . . . .724.6.4Measuring voltage and currents, multiple ways . . . . . . . . . . . . . . . .72Mechanical Analogy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .744.7.1Mechanical elements customizations . . . . . . . . . . . . . . . . . . . . . .754.8Miscellaneous bipoles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .754.8.1Miscellanous element customization . . . . . . . . . . . . . . . . . . . . . .774.9Multiple wires (buses) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .774.10 Crossings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .774.11 Arrows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .784.11.1 Arrows size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .794.12 Terminal shapes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .794.64.74.12.1 BNC connector/terminal. . . . . . . . . . . . . . . . . . . . . . . . . . . .804.13 Block diagram components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .804.13.1 Blocks anchors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .844.13.2 Blocks customization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .854.13.2.1 Multi ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .864.13.2.2 Labels and custom two-port boxes . . . . . . . . . . . . . . . . . .864.13.2.3 Box option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .864.13.2.4 Dash optional parts . . . . . . . . . . . . . . . . . . . . . . . . . .864.14 Transistors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .874.14.1 Standard bipolar transistors . . . . . . . . . . . . . . . . . . . . . . . . . . .874.14.2 Multi-terminal bipolar transistors . . . . . . . . . . . . . . . . . . . . . . . .884.14.3 Field-effect transistors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .884.14.4 Transistor texts (labels) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .914.14.5 Transistors customization . . . . . . . . . . . . . . . . . . . . . . . . . . . .924.14.5.1 Size. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .924.14.5.2 Arrows. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .924.14.5.3 Circles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .934.14.5.4 Body diodes and similar things. . . . . . . . . . . . . . . . . . . .933

4.14.5.5 Schottky transistors. . . . . . . . . . . . . . . . . . . . . . . . . . .944.14.5.6 Ferroelectric transistors . . . . . . . . . . . . . . . . . . . . . . . .944.14.5.7 IGBT outer base. . . . . . . . . . . . . . . . . . . . . . . . . . . .954.14.5.8 UJT transistors. . . . . . . . . . . . . . . . . . . . . . . . . . . . .954.14.5.9 Base/Gate terminal. . . . . . . . . . . . . . . . . . . . . . . . . . .964.14.5.10 Bulk terminals. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .964.14.5.11 Simplified symbols for depletion-mode MOSFETs . . . . . . . . .974.14.5.12 Gate/Base gap coloring. . . . . . . . . . . . . . . . . . . . . . . . .984.14.6 Multiple terminal transistors customization . . . . . . . . . . . . . . . . . .994.14.7 Transistor circle customization . . . . . . . . . . . . . . . . . . . . . . . . .994.14.7.1 Position and size. . . . . . . . . . . . . . . . . . . . . . . . . . . .994.14.7.2 Line and color. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1004.14.8 Transistors anchors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1004.14.9 Transistor paths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1044.15 Electronic Tubes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1044.15.1 Tubes customization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1064.15.2 Other tubes-like components . . . . . . . . . . . . . . . . . . . . . . . . . . 1084.15.2.1 Dynode customization. . . . . . . . . . . . . . . . . . . . . . . . . 1094.16 RF components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1094.16.1 RF elements customization . . . . . . . . . . . . . . . . . . . . . . . . . . . 1114.16.2 Microstrip customization . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1114.17 Electro-Mechanical Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1114.17.1 Electro-Mechanical Devices anchors . . . . . . . . . . . . . . . . . . . . . . 1124.18 Double bipoles (transformers) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1124.18.1 Double dipoles anchors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1134.18.2 Double dipoles customization . . . . . . . . . . . . . . . . . . . . . . . . . . 1144.18.3 Styling transformer’s coils independently . . . . . . . . . . . . . . . . . . . . 1154.19 Amplifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1174.19.1 Amplifiers anchors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1184.19.2 Amplifiers customization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1204.19.2.1 European-style amplifier customization . . . . . . . . . . . . . . . 1224.19.3 Designing your own amplifier . . . . . . . . . . . . . . . . . . . . . . . . . . 1234.20 Switches and buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1234.20.1 Traditional switches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1244.20.2 Cute switches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1254.20.2.1 Cute switches anchors . . . . . . . . . . . . . . . . . . . . . . . . . 1264.20.2.2 Cute switches customization . . . . . . . . . . . . . . . . . . . . . 1264.20.3 Rota

20 21 19 22 18 23 17 24 16 25 15 26 14 27 13 28 12 29 11 30 10 31 9 32 8 33 7 34 6 35 5 36 4 37 3 38 2 39 1 40 CircuiTikZ Massimo A. Redaelli m.redaelli@gmail.com Stefan Lindner stefan.lindner@fau.de