LED Lighting - quasics/quasics-frc-sw-2015 GitHub Wiki

If you want to add lighting effects to your robot, LED strips are a great way to start it out.

And if you need to document your circuits (and you will), I'd suggest looking at Fritzing, which is a great open-source tool for just this task.

Note: estimating power consumption can be a little tricky, but is important. A sample spreadsheet for looking at a couple of different options for a given linear run can be found here.

Analog LED strips

Analog LED strips basically work from an electrical standpoint as though they are a single (huge) LED. As a result, while you can get some interesting effects with them (e.g., flashing, "breathing", etc.), you're going to be turning the whole strip on/off at once every time. However, this can also make them easier to work with than a digital LED strip, and you can easily work up your lighting effects with a single RGB LED plugged into the circuit outside of the robot, and then just swap in the LED strip and everything will work exactly the same way (other than a higher power requirement).

You may choose to control the LEDs directly from the Rio, or you may choose to have a co-processor (Arduino, Raspberry Pi, etc.) do so, optionally under some sort of "remote control" from the Rio.

Some sources for analog LED strips:

Digital LED strips

Digital LED strips have tiny microprocessors embedded into the strip along with the lights. As a result, each LED is individually programmable, allowing you to do more sophisticated stuff (e.g., use different colors along the strip, "chasing" lights that run around the strip, etc.).

But with this sophistication comes greater complexity of control: you're pretty much going to have to use a computer of some sort (e.g., an Arduino, Raspberry Pi, etc.) to drive them, which drives up the cost of materials and programming effort. It's also likely that it's not going to be your Rio that's directly controlling the lights, which means you'll also need to have a way for the Rio to communicate with the co-processor (e.g., via a serial port, SPI, or other interface) if you want to have the lights reflect the state of the robot (alliance color, mode, errors, etc.).

  • Strip lighting
    • Adafruit NeoPixels (e.g., this RGB strip with 30 lights/meter)
      • These are more generically available as "WS2811/2812" LED strips (available from Amazon, etc.).
      • This was an option that we began using with our 2017 FRC robot ("Nike"), and have continued using through 2019.
      • In addition to flexible LED strips (both RGB and RGBW, and in varying densities), NeoPixels are also available as rings, 8-pixel boards, or even individual elements, which can be a lot easier to use in an breadboard circuit when writing the code to generate different patterns.
      • These lights use a single wire for control, and require very precise timing, which used to mean that you had to use a microcontroller like an Arduino. However, AdaFruit later created a library that will let you control them with a Raspberry Pi, and they can also be controlled directly by the RoboRio (see WPILib docs for software details, and some discussion of wiring on this CD thread).
    • Adafruit DotStar (e.g., this RGB strip with 30 lights/meter)
      • In addition to flexible LED strips (RGB or pure white, and in varying densities), NeoPixels are also available as matrixes and individual elements.
      • These lights use 2 lines for control (command and clock), and thus have lower timing requirements. They can be driven by an Arduino, Raspberry Pi, or other controllers (possibly including the Rio, though I wouldn't recommend it).
    • Other products from Adafruit include "Digital RGB LED Weatherproof Strip - LPD8806 32 LED".
    • Other seller options exist, such as this one on Amazon.
  • "Christmas tree" style
    • ALITOVE WS2811 - 12mm diffused LEDs (NeoPixel compatible), with 50 LEDs per string, each string is about 11.5' long (and can be connected together)

Bonus points

Want to drive multiple (separate) sets of lights from the same controller? Check out some different options/approaches here.