ToolJoltTools

GPIO Current Limits Reference

Per-pin and whole-chip drive limits for AVR, ESP32, STM32, RP2040 and ESP8266 — with a direct-drive LED check.

Recommended / pin
Absolute max / pin
Whole-chip budget
Your LED current
Total for pins
Verdict
I = (Vio − Vf)/R ; check per-pin AND total-package limits
References: ATmega328P / ESP32 / STM32 / RP2040 datasheets — absolute maximum ratings & DC characteristics

STM32 and RP2040 are far weaker drivers than AVR — the “Arduino habit” of 20 mA LEDs directly on pins overloads them. Output voltage also sags near the limit (the pin is ~40 Ω of FET), so “3.3 V” at 8 mA is really ~3.0 V. Anything inductive (relay, motor, buzzer coil) never connects directly — transistor + flyback diode, always.

GPIO Current Reference computes per-pin and whole-chip GPIO current limits across MCU families, with an LED check — free, instant and private in your browser. Anyone moving between MCU families who carries the 'Arduino 20 mA habit' along use it to skip the datasheet algebra: type your numbers, read the answer with the substituted formula shown step by step, and share an exact permalink of the calculation.

About GPIO Current Limits Reference

GPIO Current Reference computes per-pin and whole-chip GPIO current limits across MCU families, with an LED check using the standard engineering relation: AVR 20/40 mA per pin, 200 mA chip; STM32 8/25 mA; RP2040 4/12 mA, 50 mA total. Worked live: a 220 Ω LED on a Pico draws ~6 mA — already beyond RP2040's default 4 mA pad setting. The result recalculates on every keystroke, the worked-example panel shows your numbers substituted into the formula, and the Copy permalink button encodes the inputs in the URL so a colleague opens exactly your calculation. Everything runs client-side — nothing you type leaves your device.

How to use GPIO Current Limits Reference

  1. 1Enter your values — the tool starts with realistic defaults for this exact use case, so the worked example is meaningful immediately.
  2. 2Read the live result and the worked-example panel, which substitutes your numbers into the formula step by step.
  3. 3Adjust any input to compare scenarios, then use Copy result or Copy permalink to share the calculation.

Why use GPIO Current Limits Reference?

  • Implements the real formula — AVR 20/40 mA per pin, 200 mA chip — with the substitution shown, not a black box
  • Built for anyone moving between MCU families who carries the 'Arduino 20 mA habit' along
  • Copy result and permalink buttons — share the exact calculation in a README, forum answer or design review
  • 100% free, no sign-up, runs entirely in your browser (works offline once loaded)

Frequently asked questions

How do you calculate gpio current?+

Per-pin and whole-chip GPIO current limits across MCU families, with an LED check follows AVR 20/40 mA per pin, 200 mA chip; STM32 8/25 mA; RP2040 4/12 mA, 50 mA total. For example, a 220 Ω LED on a Pico draws ~6 mA — already beyond RP2040's default 4 mA pad setting. The calculator applies the same relation and shows the substituted arithmetic so you can verify every step.

What happens if I exceed a GPIO's current rating?+

First the output voltage sags badly (the pin FET is ~40 Ω); sustained abuse cooks metal migration into the pad driver and the pin dies quietly — sometimes taking neighbours or the whole port with it. Absolute-max numbers are survival limits, not operating points.

How do I drive loads beyond a few milliamps?+

A logic-level MOSFET (gate to GPIO, load on drain) handles amps with microamps of gate demand; an NPN + base resistor suits small relays and buzzers; driver ICs (ULN2003, 74HC595+UDN) scale to many channels. Inductive loads always get a flyback diode.

Is the GPIO Current Reference free and private?+

Yes — completely free with no sign-up or usage limits, and it runs entirely in your browser: the values you enter are never uploaded or stored on a server.

Related tools

Related Electronics tools

Sponsored