Model Scenery Tutorials

A Comprenshive Modeler's And Model Railroader's Guide

model scenery center

How To Make A Voltage Regulator Using An LM7805

How To Make A Voltage Regulator Using An LM7805

What’s In This Page

Instructions for making a voltage regulator that uses an unregulated 12v input voltage and provides regulated 5 and 12 volt regulated outputs.

A video demonstration is included as well as a source for the parts needed.

If you are using a phone, at the bottom of the page there are links to many  supplies for modelers. Otherwise those links are in the sidebar to the right. You can also find other information  by using the search function that is in the navigation bar above.

Also In Addition To What’s In This Page, What This Site Can Do For You

If you are a model train enthusiast, modeler, diorama maker, or interested in making Arduino projects the easy way, there is categorized information for you here. Click Here.

Why Use A Voltage Regulator

Voltage sources often have fluctuations and cannot provide a fixed output. A voltage regulator will provide a constant and steady output.

A voltage regulator is particularly useful when powering Arduino boards.  The VCC pins require regulated 5 volts.  A voltage regulator will provide that even if you use a battery or even a 24 volt power supply. With one there is no need to consider using the RAW input pin on the Arduino board.

Is A Wallwart Regulated?

Whether the voltage from a typical 5-volt wall wart is regulated depends on the specific type and design of the wall wart. Here are the general categories:

Unregulated Wall Warts

These are usually cheaper and simpler in design.
The output voltage can vary significantly depending on the load. For example, a 5V unregulated wall wart might output a higher voltage (e.g., 7V) when there is no load, dropping closer to 5V when a load is applied.
Unregulated wall warts are not suitable for sensitive electronic devices that require a steady voltage. And that includes Arduino boards that require a 5 v regulated input.

Regulated Wall Warts

These contain additional circuitry to maintain a constant output voltage regardless of the load, within specified limits.
A 5V regulated wall wart will provide a stable 5V output whether the device is under light or heavy load.
They are suitable for sensitive electronics and are generally more reliable and safer for a wide range of applications.

To determine if a specific wall wart is regulated

It’s essential to verify the type for your specific application, especially if you need a stable power supply for sensitive electronics and if you are going to use it with an Arduino board.

Check the Specifications –  The packaging, datasheet, or label on the wall wart should indicate whether it is regulated. It might explicitly state “regulated” or mention a stable output voltage under various loads.

Measure the Voltage – Using a multimeter, you can measure the output voltage with and without a load. A regulated wall wart should maintain a voltage close to 5V in both conditions, while an unregulated one will show a significant difference.

 

The LM7805

The 7805 voltage regulator  is a fixed linear regulator. The 7805 maintains a constant 5V output when input voltages range from 7 up to 35 volts DC.

In an LM7805 voltage regulator circuit, it’s important to use capacitors to ensure stable operation and filter out noise. The typical values for the input and output capacitors are:

Input Capacitor: A 0.33 µF (microfarad) ceramic or tantalum capacitor is usually recommended. This capacitor helps to stabilize the input voltage and filter out any high-frequency noise from the power supply.

Output Capacitor: A 0.1 µF (microfarad) ceramic or tantalum capacitor is typically recommended. This capacitor ensures stability in the output voltage and filters out high-frequency noise from the regulator.

In some cases, additional larger electrolytic capacitors may be used to further stabilize the voltage, particularly when the power supply or load has significant ripple or noise. Common values for these are:

Input: 10 µF to 100 µF electrolytic capacitor.
Output: 10 µF to 100 µF electrolytic capacitor.

In any case, add at least the larger capacitors:

Current Limitations

The LM7805 is made with a heat shield that dissipates the heat it generates.  The heat is a function of the current it passes.  At higher currents the LM7805  may get so hot that the heat shield cannot dissipate enough heat.  The LM7805 thermal limiter will shut it down.

For example, a shutdown will occur at rather low current when the input voltage is 12v.  Increasing the size of the heat shield will allow higher currents to pass without shutdown.

Increasing Heat Shield Capability

Choose an Appropriate Heatsink

heat shield

  • Larger Heatsink: Select a larger heatsink with a lower thermal resistance (RθSAR_{\theta SA}). Ensure the heatsink has good airflow around it.
  • Material: Prefer aluminum heatsinks due to their good thermal conductivity and lightweight properties.
  • Design: Choose a heatsink with more surface area (fins) for better heat dissipation. Consider heatsinks designed for TO-220 packages, which are compatible with the LM7805. The image to the left shows one designed for TO-220 packages.

3. Mounting the Heatsink

  • Attachment Method: Use thermal compound (thermal paste) between the LM7805 and the heatsink to improve thermal conductivity. Secure the heatsink to the LM7805 using a mounting screw and an insulating washer if necessary.
  • Ensure Proper Contact: Make sure there is firm contact between the LM7805 and the heatsink for optimal heat transfer.

4. Improve Airflow

  • Positioning: Place the LM7805 and its heatsink in a well-ventilated area on the PCB. Avoid placing it near other heat-generating components.
  • Active Cooling: If necessary, use a fan to increase airflow over the heatsink, further reducing the thermal resistance.

5. Testing and Validation

  • Thermal Testing: After installing the larger heatsink, measure the temperature of the LM7805 during operation to ensure it remains within safe limits. Use a thermocouple or an infrared thermometer for accurate measurements.
  • Load Testing: Test the regulator under different loads to ensure stability and proper heat dissipation.

 

LM7805 Pinout

LM7805PIN 1-INPUT
The function of this pin is to give the input voltage. It should be in the range of 7V to 35V. We apply an unregulated voltage to this pin for regulation. For 7.2V input, the PIN achieves its maximum efficiency.

PIN 2-GROUND
We connect the ground to this pin. For output and input, this pin is equally neutral (0V).

PIN 3-OUTPUT
This pin is used to take the regulated output. It will be 5 Volts.

 

Single Or Double Output Regulator

A single output regulator has only output pins that provide 5 volts.

A double output regulator is wired so that there are pins for a volt output and pins for the same value voltage as the input..

The double output is most used with a 12 volt input.  The output voltages are those commonly used on model railroad layouts. It makes wiring simple.  Only one 12 volt power supply is needed.

For simplicities sake, make double output and use only the output required.

Regulated Power Supply Circuit

voltage regulator

This image shows a DIY voltage regulator before the addition of an extra heat shield.  You can get this kit with the heat shield here. MMMMM

 

 

Video Demonstration

Video In Editing

 

 

Feedback

Your questions and comments help us clarify and upgrade the information presented.  Even if you find this helpful, please tell us.

Please let us know if this page has been helpful  And if you have questions or suggestions, use this spam free system.

Or use the green WhatsApp button that is to the right.

 

Scroll to top