← Wiki · Component

Level shifter (74AHCT1G125)

A single buffer that turns a 3.3 V logic signal into a clean 5 V one, typically for WS2812 LED strips driven by an ESP32 or RP2040.

What it does#

The 74AHCT1G125 is one buffer gate powered from 5 V whose input threshold is TTL-like: anything above 2.0 V counts as high (VIH). So a 3.3 V output reliably drives it, and its output swings the full 0–5 V an LED strip expects. Pins: 1 = OE (output enable, active low), 2 = A (in), 3 = GND, 4 = Y (out), 5 = VCC.

Example circuit: DATA_3V3 from the microcontroller into A, OE tied to GND (always on), Y through 330 Ω to the strip's data terminal. 100 nF on VCC.
DATA_3V3 from the microcontroller into A, OE tied to GND (always on), Y through 330 Ω to the strip's data terminal. 100 nF on VCC. Open the level_shifter_ws2812 example from this page in PCB Canvas: “Insert into my schematic”.

Why not a MOSFET shifter#

The common BSS138 bidirectional shifter (as on I²C breakouts) relies on a pull-up resistor and is too slow and soft for an 800 kHz LED data stream. A one-way buffer is the right tool for one-way data.

Pitfalls#

  • OE is active low. Leaving it floating can disable the output; tie it to GND (or to a GPIO if you want to switch the strip’s data off).
  • Supply it from 5 V, the same 5 V as the LEDs. At 3.3 V supply it would only output 3.3 V.
  • Use the AHCT, not the AHC. The 74AHC1G125 at 5 V needs a higher input voltage than 3.3 V logic gives.

Footprint#

SOT-23-5 (SOT-753). Hand-solderable with a fine tip. JLCPCB: C52140417 (Nexperia 74AHCT1G125GV), extended part.