Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Technical Discussion (http://www.chiefdelphi.com/forums/forumdisplay.php?f=22)
-   -   How does this robot have addressable LEDs still running when disabled? (http://www.chiefdelphi.com/forums/showthread.php?t=135761)

NathanCJohnson 14-03-2015 15:05

How does this robot have addressable LEDs still running when disabled?
 
I've been watching the webcast of the FIM Woodhaven district event and I saw team 1076's robot has addressable RGB LEDs that keep running after the match was over.

https://www.youtube.com/watch?v=XWKr9B_NIjw&t=2m38s

It's pretty cool, a line starts moving through the LED strip when the robot is disabled but I don't understand how it works. I didn't think that when disabled the controller would be able to continually send signals to the LEDs. Anyone have any ideas on how this works?

otherguy 14-03-2015 15:29

Re: How does this robot have addressable LEDs still running when disabled?
 
Digital output channels can still be controlled in disabled. I believe serial interfaces are as well. They could also have a coprocessor (arduino) controlling the strip...

So lots of possibilities.

pribusin 14-03-2015 16:38

Re: How does this robot have addressable LEDs still running when disabled?
 
They're running off a dedicated LED processor. RoboRIO only gives 'commands' via digital I/O. We do the same thing on our robot. We use an arduino, not sure what they use tho.

Arhowk 14-03-2015 17:52

Re: How does this robot have addressable LEDs still running when disabled?
 
You also have these

http://www.adafruit.com/products/2238

which operate on the SPI communication channel, which has no data limits.

Caleb Sykes 14-03-2015 23:15

Re: How does this robot have addressable LEDs still running when disabled?
 
Quote:

Originally Posted by pribusin (Post 1457543)
They're running off a dedicated LED processor. RoboRIO only gives 'commands' via digital I/O. We do the same thing on our robot. We use an arduino, not sure what they use tho.

What information do you send to the arduino from the roboRIO? Is it just enabled/disabled state? Or do you send additional information?

We are looking to do the latter and have some questions about transferring the information from the roboRIO to the arduino.

AlexanderTheOK 15-03-2015 00:01

Re: How does this robot have addressable LEDs still running when disabled?
 
the wpi libraries give nice functions for i2c communication as well as Serial (usb) communications.The arduino can also communicate using both of these methods. The only caveat is of course that you will likely have to write the code on both sides to properly interpret messages.

Theres also the fact that i2c and serial dont work very well on the roborio. Last I remember the i2c port on the actual roborio doesnt work and you need to use the mxp i2c pins.

NathanCJohnson 15-03-2015 13:22

Re: How does this robot have addressable LEDs still running when disabled?
 
Thanks everyone!

Quote:

Originally Posted by pribusin (Post 1457543)
They're running off a dedicated LED processor. RoboRIO only gives 'commands' via digital I/O. We do the same thing on our robot. We use an arduino, not sure what they use tho.

That's what I was kind of thinking, just wasn't really sure and didn't know the roboRIO's digital I/O works when disabled.

This year we just have a single-colored 12v LED strip plugged into the PCM (so we can toggle it). Next year we want to do RGB LEDs. If we use an Arduino and talk to the Arduino via roboRIO's digital I/O, does it just tell the Arduino which sequence to do (and then the Arduino has the actual code for the LEDs) or does the roboRIO have to send other data?

Ben Wolsieffer 15-03-2015 13:31

Re: How does this robot have addressable LEDs still running when disabled?
 
Quote:

Originally Posted by NathanCJohnson (Post 1457760)
This year we just have a single-colored 12v LED strip plugged into the PCM (so we can toggle it).

Are you powering the LED strip through the PCM? :eek: This is not a good idea since the PCM can only output a maximum of 500 mA total on the solenoid channels. You would be much better off running it off a spike.

Foster 15-03-2015 14:15

Re: How does this robot have addressable LEDs still running when disabled?
 
I'm guessing there isn't an "MATCH OVER" state to allow teams to fold up / display "TEAM 1640" on their LED lights.

NathanCJohnson 15-03-2015 20:27

Re: How does this robot have addressable LEDs still running when disabled?
 
Quote:

Originally Posted by lopsided98 (Post 1457763)
Are you powering the LED strip through the PCM? :eek: This is not a good idea since the PCM can only output a maximum of 500 mA total on the solenoid channels. You would be much better off running it off a spike.

Hmm, well it's been working okay for us. 500mA seems to be good enough for our LED strip (we bought a 16ft roll but aren't using all of it). Somebody else suggested it on another thread.

We don't have any spikes but might get one if it really isn't good to power LEDs through the PCM. The inspector didn't say anything about it though.

CronusWorks 15-03-2015 21:08

Re: How does this robot have addressable LEDs still running when disabled?
 
1076 electrical mentor here.

The LEDs are driven by a Pololu A-Star 32U4 (more or less an Arduino Leonardo). This is connected to the serial output on the RoboRIO's MXP.

When powered on, it runs the idle animation and waits for serial data. Once it receives data, it does a boot-up animation and then the main one (stripes that move back and forth with the motors they're next to). If no data is received for 750 milliseconds, it does a shutdown animation and then back to the idle.

The RoboRIO sends a single byte every time it runs through the control loop during autonomous and teleop to tell it which motors are moving which direction. We aren't actually telling it to run the idle animation, it just falls back to it when there's no data.

If anyone's curious, we're powering the LEDs with one of these http://www.mini-box.com/DCDC-USB.
We initially bought it for our Jetson TK1, but that didn't end up making it onto the robot this year.

Frank Neuperger 23-03-2015 04:37

Re: How does this robot have addressable LEDs still running when disabled?
 
Is it legal just to use an NPN transistor to drive the LED strip? drive the transistor from the DIO on the roborio. power form a fused output on PDB.

I don't see anything in rule 44 forbidding this.

Wires would have to be the appropriate gauge for the fuse on power distribution board.

Team118Joseph 23-03-2015 08:28

Re: How does this robot have addressable LEDs still running when disabled?
 
The SPI bus on the Roborio can still run while disabled. This can be helpful for debugging issues on the robot while disabled on the field, providing feedback about connection issues and calibration details using the LEDs.

FrankJ 23-03-2015 08:45

Re: How does this robot have addressable LEDs still running when disabled?
 
Quote:

Originally Posted by NathanCJohnson (Post 1457898)
...
We don't have any spikes but might get one if it really isn't good to power LEDs through the PCM. The inspector didn't say anything about it though.

Realize the inspectors have varying backgrounds. Some are more versed on electronics than others. The main function of the inspectors is to make sure your robot is relatively safe and meets the rules.

Quote:

Is it legal just to use an NPN transistor to drive the LED strip? drive the transistor from the DIO on the roborio. power form a fused output on PDB.
That would be a custom circuit. As long as it meets the rules for custom circuits, it is legal.

Mschmeh144 23-03-2015 10:01

Re: How does this robot have addressable LEDs still running when disabled?
 
Team 144 uses pololu strips and a arduino uno ( sunfounder uno to be exact), the arduino will continue adressing the strips even if there is no input from the roboRio. The arduino will default to the last used command or color I believe once the robot is disabled. Our robot does this too, but it doesn't do the "rainbow" unless the elevator is at the top when it's disabled, otherwise it just locks in at the solid color it was at ( our lights color code to the height of our elevator, and change accordingly )

Edit: I'm currently working on a project like this, but for the older 2014 bot.


All times are GMT -5. The time now is 16:35.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi