Go to Post You can take my blocker... but you can never take my cheesecake! - Andrew Schreiber [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #16   Spotlight this post!  
Unread 05-11-2002, 21:16
Unsung FIRST Hero
Nate Smith Nate Smith is offline
FRC Key Volunteer Trainer
AKA: CrazyNate
no team
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Old Town, Maine
Posts: 1,029
Nate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to behold
Send a message via AIM to Nate Smith Send a message via Yahoo to Nate Smith
Quote:
Originally posted by miketwalker
You probably want to post that on FIRST Codex, cause then it'll be available for all teams to use and see, since FIRST Codex is trying to put together resources for teams for help on programming. By the way, VERY nice code! I'm impressed. Keep up the great work.

http://www.first-codex.net/
First, thanks for advertising the Codex! Right now, however, we don't have a way to directly post files, except through the discussion forums. however, the size we're talking about I think is too large for the forums upload system. I'll see if I can get a "white papers"-style upload system in place...
__________________
Nate Smith
nsmith@smythsoft.com
12 seasons, 4 teams, and more time logged behind the scorekeeper's table than I care to remember...
returning for 2011? only time will tell...
  #17   Spotlight this post!  
Unread 05-11-2002, 22:48
rbayer's Avatar Unsung FIRST Hero
rbayer rbayer is offline
Blood, Sweat, and Code
no team (Teamless Orphan)
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Minnetonka, MN
Posts: 1,087
rbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of light
Send a message via AIM to rbayer
Quote:
Originally posted by VanWEric
I think i'll be fooling around with roboCon tomarrow or at least sometime this week. I'd be happy to run those tests for you, seeing as that these computers at school are made from a solid mass of kevlar, and could probably withstand anything. That, and i need to distract IMS with problems other than taking my privalages away one by one.
Does anyone know where to find a copy of the program running on the stamp located within the OI? That may help this effort greatly.
Lastly, what exactly is coming out of the computer? Is this a stream of data that can go over the modems? You may be able to replace the OI with a comp, and leave the sensor checks on the stamp code. Just theorizing, don't tear my logic apart to gruesomely.
Any who, send me the code you want me to test, and ill have at it. I'm assuming you just want to monitor it on the serial port, I think I can handle it ( i hope ).

OK, there are a few issues here. First, the Stamp is only in the RC. The OI consists of several other types of ICs. Similarly, the RC is A LOT more than just the Stamp. There are also processors for input, output and a master processor to control it all. This master processor (or mater uP) is the only thing the Stamp communicates with directly.

As for what comes out of the computer, its sorta complicated. It starts by waiting for a 255,255,1 sequence, then reads the next 11 bytes. These eleven bytes contain all eight sensors, both bytes of rc switches, and a control byte that I use internally to prevent bytes from every being 0 (Windows doesn't like sending or receiving 0 as it thinks it is the end of the message). It then waits to get back a 255,255,255 sequence indicating that the Stamp is ready to receive the new data. It then sends a 20-byte packet to the RC that contains all 16PWMs, both relay bytes, a byte for all eight LEDs, and a control byte similar to the one I discussed previously.

If you want to see this as actual code, open up the "RoboCon RC.bsx" file and take a look.

Finally, do you have an OI and an RC and the necessary cables (one F-F and one M-F)? If so, I'll try to write a little program in the next few days to record everything that gets sent back-and-forth between the two.

As another note, would people be interested in a more detailed description (possibly even a whitepaper) on the overall setup of the RC and OI?
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php
  #18   Spotlight this post!  
Unread 06-11-2002, 15:37
VanWEric VanWEric is offline
Registered User
#0250 (Dynamos)
 
Join Date: Feb 2002
Location: NY
Posts: 86
VanWEric is an unknown quantity at this point
Quote:
As another note, would people be interested in a more detailed description (possibly even a whitepaper) on the overall setup of the RC and OI?
yes. Very much so. I had to teach myself everything i know about PBASIC and all of its associated what not. I know enough to get by, and I get most of it, but a few questions bother me, such as :

If the main stamp is on the RC, then how does the OI respond to it? Are the screamers bi-directional? I hooked up the modems in backwards for kicks once, and the RC got short spurts of signal. IE. Pause .5sec, lurch, pause, lurch.

I think i can get a serial port monitor up and running on my own, but i wouldnt mind if you did it. I tend to break things in my debuging attempts. I do have the cables required, i just need to find them and the rc&oi. It'll be fun.
  #19   Spotlight this post!  
Unread 06-11-2002, 15:54
rbayer's Avatar Unsung FIRST Hero
rbayer rbayer is offline
Blood, Sweat, and Code
no team (Teamless Orphan)
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Minnetonka, MN
Posts: 1,087
rbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of light
Send a message via AIM to rbayer
The important thing to keep in mind is that the Stamp is a VERY small part of the OI/RC system. Basically, it is only there to allow us to program more easily. After all, a Stamp IIsx is only about $30-$45, but the whole RC/OI setup is $1145. There are SEVERAL other microprocessors that are far more expensive than the Stamp in both the RC and the OI. These are the ones that deal with all the communications between the two pieces.

As for the Radio Modems, they ARE bi-directional. After all, the OI needs to send Joystick data to the RC and the RC needs to send dashboard/LED data to the OI.

If you feel like doing the serial port thing yourself, I'd appreciate it as I'm currently in the middle of the Linux port of RoboEmu. About the only advice I can give you is that the Radio Modems are 9600bps, so I would guess the thether probably is too.

--Rob
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php
  #20   Spotlight this post!  
Unread 06-11-2002, 17:18
Dave Flowerday Dave Flowerday is offline
Software Engineer
VRC #0111 (Wildstang)
Team Role: Engineer
 
Join Date: Feb 2002
Rookie Year: 1995
Location: North Barrington, IL
Posts: 1,366
Dave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond repute
This will probably end up being a long post, and hopefully I can answer a lot of questions from this thread. But before I do that, I need to stress one thing: DO NOT connect a computer directly to the tether port of either the OI or the RC! The tether port carries standard serial data, but it also has +12V on one of the pins (think about it: the OI gets power from the RC when in tether mode, so this power has to come from somewhere). If you hook this up to a computer, there is a good chance you will ruin either the serial port on the PC or the RC itself or both.

OK, now that that's out of the way... Myself and some other members of team 111 experimented a lot with this last season. We successfully built a miniature operator interface out of a Motorola HC08 microprocessor that talks directly to the RC over the tether port. So it definitely can be done. However, we also have a lot of fancy equipment here at Motorola that allowed us to figure it all out before we destroyed anything. If you don't know exactly what's on each pin of the tether port, then you shouldn't be hooking the RC up to anything other than the OI.

Quote:
The only reason why you still need the OI is that otherwise the master uP stops execution of the Stamp when it doesn't detect a signal from the OI. Strictly speaking, the OI just sits there. In fact, it doesn't even send any important data to the RC as the only things that are present in the Serin command are the sensors and switches.
The OI is sending several "important" pieces of data to the RC, even in this case. One of the bytes in the datastream from the OI to the RC is your team number. The RC will not function unless it is receiving this team number in the stream. There's also 2 checksum bytes, an "enabled" bit, etc.

Quote:
Finally, do you have an OI and an RC and the necessary cables (one F-F and one M-F)? If so, I'll try to write a little program in the next few days to record everything that gets sent back-and-forth between the two.
We've obviously figured out the whole bi-directional protocol since we can control the RC with our own software. Right now I'm thinking it's not a good idea for me to share the protocol as it will almost certainly just lead to lots of dead RCs from people trying to hook up to them. I can tell you this though: the RC-->OI data stream is the exact stream you get out of the Dashboard port. So if you read the spec for that you'll get a very good idea of what's going on between the OI and the RC. The reverse direction is extremely similar.

Quote:
If the main stamp is on the RC, then how does the OI respond to it? Are the screamers bi-directional? I hooked up the modems in backwards for kicks once, and the RC got short spurts of signal. IE. Pause .5sec, lurch, pause, lurch.
The screamers are indeed bidirectional. I'm a little surprised that hooking them up backwards didn't work. Functionally, the radios on each side of the link are identical, except for the Tx/Rx frequencies are opposite. If you want to learn more about the radio modems, visit www.electrowave.com and look for the SCREAMER422 technical manual.

Quote:
The important thing to keep in mind is that the Stamp is a VERY small part of the OI/RC system. Basically, it is only there to allow us to program more easily. After all, a Stamp IIsx is only about $30-$45, but the whole RC/OI setup is $1145. There are SEVERAL other microprocessors that are far more expensive than the Stamp in both the RC and the OI. These are the ones that deal with all the communications between the two pieces.
It's been about 6 months since I looked at this, but if I recall correctly, there are 3 processors in the RC: Two PICs and the Stamp. The two PICs do the majority of the work, and run considerably faster than the Stamp. However, they are a lot cheaper. At $30-45, the BS2SX is easily one of the most expensive microcontrollers on the market. The PICs in the RC are probably between $5-10. The HC08 that we used in our Mini OI was $3. With the Stamp, you are paying a hefty price premium for the "ease of use" of the PBASIC language, though I'd argue that programming a regular microcontroller in assembly isn't really that much more difficult, and would be a lot more useful to students interested in computer science/engineering (but that's another topic altogether!).

So if the microcontrollers in the RC and OI are so cheap, why does it cost $1200, you ask? Well, I can't say for sure, but just guessing I'd say that it's because it's such a low volume product that they have to charge that much to recoup their costs in designing the hardware and writing the software to run it all.


Please let me know if you guys have questions about any of this. It's great to see so many people interested in the inner workings of the control system! This is exactly the kind of stuff that electrical/computer engineering is all about, and unfortunately I don't think either of these fields get enough exposure in the FIRST world.
  #21   Spotlight this post!  
Unread 06-11-2002, 21:30
rbayer's Avatar Unsung FIRST Hero
rbayer rbayer is offline
Blood, Sweat, and Code
no team (Teamless Orphan)
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Minnetonka, MN
Posts: 1,087
rbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of light
Send a message via AIM to rbayer
Given that you hooked your HC08 up to the tether port, I assume you must have a pinout. If so, would you mind sharing that? If I knew which pin the +12V was on, I could merely disconnect that wire in the serial port and wouldn't have anything to worry about.

Also, would you mind sharing the HC08 setup, as this could be a fun project while we wait for Jan 4, and at $3 it would definately be one of the cheaper ones.
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How much planning goes into your robot? Jnadke General Forum 41 29-01-2006 21:29
how do you power on the robot control great_one411 Electrical 6 04-02-2003 00:46
WASH Palm scouting at the Championship Mike Soukup Scouting 2 19-04-2002 15:14
robot control emulator for default or other program CharlieWilken Programming 26 24-02-2002 02:36
about how Drive Train push the robot... shouldn't the force accelerate the robot? Ken Leung Technical Discussion 12 26-11-2001 09:39


All times are GMT -5. The time now is 05:25.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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