View Full Version : Building an arena controller
Hey,
We are having a media day in Sacrmento. I know how to build the standard port overrides, and have built a central control system based on the same in the past. This year, however, we are trying to build a more advanced control system which can automatically interface the team colors, timing, etc.
Several people claim to have created such a thing, but I am curious how this was done.
Please respond with ideas.
Hi, some team members and I were thinking it would be uber-cool if we could hack together a fake IFI "arena controller" and the field controller computer, to supply most of the functions that the real IFI stuff does for an off-season competition.
Specifically:
-LED Color
-Channel (all of them, remotely, not just enabling the dip switches)
-Auton & Disable (really easy)
Also if we could figure them out...
-Data being transmitted - I am guessing there is some sort of comms between the OI and the AC, I say this because of the "heartbeat" LED you can see on the AC's, that flashes at about the same rate (im guessing now) as the status lights onthe OI/RC (the 26.2ms loop). This could just be indicating the program loop, or it could mean that there is serial communication between the Arena Controller and the OI.
I just remembered that the radios run through the comp port now too. The new arena controllers must be a tad bit more complicated because of that since they have to rebroadcast the radio data to and from the modem tree. Just throwing this out there. We would have people use their own modems in our competition.
Now, we were going to go ahead and try to map out as many of the comp port pins as possible (probably not too many). My question is, does anyone know anything at all about the IFI back-end controllers? Has anyone volunteered and touched/seen/used them? Can I not ask this...i.e, has IFI sworn those people who operate the field to secrecy? Is there any hope for us to get a full pinout of the comp port or at least some hints?
As far as I can tell, the only reasons IFI would have for not releasing any info on the AC or comp ports are 1) so people dont burn out their $350 OI, 2) so people dont hack it and download new firmware (i'm guessing that, as the only mystery port, the comp port is used to communicate directly with the OI's microprocessor and download new firmware. But, these reasons exist for other info IFI has released, such as using the program port, etc.
IFI seems to be doing a good job of avoiding liability for anything teams do to their comp ports, so I is there any other reason (besides wanting to keep trade secrets) that IFI couldn't release more info about how the arena system works?
Sorry if this seems pointless, but I think the IFI control system is extremely cool and it would be a great project to build our own arena controller.
Mr. Steve
06-03-2005, 00:26
I always thought something like that would be awesome, but never had the time/resources to actually do it.
I would be darn careful with what your doing given the rather large warning from IFI
jzampier
06-03-2005, 11:05
IF (big IF) I were going to do this... here's where I would start...
1. Get a screw driver.
2. Open OI
3a. See what's inside...
3b. Look up the data sheets for the chips inside.
4. Pin out (w/ meter) what connects where and draw up
some kind of basic schematic. (Do this UNPOWERED)
5. Be happy.
Common stuff I would expect to be there (never having opened an OI).
A. Some kind of voltage regulation circuitry.
B. Some kind of microcontroller (probably another PIC18 series)
C. Some kind of RS232 driver circuitry.
Here's what people before you have noted about the Comp Port:
1. There are power and gnd pins.
2. There are some GPIO pins to control Auton/Disable
(GPIO is general purpose IO, think the digital inputs/outputs on the RC)
3. And the other pins are a mystery... but I'd bet there are
serial i/o pins, given how IFI has magically done away with
the radios directly connected to the OI.
Also from what I know about the Arena system:
The arena actually functions over ethernet (hardwired).
Each alliance station actually has a private IP address
(man... it was pretty cool to ping an alliance station :) ).
So here's the setup (on each side):
3 Arena Controllers somehow have an ethernet interface.
Each AC appeared to have 5 ports of interest:
1. 1 ports for Competition controllers
2. 1 Comm Port
3. 1 Power port
Now If I were a betting man (ie how i would design the system)...
I would use some kind of embedded linux to talk to a commercial
Single board computer that has a serial port (or 3, one for each AC)
over IP and relay data over some custom protocol over TCP.
Now... disclaimer. If you are not a CE/EE and know what you are doing
I would suggest not doing anything. Those things are darn expensive.
(I've never been brave/crazy enough to crack one open...one day maybe
and I'm a 5th year CE Grad Student)
Secondly, as a budding engineer you have to ask yourself what the
ethical implications of reverse engineering someone else's design are.
(I'm not touching this with a 10' pole)
Lastly, IANAL. Don't annoy IFI. Cease and Desist letters are not fun.
They do good work for FIRST.
steven114
06-03-2005, 13:58
Why not just email and ask IFI themselves? Many of the people that I've met have been very nice and helpful, and they may just share a few secrets.
I have opened up an OI after someone spilled soda all over it and I cleaned it out. It is an old one so we're not that worried about not being able to get it repaired on warranty... I think the soda pretty much killed that :-)
Anyway, I, not being an EE, didn't get much info out of the OI except for there being at least one microprocessor.
Keep in mind, my goal here is making something functional for an off-season competition, not duplicating what IFI does. That means, I would prefer to make it wired directly into an interface, not with single-board computers as AC's with ethernet...as cool as that would be.
What i was thinking:
-Each OI gets a comp-port cable that goes back to a game controller. This would be the _only_ control device (apart from computers). This would tie together the disable/autonomous from each one and interface with a computer, either with a serial driver or with another IFI-RC talking to a PC through its program port (those RC's are the most useful pieces of hardware I've ever seen).
There would be two computers networked. One would be running a display program I am working on, outputting a color-keyed fullscreen display of time and scores to a video mixer/projector. The other computer would be running the control program that would network with the display computer and the field controller, telling it when to disable and autonomous-enable the various robots. That in itself would be enough, but for one problem:
Radio channels.
I could ask each team to go through the process of setting the MSB of the team number and then assign them a radio channel, but it would be so much nicer to set it remotely. Unfortunately, that might only be accomplished through another IFI-proprietary data stream that would be extremely hard to decode without their help (kinda like the stream from the dashboard port).
Also from what I know about the Arena system:
The arena actually functions over ethernet (hardwired).
Each alliance station actually has a private IP address
(man... it was pretty cool to ping an alliance station :) ).
So here's the setup (on each side):
3 Arena Controllers somehow have an ethernet interface.
Each AC appeared to have 5 ports of interest:
1. 1 ports for Competition controllers
2. 1 Comm Port
3. 1 Power port
So, after the Arena Controllers, everything is done on computers? Like, there aren't any more small rectangular black boxes from IFI labeled "Uber-Master-Multiplex Controller" etc?
In that case, the AC would handle just about everything... oh well.
Before I directly email IFI, if anyone working for or related to IFI is reading this, what is your feeling? Should I stop this right now or is it ok?
If there is an easy way to set team color, that would be neat. It's interesting that autonomous and disable are plain digital switches, instead of being part of a serial data stream. Did they intentionally break off those two to let teams build competition adapter dongles? Does this mean that any other functions (read-light color) are plain digital inputs?
I had the same idea.
http://www.chiefdelphi.com/forums/showthread.php?t=35833
Someone responded who had seen the control system there, and honestly, it doesnt look very promising. I suspect that all functions other than the standard disable/auto are enclosed in serial comms between the OI and the Arena Controller.
miketwalker
06-03-2005, 21:46
If you did research through IFI and read the Robot Controller and Operator Interface manuals you would find that the LED colors are selected in the master controller based on which radio channel you use. This is as of 2004, and I do not believe they changed that this year. As for selecting channels, you can make switches for the competition ports (or interface them to a computer) to select the channels. Teams do it all the time for offseason competitions. It's all in documented resources on the Innovation First website if you look around, it's been done for years. If you can't find them, call IFI and they're very helpful. Autonomous and disabled are also simply shorting out 2 particular pins on the OI...
DISCLAIMER: IF YOU DO THIS AND MESS UP, YOU CAN SERIOUSLY DAMAGE YOUR OPERATOR INTERFACE, AND IT WILL NO LONGER BE COVERED UNDER WARRANTY. MAKE SURE YOU HAVE RESEARCHED BEFORE PLUGGING ANYTHING INTO THE COMPETITION PORT.
If you are planning on hosting an off season competition i would seriously suggest you to get an official FIRST field, which would come with the field electronics. While this may cost a lot for insurance and is normally refunded, barring no damage, see if a sponsor will help out. Also in the long run it probably will be cheaper for if some reason your home brew arena controller surges power to the teams OI, it will start costing you a lot to replace damaged units for teams.
To Miketwalker: I have read the manuals. The system you are talking about sets the LED colors based on the channels that teams can set on the channel switches. There are only two channels that have a blue color, therefore Triple Play wouldn't work that well... Also, the goal was to see if we could set the channel externally without the hassle involved (changing the team number MSB and getting every team to change their channel switches correctly).
To dez250: The reason we are doing this is 95% for the fun of hacking together (the good sense of the word) the back-end control system, not to have official stuff. We also don't have any money :-)
Note that the OI doesn't HAVE to receive power from the Arena Controller---we would have them bring their bricks to plug in. Same goes for the radio modems, we would have teams do it the old way.
We merely would have this system _available_ in the case we want to have an off-season event. As a programmer and electrical person, I would be doing it for the fun of it.
Also, no offense, but enough with the disclaimers. I have seen an OI blow up because of a miswired comp port dongle. We will be taking precautions and doing extensive testing before actually using the system with other teams' OI's.
Alan Anderson
06-03-2005, 22:26
As for selecting channels, you can make switches for the competition ports (or interface them to a computer) to select the channels. Teams do it all the time for offseason competitions. It's all in documented resources on the Innovation First website if you look around, it's been done for years.
Are you sure about that? The channel selection is in none of the documentation I have found. In fact, the competition port pinout guide explicitly states that connecting to any pins other than the four called out (ground, disable, autonomous, and practice) will void the OI warranty.
The three offseason competitions I have attended either used the official IFI field controllers, or had the radio channels set manually using the OI switches.
miketwalker
06-03-2005, 22:27
Also, no offense, but enough with the disclaimers. I have seen an OI blow up because of a miswired comp port dongle. We will be taking precautions and doing extensive testing before actually using the system with other teams' OI's.
I wasn't necessarily placing the disclaimer just towards you, but if some person comes along reading this thread and says "OH I SHOULD DO THAT!" and when they blow something up say that I helped them out with ideas... I'm not in the mood to be yelled at and have people say I suggested something that cost them alot of money because of a mess up.
Alan and all, as far as i have been told by IFI up to last year 4 channels were available to everyone to practice with so you could scrimmage. This year 6 are available for the same reason. Now to access the other 34 the Firmware that is in your RC and the Firmware thats in the Arena Controller have sections that do some of that. Without IFI equipment you really cant open all 40 channels yourself.
For everyone's reference, here's how you select the channels: Set the MSB of the team number (to make the team number higher than 2048) while having the OI tethered to the RC. Then, select a new channel from the six and reset.
I realize that it would be easy enough to get everyone in a scrimmage to set their team numbers correctly and then assign them channels. However, the idea behind this thread was to learn more about how the Arena Controllers work to set the OTHER 34 channels, not to be able to quickly hold an off-season event.
Josh Hambright
07-03-2005, 11:06
I put together a white paper on the last day of the build season explaining changing the channel with the 2005 system.
http://www.chiefdelphi.com/forums/papers.php?s=&action=single&paperid=445
Well, if we cannot get something setup to act like an arena controller and automatically set the channel, so be it.
To CJO - This is how we were going to do the system:
A laptop with serial port to an IFI robot controller (2004 model). This would be the "arena controller." It would have a little bit of circuitry to hook together the auton mode switches into one digital output and wire the six disable switches to more digital outputs, then have some digital inputs running to a control board with instant disable switches for the six teams. The laptop would be running a program to have serial communication with the IFI controller, telling it when to start a match and when to go autonomous, etc. That would handle the timing. It would also be talking to a custom program on another computer over a network, that computer would be hooked up to the video mix and display the countdown timer and scoreboard.
I am currently working on all three of those programs:
-the display program: 10% done
-the master control program: 0% done
-the IFI-RC master program: 15% done.
Once those get a little closer to public release, I will set up a website somewhere and post them for anyone interested.
devicenull
07-03-2005, 18:20
Before you wire all the auton switches together, check what happens when the disable AND auton switches are connected. I'm thinking it will disable anyway, but the last thing you want is a robot running around by itself in auto mode with no way of stopping it.
How are you planning on creating the human player pads? We've been interested in building one, but can't really find a way. Wiring its no problem though.
Dave Flowerday
07-03-2005, 18:38
How are you planning on creating the human player pads? We've been interested in building one, but can't really find a way.
We simulated the human player pads at a pre-ship competition we held using some dead-man's switches. Basically, a momentary switch that is normally-closed (turned ON) unless you press it, then it opens up. We placed the switches where the pads should have been. This way, the HP has to hold the switch down for their robot to stay enabled, and when they let go to go deliver a tetra their robot is automatically disabled. It worked really well.
steven114
07-03-2005, 20:28
Before you wire all the auton switches together, check what happens when the disable AND auton switches are connected. I'm thinking it will disable anyway, but the last thing you want is a robot running around by itself in auto mode with no way of stopping it.
IIRC, it does exactly what you would expect - runs autonomous mode but does not move.
The controller will operate the field the same way the IFI stuff does--keep the robots disabled until the match is started, then enable autonomous mode. Disable does prevent auton mode from doing anything, as it affects the master controller in addition to the user processor, but that won't be an issue.
Also, each individual station will be controllable in terms of disabling robots before or during the game. We will have e-stop buttons and disable switches on the master controller to disable robots for hazards or violations.
You can build floor mats with a little floor mat, a piece of plexi or aluminum to cover the bottom (insulate the metal though) and some strips of metal. Glue one strip to the bottom of the mat, then one stripto the underlying material (wood/plexi/insulated metal). These wires go out to connectors to the RC dig ins on the master controller. Then, you put strips of nonconductive material around the conductive strips, springy stuff like folded pieces of cardboard or something else that is springy but low-profile.
I have tested the mat idea before for use in a haunted house :-D it works. We will probably have overrides in case the mats fail during a match.
ConKbot of Doom
08-03-2005, 15:42
Anyone with an OI open, could you try to hook the microprocessor up to a programmer with ICSP (in circuit serial programming) capability, then try to read the hex off of the chip. I know that the guys at IFI are probably smart enough to use code protection, but it might be worth a shot. Then just disassemble the hex to get the assembly. Might not be super helpful to have the assembly, but it would be better than nothing.
Just my thought...
Anyone with an OI open, could you try to hook the microprocessor up to a programmer with ICSP (in circuit serial programming) capability, then try to read the hex off of the chip. I know that the guys at IFI are probably smart enough to use code protection, but it might be worth a shot. Then just disassemble the hex to get the assembly. Might not be super helpful to have the assembly, but it would be better than nothing.
Two reasons why I won't do that:
1) reverse-engineering the OI would probably get IFI people pissed more quickly than just messing with it
2) I am the only person working on this for now, and not being a genius programmer, have no clue how to take assembly code and figure out serial data structure from it...
Mike Hendricks
08-03-2005, 23:48
Are you sure about that? The channel selection is in none of the documentation I have found. In fact, the competition port pinout guide explicitly states that connecting to any pins other than the four called out (ground, disable, autonomous, and practice) will void the OI warranty.
The practice switch enables you to use that row of 4 switches to change the channel. Check the OI manual for the channel settings.
Edit -
Some channels will go blue, others will go red. Just keep trying different channels on the OI until you get the color you want (it seems like the first 2 or 3 were red and the rest were blue .. or was it the other way around .. :confused: )
The practice switch enables you to use that row of 4 switches to change the channel. Check the OI manual for the channel settings.
Edit -
Some channels will go blue, others will go red. Just keep trying different channels on the OI until you get the color you want (it seems like the first 2 or 3 were red and the rest were blue .. or was it the other way around .. :confused: )
The practice switch doesn't do anything with new OI's... you just have to have the team number > 2048 (MSB set). I had also thought that I remembered there being an uneven number of colors, like 4 red and 2 blue or something. I read something on it but I can't find it anymore... does anyone have a link to where IFI said what channels produce what colors?
Alan Anderson
09-03-2005, 11:01
The practice switch enables you to use that row of 4 switches to change the channel. Check the OI manual for the channel settings.
miketwalker was talking about using the competition port pins to set the channel, not the OI dip switches. The 2005 OI doesn't use the practice pin anyway; the documentation I can find says that the channel select switches are always active. (That's not exactly true; you have to set the team number's high bit before you can escape channel 40.)
Mike Hendricks
09-03-2005, 12:52
Hmm .. I wonder why they stoped using the practice pin. My fault on spreading wrong info .. I know we used the practice pin last year without any problem .. and since the RC/OI sets are almost the same .. I figured there wouldnt be any problem.
Heres the offical word from IFI
http://www.ifirobotics.com/forum/viewtopic.php?t=339&sid=277bdd8537e521a7bae7f3520bb85074
http://ifirobotics.com/docs/oi-ref-guide-2-21-05.pdf - Page 16 lists the channels and the switches you need to set. It doesnt say the colors however.
I built a field controller based on the edu controller. What pin on the competition port is the e-stop? In order to effectivly control the units, i hooked the power supply up to a relay, and used Kevin Watson's ttl interface to control the system from a laptop. It was an arena controller uber ghetto edition, but it worked. I talked to one of the IFI people. They are somewhat touchy about the chanell changing, however, I think that they might be willing to release the e-stop and disable ports, because of the safety issue related to running a scrimage w/o e-stop and using powerdown to disable.
Finally a note on the field controller. Hatch chose to create a system this year in which there was no hardware control panel. As a result the official field had as long as 2 sec latency between a robot disable, and the actual robot disable.
Mike Hendricks
29-03-2005, 00:26
I think that they might be willing to release the e-stop and disable ports, because of the safety issue related to running a scrimage w/o e-stop and using powerdown to disable.
Finally a note on the field controller. Hatch chose to create a system this year in which there was no hardware control panel. As a result the official field had as long as 2 sec latency between a robot disable, and the actual robot disable.
Intresting. I thought that the e-stop was just a disable button for the drivers. I doubt they would use another pin for the e-stop when they could just use the disable pin. I'm not sure thou. Might be something to ask the IFI people if such a pin even exists.
As for the latency, I recall seeing that. Following the auton, it seems like there was a long delay (well .. a couple of seconds) between the human control sound playing, and the humans actually gaining control. At Sac, I also remember seeing a robot not getting disabled when the human player jumped off the pressure pad. My jaw hit the ground when I watched it happen, I only saw it once thou.
Two thoughts,
The e-stop on blue #3 did not work at SVR. We tried several things, and could not re-enable the e-stop.
As for the latency. I believe that there is ~1.5 sec between the end of autonomous mode and the beginning of driver control designed to allow field attendants to remove the hanging tetras.
Finally, at SVR we observed that the real time scoring frequently increased the field latency. Also, we had some communications problems with the team number displays.
Billfred
29-03-2005, 00:35
I am no IFI rep, but in my experience the E-stop buttons have always used a DB9 port setup. Those plug into the controls at the alliance station, which then go on their sweet merry way.
I've always wondered what could be traveling through such a port. I've got a donut* for someone that tells me.
*Delivered off of the arena site, of course.
As far as I know (from an IFI rep comment at sac last year), they only use two pins of the DB9 port, they use that format simply because of the ease of disconnecting and the fact that there is only one DB9 port on each field controller channel.
Nate Smith
29-03-2005, 07:04
You've got it basically right...my understanding is that the channel select is activated by a password authentication sequence between the OI and AC when it is connected. Once that authentication is completed, a link is established between the two devices, transmitting enable/auton/channel/color/radio data.
If you don't want to get a full field from FIRST, there is an alternative that OCCRA has used for the past few years. Contact IFI directly, and see if you can rent a set of arena controllers directly from them. In conjunction with this, I have designed a basic field controller based on a Basic Stamp which OCCRA used in their 2004 season, and have a greatly improved version in the early design stages. Note that my system does not replace the ACs, but rather interfaces with them, mimicing the rest of the FIRST electronics system. If anyone is interested in the new design, let me know via e-mail.
Also, a clarification on the post mentioning the ethernet link to the Alliance consoles this year...my understanding is that there is a PLC installed in each console which handles control of that alliance station. The ethernet link is actually between that PLC and the main switch/router.
Also, if anyone is interested, I will be at the West MI event on Saturday only. I can bring information with me then...
I had the same idea.
http://www.chiefdelphi.com/forums/showthread.php?t=35833
Someone responded who had seen the control system there, and honestly, it doesnt look very promising. I suspect that all functions other than the standard disable/auto are enclosed in serial comms between the OI and the Arena Controller.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.