BLING Your BOT With Some LED GLOW Overview
BLING Your BOT With Some LED GLOW!!!
Overview • Rule Changes • Why use LEDs and what they can do • Type of LEDs Strips • FTC LED solutions available NOW • LED compromises • Demo • Software Control • “And this just in” • Q/A
2018 -2019 Rule Regarding LEDs <RE-12> Light Sources - Functional and/or decorative light sources (including LEDs) are allowed with the following constraints: a. b. c. d. Focused or directed light sources (for example: lasers and mirrors) are not allowed except for the REV Robotics 2 m Distance sensor (REV-31 -1505). Light source control by compatible ports on the REV Expansion Hub and Modern Robotics Core Control Modules is allowed. Commercial off the Shelf interface modules (without user programmable microprocessors) are allowed between the light source and the components listed in b. The only approved power sources for lights are as follows: i. iii. iv. Internal (as supplied by the Commercial off the Shelf manufacturer) battery pack or battery holder Power ports on the Core Power Distribution Module Motor-control ports on the Core Motor Controller Module REV Expansion Hub Motor-control ports, spare XT 30 ports, 5 V auxiliary power ports, and I 2 C sensor ports. Bottom Line: FTC rules now allow LED strips to be controlled from user program using specialized hardware.
Why use LEDS? • • LEDs (like bowties) are COOL!!!! Calls attention to your robot Show your alliance color Lets the robot talk TO the drivers • • • Gyro is calibrating (don’t touch me) Robot is ready to play Feedback from a color sensor Report number of game objects in the robot End game indicator Low Battery Warning • Diagnostics • Graphical Battery Meter • System Test/Problem Indicator
LED Strip Basics LED Strips… • Can be: bent, cut, linked, bridged • Can be wired in parallel to make two identical strips • May need to be electrically protected from shorting against metal (non-waterproof versions) • Are not indestructible and should be protected from hits and repeated hard bends • May need power injected from both ends if using long LED strips • LED Strips contain pixels. Each pixels consists of different color LEDs contained in a single case Each LED is controlled separately, allowing for many different color combinations • LED “strips” are diverse and come in different: • • Shapes (strips, rings, matrixes, etc) Strip colors (typically black or white) LED colors (Red, Green, Blue, White, RGBW, UV) Pixel Densities (30, 60, 144 pixels per meter) Voltages (5 V, 12 V, 24 V) Control interfaces (Analog, Digital 1 -Wire, Digital SPI) Waterproof/non-waterproof
LED Pictures
Type of LED Strips Analog +12 V Pixel 1 Pixel 2 RED (GND) GRN (GND) BLU (GND) Digital 1 -Wire Pixel N +12 V RED (GND) GRN (GND) BLU (GND) +12 V GND Data In . . CPU Data Out CPU +12 V GND Data Out Clock Out . . . Digital SPI +12 V GND Data In Clock In CPU . . .
Type of LEDs Feature Analog Digital (1 wire) Digital (2 wire) Alias Common Anode Neopixel Dot. Star Voltage 12 V 5 V 5 V Color range RGB RGB Different colors on each pixel? NO YES Supporting interface hardware BLINKIN I 2 C/SPI Bridge Maximum number of pixels LOTS 240 (4 M @ 60 pixels) LOTS Number of wire connections 4 (+12 V, R-, G-, B-) 3 (+5 V, -, data) 4 (+5 V, -, data, clock) Communication/control protocol PWM WS 2812 Communication speed N/A 400 KHz 0 -32 MHz Programming Skill Level Easy Moderate. Image
REV Robotics BLINKIN – Features • • Works with any control system with a servo port Powered from 12 V battery connection Support either analog or addressable LED strips. Contains 100 pre-program (and customizable) LED patterns Simple to control from user program (controlled like a servo) Supplies up to 5 Amps @ 5 V for addressable strips Pre-use Configuration is optional (brightness, strip length, preset colors, speed, etc. ) Support up to 240 addressable pixels, or “unlimited” number of non-addressable pixels This is a great option: easy to add, configure, and control, but does not allow full control of the strip. Recommended for rookie teams, teams that struggle with programming
Rev Robotics LED Solution – Wiring Diagram Analog Digital Analog OR Digital
I 2 C/SPI Features. • • • Connects to an I 2 C port Requires 5 V power (RR 5 V port) Uses the Digital SPI LED strips (addressable) Some wiring required. Direct control of Brightness and color of each Pixel in the strip User program must explicitly set the color and brightness of each and every pixel in the LED strip (more software intensive) Only Recommended for teams with stronger programmers who want to do custom LED patterns (bar graphs, custom patterns, etc. ). Recommend starting with the Blinkin first. Note: both solutions can be used on the robot at the same time if so desired.
I 2 C/SPI Wiring 3 inches
Power Usage • LED strips are powered from the robots 12 V battery • LEDs are very efficient, but LED strip power usage is not trivial • Each meter of 60 pix/M analog LED strip CAN use up to 1. 2 Amps of battery current • Each meter of 60 pix/M addressable LED strip CAN use up to 1. 6 Amps of battery current (~3 Amps of 5 V current) • Total power in a new FTC battery is 3 Amp Hours (AH). However, useable capacity is less and degrades with use. Figure on 1 -2 AH of useable power • Running lots LEDs at full brightness could drain a battery in 30 -60 minutes • The robot also has a maximum power draw of 20 Amp (why? ). Power used by the LED strip subtracts from max power draw.
Power Management Q: How can we avoid using lots of LED power? A: Make some engineering tradeoffs: • • • Don’t use full brightness OR be selective when you do. Turn them on/off and only use when make since. Turn them off during high power demands (i. e. pushing). Use less LEDs (short length strip) Use less LEDs, (less density strips) Lots of bright LEDs can gobble up power. Strike a balance between appearance, functionality, and power consumption.
Demos • BLINKIN (Analog Strip) • BLINKIN (1 wire) • I 2 C/SPI BRIDGE (2 wire)
BLINKIN Coding Servo blinkin; public void init() { // Change to your configured name! blinkin = hardware. Map. servo. get("blinkin"); } public void loop() { blinkin. set. Position(0. 5); // Example setting }
Digital 2 -Wire Coding Dot. Star. Bridged. LED leds; public void init() { // Change to your configured name! (30 pixels by default) leds = hardware. Map. get(Dot. Star. Bridged. LED. class, "leds"); } public void loop() { for (int i = 0; i < leds. pixels. length; i++) { leds. pixels[i]. set. RGB(255, 0, 100); } leds. update(); }
Handy LED accessories • LED strip coupler • LED strip extension. • LED strip pigtail. • LED extrusion
Things We Need Not Say (but will). LED strips should be used to enhance your robot, not as a weapon against other teams: • Don’t try to blind other robots (i. e. sensors) with your LEDs • Don’t try to blind other drivers with your LEDs • Don’t use LEDs to distract the other drivers Be considerate of your fellow FIRSTers and (as always) use your GP when figuring out how to use LEDs
Extra – Rev Releases New Stuff!!!! • Time-Of-Flight (TOF) Laser Distance Sensor • New Color sensor • Expansion Hub USB retention clip • Special Electrical “Gizmo” (to be announced kickoff day) • New Game Manual PART 1 update coming out very soon ?
Useful Links Rev Robotics (BLINKIN, Analog and Digital strips, color sensor, TOF, etc. ) • Blinkin: http: //www. revrobotics. com/rev-11 -1105/ • Analog LED Strips: http: //www. revrobotics. com/rev-11 -1197/ • Digital LED Strips: http: //www. revrobotics. com/rev-11 -1198/ • TOF Distance Sensor: http: //www. revrobotics. com/rev-31 -1505/ • Color Sensor: http: //www. revrobotics. com/rev-31 -1537/ Adafruit (LED strips of all kinds) • Digital 2 -wire (Dot. Star) LED Strips: https: //www. adafruit. com/? q=dotstar • Digital 1 -Wire (Neopixel) LED Strips: https: //www. adafruit. com/? q=neopixel • Analog Strips: https: //www. adafruit. com/? q=analog%20 strip Sandbox electronics (I 2 C to SPI bridge adapter) • I 2 C to SPI Bridge: https: //sandboxelectronics. com/? product=sc 18 is 602 -i 2 c-to-spi-bridge-module Digital 2 -Wire programming object: • Software: https: //github. com/aj-foster/FTC-Examples.
Questions? (and maybe some answers)
- Slides: 23