|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
|
|
|
#1
|
||||
|
||||
|
LED's For Robot
Hello. I was wondering how my team can put LED's on our robot and wire them up to be controlled by robot code. Thanks!
|
|
#2
|
||||
|
||||
|
Re: LED's For Robot
So there are 2 basic ways you can control via code. You can use spike relays as on or off switches. The second way is to use a solenoid breakout to connect LEDs. To use that method is the same as programming for a festo only it runs on a single channel not 2. The neat thing about using the solenoid breakout is that it takes no extra space on the robot and you only need 3 channels to run 7 colors (if you have RGB LEDs of course). Be aware that there is a limit as to how many watts you can use, but for most scenarios you should be fine.
|
|
#3
|
||||
|
||||
|
Re: LED's For Robot
We have a strip of tri-color LEDs on our robot. One of our mentors constructed a small circuit with 3 MOSFETs, one for each color. We then control them through PWM, which allows us to have varying brightness for each color.
|
|
#4
|
||||
|
||||
|
Re: LED's For Robot
Ok thanks guys. Joe you guys did amazing today and thanks for the help today with our robot drive. My mentor wants us to do the LED thing for our robot that we use for community events. So hopefully I can get this done.
|
|
#5
|
|||
|
|||
|
Re: LED's For Robot
We use the NFLS-X3 series LED strip from SuperBrightLEDs, connected to the solenoid breakout. It's about $1 a foot. It can be cut into smaller sections. You'll also want one NFLS10-2CPTH solderless pigtail adapter per section. I can't remember whether one comes with a strip -- you'll need to check.
http://www.superbrightleds.com/morei...ht-strip/1440/ |
|
#6
|
||||
|
||||
|
Re: LED's For Robot
Here is a very cool example of what can be done with LEDs on robots. http://www.youtube.com/watch?v=06c-6VXEHrg only pay attention to the first ten seconds XD in 2011, we had the first logo flash on our robot in, if i remember correctly, 40 LEDs. One shape at a time. It really fit the game, and it taught people a simple electronics at the same time. As for power, it was using power from the distributions board.
|
|
#7
|
|||
|
|||
|
Re: LED's For Robot
We planned to have a strip of LEDs with an Arduino Uno board, then wire it directly to the PD board. Although we weren't able to mount it to our robot (due to weight limitations) we placed it on the robot cart. We purchased the Arduino at http://www.adafruit.com/products/50
and downloaded the library for the LPD8806 strip http://www.adafruit.com/products/306 |
|
#8
|
||||
|
||||
|
Re: LED Lights for the Robot (what do you use??!?!)
Ok thanks. We might do that in case we cant wire it to the crio.
|
|
#9
|
|||||
|
|||||
|
Re: LED Lights for the Robot (what do you use??!?!)
We use 8 Shift Brite's.
While it would probably be possible to use the SPI on the cRio to control them, we used an Arduino and spare Relay Out ports with external pull downs for control. We send a 3-bit command nibble to the Arduino which sets the LED states for that state. This gives us 8 possible LED combinations controllable by the cRio with 3 digital lines, but only 1 combination when disabled (relay outputs are disabled). |
|
#10
|
||||
|
||||
|
I was looking at Strip LED's from superbrightleds and saw the Red, Green, Blue and Black wires. I'm pretty sure that the Red, Green, and Blue is the positive for the LED colors and black is the ground. I know wiring enough to wire our robot's components, but I don't know how I would hook 1 ground up to 3 spikes. I'm sure there is a way, I just dont know it.
|
|
#11
|
||||
|
||||
|
Re: LED Lights for the Robot (what do you use??!?!)
For the last 2 years, we have used those 12v single-color LED strips you can order on Amazon. Simple, but effective. This coming year, we hope to use individually-addressable RGBLED strips that we purchased from andymark recently. We have developed a basic little custom circuit that we use for the lights on the robot. All it is is a terminal block connected to the PDB through a switch. This way, we can turn off all the lights if needed, and their connections don't take up valuable space on the PDB.
(protip: those adhesive backs on the light strips don't work, packing tape works great though ) |
|
#12
|
||||
|
||||
|
Re: LED Lights for the Robot (what do you use??!?!)
Similar to other teams, our robot this year we used the Sparkfun addressable RGBs (uses WS2812 LED drivers internally to the strip).
https://www.sparkfun.com/products/12026 You only have to plug in 5V, GND and the 1-wire interface which we drove using an Arduino and the Adafruit WS2812 libraries (details in the Sparkfun hookup guide). The power was supplied by a 5V/10A regulator very similar to the one supplied for the router (no 5V source on the robot is capable of supplying this much current). Additionally, we used an LED diffuser film to spread out the light source. This helped us give the effect that the arms were filled with light, where there was only a strip of RGB LEDs running through the top side of each arm. https://www.inventables.com/technolo...diffuser-films The Arduino allowed us to program light patterns that were triggered by the cRIO's digital outputs when the robot performed various actions (e.g. feeding, shooting, cocking the catapult). For instance, when the feeder motor was running, the robot would pull a zero on a cRIO digital output which fed into a digital input on the Arduino. Every 10ms, the Arduino firmware checked the digital inputs for changes and would modify the light pattern accordingly. This may get a bit detailed for those not familiar with embedded programming, but the key to making these animations work fluidly and seamlessly (and respond to asynchronous input) was to program the Arduino an interrupt-driven model. The simplest way to get patterns to display is to shift in the colors to each LED (24 in our case) and then to delay() for the number of milliseconds until the next color pattern needed to be shifted. In Arduino speak, these delay() statements literally force the processor to sit and wait for a number of milliseconds and not do anything (this is an eternity for a processor). In the interrupt-driven model, these delay() statements are replaced by conditional checks on variables (sometimes called flags) which are set by interrupts based on events (in our case, a 10ms timer interrupt since there weren't enough IRQ-capable pins). Every 10ms, the timer would interrupt the processor, check all of the inputs for any updates from the cRIO and it would increment a timer variable that counted the number of 10ms interrupts that passed. This variable could be checked by the main program to determine how many seconds had elapsed and whether or not it was time for the next pattern to be pushed to the LEDs. In our reveal video, we hadn't yet finished coding all of the patterns, but you can see what the diffuser material looks like up close: http://www.youtube.com/watch?v=tEhQnKbRz-0 You can see the patterns when we drive/load/shoot pretty well in this video: http://www.youtube.com/watch?v=iOK7eQOLqag#t=300 |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|