Objective and use case
What you’ll build: This project demonstrates how to replace a resistor with an inductor in a PWM LED circuit, enhancing efficiency and reducing current ripple.
Why it matters / Use cases
- Improves LED lifespan by reducing thermal stress caused by current ripple.
- Enhances power efficiency in battery-operated devices by minimizing energy loss.
- Allows for smoother dimming effects in lighting applications by providing a more stable current.
- Facilitates the use of PWM in low-power IoT devices that require precise control of LED brightness.
Expected outcome
- Reduction in current ripple measured at less than 5% across the LED.
- Improved efficiency with a target of at least 90% in power conversion.
- Latency in PWM response time of less than 10 ms for LED brightness adjustments.
- Measurement of inductor current stability with less than 1 A fluctuation during operation.
Audience: Electronics enthusiasts; Level: Basic
Architecture/flow: The circuit involves a 5 V power supply, PWM generator, N-channel MOSFET, LED, inductor, Schottky diode, and resistors to control and measure LED current.
Materials
- 1 × 5 V DC power supply (≥ 200 mA)
- 1 × PWM generator (e.g., Arduino pin or function generator, 5 V logic)
- 1 × N‑channel logic‑level MOSFET Q1 (e.g., AO3400, IRLZ44N)
- 1 × LED D1 (red, 5 mm or similar, If ≤ 20 mA)
- 1 × Inductor L1, 100 µH, ≥ 0.3 A, low DCR
- 1 × Schottky diode D2, 1N5819 (or SS14)
- 1 × Sense resistor R_S, 1 Ω, 0.5 W
- 1 × Gate resistor R_G, 100 Ω
- 1 × Gate pulldown resistor R_PD, 100 kΩ
- 2 × Oscilloscope probes (recommended) or 1 × multimeter
- Optional (for baseline comparison): 1 × R_LIMIT, 150 Ω, 0.25 W
Wiring guide
- Power rails:
- Connect the +5 V supply to the +5 V rail on the schematic; connect supply ground to GND.
- LED and series path:
- D1 anode to +5 V; D1 cathode down to R_S; then R_S down to L1; then L1 down to the switch node (the top of Q1).
- MOSFET switch:
- Q1 source to GND.
- Q1 drain to the switch node (bottom of L1).
- Q1 gate is the middle‑side node shown in the schematic; drive it via R_G from the PWM source.
- Freewheel diode:
- D2 cathode to +5 V; D2 anode to the switch node (bottom of L1/top of Q1). This provides the current path when Q1 is OFF so LED current continues through D1 and L1.
- PWM drive:
- PWM generator output → R_G → Q1 gate node.
- R_PD from the same gate node to GND (keeps Q1 OFF when PWM is disconnected).
- PWM generator ground to GND.
- Abbreviations used on the schematic (measurement dots):
- V_G: gate node voltage (to GND reference).
- V_SW: switch node voltage at Q1 drain (to GND reference).
- V_LED: voltage across the LED D1 (between the two dots labeled V_LED).
- V_RS: voltage across the sense resistor R_S (between the two dots labeled V_RS; I_LED = V_RS / 1 Ω).
Schematic
+5 V
│
┌───────────────────┴───────────────────┐
│ │
┌──────────┐ ┌──────────┐
│ │ C1 47 µF │ │ C2 100 nF
│ │ │ │
└──────────┘ └──────────┘
│ │
V_LED+ ●───────┴───────────────────────────────┬───────┴───────────┐
│ │
┌──────────┐ │
│ │ D2 LED rojo │
│ │ │
└──────────┘ │
│ │
V_LED- ●───────┴───────┐ │
│ │
┌──────────┐ │
│ │ R1 │
│ │ 10Ω │
└──────────┘ │
│ │
┌──────────┐ │
│ │ L1 │
│ │10 mH│
└──────────┘ │
│ │
Vs ●───────┴───────┐ │
│ │
┌──────────┐
│ │ D1 1N5819
│ │
└──────────┘
│
│
PWM ●───┐ │
│ │
┌──────────┐ │
│ │ R2 100Ω │
│ │ │
└──────────┘ │
│ │
├──────────────┐ │
│ │ │
┌──────────┐ │ │
│ │ R3 100kΩ │
│ │ │
└──────────┘ │ │
│ │ │
│ │ │
GND │ │
│ │
┌──────────┐ │ │
│ │ │ Q1 IRLZ44N
│ │ │
└──────────┘ │
│ │
│ │
GND +5 V
Measurements and tests
- Setup:
- Set PWM to 20 kHz, duty cycle at 50% to start. Verify +5 V supply is stable.
- Safety pre‑check:
- Confirm D2 orientation (cathode at +5 V), LED polarity (anode to +5 V), and no shorts at the switch node.
- Waveforms:
- V_G:
- Measure at the dot labeled V_G. Expect 0–5 V square wave at PWM frequency.
- V_SW:
- Measure at V_SW to GND. Expect a switching waveform between near 0 V (Q1 ON) and near +5 V (Q1 OFF), with short diode conduction intervals visible.
- V_G:
- LED voltage and current:
- V_LED:
- Measure between the two dots labeled V_LED. Expect roughly the LED forward voltage (~1.8–2.2 V for red) with small ripple.
- V_RS and I_LED:
- Measure between the two dots labeled V_RS. Compute I_LED = V_RS / 1 Ω. Expect average current set by duty cycle; ripple should be noticeably smaller compared to a pure PWM + series resistor at the same duty.
- V_LED:
- Duty sweep:
- 10%, 50%, 90%:
- Observe I_LED vs duty using V_RS. Brightness should track average current; inductor smooths current so flicker and ripple are reduced.
- 10%, 50%, 90%:
- Baseline comparison (optional):
- Replace L1 + D2 with R_LIMIT = 150 Ω in series with D1 (keep Q1 PWM low‑side switch). Repeat V_LED and V_RS measurements to compare ripple and efficiency with the resistor approach.
Common mistakes
- Using a non‑logic‑level MOSFET: gate may not fully enhance at 5 V; choose a MOSFET with low R_DS(on) at 4.5–5 V.
- Omitting the Schottky diode or reversing it: the inductor current will have no safe path when Q1 turns OFF, risking LED/MOSFET damage.
- Inductor saturation: choose L1 with a saturation current well above the peak LED current.
- PWM frequency too low: leads to visible flicker and large current ripple; keep ≥ 10–20 kHz.
Safety
- Never power the circuit until polarity (LED and D2) and connections are verified.
- The inductor can generate voltage spikes; keep wiring short and use the specified Schottky diode.
- The sense resistor may get warm; use 0.5 W or higher.
Improvements
- Add a small ceramic capacitor (e.g., 100 nF) from +5 V to GND near D1 to reduce supply ripple.
- For finer control, add a current feedback loop (beyond basic level) to regulate I_LED instead of open‑loop duty control.
- Try different L values (47–220 µH) and note effects on ripple versus transient response.
Validation: All components are identified per the Materials list; +V is at the top and GND at the bottom. Every connection is continuous, the MOSFET includes all three pins, and measurement dots with abbreviations (V_G, V_SW, V_LED, V_RS) are placed on the circuit and explained in the guide.
More Practical Cases on Prometeo.blog
Find this product and/or books on this topic on Amazon
As an Amazon Associate, I earn from qualifying purchases. If you buy through this link, you help keep this project running.



