You’ve got two common cases. Pick the one that matches your strip. ![Non-Addressable_RGB_LED_Strip_Breadboard_Arduino_2_Power_Sources](https://hackmd.io/_uploads/Sk258l6Tgx.jpg) **Case 1 — “Dumb” 2-wire 5 V LED strip (just ON/OFF)** Use your 3 V/3.3 V [MCU](https://www.ampheo.com/c/microcontrollers) to switch the 5 V rail with a [MOSFET](https://www.onzuu.com/category/fets-mosfets). Easiest: low-side N-MOSFET. **Parts** * Logic-level N-MOSFET that fully turns on at 3 V (e.g., [AO3400](https://www.onzuu.com/product/alpha-and-omega-semiconductor-inc-ao3400a-5190082), [IRLZ44N](https://www.onzuu.com/search/IRLZ44N) for big current) * 100 Ω gate [resistor](https://www.onzuu.com/category/resistors) * 100 kΩ gate-to-GND pull-down * 100–470 µF bulk cap across strip 5 V/GND * 5 V [power supply](https://www.onzuu.com/category/external-internal-power-supply) sized for the strip **Wiring (low-side switch)** ``` +5V ───────────── LED strip +5V LED strip GND ──●── D (MOSFET) S ── GND (common with MCU) MCU pin ── 100Ω ── G │ 100kΩ │ GND (also put 100–470 µF across +5V↔GND near the strip) ``` **Notes** * Tie MCU GND to strip GND (common ground). * This is fine for 2-wire strips. If you plan to add a data line later (addressable LEDs), prefer the high-side method below. **Case 2 — Addressable 3-wire strip (WS2812/“NeoPixel”, SK6812)** You need power switching and a 3 V→5 V level-shift for DATA. **A) Power the strip (recommended: high-side switch)** Low-side switching can cause “phantom powering” via the data pin. Use a P-MOSFET or a load-switch IC to cut +5 V. **High-side with P-MOSFET (simplified)** ``` +5V ──●─── P-MOSFET ─── LED strip +5V │ (P-ch, e.g., AO3407A) 100kΩ │ GND MCU pin ── NPN/N-MOSFET level to pull P-gate low = ON LED strip GND ───────────── GND (common) ``` (Or use a dedicated load switch like [TPS229xx](https://www.onzuu.com/search/TPS229); control pin goes to MCU.) **B) Level-shift the data line** * Use [74AHCT125](https://www.onzuu.com/search/74AHCT125)/[74HCT14](https://www.onzuu.com/search/74HCT14) powered at 5 V. These read 3.0–3.3 V as HIGH and output clean 5 V. * Add ~330 Ω series resistor on DATA near the strip. * Put a ~1000 µF cap across strip 5 V/GND at the connector. **Connections** ``` MCU (3.3V) ──> 74AHCT125 IN 74AHCT125 Vcc=5V 74AHCT125 OUT ──> LED DATA GND (MCU) ────────┐ LED GND ──────────┴─ (common ground) ``` **Important rules for addressable strips** * Common ground is mandatory. * Don’t send data when strip power is OFF (tri-state the pin or keep the buffer disabled) to avoid back-feeding. * Size the PSU: WS2812 ≈ 60 mA/LED at full-white → I_max ≈ 0.06 A × LED_count (choose PSU ≥ 1.2× that). **Quick [Arduino](https://www.ampheo.com/c/development-board-arduino) examples** **Low-side MOSFET ON/OFF (Case 1)** ``` const int MOSFET = 5; // gate pin void setup(){ pinMode(MOSFET, OUTPUT); digitalWrite(MOSFET, LOW); } // off void loop(){ digitalWrite(MOSFET, HIGH); // on delay(3000); digitalWrite(MOSFET, LOW); // off delay(3000); } ``` **Addressable strip (Case 2)** * Power strip from 5 V through high-side switch. * DATA from [MCU](https://www.ampheoelec.de/c/microcontrollers) → 74AHCT125 → strip DIN, with 330 Ω series. * Use your LED library (FastLED/Adafruit_NeoPixel). Ensure the pin is input/LOW before power-up and when powered-down. **Sizing & safety checklist** * PSU current: compute worst-case (see 60 mA/LED rule). * MOSFET: pick logic-level with low R_DS(on) at V_GS = 3 V; current ≥ strip max, with margin. * Caps: 0.1 µF per segment if you can, and at least one 100–1000 µF at the strip input. * Wiring: keep power and return thick & short; twist +5V/GND for long runs; inject power at multiple points for long strips.