|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Using an Operator Interface with the 2004 EDU RC wirelessly
I'm hoping this may be of use to some teams out there who'd like to be able to control their new 2004 EDU RC with a previous year's OI. What we've done is to connect the serial port on the 2003 EDU RC to the serial port on the 2004 EDU RC, and then modified the code for each so that the 2003 EDU RC simply acts as a forwarding device to send the joystick & button data from the OI into the 2004 EDU RC. Essentially, the 2003 EDU RC becomes a fancy radio modem.
There are only 2 pieces of hardware that you'll need to duplicate this setup. First is a special serial cable to connect the 2 RCs. This serial cable needs to only have 3 wires and connect the pins like this: Code:
2003 RC 2004 RC Pin 2 <------> Pin 3 Pin 3 <------> Pin 2 Pin 5 <------> Pin 5 The other thing you will need to do is figure out a way to power both EDU RCs at the same time. We did not receive a new EDU battery with the 2004 kit, so I'm assuming noone else did either. The best option for this problem is probably to order a second battery from Innovation First. Otherwise, if you're feeling adventurous, you may be able to construct a Y power cable to power both RCs from the same battery pack. Once you have figured out how to power both EDUs and made your serial cable, then simply download the code for each EDU from the zip file I'm attaching to this post. There's an OIPassthru.bsx file for the 2003 EDU and an MPLAB IDE project for the 2004. Your own code should still go in user_routines.c or user_routines_fast.c, just like with the default EDU code. Well, hopefully this is helpful to some teams. Please feel free to reply with questions and we'll do the best we can to get them answered. |
|
#2
|
|||||
|
|||||
|
Sounds ingenious. Thanks for the input. What exactly did you do to the code?
|
|
#3
|
||||
|
||||
|
You beat me to it.
|
|
#4
|
|||||
|
|||||
|
So let me get this straight.
WE cannot use the operator interface from last year with the new edu controller? or have i got this totally wrong. |
|
#5
|
|||||
|
|||||
|
Quote:
That's a bad thing... ![]() |
|
#6
|
||||
|
||||
|
Quote:
|
|
#7
|
||||
|
||||
|
Thanks Dave!
We are adapting the EduRC to our 2003 robot. We built the cable and have finished the user portion of the code. This has allowed us to run the 2003 OI controls without modification. Our drivers may not even know the difference! Our plan is to use this robot as a test bed for 2004 software development I encourage everyone to try this! Andy |
|
#8
|
||||
|
||||
|
Quote:
|
|
#9
|
||||
|
||||
|
Quote:
|
|
#10
|
|||
|
|||
|
Thank you Dave
Team 1008 hooked up the Edubots. Works great We also try to control the pmw this work as well. So we will use this set-up to test and right code for our 2 speed 2 motor air shift transmission we our developing. Thanks !! |
|
#11
|
||||
|
||||
|
Re: Using an Operator Interface with the 2004 EDU RC wirelessly
Iīve tried to connect the eduīs, but I had some problems.
I downloaded the program into 2003 EDU and into 2004 EDU with total sucess. After that, I tested the communication sending pwm_03 = 250 , and engaging a servo motor into pwm03, in the 2004 EDU RC. It moved. So I tried pwm_03=127 and the servo stopped. Great, it worked. Now, we tried to turn on the 2003 Operator Interface, in order to send Joystick data to the 2004 EDU controller (note: using 2003 radio modens). But for some reason it went crazy, and the servos didnīt respond to the joystick, they just start running at top speed, without stopping. We plugged both RC in a main power source with 7,2 V, so it should power then at the same time. We are trying to use TTL communication using Parallax RF modules, did anyone try to use something like this? What about the 3 pins for TTL communications, I read that thereīs no custom code in the default program for it, is that true? We have a lot of thing in mind such as: pluging joysticks in parallax boards of education. After that we plug one RF transmitter, and we use another Parallax board to receive the signal. Finally, we program the receiver board to convert the signal (in value) to PWM signal (used in the 2004 RC). This is a little harder, but it works in theory. Last edited by Guilherme : 05-12-2003 at 15:35. |
|
#12
|
||||
|
||||
|
Re: Using an Operator Interface with the 2004 EDU RC wirelessly
Joe,
First are you using the 2003 EduRC with its internal Modem? The cabling goes between the two EduRC's to link them serially through the DB9 ports. The RC modem is not used. The user_routine.c file is specific about which joystick controls which pwm_out. ================================================== ========== pwm01 = pwm03 = Limit_Mix(2000 + OIData->p1_x + OIData->p1_y - 127); /* LEFT WHEELS */ pwm02 = pwm04 = Limit_Mix(2000 + OIData->p1_y - OIData->p1_x + 127); /* RIGHT WHEELS */ pwm01 = pwm03 = 255 - pwm01; /* reverse direction of left side */ /* ------ Other PWM OUTPUT Mapping (can be used for two-joystick drive ------*/ pwm05 = OIData->p3_x; /* limited by digital inputs 1 & 2 below */ pwm06 = OIData->p3_y; /* limited by digital inputs 3 & 4 below */ pwm07 = OIData->p4_x; pwm08 = OIData->p4_y; ================================================== === Plugging into pwm03 may be giving you the strange actions. The default program uses it with the mix routine. The syntax is also very picky for OIDATA->___. Also if the modem on the 2003 EduRC is not firmly seated into the motherboard you wil get erratic motion up to and including basic run and init errors. We have successfully adapted our 2003 code and can run our 2003 robot with this setup and our 2003 OI. Andy Brockway Team 716 Last edited by Andy Brockway : 05-12-2003 at 15:40. |
|
#13
|
||||
|
||||
|
Re: Using an Operator Interface with the 2004 EDU RC wirelessly
I plugged the 2003 EDU RC with the 2004 edu RC with the cables, I didnīt use the internal modem.
So the two RC are plugged with the 3-wire cable, and the OI sends data to the 2003 edu, just like you said. Any idea of whats is causing this problem? I just plugged a servo in pwm03 to test communication between the EDUīs. Last edited by Guilherme : 05-12-2003 at 17:10. |
|
#14
|
||||
|
||||
|
Re: Using an Operator Interface with the 2004 EDU RC wirelessly
...
The 2003 Edu RC receives data from 2003 Operator Interface. Then the 2003 Edu RC, witch is serial connected to the new Edu throught one cable (with the three wires like you said), sends the data to the new Edu RC. Now... Is this correct? I guess so, 'cos itīs exactlly what we did. The main question is: why canīt we control the servos attached in the pwm outputs located in the new Edu RC ? When we move the joystick we get no light blinking in the Operator Interface... Thanks for your help, weīll work harder in the assembly to try to figure it out our mistakes. Just let me know if you found any difficulties like ours, so we can share solutions. |
|
#15
|
||||
|
||||
|
Re: Using an Operator Interface with the 2004 EDU RC wirelessly
Joe,
I am still a little confused on your set-up. What are you using for the modem on the 2003 EduRC? For your test, plug the servo into pwm08 and test with py_4, this is a direct link. The setup that we are using is as follows: 2003 OI with its Radio Modem, Team Number set (ours is 716) per IFI instructions. 2003 EduRC with its interal modem (this is the black box with two sets of multiple pins and plugs into the bottom of the motherboard) and motherboard, Team number set to 716, switch set to 'program'. Do not use the full size RC radio modem. I think you are using the internal modem because you said you had no problem programming. 2004 EduRC Cable between the 9 pin connectors of the EduRC's. Note- must be per this thread, note crossover between pins 2 and 3. Do not use a standard serial cable! All pwm cables attached to 2004 EduRC. Good Luck! Andy Brockway Team 716, The Who'sCTEKS Last edited by Andy Brockway : 08-12-2003 at 08:04. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| My hints and guess on the Game in 2004! | Elgin Clock | Rumor Mill | 116 | 09-01-2004 13:30 |
| 2004 Championship Eligibility Criteria!!! | dez250 | General Forum | 214 | 28-12-2003 20:11 |
| 2004 will be 2 v 2 | Gadget470 | Rumor Mill | 20 | 25-10-2003 21:32 |
| 2004 Goals | Rich Kressly | FIRST Interactive Rural SupporT | 2 | 19-10-2003 18:09 |
| 2004 OCCRA Competition | Gadget470 | OCCRA | 2 | 11-06-2003 12:37 |