
LM317 Voltage Regulator in Proteus

Hello friends! Today we will build an adjustable DC supply using an LM317 voltage regulator in Proteus. We will calculate the output-setting resistors, check the available voltage range, and see why load current and temperature matter as much as the potentiometer setting.
Our earlier 5 V supply using a 7805 provides a fixed output. The LM317 uses an external resistor network to set its output, making it useful when a project needs a different low-voltage supply. It does not, however, provide every voltage from zero to the input voltage.
The original motor demonstration, images, video and download remain in this tutorial. We will explain the historical readings while correcting its missing LED current limiter, capacitor choices and assumptions about the maximum output. Start with a resistive load before adding a motor.
What the LM317 Regulates
The LM317 is a positive linear regulator. It adjusts an internal pass element to maintain an approximately 1.25 V difference between its output and adjustment terminals. The external resistors translate that reference difference into the required output relative to ground.
It is not a voltage booster, and the simple ground-referenced arrangement does not reach zero volts. With the adjustment terminal near ground, the output remains near the reference voltage. A true zero-output design needs additional circuitry.
The TI LM317 datasheet defines the reference, adjustment current, minimum load, protection and operating conditions. Use the documentation for your actual manufacturer and package, because a Proteus symbol's pin numbering is not a universal physical pinout.
Identify the Pins Correctly
The historical simulation uses an LM317K symbol labeled VI, VO and ADJ. Wire by those functions inside the simulation. Before building hardware, check the package drawing and viewing direction for the part you actually have.
| Terminal | Purpose |
|---|---|
| IN or VI | Receives the unregulated DC input |
| OUT or VO | Provides the regulated output and connects to the upper setting resistor |
| ADJ | Connects to the junction of the two setting resistors |
For the common TI TO-220 package shown in its datasheet, pins 1, 2 and 3 are adjustment, output and input respectively, and the tab is connected to output. That differs from the numbering displayed on the older LM317K simulation symbol.
The tab connection matters when mounting a heatsink. A bare metal heatsink can become electrically connected to the output unless the mounting arrangement provides suitable insulation. Mechanical cooling and electrical isolation must be considered together.
Build the Basic Adjustable Supply
Use a suitable 12 V DC source for the demonstration. Connect it to the input and connect the circuit return to ground. Place R1 between OUT and ADJ, and R2 between ADJ and ground. Connect the load between OUT and ground.
The original drawing uses R1 = 270 Ω and a 10 kΩ potentiometer. It also connects an LED directly across the output, which is not an acceptable general hardware connection. Add a series LED resistor before using an indicator.
For a revised teaching setup, use R1 = 120 Ω and make R2 adjustable from zero to approximately 680 Ω. This gives a nominal range from about 1.25 V to 8.33 V before including adjustment-current effects. The range leaves more headroom from a nominal 12 V input than attempting to adjust all the way to 12 V.
Start with a 220 Ω, suitably rated load resistor instead of a motor. At 5 V it draws approximately 22.7 mA and dissipates 0.114 W. At 8.33 V it dissipates about 0.315 W, so a 1 W resistor provides useful margin for this exercise.
Calculate the Output Voltage
The setting equation is VOUT = VREF(1 + R2/R1) + IADJR2. The first term is the familiar resistor-ratio result. The second accounts for the adjustment-terminal current flowing through the lower resistor.
Ignoring the smaller adjustment-current term for an initial estimate, R2 = R1(VOUT/1.25 − 1). With R1 = 120 Ω and a 5 V target, R2 is 360 Ω.
| Target output | Calculated R2 | Comment |
|---|---|---|
| 1.25 V | 0 Ω | Approximate minimum in this arrangement |
| 3.3 V | 196.8 Ω | Choose practical values and check actual accuracy |
| 5.0 V | 360 Ω | Useful fixed-output example |
| 8.0 V | 648 Ω | Within the proposed adjustment range |
If IADJ is an illustrative 50 µA and R2 is 360 Ω, its contribution is 0.018 V. The nominal result becomes about 5.018 V before reference and resistor tolerances. Use the datasheet's limits rather than treating that illustrative current as exact.
For a sensitive fixed-voltage module, calculate the worst-case range and measure the result before connecting the module. A potentiometer set by eye is not sufficient protection for a 3.3 V device. Our LM317 calculator can help with the resistor arithmetic, but it cannot evaluate your thermal or fault conditions.
Why a 12 V Input Cannot Produce Every Requested Output
The regulator needs input-to-output headroom. As the requested output approaches the input, it eventually loses regulation. The required margin depends on current, temperature and the device; use the applicable datasheet conditions when choosing the minimum input.
A planning allowance of roughly 3 V is useful for this basic LM317 exercise, but it is not a universal measured dropout constant. With a nominal 12 V source, do not advertise a guaranteed regulated 12 V output or assume a screenshot reading of 10.6 V is available under every load.
If the input contains ripple, check the lowest point of that ripple rather than only its average. Regulation can be lost for part of each cycle even when a multimeter reports a seemingly adequate input voltage.
The original 270 Ω and 10 kΩ network would ideally request about 47.55 V at maximum resistance, ignoring adjustment current. A 12 V source cannot supply that result through a linear regulator. The historical maximum setting therefore pushes the regulator against its available headroom rather than selecting a valid 47 V output.
Interpret the Three Historical Simulation Stages
At the lower adjustment setting, the screenshot shows an output near 1.25 V. That is consistent with the reference-limited minimum. A simulated motor moving at that voltage does not guarantee that a physical motor will overcome friction or start under load.
The intermediate screenshot reports approximately 6.40 V and describes a flashing LED. An LM317 is not intentionally generating a flashing output in this circuit. An LED connected without a resistor, motor loading, model behavior or protection activity must be investigated before interpreting such behavior as normal regulation.
The maximum historical setting shows approximately 10.6 V. Treat it as a result from that old simulation and load, not a guaranteed regulated output specification. Measure input headroom, output current and temperature before deciding whether a physical supply is operating properly.
Check Minimum Load and Divider Current
The LM317 needs a specified minimum load to maintain regulation under its stated conditions. The resistor from OUT to ADJ draws current continuously and contributes to that load. At approximately 1.25 V across 120 Ω, the divider current is about 10.4 mA.
By comparison, 270 Ω gives about 4.63 mA. That may not satisfy every minimum-load condition of the selected part when the external load is disconnected. A design that looks correct with a motor attached can behave differently at no external load.
Check the exact datasheet limit and include all load paths deliberately. The voltage-setting resistor is not free of power loss: R1 dissipates about 1.25²/120 = 13 mW, and R2 has its own dissipation depending on the selected output.
At R2 = 680 Ω and approximately 10.4 mA, its nominal dissipation is around 74 mW. Check the potentiometer's total and wiper-related ratings, especially if using only part of its track. Avoid selecting a tiny adjustment component solely from its resistance value.
Use Capacitors for the Right Purpose
The original diagram labels two capacitors as 100 pF. That is 1000 times smaller than 100 nF, also written 0.1 µF. These units are not interchangeable. Follow the regulator manufacturer's input bypass and output transient recommendations.
A small capacitor close to the input helps with local high-frequency supply impedance. An output capacitor can improve transient response. A larger bulk capacitor stores energy, but its value alone does not make the output perfectly clean or eliminate the need for appropriate wiring.
The original 2200 µF output capacitor also stores enough energy to require attention when the input collapses. Review the datasheet's protection-diode arrangements for output and adjustment capacitors. A typical output-to-input protection diode has its anode at OUT and cathode at IN, providing a discharge path when output voltage exceeds input.
Select protection components for the possible surge and fault conditions, and consider where that energy goes. Adding a diode without considering the input source is not a complete reverse-energy design.
Calculate Heat Before Increasing the Load
A linear regulator dissipates approximately P = (VIN − VOUT)I, with additional internal and divider-related losses. At 12 V input, 5 V output and 0.30 A load, the main loss is 2.1 W.
That heat does not disappear because the part's headline current rating exceeds 0.30 A. Package, heatsink, airflow and ambient temperature determine whether the junction can remain within its intended operating temperature.
As a design illustration, choose a 100°C junction target at 40°C ambient. For 2.1 W, the total junction-to-ambient thermal resistance would need to be no more than (100 − 40)/2.1, approximately 28.6°C/W. Subtract the actual package and mounting interface thermal resistances to determine the required heatsink contribution.
Those temperatures are chosen example design targets, not a replacement for the device's ratings. Datasheet board-based thermal numbers also depend on their test layout, so do not assume a bare breadboard-mounted part achieves the same result.
Thermal shutdown is protection against abnormal conditions, not a normal control strategy. An output that repeatedly collapses and recovers under load needs a thermal and electrical review.
Compare efficiency at different output settings
Ignoring the smaller internal and divider currents, a linear regulator's efficiency is approximately VOUT/VIN. Converting 12 V to 5 V therefore gives about 41.7 percent, while converting 12 V to 3.3 V gives about 27.5 percent. The remaining input power is largely converted into heat.
Lowering the output can therefore make the regulator hotter at the same load current. An adjustable supply must be checked across its operating range, not only at its maximum output voltage. At very light external load, the divider current also becomes a significant part of total consumption.
When voltage drop and current make these losses impractical, consider a suitably designed switching converter or a preregulator. That changes the noise, transient and layout questions, but avoids demanding that a small linear regulator dissipate excessive power.
Include resistor-ratio tolerance
For the 5 V example using 120 Ω and 360 Ω, opposing one-percent resistor errors can noticeably shift the ratio. With the lower resistor one percent high and the upper one percent low, the reference-only estimate is approximately 5.076 V. Reversing those errors gives approximately 4.926 V.
Reference tolerance and adjustment current add further uncertainty. A calculator showing many decimal places does not remove these component limits. Use appropriate tolerances, a controlled trim range and actual measurements when supplying a device with a narrow allowed voltage window.
Use a Motor Only After the Supply Is Characterized
A motor is a dynamic load. Starting current can be much higher than running current because the stationary motor has little back electromotive force. The regulator may enter current limiting before the motor reaches speed.
Reducing supply voltage can change speed in a simple unloaded experiment, but speed also depends on load and the motor's characteristics. The LM317 does not measure shaft speed or provide closed-loop speed control.
Motor inductance and mechanical energy can produce transients or feed energy back when operating conditions change. Provide an appropriate suppression and drive arrangement. A linear regulator generally does not sink arbitrary returned energy to hold its output down.
For a practical motor controller, a suitably designed switching driver is often more efficient and controllable. See our DC motor driver tutorial for the next stage. Do not infer that a motor-connected supply is suitable for a sensitive radio module without separate testing.
Test the Regulator Systematically
- Check pin functions, polarity, resistor values and capacitor units.
- Set the output with only the planned minimum-load and test-load paths present.
- Measure OUT relative to ground and OUT relative to ADJ.
- Change the load within the design limit and record output and input voltage.
- Reduce input voltage gradually in simulation to observe loss of regulation.
- Calculate dissipation for each operating point.
- Check startup, shutdown and the maximum permitted adjustment before attaching a sensitive load.
Measure voltage at the actual load when long leads are used. If the supply output is 5.00 V but 0.20 Ω of wiring carries 0.30 A, the load receives about 60 mV less. The regulator cannot correct a voltage drop it does not sense through its connection arrangement.
For a fixed target, replace a broadly adjustable control with calculated fixed resistors or a deliberately limited trim range. A potentiometer wiper fault can move the output toward an unintended value; include that possibility in a supply intended for expensive components.
Download, Video and Review
The archived simulation remains available here. It retains the historical motor circuit and has not been rebuilt with the revised resistor, protection and LED recommendations.
The original video provides another view of that earlier demonstration:
| Symptom | Check |
|---|---|
| Output will not reach the setting | Input headroom, excessive requested ratio and load current |
| Output rises when unloaded | Minimum load and divider current |
| Output cycles under load | Thermal protection, current limiting and source collapse |
| LED behaves abnormally | Missing series resistor and actual output waveform |
| Unexpected hardware voltage | Physical pinout, grounding, resistor tolerance and wiper connection |
The LM317 regulates voltage within a set of electrical and thermal limits. Understanding those limits is the difference between adjusting a simulation slider and designing a dependable supply. Our LM317 introduction provides additional background.
Frequently Asked Questions
Can this circuit produce zero volts?
Not in the basic ground-referenced configuration. Its minimum is approximately the 1.25 V reference.
Can a 12 V input provide regulated 12 V output?
No. The regulator needs headroom, so the useful maximum is below the input and depends on operating conditions.
Does the current rating mean a heatsink is unnecessary?
No. Calculate voltage drop times current and design the thermal path accordingly.
Can I connect an LED directly across the output?
No. Add an appropriate current-limiting resistor or LED driver.
Can I power any Arduino or radio module from this circuit?
Only after checking that device's required rail, current, tolerance and transient behavior. Different boards and modules do not all use the same supply.
hi again. and do not bother about your education.
I am a newbie question on what the formula is that you've capacitor capacity?
Now you select 100pf what formula you use, a but the amount of capacity you choose?
1 reply
Hi, the capacitor here is used just to remove ripples in the DC signal, so you can use any small capacitor here like 10pF or 1000 uF. Even if you don't use capacitor still your circuit will work but if you use capacitor then it will be kind of protection that if there's any noise in the DC supply then it will remove it.
You will burn that LED.
1 reply
Hi,
Yeah I just noticed that you have to add a resistance of 10k ohm before LED. Thanks for mentioning.
Have a good day.
























Comments
5