LED Lighting (5V, using robot power) - quasics/quasics-frc-sw-2015 GitHub Wiki
5V addressable strips (like WS2812B) are great, but they are power-hungry. To keep our robot legal and reliable, we use need to use a voltage regulator module (VRM) or some other "buck-boost" converter.
[!IMPORTANT] THE 1.5A RULE: While a VRM can hit 2A peak, it is rated for 1.5A continuous.
- Maximum LEDs per VRM: ~25 LEDs (at full brightness white).
- If your strip is longer than 25 LEDs, you must use the "Multiple VRM / Segmenting" method described below.
🛠️ Required Components
- LED Strip: 5V Addressable (WS2812B or equivalent).
- Power Source: One or more FRC VRMs.
- Controller: RoboRIO 2.0 (Any open PWM port).
- Tools: Wire strippers, soldering iron (for segmenting), and a sacrificed PWM cable.
🔌 Option A: Single VRM (Up to 25 LEDs)
- Power: Connect the LED 5V (Red) to the VRM 5V/2A positive terminal.
- Ground: Connect the LED GND (Black) to the VRM 5V/2A negative terminal.
- Data: Connect the White/Yellow PWM wire to the LED DI (Data In).
- Common Ground: Splice the Black PWM wire into the GND line at the LED strip.
- Safety: DO NOT connect the Red PWM wire to the strip. Cut it and heat-shrink the end.
🔌 Option B: Multiple VRMs (More than 25 LEDs)
If we want a long strip (e.g., 50+ LEDs), we have to "inject" power from multiple VRMs.
[!CAUTION] NEVER connect the 5V (+) wires of two different VRMs together. This can cause the regulators to fight each other and fail. You must break the connection between segments.
How to Segment:
- Data & Ground stay continuous: The Data (DI) and GND wires run the entire length of the strip.
- Break the 5V Line: Cut the 5V (Red) copper trace or wire between LED #25 and LED #26.
- Independent Power:
- VRM #1 powers the 5V line for LEDs 1–25.
- VRM #2 powers the 5V line for LEDs 26–50.
- Shared Signal: The RoboRIO PWM signal still starts at LED #1 and flows through the entire strip.
📌 Wiring Reference Table (Multi-VRM)
| LED Section | Wire Type | Connects To |
|---|---|---|
| All LEDs | GND (Black) | All VRM Negatives (-) AND PWM Black |
| All LEDs | Data (DI) | RoboRIO PWM Signal (White/Yellow) |
| LEDs 1-25 | 5V (Red) | VRM #1 (5V/2A Positive) |
| LEDs 26-50 | 5V (Red) | VRM #2 (5V/2A Positive) |
✅ Pre-Flight Checklist
- The "Split" Check: If using multiple VRMs, did you verify the 5V Red wire is physically cut between segments?
- Common Ground: Are all VRM negatives and the RoboRIO PWM ground tied to the same GND line? (Crucial for signal timing!)
- Directionality: Is the data flowing in the direction of the arrows on the strip?
- Rio Safety: Is the Red wire from the PWM cable safely tucked away?