# DIAC (`diac`)

> A trigger diode that breaks over at vbo in either direction, then conducts at a lower voltage until its current dies away.

![diac](https://voltecx-web.nguyenvanqui291.workers.dev/docs/reference/img/diac.svg)

[Component reference](https://voltecx-web.nguyenvanqui291.workers.dev/docs/reference/) · [繁體中文](https://voltecx-web.nguyenvanqui291.workers.dev/zh/docs/reference/switches/diac/)

**Group:** Switches · **Kind:** `{"kind":"diac"}`

## When to use it

Use it to fire a TRIAC from an R-C phase-shift network, as in lamp dimmers, and in relaxation oscillators. Use TRIAC or Thyristor for the power path itself.

## Pins

| Pin | Domain | Meaning |
|---|---|---|
| `a1` | electrical | Terminal 1; positive current flows from a1 to a2 |
| `a2` | electrical | Terminal 2; the part is symmetric, so the two ends can be swapped |

## Common parameters

- `vbo`: Breakover voltage: above it the part conducts, either way (Default: 32)
- `vf`: Voltage lost while it conducts (Default: 27)
- `ih`: Current below which it stops conducting (Default: 50u)

## Parameters

| Key | Unit | Default | Typical range | Description |
|---|---|---|---|---|
| `ron` | Ω | 1 |  | Resistance when it is on |
| `roff` | Ω | 1.8meg |  | Resistance when it is off |
| `vf` | V | 27 |  | Voltage lost while it conducts |
| `device` | — | optional (off) |  | Device name used to look up losses |
| `thermal` | — | optional (off) |  | Where the lost heat goes |
| `eon` | J | 0 |  | Energy lost each time it turns on |
| `eoff` | J | 0 |  | Energy lost each time it turns off |
| `err` | J | 0 |  | Energy lost when the diode recovers |
| `vref` | V | 0 |  | Voltage used to measure those energies |
| `iref` | A | 0 |  | Current used to measure those energies |
| `tc` | 1/K | 0 |  | How on-resistance changes with heat |
| `tj` | °C | 25 |  | Junction temperature for the loss tables |
| `nParallel` | — | 1 |  | Identical devices this one switch stands for: the current is shared, the losses add up, each device keeps its own junction |
| `tjMax` | °C | optional (off) |  | Highest junction temperature allowed; overrides the device's rating |
| `ls` | H | 0 | 500p – 50n H | Unwanted inductance in series with it |
| `coss` | F | 0 | 10p – 5n F | Capacitance across the device |
| `cj` | F | 0 | 5p – 2n F | Extra capacitance across the junction |
| `tdon` | s | 0 | 1n – 500n s | Delay before it turns on |
| `tdoff` | s | 0 | 1n – 500n s | Delay before it turns off |
| `qrr` | C | 0 | 1n – 5u C | Charge released as the diode recovers |
| `trr` | s | 100n | 10n – 1u s | How long the diode takes to recover |
| `qrrTemp` | — | optional (off) |  | Junction temperature (°C) and factor pairs that scale qrr, from the datasheet's curve |
| `part` | — | optional (off) |  | Part number; the catalogue part number, such as BSC070N10NS5, written on the schematic; information only, not simulated |
| `vRating` | V | optional (off) |  | Voltage rating; the largest blocking voltage of the data sheet's maximum ratings (VDS, VCES, VRRM), written on the schematic; information only, not simulated |
| `iRating` | A | optional (off) |  | Current rating; the continuous current of the data sheet's maximum ratings (ID, IC, IF), written on the schematic; information only, not simulated |
| `vbo` | V | 32 |  | Breakover voltage: above it the part conducts, either way |
| `ih` | A | 50u |  | Current below which it stops conducting |

_Parameter descriptions are in English in both languages._

**Use for:** TRIAC triggering · Lamp dimmers · Relaxation oscillators

**Not for:** Switching the load current → [`triac`](https://voltecx-web.nguyenvanqui291.workers.dev/docs/reference/switches/triac/)

## Formulas

| Formula | Equation | Source |
|---|---|---|
| Charging time constant | τ = Rt·Ct | Hayt, Kemmerly & Durbin, Engineering Circuit Analysis, 8th ed. (2012), ch. 8 (basic RC circuits) |
| Time to breakover from a DC supply | t = τ·ln(Vdc/(Vdc − vbo)) | Hayt, Kemmerly & Durbin, Engineering Circuit Analysis, 8th ed. (2012), ch. 8 (driven RC circuits) |
| Charge in the trigger pulse | Q = Ct·(vbo − vf) | Hayt, Kemmerly & Durbin, Engineering Circuit Analysis, 8th ed. (2012), ch. 7 (capacitors) |

## Quick check

Inputs:

- `vdc`: Supply that charges the capacitor = 100 V
- `rt`: Charging resistance = 100k Ω
- `ct`: Trigger capacitance = 100n F
- `vbo`: Breakover voltage = 32 V, `vbo`
- `vf`: On-state voltage = 27 V, `vf`

Outputs:

- `tau`: Charging time constant = `rt*ct` s
- `tfire`: Time to breakover = `tau*ln(vdc/(vdc - vbo))` s
- `qpulse`: Charge in the pulse = `ct*(vbo - vf)` C

## Model logic

- It blocks through roff until abs(v(a1) - v(a2)) exceeds vbo, then turns on in that direction; there is no gate.
- On, it conducts i = (v - vf)/ron forward or i = (v + vf)/ron backwards, so the drop from vbo to vf is a jump, not a negative-resistance curve.
- It turns off when the current in its conducting direction falls below ih, and then blocks again until the next breakover.
- Its capacitance, the breakover current and the temperature drift of vbo are not modelled.

## Model

The DIAC blocks through roff until |v(a1) - v(a2)| exceeds vbo. It then conducts i = (v - vf) / ron forward or i = (v + vf) / ron backwards, where vf is the breakover voltage less the breakback. It stops when |i| falls below ih. The negative-resistance region between the two is a jump, not a curve.

## Common mistakes

- A DIAC fed through a large resistor from a slowly rising source, with no capacitor, cannot carry ih after breakover, so in the model it flips on and off in one step and the solver may not settle. Fire it from a capacitor, as real trigger circuits do.
- vbo must be above vf, or it would turn off as soon as it fires. The compiler refuses such a part.

## Datasheet and sources

The defaults are the STMicroelectronics DB3 (data sheet DS2125 Rev 3, December 2018, Table 2). vbo is VBO typ = 32 V. vf is VBO typ less the dynamic breakover voltage, 32 - 5 V (dV min, at 10 mA). roff is 0.5 x VBO max / IR max = 18 V / 10 uA. The data sheet gives no holding current, and its conducting branch starts at the breakover current, so ih is IBO max = 50 uA. It gives no on-state slope, so ron = 1 Ohm is a modelling value, small next to the gate resistor it drives.

## Example

Open the example with the command `file.openExample` and the name `demo:diac`.

---
Generated by `cargo xtask reference` from the usage texts and parameter specs. Do not edit by hand.
