|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: Vex encoders/Interrupts
I remember the Vex encoders not being quad-output, so you can't have the "phase A plugged into dig-01 and phase B plugged into dig-02" problem. Hm.
Just out of curiosity, especially if you're using tank drive, what is the purpose of putting an encoder on the front and rear wheels of the same side of the robot? Shouldn't those wheels turn the same amount anyway? I guess it wouldn't be a bad idea to say exactly what you have plugged in exactly where. That seems to be the starting point for a lot of these questions ![]() |
|
#2
|
|||
|
|||
|
Re: Vex encoders/Interrupts
We had the same problem last year. Interrupt pin 3 registered as encoder 6, interrupt pin 6 registered as encoder 4, and interrupt pin 4 either registered as a random thing each time, or stayed at -13. I know the answer, but my brain doesn't want to remember it right now. I will try to think about it and get back to you tomorrow.
|
|
#3
|
|||
|
|||
|
Re: Vex encoders/Interrupts
He probably is using one motor per wheel rather than having them chained together like the typical 4wd FRC robot. The bigger question what good encoders are on a tank drive robot other than to control wheel speed.
|
|
#4
|
|||
|
|||
|
Re: Vex encoders/Interrupts
Quote:
It's a prototype with mecanum wheels, so that our programmers can work on the mecanum drive code while the actual robot is being built. FrankenVex consists of a Vex controller, 4 Victor 884s (Motor 1-4), some power wheel motors (I think...very beefy), and the mecanum wheels. There's a photo attached below. We need the encoders in order to make the thing drive straight! What's plugged in where: Motors go to ports 1-4, encoders, I've tried plugging an encoder in each of the interrupt ports, and got the weird mapping I described before. I'd like to plug the encoders into ports 1-4...but I'm willing to plug them into any 4 ports such that they'll work ![]() I think I'll probably just stick an old FRC controller onto FrankenVex, making it into FrankenFirst, since the encoders seem to work correctly on the FRC. Here's a poor picture of it. Once I get it put back together I'll post a better one. ttyl, --buddy |
|
#5
|
||||
|
||||
|
Re: Vex encoders/Interrupts
Switching to an FRC controller shouldn't affect anything unless you change the code because the FRC controller and the VEX controller have the exact same microchips and are just packaged differently. Also, I was wondering how you are powering the Victors and motors because you don't appear to have a 12v FRC battery on the robot and running them off a 7.2v VEX battery could be causing your uneven drive problems if they are made to run off 12v.
|
|
#6
|
|||
|
|||
|
Re: Vex encoders/Interrupts
Quote:
Quote:
--buddy |
|
#7
|
|||||
|
|||||
|
Re: Vex encoders/Interrupts
The Vex controller may have a different mapping of processor I/O pins to digital inputs. So even though the processor inside is the same, "what goes to where" is different.
|
|
#8
|
|||
|
|||
|
Re: Vex encoders/Interrupts
Just a personal comment, I've been through the recent FVC and I experienced much unpleasantness when using the VEX encoder. Not sure due to its poor build quality or otherwise, there is often much plastic dust (due to friction between plastic parts when spinning) accumulating INSIDE the encoder unit, which affects the encoder's output and hence would affect you during tuning/testing and soon you will find yourself changing program values unneccessarily. The abrasive dust would get clogged not only in the optical wheel but also in the IR sensing area which results ultimately in the failure of the device to sense any rotation at all (after long runs) and you will need to open it up and blow air into it in an attempt to clear out whatever crap is inside...
One solution could be to position the optical wheel properly and suspend the optical wheel on bearings.. not sure if that helps..In a nutshell, don't rely too much on the vex encoder ![]() |
|
#9
|
||||
|
||||
|
Re: Vex encoders/Interrupts
If you are using easyC Pro you can use quad encoders on the VEX bot. Plug your encoder A channel into interrupt ports 1-4 and plug your B channel into I/O ports 5-8 or hit F5 and reasign I/O ports 1-4 to Digital Inputs.
It looks like you are using the VEX encoders though so you probably need to upgrade to a set of quad encoders. Good Luck |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Interrupts | JSonntag | Programming | 1 | 14-01-2006 12:43 |
| Vex navigation with ultrasonic and encoders | GlennGraham | Electrical | 4 | 13-01-2006 12:58 |
| VEX Optical Shaft encoders in FRC | sanddrag | FIRST Tech Challenge | 8 | 04-10-2005 07:52 |
| Encoders, interrupts, and edge-triggering issues | Alan Anderson | Programming | 6 | 11-03-2005 16:06 |
| Interrupts | CyberWolf_22 | Control System | 3 | 12-01-2004 21:46 |