LED Lighting (5V, using strap‐on power) - quasics/quasics-frc-sw-2015 GitHub Wiki
Using a USB power bank is a great way to power LED strips without taxing the robot's main electrical system. This is especially useful for high-density strips or decorative "underglow."
[!IMPORTANT] THE COMMON GROUND RULE: Because the USB pack is a separate battery, you MUST connect the Ground (-) wire from the USB pack to the Ground (-) wire of the RoboRIO PWM port. If you don't, the LEDs will flicker, strobe, or not turn on at all.
🛠️ Required Components
- LED Strip: 5V Addressable (WS2812B).
- Power Source: USB Power Bank (Look for one rated for 2.1A or 2.4A output).
- USB Cable: A "sacrificial" USB-A cable (to cut open) or a USB breakout board.
- Controller: RoboRIO 2.0.
🔌 Wiring Procedure
1. The USB Breakout
- Take your USB cable and cut off the "device" end (the micro-USB or USB-C end).
- Strip the outer casing to find the four wires inside.
- Red: 5V Power (+)
- Black: Ground (-)
- Green/White: Data (We don't need these; cut them short and tape them off).
2. Powering the Strip
- Connect the USB Red (5V) wire to the LED strip's 5V / V+ wire.
- Connect the USB Black (GND) wire to the LED strip's GND wire.
3. Logic & Common Ground
- The Signal: Connect the White/Yellow PWM wire from the RoboRIO to the DI (Data In) on the strip.
- The Shared Ground: Take the Black PWM wire from the RoboRIO and splice it into the same GND connection where the USB Black wire meets the LED strip.
- This links the USB battery's ground to the RoboRIO's ground, allowing the signal to flow correctly.
- The Red PWM Wire: As always, cut the Red wire on the PWM cable. The USB pack is handling the power!
📌 Wiring Reference Table
| LED Strip Wire | Connects To | Role |
|---|---|---|
| 5V (Red) | USB Cable Red | Main Power. |
| GND (Black) | USB Black AND PWM Black | Common Ground (Crucial!). |
| Data (DI) | RoboRIO PWM Signal (White) | Data Instructions. |
✅ Pre-Flight Checklist
- Mounting: Is the power bank secured with more than just Velcro? (We don't want a 1lb battery flying into the intake during a collision!)
- Current Limit: Is the power bank rated for enough Amps for your LED count? (2.4A is usually enough for ~40 LEDs).
- Charging: Did you remember to charge the pack? (Add "Charge LED Pack" to your pit crew's checklist!)
- Common Ground: Is the RoboRIO PWM black wire connected to the USB ground?