:author: The KiCad Team
:doctype: article
:toc:
:ascii-ids:


= Calculator Tools

include::../version.adoc[]

_KiCad {kicad-version-short} Reference Manual_

[[copyright]]
*Copyright*

This document is Copyright The KiCad Documentation Contributors.
You may distribute it and/or modify it under the terms of either
the GNU General Public License (http://www.gnu.org/licenses/gpl.html),
version 3 or later, or the Creative Commons Attribution License
(http://creativecommons.org/licenses/by/3.0/), version 3.0 or later.

All trademarks within this guide belong to their legitimate owners.

[[contributors]]
*Contributors*

Heitor de Bittencourt.
Mathias Neumann

[[feedback]]
*Feedback*

The KiCad project welcomes feedback, bug reports, and suggestions related to the software or its
documentation.  For more information on how to submit feedback or report an issue, please see the
instructions at https://www.kicad.org/help/report-an-issue/

*Software and Documentation Version*

This user manual is based on KiCad {kicad-version-long}. Functionality and
appearance may be different in other versions of KiCad.

Documentation revision: `{doc-commit}`.

[[introduction]]
== Introduction

The KiCad PCB Calculator is a set of utilities to help you find the values of
components or other parameters of a layout. The Calculator has the following
tools:

* Regulators
* Track Width
* Electrical Spacing
* Trans Line
* RF Attenuators
* Color Code
* Board Classes


[[calculators]]
== Calculators

[[regulators]]
=== Regulators

This calculator helps with the task of finding the values of the resistors
needed for linear and low-dropout voltage regulators.

image::images/en/regulators.png[alt="Regulators",scaledwidth="80%"]


For the _Standard Type_, the output voltage Vout as a function of the reference voltage Vref and resistors R1 and R2 is given by:

image::images/Calculation1.png[alt="Regulators",scaledwidth="20%"]


For the _3 terminal type_, there is a correction factor due to the quiescent current Iadj flowing from the adjust pin:

image::images/Calculation2.png[alt="Regulators",scaledwidth="20%"]


This current is typically below 100 uA and can be neglected with caution.

To use this calculator, enter the parameters of the regulator _Type_, _Vref_ and, if needed, _Iadj_, select the field you want to calculate (one of the resistors or the output voltage) and enter the other two values.

[[rf-attenuators]]
=== RF-Attenuators

With the RF Attenuator utility you can calculate the values of the resistors
needed for different types of attenuators:

* PI
* Tee
* Bridged Tee
* Resistive Splitter

To use this tool, first select the type of attenuator you need, then enter the
desired attenuation (in dB) and input/output impedances (in Ohms).

image::images/en/rfattenuators.png[alt="RF Attenuators",scaledwidth="80%"]

[[e-series]]
=== E-Series

This calculator helps to identify combinations of standard E-series resistors that meet a required
resistance, optionally excluding several resistor values that are not available.

image::images/en/eseries.png[alt="E-Series",scaledwidth="80%"]

[[color-code]]
=== Color-Code

This calculator helps translating the color bars from the resistor to its value. To use it, first select the _tolerance_ of the resistor: 10%, 5% or equal or smaller than 2%. For example:

* Yellow Violet Red Gold: 4 7 x100 ±5% = 4700 Ohm, 5% tolerance
* 1kOhm, 1% tolerance: Brown Black Black Brown Brown


image::images/en/colorcode.png[alt="Color-Code",scaledwidth="80%"]

[[transline]]
=== TransLine

Transmission line theory is a cornerstone in the teaching of RF and microwave engineering.

In the calculator you can choose different sorts of Line Types and their special parameters. The models implemented are frequency-dependent, so they disagree with simpler models at high _enough_ frequencies.

This calculator is heavilly based on http://transcalc.sourceforge.net/[Transcalc].

The transmission line types and the reference of their mathematical models are listed below:

* Microstrip line:

- H. A. Atwater, “Simplified Design Equations for Microstrip Line Parameters”, Microwave Journal, pp. 109-115, November 1989.

* Coplanar wave guide.

* Coplanar wave guide with ground plane.

* Rectangular waveguide:

- S. Ramo, J. R. Whinnery and T. van Duzer, "Fields and Waves in Communication Electronics", Wiley-India, 2008, ISBN: 9788126515257.

* Coaxial line.

* Coupled microstrip line:

- H. A. Atwater, “Simplified Design Equations for Microstrip Line Parameters”, Microwave Journal, pp. 109-115, November 1989.

- M. Kirschning and R. H. Jansen, "Accurate Wide-Range Design Equations for the Frequency-Dependent Characteristic of Parallel Coupled Microstrip Lines," in IEEE Transactions on Microwave Theory and Techniques, vol. 32, no. 1, pp. 83-90, Jan. 1984. doi: 10.1109/TMTT.1984.1132616.

- Rolf Jansen, "High-Speed Computation of Single and Coupled Microstrip Parameters Including Dispersion, High-Order Modes, Loss and Finite Strip Thickness", IEEE Trans. MTT, vol. 26, no. 2, pp. 75-82, Feb. 1978.

- S. March, "Microstrip Packaging: Watch the Last Step", Microwaves, vol. 20, no. 13, pp. 83.94, Dec. 1981.

* Stripline.

* Twisted pair.


image::images/en/transline.png[alt="TransLine",scaledwidth="80%"]

[[via-size]]
=== Via Size

The Via Size tool calculates the electrical and thermal properties of a given plated through-hole
pad or via.

image::images/en/viasize.png[alt="Via Size",scaledwidth="80%"]


[[track-width]]
=== Track Width

The Track Width tool calculates the trace width for printed circuit board conductors for a given
current and temperature rise.  It uses formulas from IPC-2221 (formerly IPC-D-275).


image::images/en/trackwidth.png[alt="Track-Width",scaledwidth="80%"]


[[electrical-spacing]]
=== Electrical Spacing

This table helps finding the minimum clearance between conductors.

Each line of the table has a minimum recomended distance between conductors
for a given voltage (DC or AC peaks) range. If you need the values for voltages
higher than 500V, enter the value in the box in the left corner and press
_Update Values_.

image::images/en/electricalspacing.png[alt="Electrical-Spacing",scaledwidth="80%"]


[[board-classes]]
=== Board-Classes

==== Performance Classes

In IPC-6011 have been three performance classes established

* *Class 1 General Electronic Products*:
  Includes consumer products, some computer and computer peripherals suitable for applications where cosmetic imperfections are not important and the major requirement is function of the completed printed board.

* *Class 2 Dedicated Service Electronic Products*:
  Includes communications equipment, sophisticated business machines, instruments where high performance and extended life is required and for which uninterrupted service is desired but not critical. Certain cosmetic imperfections are allowed.

* *Class 3 High Reliability Electronic Products*:
  Includes the equipment and products where continued performance or performance on demand is critical. Equipment downtime cannot be tolerated and must function when required suchas in life support items or flight control systems. Printed boards in this class are suitable for applications where high levels of assurance are required and service is essential.

==== PCB Types

In IPC-6012B there are also 6 Types of PCB defined:

* Printed Boards without plated through holes (1)

** 1 Single-Sided Board

* And Boards with plated through holes (2-6)

** 2 Double-Sided Board

** 3 Multilayer board without blind or buried vias

** 4 Multilayer board with blind and/or buried vias

** 5 Multilayer metal core board without blind orburied vias

** 6 Multilayer metal core board with blind and/orburied vias

image::images/en/boardclasses.png[alt="Board-Classes",scaledwidth="80%"]

