By Prof. Dr. Dogan Ibrahim
In this e-book, top-selling Elektor author, Prof. Dr. Dogan Ibrahim aims to teach the design and analysis of electrical and electronic circuits and develop PCB boards using both TINA and TINACloud. The book is aimed at electrical/electronic engineers, undergraduate electronic/ electrical engineering students at technical colleges and universities, postgraduate and research students, teachers, and hobbyists. Many tested and working simulation examples are provided covering most fields of analogue and digital electrical/electronic engineering. These include AC and DC circuits, diodes, zener diodes, transistor circuits, operational amplifiers, ladder diagrams, 3-phase circuits, mutual inductance, rectifier circuits, oscillators, active and passive filter circuits, digital logic, VHDL, MCUs, switch-mode power supplies, PCB design, Fourier series, and spectrum. Readers do not need to have any programming experience unless they wish to simulate complex MCU circuits.
Table of contents:
Chapter 1 ● Introduction
1.1 ● Why simulation? 13
1.2 ● Electronic simulation 14
1.3 ● SPICE modelling of electronic circuits 15
1.4 ● The TINA program 16
1.4.1 ● Schematic capture 17
1.4.2 ● Live 3D Breadboard Tool 17
1.4.3 ● PCB design 17
1.4.4 ● Electrical Rules Check (ERC) 17
1.4.5 ● Schematic Symbol Editor 18
1.4.6 ● Library Manager 18
1.4.7 ● IBIS model support 18
1.4.8 ● Parameter Extractor 18
1.4.9 ● Text and Equation Editor 18
1.4.10 ● DC analysis 19
1.4.11 ● Transient analysis 19
1.4.12 ● Auto convergence 19
1.4.13 ● Transient noise analysis 19
1.4.14 ● Fourier analysis 19
1.4.15 ● Digital simulation 20
1.4.16 ● HDL simulation 20
1.4.17 ● Microcontroller (MCU) simulation 20
1.4.18 ● Flowchart Editor and Debugger 20
1.4.19 ● AC analysis 21
1.4.20 ● Network analysis 21
1.4.21 ● Linear AC Noise analysis 21
1.4.22 ● Symbolic analysis 21
1.4.23 ● Monte-Carlo and worst-case analysis 21
1.4.24 ● Design Tool 21
1.4.25 ● Optimisation 22
1.4.26 ● Post-processor 22
1.4.27 ● Presentation 22
1.4.28 ● Interactive mode 22
1.4.29 ● Virtual instruments 23
1.4.30 ● Real-time Test & Measurements 23
1.4.31 ● Training and Examination 23
1.4.32 ● Mechatronics Extension 23
Chapter 2 ● TINA Versions
2.1 ● Overview 24
2.2 ● Version features 24
2.3 ● Options 27
2.4 ● Supplementary hardware 27
2.4.1 ● LabXplorer: Multifunction Instrument for Education and Training with local and
remote measurement capabilities 27
Chapter 3 ● TINA Installation Procedure
3.1 ● Hardware and software requirements 29
3.2 ● Installation 29
3.3 ● Installing the hardware key (dongle) version of TINA 36
3.4 ● Authorisation of the software protected version of TINA 37
Chapter 4 ● Getting Started – Simulating Simple Circuits
4.1 ● The Schematic Editor 38
4.2 ● Simulation 1 – Series and parallel resistors 39
4.3 ● Simulation 2 – Resistor – capacitor circuit 49
4.4 ● Simulation 3 – Resistor – inductor-capacitor circuit 61
4.5 ● Simulation 4 – Power consumption – using a power meter 67
4.6 ● Simulation 5 – Voltage across components – using voltmeters 69
4.7 ● Simulation 6 – Current through components using Ampere Meters 70
4.8 ● Simulation 7 – Impedance measurement using the Impedance Meter 71
4.9 ● Simulation 8 – Resistance measurement using the Ohmmeter 73
4.10 ● Simulation 9 – Plotting voltage across components using an Oscilloscope component 74
4.11 ● Simulation 10 – Measuring frequency using a frequency meter 78
4.12 ● Simulation 11 – AC circuit analysis I 79
4.13 ● Simulation 12 – AC circuit analysis II 82
4.14 ● Simulation 13 – AC circuit analysis III 84
4.15 ● Simulation 14 – Thevenin’s Theorem – AC circuit analysis 86
4.16 ● Simulation 15 – Norton’s Theorem – AC circuit analysis 89
4.17 ● 3-Phase circuits 92
4.17.1 ● Simulation 16 – 3 phase star connected circuit analysis with resistive load 93
4.17.2 ● Simulation 17 – 3 phase star connected circuit analysis with resistive and
inductive load 95
4.18 ● Mutual inductance 98
4.18.1 ● Simulation 18 – Mutual inductance 99
Chapter 5 ● Diode Circuit Design and Simulation
5.1 ● Simulation 1 – Simple diode circuit 102
5.2 ● Simulation 2 – Half-wave rectifier circuit 103
5.3 ● Simulation 3 – Half-wave rectifier circuit with transformer 104
5.4 ● Simulation 4 – Full-wave rectifier circuit with center-tapped transformer 105
5.5 ● Simulation 5 – Full-wave bridge rectifier circuit with transformer 107
5.6 ● Simulation 6 – Diode clamper circuit 109
5.7 ● Simulation 7 – Zener diode characteristics 110
5.8 ● Simulation 8 – Zener diode voltage regulator 112
5.9 ● Simulation 9 – Zener diode symmetrical voltage limiter 113
5.10 ● Simulation 10 – Voltage tripler circuit 114
Chapter 6 ● Transistor Circuit Design and Simulation
6.1 ● Simulation 1 – Bipolar transistor characteristics 118
6.2 ● Simulation 2 – Common emitter transistor amplifier – Analysis 119
6.3 ● Simulation 3 – Common emitter transistor amplifier – Design 125
6.4 ● Simulation 4 – Multi-stage common emitter transistor amplifier – Using subcircuits in TINA 127
6.5 ● The Netlist 131
6.6 ● Simulation 5 – BJT transistor Colpitts oscillator 132
6.7 ● Transistor as a two port network 136
6.7.1 ● Transistor h parameters 139
6.8 ● Simulation 6 – JFET transistor common source amplifier 142
6.9 ● Simulation 7 – JFET transistor characteristic curves 146
6.10 ● Simulation 8 – BJT Transistor switch 147
6.11 ● Thyristors and triacs 149
6.11.1 ● Simulation 9 – Thyristor phase control 149
6.11.2 ● Simulation 10 – Triac phase control 151
6.12 ● Audio power amplifiers 153
6.12.1 ● Simulation 11 – Class AB audio power amplifier 154
Chapter 7 ● Operational Amplifier Circuit Design and Simulation
7.1 ● Key characteristics 161
7.2 ● Operational amplifier circuits 162
7.2.1 ● Inverting amplifier 163
7.2.1 ● Inverting amplifier 163
7.2.2 ● Non-inverting amplifier 163
7.2.3 ● Voltage follower 164
7.2.4 ● Voltage adder amplifier 165
7.2.5 ● Voltage subtractor 166
7.2.6 ● Voltage integrator 167
7.2.7 ● Voltage differentiator 168
7.2.8 ● Current to voltage converter 169
7.3 ● Simulation 1 – Inverting amplifier 171
7.4 ● Simulation 2 – Summing amplifier 174
7.5 ● Simulation 3 – Voltage integrating amplifier 175
7.6 ● Simulation 4 – Half-wave rectifier circuit 176
7.7 ● The Design Tool 178
7.7.1 ● Simulation 5 – Example design 178
7.8 ● Optimisation 180
7.8.1 ● Simulation 6 – Example design – AC circuit 183
7.8.2 ● Simulation 7 – Example design – DC circuit 185
7.9 ● Sinusoidal oscillators . 187
7.9.1 ● Simulation 8 – Phase shift oscillator 187
7.9.2 ● Simulation 9 – The Wien Bridge oscillator 189
7.9.3 ● Simulation 10 – The Colpitts oscillator 192
7.10 ● Square wave generators 194
7.10.1 ● Simulation 11 – Operational amplifier square wave generator 194
7.10.2 ● Simulation 12 – 555 integrated circuit 196
Chapter 8 ● Filter Circuit Design and Simulation
8.1 ● TINA filters 199
8.2 ● Simulation 1 – Designing a 2nd order low-pass active filter 201
8.3 ● Simulation 2 – Designing a higher-order low-pass active filter 206
8.4 ● Simulation 3 – Designing a high-pass active filter 207
8.5 ● Simulation 4 – Designing a band-pass active filter 209
8.6 ● Simulation 5 – Designing a low-pass passive filter 210
Chapter 9 ● Digital Logic Circuit Design and Simulation
9.1 ● Digital logic simulation using TINA 212
9.2 ● Simulation 1 – Simple AND gate 212
9.3 ● Simulation 2 – Half adder using gates 215
9.4 ● Simulation 3 – 2-bit synchronous counter 216
9.5 ● Simulation 4 – 7-segment LED display 217
9.6 ● Simulation 5 – 4-bit binary counter with logic indicators 218
9.7 ● Simulation 6 – 4-bit decade counter with 7-segment display 219
9.8 ● Simulation 7 – 8-bit decade counter with two 7-segment displays 220
9.9 ● Simulation 8 – 4-bit decade counter and 7-segment display – Using a 4-bit Data Generator 221
9.10 ● Simulation 9 – Creating a full adder – using a MACRO 223
9.11 ● Using Hardware Description Languages (HDLs) 225
9.11.1 ● Using VHDL simulation in TINA to analyse digital circuits 226
9.11.2 ● Simulation 10 – Half adder circuit – VHDL 226
9.11.3 ● Simulation 11 – Counter circuit – VHDL 230
9.11.4 ● The VHDL Debugger 233
9.12 ● Using Verilog simulation in TINA to analyse digital circuits 235
Chapter 10 ● Logic Design Tool
Chapter 11 ● Simulating Microcontrollers
11.1 ● Overview 246
11.2 ● Using the Flowchart editor 246
11.2.1 ● Simulation 1 – Alternately flashing 2 LEDs – PIC series microcontroller 246
11.2.2 ● Simulation 2 – 4-bit Up/Down counter with hex display – PIC series microcontroller 249
11.2.3 ● Flowchart debugging 252
11.3 ● Using assembly programming 253
11.3.1 ● Simulation 3 – Counter – PIC series microcontroller 253
11.3.2 ● Modifying the asm code 255
11.3.3 ● Debugging the ASM code 256
11.4 ● Using C programming 257
11.4.1 ● Simulation 4 – Counter – ATTINY13 microcontroller 258
11.4.2 ● Simulation 5 – Traffic lights – ATTINY13 microcontroller 261
11.4.3 ● Simulation 6 – LCD counter – Arduino Uno 263
11.4.4 ● Simulation 7 – Traffic light sequencer– PIC microcontroller 266
11.4.5 ● Simulation 8 – Flashing light– STM32 microcontroller 268
11.5 ● Memory devices 272
11.5.1 ● Simulation 9 – 2-bit x 2-bit digital multiplier – ROM memory . 272
11.5.2 ● Simulation 10 – 4-bit binary counter with two hex displays – ROM memory . 275
Chapter 12 ● Ladder Logic Circuits
12.1 ● Overview . 278
12.2 ● Simulation 1 – Ladder logic with a light and motor 278
12.3 ● Ladder logic components as digital logic components 279
12.4 ● Latching circuit 281
12.4.1 ● Simulation 2 – Latching motor circuit 281
12.4.2 ● Simulation 3 – Forward/reverse motor control 283
12.4.3 ● Simulation 4 – Conveyor belt controller 284
Chapter 13 ● Switching-Mode Power Supply Circuits (SMPS)
13.1 ● Overview . 286
13.2 ● Simulation 1 – TPS61031 SMPS circuit 286
Chapter 14 ● Printed Circuit Board (PCB) Design
14.1 ● Overview 293
14.2 ● Bipolar transistor multivibrator circuit project 293
14.2.1 ● The design 294
14.2.2 ● Simulation 294
14.2.3 ● Check footprint names 295
14.2.4 ● Stress analysis 297
14.2.5 ● Save your schematic 297
14.2.6 ● Start TINA PCB program . 298
14.2.7 ● Gerber file 302
14.2.8 ● GCode NC drill file 302
14.2.9 ● PCB information 303
14.2.10 ● Component list 303
14.2.11 ● Netlist 304
Chapter 15 ● PCB Design Techniques
15.1 ● Overview 307
15.2 ● Creating Buses in the Schematic Editor and the PCB Designer of TINA 307
15.3 ● Multiple units in the same package 310
15.4 ● Power supply of logic components 313
15.5 ● Repeating circuit blocks (using the Copy Macro function) 316
15.6 ● Creating a Two-Layer, Double-Sided, Surface-Mount Technology Board 320
15.7 ● Creating PCB components 325
Chapter 16 ● Making Schematic Symbols and Footprints
16.1 ● Overview 328
16.2 ● Example 328
16.3 ● Using the IC wizard in Schematic Symbol editor 332
16.4 ● Using the Footprint editor 335
16.5 ● IC Wizard in the Footprint Editor 339
16.5.1 ● Example design 340
16.6 ● Adding Public PCB Footprints to TINA 343
16.7 ● Adding Public 3D Footprint models to TINA 346
Chapter 17 ● Using TINACloud
17.1 ● Overview 348
17.2 ● Starting to use TINACloud 349
17.3 ● Example simulation 350
17.4 ● Example PCB design 355
17.5 ● Sharing your TINA schematic 357
Chapter 18 ● Other Useful Tools
18.1 ● Overview 359
18.2 ● 3D Breadboard 359
18.3 ● Stress (Smoke) analysis 360
18.4 ● Electric Rules Check (ERC) 362
18.5 ● Serial monitor 362
18.6 ● Component explorer 362
18.7 ● Find component 363
18.8 ● Protect circuit 364
18.9 ● Export 365
18.10 ● Import 365
18.11 ● Fourier series 365
18.12 ● Fourier spectrum 367
18.13 ● Noise analysis 367
18.14 ● Power dissipation analysis 369
18.15 ● Interpreter 370
18.15.1 ● Example 1 – RLC circuit 371
18.15.2 ● Example 2 – DC circuit 373
18.15.3 ● Example 3 – AC circuit 374
18.15.4 ● Evaluating Integrals 375
18.15.5 ● Solving linear system of equations 375
18.15.6 ● Drawing diagrams 376
18.15.7 ● Bode diagrams 377
18.15.8 ● Signal definition 379
18.15.9 ● Supported functions 381
18.16 ● DC Temperature analysis 382
18.17 ● The parameter extractor 382
18.18 ● Finite State Machine Editor 384
Chapter 19 ● The Library Manager
Chapter 20 ● Field-Programmable Gate Arrays (FPGA)
20.1 ● Overview 391
20.2 ● Programming FPGA Boards with Schematic Design Entry using TINA – Example 1
391
20.3 ● Programming FPGA Boards with Schematic Design Entry using TINA – Example 2
400
20.4 ● Programming FPGA Boards in VHDL with TINA 404
20.5 ● Programming FPGA Boards in Verilog with TINACloud 407
20.6 ● Storing the program in non-volatile memory of Basys 3 board 411
20.7 ● Seconds counter on the 7-segment 4-digit Basys 3 FPGA board using TINA with
VHDL 415
20.8 ● Pushbutton counter on the 7-segment 4-digit Basys 3 FPGA board using TINA with
VHDL 428
Chapter 21 ● Additional Information
21.1 ● TINA website 431
21.2 ● TINA-TI 434
21.3 ● Other useful links 434
21.4 ● TINA Help files 435
● Epilogue 436
● Index 437