Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Technical Discussion (http://www.chiefdelphi.com/forums/forumdisplay.php?f=22)
-   -   Ardruino and cRio (http://www.chiefdelphi.com/forums/showthread.php?t=98744)

tap13 10-12-2011 15:59

Ardruino and cRio
 
I want to know if Arduino directly connect to cRio or it has to go to digital sidecar before the cRio. Thanks!

404'd 10-12-2011 16:55

Re: Ardruino and cRio
 
How are you trying to use your arduino, to control motors and outputs? Because then it wouldn't be practical to use the c-rio in conjunction with an arduino, you can use the arduino directly as a replacement for the c-rio.

tap13 10-12-2011 16:58

Re: Ardruino and cRio
 
Quote:

Originally Posted by 404'd (Post 1090008)
How are you trying to use your arduino, to control motors and outputs? Because then it wouldn't be practical to use the c-rio in conjunction with an arduino, you can use the arduino directly as a replacement for the c-rio.

yeah for motor and outputs, well basically we're just researching for it. :D

EricH 10-12-2011 17:12

Re: Ardruino and cRio
 
Quote:

Originally Posted by 404'd (Post 1090008)
How are you trying to use your arduino, to control motors and outputs? Because then it wouldn't be practical to use the c-rio in conjunction with an arduino, you can use the arduino directly as a replacement for the c-rio.

In the offseason, yes, that would work.

In the competition season, at least in the past, that has been prohibited. In 2011, the rule was <R57>. In short, signals controlling motors had to come from the Digital Sidecar on the cRIO--no other sources were allowed.

tap13 10-12-2011 17:17

Re: Ardruino and cRio
 
Quote:

In the offseason, yes, that would work.

In the competition season, at least in the past, that has been prohibited. In 2011, the rule was <R57>. In short, signals controlling motors had to come from the Digital Sidecar on the cRIO--no other sources were allowed.
thanks, I didn't even know, just new here

RoboMaster 10-12-2011 17:25

Re: Ardruino and cRio
 
You can use an Arduino for other, non prohibited things if you want though. FIRST gives us a lot of free reign for "custom circuits and sensors." So if there's something you know how to do on Arduino but can't find out how to do it on the FIRST control system, you could have the Arduino do the work and the cRIO would just receive or send commands. I guess you could hook Digital I/O pins together and have the cRIO and Arduino send and listen for dedicated On/Off signals along one or more pairs of pins.

Cons are that you can't use the Arduino to control motors, as mentioned, and that having two systems could easily be more complicated than just using the main FIRST control system. It would depend a lot on what you wanted to do with the Arduino.

I've always wanted to use a custom circuit though; it would be pretty cool.

EricH 10-12-2011 17:28

Re: Ardruino and cRio
 
Yep, RoboMaster has it right. As long as you aren't directly controlling motors with the Arduino, or doing something else that's prohibited by the rules, knock yourself out. Also, during the offseason, play with what you want to controls-wise.

apalrd 10-12-2011 17:52

Re: Ardruino and cRio
 
If I were to connect an Arduino to a cRio, I would do it via the Serial port. This requires an RS232 level shifter (to 5v TTL logic of the Arduino), but is probably the easiest way on both ends.

RoboMaster 10-12-2011 21:52

Re: Ardruino and cRio
 
But in normal competition setup you can't use the serial port. It only sends out basic status information about the cRIO. You would have to change some default stuff, which I think would be easier said than done, and then revert for competitions. Plus, the recent cRIOs don't even have a serial port, right? (I might be wrong on that).

apalrd 10-12-2011 21:59

Re: Ardruino and cRio
 
Quote:

Originally Posted by RoboMaster (Post 1090111)
But in normal competition setup you can't use the serial port. It only sends out basic status information about the cRIO. You would have to change some default stuff, which I think would be easier said than done, and then revert for competitions. Plus, the recent cRIOs don't even have a serial port, right? (I might be wrong on that).

All false.

The serial port is a valid port (on both cRio's), there were no 2011 rules prohibiting its use.

It's available in code as a standard VISA serial port with WPI wrapper in LabVIEW. I would assume it's available in other languages similarly.

You would have to flip the Console Out DIP switch, but that's not very hard to do.

RoboMaster 10-12-2011 22:04

Re: Ardruino and cRio
 
Huh, wow, thanks then for correcting me. Maybe it wasn't available in previous years, maybe 2009 when the system first came out or something.

This might be helpful, I don't know if you can run these VIs on the cRIO.
http://web.me.com/iklln6/automation/LabVIEW.html

ajlapp 10-12-2011 23:10

Re: Ardruino and cRio
 
We used an Arduino in 2011 to read encoders and the transmit distance travelled during auton.

The Arduino directly read the encoders and talked to the cRIO via serial.

This worked great. We'll be doing another Aruino project in 2012.

Mk.32 11-12-2011 00:21

Re: Ardruino and cRio
 
Our team was recently trying to get the Arduino to work on the cRIO.
Is there anything special we need to do?
I just read above we needed to flip the DIP switch?

Our programmer (JAVA) was working on this and was getting unexpected errors.

tap13 11-12-2011 02:08

Re: Ardruino and cRio
 
just to be sure... so is there any limit/prohibitions on what we can use on the arduino?
Spoiler for :
Thanks all for the replies :D

theprgramerdude 11-12-2011 03:39

Re: Ardruino and cRio
 
Quote:

Originally Posted by tap13 (Post 1090135)
just to be sure... so is there any limit/prohibitions on what we can use on the arduino?
Spoiler for :
Thanks all for the replies :D

Can you be more specific? Do you mean, what you can add on to the board for more features like other wireless, or what you can attach and control/sense?

O'Sancheski 11-12-2011 11:15

Re: Ardruino and cRio
 
^Reported^

JamesBrown 12-12-2011 10:33

Re: Ardruino and cRio
 
Quote:

Originally Posted by ajlapp (Post 1090121)
We used an Arduino in 2011 to read encoders and the transmit distance travelled during auton.

The Arduino directly read the encoders and talked to the cRIO via serial.

This worked great. We'll be doing another Aruino project in 2012.

Any reason you decided to use the Arduino for this purpose rather than jsut connecting the encoders directly to the cRIO?

ajlapp 12-12-2011 11:16

Re: Ardruino and cRio
 
Quote:

Any reason you decided to use the Arduino for this purpose rather than jsut connecting the encoders directly to the cRIO?
We have included projects like this for the last few seasons to involve more students in programming for the robot and to add additional languages to our training program.

In most seasons we have about two students who really become the lead programmers for the comp robot. In order to sustain a larger group and have their work be meaningful we have added components like the Arduino.

We try to pick something useful yet achievable by a group of students with little oversight. Last year's encoder reading was a success, though we stopped using it before Worlds because of some unknown and possibly unrelated errors. Regardless those students were proud of their work and had a featured component on the robot that otherwise would not have existed.

In past year's, when we've had mentors with PCB design experience we have tried things like a hardware based PID board that used SPI to talk to the main controller.

This year we plan to use it the Arduino again, though the scope of the project isn't defined.

Gdeaver 12-12-2011 13:42

Re: Ardruino and cRio
 
I'm assuming you used the Arduino as a spi slave. You wouldn't happen to have a library for the Arduino as a slave that you could point to or share?

theprgramerdude 12-12-2011 14:15

Re: Ardruino and cRio
 
Quote:

Originally Posted by ajlapp (Post 1090485)
We have included projects like this for the last few seasons to involve more students in programming for the robot and to add additional languages to our training program.

In most seasons we have about two students who really become the lead programmers for the comp robot. In order to sustain a larger group and have their work be meaningful we have added components like the Arduino.

We try to pick something useful yet achievable by a group of students with little oversight. Last year's encoder reading was a success, though we stopped using it before Worlds because of some unknown and possibly unrelated errors. Regardless those students were proud of their work and had a featured component on the robot that otherwise would not have existed.

In past year's, when we've had mentors with PCB design experience we have tried things like a hardware based PID board that used SPI to talk to the main controller.

This year we plan to use it the Arduino again, though the scope of the project isn't defined.

Why don't you have the students do a bit of software engineering as a team and have them all write code on the Crio alone, and simply break portions of it up into chunks that each student works on, rather than separating the platforms and making things more complicated?

tap13 12-12-2011 21:08

Re: Ardruino and cRio
 
Quote:

Originally Posted by theprgramerdude (Post 1090141)
Can you be more specific? Do you mean, what you can add on to the board for more features like other wireless, or what you can attach and control/sense?

Well I guess both, honestly, I'm still learning and researching what an arduino is used for. I want to know if there is rules that I might need to know on what I can do and can't do on an arduino :D

EricH 12-12-2011 21:13

Re: Ardruino and cRio
 
Ah, the "what are the rules?" question.

Well, to be honest, we don't know the rules for 2012 yet. However, you may find Section 4.3.10 of the 2011 Game Manual interesting reading.

Now, that won't affect what can be attached to an Arduino for non-competition purposes. But if you're using it for FRC purposes, those rules governed what you could do in 2011 and may or may not be similar to the 2012 rules.


All times are GMT -5. The time now is 00:36.

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