← Back to Electronics

GPIO Current Limits

πŸ”
Platform ↕ Chip ↕ Vcc ↕ Max/Pin (mA) ↕ Rec/Pin (mA) ↕ Total Pkg (mA) ↕ Notes

Important Notes

Max vs. Recommended

The max per-pin value is the absolute limit from the datasheet β€” exceeding it will damage the pin. The recommended value is the safe working current for long-term reliability (typically 60–70% of max).

Total Package Budget

Even if individual pins are within limits, the total current drawn from all GPIO pins combined must stay below the package limit. Overloading the total budget causes chip overheating and resets.

Drive LEDs Safely

  • Always use a series resistor
  • Keep LED current ≀ 10 mA per GPIO pin
  • For multiple LEDs, use a transistor or MOSFET
  • For higher loads, use a driver IC (ULN2003, L293D)

Special Pins

Some platforms have pins with different current ratings β€” e.g. ESP8266 GPIO16 differs from others, RPi GPIO2/3 are shared IΒ²C pins. Always check the specific datasheet for your pin.

When to use a transistor or MOSFET?

Use a NPN transistor when…

  • Load current > 20 mA
  • Load is DC (motor, relay, LED array)
  • Low-side switching (ground-side)
  • Example: BC547, 2N2222, PN2222

Use a N-channel MOSFET when…

  • Load current > 100 mA
  • High efficiency needed (low Rds(on))
  • Switching motors, heaters, solenoids
  • Example: IRLZ44N, 2N7000, AO3400