electricpy.lm317

electricpy.lm317(r1, r2, v_out)[source]

LM317 linear voltage regulator solver.

The LM317 is a linear voltage regulator that can be adjusted to supply a specific output voltage. The LM317 has three pins, adjust, output and input. The LM317 is often connected as in the image below. [1]

https://www.basictables.com/media/lm317-circuit.png

Formula to Calculate Output Voltage, R1, R2:

\[V_{out} = 1.25 * (1+\frac{R2}{R1})\]
\[R1 = \frac{1.25*R2}{V_{out}-1.25}\]
\[R2 = \frac{R1*V_{out}}{1.25 - R1}\]
Parameters:
v_out : float, Optional

Output Voltage in LM317 in Volts

r1 : float, Optional

r1 is resistance and is measured in ohm

r2 : float, Optional

r2 is resistance and is measured in ohm

Returns:

  • v_out (float) – v_out is the output voltage and is measured in volt (V)

  • r1 (float) – r1 is resistance and is measured in ohm

  • r2 (float) – r2 is resistance and is measured in ohm

[1]

Electronial, “LM317” BasicTables, Accessed May, 2022 https://www.basictables.com/electronics/lm317