Skip to main content

LM317 as a Variable Power Supply: 0-35V Adjustable Voltage

7805 and 7812 Voltage Regulators: Building 5V and 12V Power Supplies

image-1729976415582.pngThe 7805 and 7812 are popular and reliable voltage regulators used to create stable 5V and 12V outputs, making them ideal for low-power electronics and microcontroller circuits. These voltage regulators are widely used because of their simplicity, efficiency, and capability to provide steady output voltages regardless of input variations. In this article, we will explore how to set up both 7805 and 7812 voltage regulator circuits, as illustrated in Stanley Meyer's schematic, to create regulated 5V and 12V power supplies.

 

 

How the 7805 and 7812 Voltage Regulators Work

The 7805 and 7812 are three-terminal voltage regulators that provide fixed output voltages of 5V and 12V respectively. They are capable of handling input voltages between 7V and 35V for the 7805 and 14V and 35V for the 7812. These regulators output stable voltages suitable for powering most small electronic circuits. The three pins on both regulators are:

  • Input (Vin): The input voltage, which needs to be greater than the desired output by at least 2V.

  • Ground (GND): The common ground for both the input and output.

  • Output (Vout): The regulated output voltage, fixed at 5V for the 7805 or 12V for the 7812.

Both regulators have internal current limiting and thermal shutdown features, which make them reliable options for most low-power electronics projects.

image-1729976415582.png

Setting Up the 7805 and 7812 as Power Supplies

To create reliable 5V and 12V power supplies, you'll need a few components in addition to the 7805 or 7812 voltage regulators:

  • Step-Down Transformer: A transformer to step down the AC voltage from 110V to around 12V AC for the 7805 or 15V AC for the 7812.

  • Bridge Rectifier (B1): A full-wave bridge rectifier to convert the AC voltage to DC.

  • Filter Capacitors (C1, C2, C3): These capacitors are used to smooth out the DC voltage after rectification, typically 1000μF, 35V capacitors.

  • Input Capacitor (C4, 0.1μF): This capacitor helps stabilize the input voltage to the regulator.

  • Heat Sink (optional): To prevent the regulator from overheating, especially if the current draw is significant.

Here is how to wire the 7805 or 7812 as a regulated power supply:

  1. AC to DC Conversion: Start by connecting the step-down transformer (T3) to the 110V AC input to step down the voltage to 12V AC (for 7805) or 15V AC (for 7812). The AC output is then fed to the full-wave bridge rectifier (B1), which converts the AC into DC voltage.

  2. Filtering the DC Voltage: Use the filter capacitors (C1, C2, C3), each rated at 1000μF, 35V, to smooth out the DC voltage. These capacitors help reduce the ripple and ensure a steady DC voltage is provided to the voltage regulator.

  3. Voltage Regulation: Connect the output from the filter capacitors to the Vin pin of the 7805 or 7812. Add an input capacitor (C4, 0.1μF) between the Vin pin and ground to stabilize the input. The GND pin is connected to the common ground, and the Vout pin provides the regulated 5V (for 7805) or 12V (for 7812) output.

  4. Output Filtering: To ensure a stable output, you can add a small capacitor (typically 0.1μF) between the Vout pin and ground. This helps filter out any high-frequency noise.

Practical Considerations

  • Heat Dissipation: When there is a large difference between the input voltage and the regulated output (e.g., 15V input to 12V output), the regulator will dissipate excess energy as heat. To prevent overheating, attach a heat sink to the regulator.

  • Current Capability: Both the 7805 and 7812 can supply up to 1A of current, but this depends on the input voltage and the ability to dissipate heat. If the current requirement is higher, consider using a switching regulator or adding a more efficient cooling solution.

  • Input Voltage: Ensure that the input voltage is at least 2V higher than the desired output. For the 5V output, the input should be at least 7V, and for the 12V output, the input should be at least 14V to maintain proper regulation.

Using the 7805 or 7812 in a Project Box

To create practical 5V or 12V power supplies, you can mount the 7805 or 7812 circuit in a project box. Add an external on/off switch, input and output terminals, and consider adding a fuse on the input for safety. This can provide a versatile power source for your electronics projects.

LM317 as a Variable Power Supply

The LM317 is another popular voltage regulator that can be used to create a variable power supply with an adjustable output ranging from 1.25V to 35V. This makes it suitable for projects requiring a flexible voltage source.

To wire the LM317 as a variable power supply, follow these steps:

  • Input Voltage: Connect the input voltage source (e.g., 12V-40V DC) to the Vin pin of the LM317. A 0.1μF capacitor can be added between the input and ground to stabilize the input voltage.

  • Output Voltage: Connect the Vout pin to the positive terminal of your load. Add a 1μF capacitor between the output and ground to improve stability and reduce ripple.

  • Adjust Pin and Voltage Divider: To control the output voltage, connect a 240Ω resistor between the Vout and Adjust pins. Then, connect a potentiometer (typically 5kΩ or 10kΩ) between the Adjust pin and ground. The potentiometer acts as an adjustable resistor that allows you to vary the voltage.

The output voltage (βVoutβ) can be calculated using the following formula:

Vout = 1.25V × (1 + R2 / R1) + Iadj × R2

Where:

  • R1 is the fixed resistor (typically 240Ω).

  • R2 is the resistance of the potentiometer, which varies as you adjust it.

  • Iadj is a small adjustment current (typically ignored for most practical purposes).

Conclusion

The 7805, 7812, and LM317 voltage regulators are easy and reliable solutions for creating regulated power supplies. Whether you need a fixed 5V or 12V output or a variable output using the LM317, these components offer simple setups suitable for a wide range of electronic applications. The addition of heat sinks and careful consideration of input voltages ensure that the regulators operate effectively without overheating. These power supply designs are versatile and can be used to power anything from microcontrollers to sensors, providing stable sources for your DIY electronics projects.