Zbotic Logo Zbotic Logo
  • Home
  • Shop
  • Sale
  • 3D Print Service
  • PCB Service
  • B2B
  • Blogs
  • Contact Us
0 0

View Wishlist Add all to cart

0 0
0 Shopping Cart
Shopping cart (0)
Subtotal: ₹0.00

View cartCheckout

  • Shop
  • About Us
  • Contact Us
  • Reseller
  • Blogs
020 69134444
1800 209 0998
[email protected]
Help Desk
Facebook Twitter Instagram Linkedin YouTube
Zbotic Logo Zbotic Logo
0 0

View Wishlist Add all to cart

0 0
0 Shopping Cart
Shopping cart (0)
Subtotal: ₹0.00

View cartCheckout

All departments
  • 3D Print Service
  • 3D Printer
  • Batteries & Chargers
  • Development Boards
  • Drone Parts
  • EBike parts
  • Sensor Modules
  • Electronic Components
  • Electronic Modules
  • IoT and Wireless
  • Mechanical Parts and Workbench Tools
  • Motors & Drivers & Pumps & Actuators
  • DIY and Robot Kits
  • Show more
  • Home
  • Shop
  • Sale
  • 3D Print Service
  • PCB Service
  • B2B
  • Blogs
  • Contact Us
Return to previous page
Home Arduino & Microcontrollers

Arduino Voltage Regulator Projects: LM7805 and LM317 Guide

Arduino Voltage Regulator Projects: LM7805 and LM317 Guide

March 11, 2026 /Posted byJayesh Jain / 0

Power supply design is one of the most overlooked yet most critical aspects of any Arduino project. Connecting the wrong voltage or a noisy power rail can corrupt sensor readings, cause random resets, damage components, and even destroy your Arduino board. The Arduino voltage regulator options LM7805 and LM317 are two of the most time-tested solutions for providing clean, stable DC power to your circuits. Whether you are building a bench power supply, a battery-powered field device, or a custom Arduino shield that needs a regulated 5 V rail, understanding these two ICs will serve you for a lifetime of electronics work.

  • Linear vs Switching Regulators: When to Use Each
  • LM7805: Fixed 5 V Regulator Basics
  • LM317: Adjustable Regulator Basics
  • Arduino Power Circuit Designs
  • Heat Dissipation and Heat Sink Selection
  • Practical Project Builds
  • Troubleshooting Common Problems
  • Frequently Asked Questions

Linear vs Switching Regulators: When to Use Each

Before diving into the LM7805 and LM317 specifically, it is worth understanding where linear regulators fit in the broader landscape of voltage regulation.

A linear regulator works by acting as a variable resistor between input and output. Excess voltage is dissipated as heat. This makes linear regulators extremely simple, very low-noise, and inexpensive — but at the cost of efficiency. If your input is 12 V and output is 5 V, 7 V is dropped across the regulator. At 500 mA, that is 3.5 W of heat.

A switching regulator (buck converter, boost converter, SMPS) chops the input at high frequency and filters it to produce the output. Efficiency is typically 85–95%, but switching regulators introduce high-frequency noise on the output rail and are more complex to design.

Use a linear regulator (LM7805 / LM317) when:

  • The input-to-output voltage difference (dropout) is small (< 3–5 V)
  • Current requirement is moderate (< 1 A)
  • Low noise is critical (analog sensor circuits, audio, ADC references)
  • Simplicity and cost matter most

Use a switching regulator when:

  • Battery life is critical (high current or large voltage step-down)
  • Input voltage is much higher than output (e.g., 24 V to 5 V at 2 A)
  • Heat dissipation is a constraint

LM7805: Fixed 5 V Regulator Basics

The LM7805 is a three-terminal positive linear voltage regulator in the 78xx series. It regulates its output to exactly 5.0 V (±2%) regardless of input voltage (within limits) and load current.

Key Specifications

  • Output voltage: 5.0 V ± 4% (typically ± 2%)
  • Maximum input voltage: 35 V
  • Minimum input voltage: Vout + 2 V = 7 V minimum
  • Maximum output current: 1.5 A (with adequate heat sinking)
  • Dropout voltage: ~2 V (input must be at least 7 V)
  • Package: TO-220 (standard), TO-92 (low current), D2PAK (SMD)

Pinout (TO-220)

Looking at the front face of the TO-220 package (with the tab away from you):

  • Pin 1 (left): INPUT — connect to unregulated DC supply
  • Pin 2 (middle): GROUND — connect to common ground
  • Pin 3 (right): OUTPUT — regulated 5 V output

Standard Application Circuit

The datasheet specifies two capacitors for stability:

  • C1: 0.33 µF ceramic on the input (between IN and GND)
  • C2: 0.1 µF ceramic on the output (between OUT and GND)

In practice, add a bulk electrolytic capacitor (220–1000 µF) on both input and output to handle transient current demands. This is especially important when powering servos, motors, or multiple Arduino shields.

    VIN (7–35 V)
     |
    [C1: 330nF]
     |
    [LM7805 Pin 1] --- [LM7805 Pin 3] --- VOUT (5 V)
                               |
                             [C2: 100nF]
    GND ----[LM7805 Pin 2]---[C2 GND]--- GND

Powering an Arduino Uno from 12 V with LM7805

The Arduino Uno has its own onboard 5 V regulator (NCP1117 or similar). You can bypass it entirely by supplying regulated 5 V directly to the 5 V pin (not the VIN pin). This is preferable when your external LM7805 can supply more current or has a lower dropout voltage than the Uno’s onboard regulator.

Warning: Never apply 5 V to the VIN pin simultaneously — VIN goes through the onboard regulator and connecting 5 V there can damage it.

Recommended: Arduino Uno R3 Beginners Kit — the best starting point for learning power regulation circuits. Practice building LM7805 supplies to drive the Uno from 12 V wall adapters or automotive power.

LM317: Adjustable Regulator Basics

The LM317 is the most popular adjustable linear regulator in the world. Unlike the fixed 78xx series, the LM317 lets you set the output voltage anywhere from 1.25 V to 37 V using two external resistors — making it ideal for custom voltage rails and bench power supplies.

Key Specifications

  • Output voltage range: 1.25 V to 37 V (adjustable)
  • Maximum input voltage: 40 V
  • Maximum output current: 1.5 A
  • Internal reference voltage: 1.25 V (between OUT and ADJ pins)
  • Package: TO-220 (standard), TO-92 (LM317L low-current), SOT-223 (SMD)

Pinout (TO-220)

  • Pin 1 (left): ADJUST
  • Pin 2 (middle): OUTPUT
  • Pin 3 (right — tab): INPUT

Note: The LM317 pinout is different from the LM7805! On the LM317, the tab is the INPUT, whereas on the LM7805 the tab is GND. Never assume the pinout — always check the datasheet.

Output Voltage Formula

The output voltage is set by resistors R1 and R2:

Vout = 1.25 × (1 + R2/R1)

Where R1 is connected between OUT and ADJ pins, and R2 is connected between ADJ and GND. The datasheet recommends R1 = 240 Ω. Common target voltages:

Target Vout R1 R2 (calculated) R2 (nearest E24)
3.3 V 240 Ω 393 Ω 390 Ω
5.0 V 240 Ω 720 Ω 720 Ω
9.0 V 240 Ω 1488 Ω 1.5 kΩ
12.0 V 240 Ω 2064 Ω 2.0 kΩ

For an adjustable bench supply, replace R2 with a 5 kΩ potentiometer in series with a fixed resistor (to set the minimum output voltage).

Arduino Power Circuit Designs

Design 1: Dual 5 V / 3.3 V Supply for Mixed Projects

Many Arduino projects need both 5 V (for the Uno, sensors, and shields) and 3.3 V (for ESP8266, SIM modules, or BLE modules). Build a dual rail by:

  1. Feed 12 V DC from a wall adapter into an LM7805 → outputs 5 V for the Arduino and digital peripherals.
  2. Feed 5 V from the LM7805 output into an LM317 set to 3.3 V (R1=240Ω, R2=390Ω) → outputs 3.3 V for sensitive 3.3 V modules.
  3. Add bulk capacitors (470 µF electrolytic) and bypass capacitors (100 nF ceramic) at each output.

This cascaded approach adds a second dropout across the LM317 (~1.25 V), so the input to the LM317 (5 V) must be at least 4.75 V, which is satisfied from the LM7805 output. Current draw must stay within both regulators’ 1.5 A rating.

Design 2: Variable Bench Power Supply with LM317

Combine a 15–24 V DC input, an LM317, a 5 kΩ potentiometer, and a voltmeter display to build a 1.25–20 V adjustable bench supply. Add a current limiting sense resistor (0.1 Ω, 5 W) and a comparator circuit for overcurrent protection.

Recommended: Arduino Mega 2560 R3 Board — the Mega’s higher current draw (up to 800 mA with shields) makes external LM7805-based power supplies a practical necessity for complex projects.

Design 3: Arduino Powered from Automotive 12 V

Vehicles provide 12–14.8 V from the battery. An LM7805 (minimum 7 V input, maximum 35 V) handles this range perfectly. Add a 1N4007 diode in series with the input for reverse polarity protection (it drops ~0.7 V, keeping input above the 7 V minimum), and a TVS diode (P6KE15A) across the input for automotive spike suppression (load dumps can reach 40–100 V transiently).

Heat Dissipation and Heat Sink Selection

A linear regulator converts excess voltage to heat. Calculating power dissipation is essential to avoid thermal shutdown or component failure.

Power Dissipation Formula

Pd = (Vin - Vout) × Iout

Example: Vin = 12 V, Vout = 5 V, Iout = 0.5 A
Pd = (12 - 5) × 0.5 = 3.5 W

Thermal Resistance and Junction Temperature

The LM7805 in a TO-220 package has a junction-to-case thermal resistance (θJC) of 5°C/W. Without a heat sink, the junction-to-ambient is ~65°C/W. At 3.5 W dissipation:

  • Without heat sink: ΔT = 3.5 × 65 = 228°C above ambient — the chip will hit thermal shutdown immediately.
  • With a small heat sink (10°C/W): ΔT = 3.5 × (5 + 10) = 52.5°C above ambient — junction at 25 + 52.5 = 77.5°C — safe (max 125°C).

Rule of thumb: always use a heat sink if power dissipation exceeds 1 W. Apply thermal paste (or a thermal pad) between the regulator tab and heat sink.

Reducing Heat with a Pre-Regulator

If your input is high (24 V) but output is low (5 V), consider using a small switching buck converter to pre-regulate to 8–9 V, then run that into the LM7805 for clean 5 V output. The switcher handles the large voltage drop efficiently, and the LM7805 cleans up the noise. This hybrid approach is used in many professional designs.

Practical Project Builds

Project 1: Arduino-Controlled Variable Power Supply

Replace the fixed resistors in an LM317 circuit with a digital potentiometer (MCP4131, SPI interface). Write an Arduino sketch that lets you set the output voltage via serial commands or a rotary encoder. Display the voltage on a 7-segment or TFT display. Add an ACS712 current sensor on the output for real-time current monitoring.

Recommended: Arduino Frequency Counter Kit with 16×2 LCD Display — demonstrates how to build a complete Arduino-based measurement instrument with LCD output, similar in architecture to a digital bench supply with voltage readout.

Project 2: Solar-Powered Arduino Weather Station

Use an LM317 to regulate a 6 V solar panel output down to a stable 5 V for an Arduino. Add a lithium battery charge circuit (TP4056) and a 3.7 V to 5 V boost converter for night operation. The regulated supply powers a DHT22 temperature sensor, a BMP280 pressure sensor, and a LoRa module for wireless data transmission.

Recommended: GY-BME280-5V Temperature and Humidity Sensor — a 5V-compatible BME280 module measuring temperature, humidity, and pressure — perfect for a regulated 5V Arduino weather station build.

Project 3: 13.8 V Ham Radio Power Supply with Arduino Monitoring

Build a 13.8 V regulated supply (for amateur radio equipment) using an LM317 with R1=240Ω and R2=2.4kΩ. Add an Arduino Nano that reads a voltage divider across the output (to keep the voltage in 0–5 V range for the ADC) and a current sensor. Display voltage and current on an LCD and alert on over-current via a relay disconnect.

Troubleshooting Common Problems

Output Voltage Is Incorrect

For LM7805: verify the input is at least 7 V and the ground pin is truly at 0 V. A floating or noisy ground will cause voltage errors. For LM317: recalculate R1 and R2 values, and measure the actual resistance of your resistors with a multimeter — standard resistors have ±5% or ±1% tolerance which affects the output.

Regulator Gets Very Hot Immediately

Calculate your power dissipation. If it exceeds 1 W, you need a heat sink. If the dissipation is much higher than expected, check whether the output is short-circuited or heavily overloaded. The LM7805 has internal current limiting (limits at ~1.5 A) and thermal shutdown, but repetitive thermal cycling degrades the chip over time.

Output Voltage Oscillates or Is Noisy

Missing or wrong capacitors are the most common cause. The 0.33 µF input cap and 0.1 µF output cap are not optional — without them, the regulator can oscillate at high frequency. Also check that the output cap is ceramic, not a pure electrolytic (electrolytic caps have high ESR which can cause instability).

Arduino Resets Randomly Under Load

This indicates a voltage sag on the 5 V rail when a high-current device (motor, servo, relay) activates. Add more bulk capacitance on the output (1000–4700 µF electrolytic). If the sag is severe, increase the regulator’s input voltage or switch to a higher-current regulator (LM338 is pin-compatible with LM317 but rated for 5 A).

Frequently Asked Questions

Can I connect the LM7805 output directly to the Arduino 5V pin?

Yes — but only if the Arduino is not simultaneously powered via USB or the VIN barrel jack. When two voltage sources are connected to the 5 V rail without isolation diodes, they can fight each other. If you must run both, add a Schottky diode in series with each source (e.g., BAT85) so each source can supply but not sink current from the other.

What is the minimum input voltage for the LM7805?

The LM7805 requires the input to be at least 2 V above the output, so a minimum of 7 V. In practice, use at least 7.5–8 V to account for input capacitor charging transients and line voltage variations. Do not try to power a LM7805 from a 6 V supply — the output will be less than 5 V and the regulator will not function correctly.

What is the difference between LM7805 and LM78L05?

The LM78L05 is the low-current version of the same 5 V regulator family, typically in a TO-92 package, rated for only 100 mA maximum. The standard LM7805 in TO-220 is rated for 1.5 A. Use the LM78L05 for very low-current circuits (microcontrollers with no power-hungry peripherals) where board space is at a premium.

Can I parallel two LM7805 regulators for more current?

Not directly — do not connect the outputs together without current sharing resistors. Each regulator has a slightly different output voltage; the one with the higher output will supply all the current until it thermally shuts down. To parallel them safely, add a 0.1–0.5 Ω resistor in series with each regulator’s output to force current sharing.

Is the LM317 suitable for battery-powered Arduino projects?

For short-term or prototype use, yes. For production battery-powered devices, consider a low-dropout (LDO) regulator like the MCP1702 (250 mV dropout) or a step-down switching regulator. The LM317 has a ~2.5 V dropout at 1 A, which wastes significant battery capacity compared to modern LDOs.

Build better, more reliable Arduino projects by starting with solid power design. Explore our complete range of Arduino boards, power modules, and components at Zbotic — quality parts delivered across India.

Tags: 5V power supply, arduino power, arduino voltage regulator lm7805, linear regulator, LM317, LM7805
Share Post
  • Facebook
  • Linkedin
  • Whatsapp
Troubleshooting Arduino Upload...
blog troubleshooting arduino upload errors avrdude and port fixes 594740
blog arduino string vs char array memory efficient coding tips 594742
Arduino String vs char Array: ...

Related posts

Svg%3E
Read more

Arduino Batch Programming: Flash Multiple Boards Quickly

April 1, 2026 0
Table of Contents Introduction Components and Hardware Setup Wiring Diagram and Connections Complete Code with Explanation Customization and Improvements Troubleshooting... Continue reading
Svg%3E
Read more

Arduino Based Radar System with Ultrasonic Sensor

April 1, 2026 0
Table of Contents Introduction Components and Hardware Setup Wiring Diagram and Connections Complete Code with Explanation Customization and Improvements Troubleshooting... Continue reading
Svg%3E
Read more

Arduino Automatic Plant Monitor: Sunlight, Moisture, Temperature

April 1, 2026 0
Table of Contents Introduction Components and Hardware Setup Wiring Diagram and Connections Complete Code with Explanation Customization and Improvements Troubleshooting... Continue reading
Svg%3E
Read more

Arduino Lie Detector: GSR Sensor Polygraph Project

April 1, 2026 0
Table of Contents Introduction Components and Hardware Setup Wiring Diagram and Connections Complete Code with Explanation Customization and Improvements Troubleshooting... Continue reading
Svg%3E
Read more

Arduino Metal Detector: Build a Treasure Finder

April 1, 2026 0
Table of Contents Introduction Components and Hardware Setup Wiring Diagram and Connections Complete Code with Explanation Customization and Improvements Troubleshooting... Continue reading

Add comment Cancel reply

Your email address will not be published. Required fields are marked

Facebook Twitter Instagram Pinterest Linkedin Youtube

Get the latest deals and more.

Download on Google Play Download on the App Store

Call us: 020 69134444 / 1800 209 0998

Monday - Saturday 09:30 AM - 06:00 PM
For Technical Supports Email: [email protected]
For Sales / Enquiries Email: [email protected]

  • My Account

    • Cart

    • Wishlist

    • Checkout

    • My Orders

    • Track Order

    • My Account

  • Information

    • FAQs

    • Blogs

    • Career

    • About Us

    • Contact Us

    • Payment Options

  • Policies

    • Privacy Policy

    • Terms & Conditions

    • GST Input Tax Credit

    • Shipping Return Policy

    • E-Waste Collection Points

    • Our Sitemap

© Zbotic.in is registered trademark of Moxie Supply Pvt Ltd – All Rights Reserved
Login
Use Phone Number
Use Email Address
Not a member yet? Register Now
Reset Password
Use Phone Number
Use Email Address
Register
Already a member? Login Now