Creators
Earth Bondhon Author
Earth Bondhon
CalculatorToolsProjectExpert
Reviewers
Małgorzata Koperska, MD Steven Wooding
Last updated: November 25, 2025

Adjustable Voltage Regulator LM338 Circuit: Working & Design Guide

🇺🇸
English
Default
🇪🇸
Español
Spanish
🇫🇷
Français
French
🇩🇪
Deutsch
German

*Please note: These are affiliate links. I may make a commission if you buy the components through these links. I would appreciate your support in this way!

Adjustable Voltage Regulator LM338 Circuit

Learn how the LM338 adjustable voltage regulator works, wiring diagrams, components, calculations, and troubleshooting for safe DC power supply circuits.

What is an LM338 Adjustable Voltage Regulator?

LM338 is a voltage regulator IC with 3 terminals that are adjustable terminals. LM338 is also used in place of fixed voltage regulators (7805, 7812) with the output voltage being adjustable between 1.2V and 32V. It is safe to use on different DC circuits since it offers overload and thermal protection.

DIY Flip Flop Circuit

A MOSFET flip flop circuit is a simple and yet powerful electronic project that will enable you to have bistable switching control of an output such as LEDs, motors, or any other device. Flip-flop circuits are in two stable states, and a pulse of each input switches the state, activating a load or deactivating it. The switching elements are MOSFETs; they are advantageous, and they have high current carrying, high switching speed, and low power dissipation. The project is ideal for novices and electronics hobbyists who desire to have a play with bistable circuits. In this guide, you will be taught the parts necessary, the mode of operation, how to assemble the circuit, how to trigger the input, and how to test the circuit. Upon completing the tutorial, you will be able to construct a stable MOSFET flip-flop circuit that can be used to control a variety of electronic loads.

Why Make a 12 Volt Battery Charger at Home?

Making your own battery charger offers several advantages: low cost compared to commercial chargers, full customization of charging current, easy repair/maintenance, excellent learning value, and usefulness during power outages. A homemade charger can be improved with automatic cut‑off using relays or microcontrollers.

How a 12 Volt Battery Charger Works

1. Transformer‑Based Charger

The most common home-built charger. Typical parts: a 220V → 15V AC step‑down transformer, a bridge rectifier (4 diodes or module), a smoothing capacitor, and a current control resistor or bulb limiter. This arrangement provides ~14–15V DC for charging lead‑acid batteries.

2. SMPS‑Based Charger

Uses a ready-made 12V SMPS (e.g., 12V 5A or 12V 10A). Compact, lightweight and efficient.

3. Automatic Cut‑off Charger

Adds a relay and comparator (LM358/LM324) or a regulator (LM317) to disconnect charging when the battery reaches ~14.4V.

Components Required

  • 220V → 15V AC Transformer (5A–10A)
  • Bridge Rectifier (rated ≥10A)
  • 2200µF / 25V Filter Capacitor
  • Heat sink (for regulator/rectifier)
  • Ammeter and Voltmeter
  • 12V Relay (optional for cut‑off)
  • LM317 (optional for regulated charging)
  • Wires, connectors, battery clamps
  • 100W bulb (optional current limiter) or power resistor
  • Fuses (5–10A) for safety

Circuit Diagram Explanation

Basic flow:

  • Transformer steps 220V AC down to ~15V AC.
  • Bridge rectifier converts AC → pulsating DC.
  • Filter capacitor smooths the DC output.
  • LM317 or series resistor/bulb limits/regulates charging current.
  • Optional relay disconnects charger at the set full charge voltage.

Peak DC after rectification: VDC_peak ≈ VAC_rms × 1.41. So a 15V AC secondary yields approx. 21V DC peak, which is then regulated/limited down to ~14.2–14.4V for safe charging.

Step‑By‑Step Construction Guide

  1. Assemble power section: connect transformer primary to 220V AC (observe safety).
  2. Wire transformer secondary to the bridge rectifier.
  3. Add the filter capacitor across the DC output.
  4. Route DC output to the charging terminals (red = +, black = −) and include a fuse.
  5. Add current limiter: heavy resistor or series lamp, or use LM317 for controlled charging.
  6. For automatic cut‑off: use comparator circuitry to drive a relay that disconnects at ~14.4V.
  7. Verify output with a multimeter before connecting any battery.
  8. Connect battery, monitor current, and adjust as necessary.

Charging Current Calculation

A typical safe charging current guideline: C/10 (battery Ah × 10%).

  • 7Ah → 0.7A
  • 12Ah → 1.2A
  • 35Ah → 3.5A
  • 60Ah → 6A

Do not exceed ~20% of the battery Ah rating for DIY fast charging unless proper protection is implemented.

Types of 12V Batteries You Can Charge

  • Lead‑acid (flooded)
  • AGM
  • Gel
  • LiFePO4 (requires BMS and different charge profile)
  • Motorcycle, car, inverter batteries

Safety Tips for Home‑Made Battery Chargers

  • Always check charger output with a multimeter before connecting a battery.
  • Keep charger away from flammable materials; batteries can emit hydrogen gas.
  • Never reverse polarity — use clear labeling and color codes.
  • Use fuses and proper wire gauge for the expected current.
  • Ensure good ventilation and a heat sink for regulators/rectifiers.
  • Use gloves and eye protection while connecting/disconnecting batteries.

Common Problems & Troubleshooting

Problem Solution
Battery not charging Check polarity, fuse, rectifier and voltage regulator.
Charger overheating Add or improve heat sink; reduce series current; ensure ventilation.
Battery charging very slowly Increase current within safe limits; check battery condition.
Overcharging Install automatic cut‑off (relay + comparator) or a regulator set to 14.4V.
Low voltage output Replace faulty rectifier or transformer; check connections.

Applications of a Homemade 12V Charger

  • Motorcycle and car battery charging
  • UPS/inverter battery maintenance
  • Solar battery backup charging
  • DIY power banks and emergency power supplies

Internal Linking Ideas (For Your Website)

  • 12V Battery Level Indicator Circuit
  • 12V to 220V Inverter Circuit
  • 12V SMPS Power Supply Circuit
  • Battery Bank Size Calculator
  • Lead Acid Battery Maintenance Guide

Conclusion

Building a 12V battery charger at home is affordable, customizable, and educational. With a transformer, rectifier, filter capacitor, and a simple regulator or current limiter, you can safely charge common 12V batteries. Adding automatic cut‑off and protections makes the design more reliable for everyday use.

Frequently Asked Questions - Adjustable Voltage Regulator LM338 Circuit:

What is LM338 voltage regulator?

LM338 is an adjustable three-terminal voltage regulator that outputs 1.2–32V DC with max 5A current.

How to calculate output voltage of LM338?

Vout = 1.25*(1 + R2/R1) + Iadj*R2, R1 fixed, R2 variable.

What resistors are used in LM338 circuit?

R1 is usually 240Ω fixed, R2 is a variable resistor to set output voltage.

Do I need a heatsink for LM338?

Yes, to prevent overheating when current exceeds 1A.

Can LM338 provide 5A current?

Yes, with proper heatsink and input voltage, LM338 can provide up to 5A.

What capacitors are used with LM338?

0.1µF capacitor at input, 1µF capacitor at output for stability.

Can LM338 be used for LED drivers?

Yes, LM338 provides adjustable voltage suitable for LEDs.

What is Iadj in LM338 formula?

Iadj is the adjust pin current, typically 50µA and negligible in most calculations.

Can LM338 be used in battery chargers?

Yes, LM338 is commonly used for adjustable voltage battery charging circuits.

How to troubleshoot LM338 voltage fluctuation?

Check resistors, capacitors, input voltage, and proper heatsink to ensure stability.

Comments

Please login to comment.

Earth Bondhon

Earth Bondhon

Calculator Tools Project

Md. Jony Islam is a highly skilled professional with expertise in electronics, electrical, mechanical, and civil engineering, as well as finance. Specializing intransformer service and maintenance for 33/11kV substations, he ensures reliable and efficient electrical systems. His mechanical engineering skills drive innovative designs, while his financial acumen supports effective project budgeting. With a strong foundation in civil engineering, he contributes to robust infrastructure development. Md. Jony Islam's multidisciplinary approach ensures efficiency, quality, and reliability across all projects.