|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Inverted Turning
Our robot goes forward and backwards fine, but right=left and left=right. It appears the speed controllers are wired properly, if did notice however that the LED on the speed controller is flashing green on one and red on one when the stick is pushed forward and the robot is going forward. To verify that it was not an electrical problem i reversed the leads from one of the motors then forward and backward = turn and vice versa.
This is for 2 motor drive, left = PWM 1, right = PWM 2. This is with the simple robot template. I did verify that the speed controller's + and - are wired correctly and the motor's are wired in the same direction (+ to red and - to black) I just don't know whats going on. Any help is appreciated, I just got the camera to work and here we are another problem... |
|
#2
|
|||||
|
|||||
|
Re: Inverted Turning
The reason one speed controller goes green and the other goes red is that the motors need to turn in opposite directions for the wheels to go in the same direction. That's not a problem.
Can you make absolutely certain that the PWM cables are going to the speed controllers they ought to? (If you accidentally swap the cables between PWM1 and PWM2, the robot will behave as you observe.) |
|
#3
|
|||
|
|||
|
Re: Inverted Turning
Quote:
I'll give it another try tmrw, I just got home, internet at school was a bit funky. Last edited by Darkknight512 : 28-01-2010 at 16:38. |
|
#4
|
|||
|
|||
|
Re: Inverted Turning
I flipped the PWM's again just now, the robot just inverts forward and backwards now.
|
|
#5
|
||||||
|
||||||
|
Re: Inverted Turning
I find that it's a lot easier to diagnose these issues in tank drive rather then arcade, because it's easier to see the input directly affect the output. In tank mode, once the correct side goes forward at the correct time, then arcade mode will work properly.
|
|
#6
|
|||||
|
|||||
|
Re: Inverted Turning
Quote:
![]() Then, when you find that a motor is going in the direction opposite the way you think it should, change the "Invert" constant for that motor on the Drive Open vi. (If you have wired the motors the way I think is most natural, the left motor should not be inverted and the right one should be. It's possible that your wiring is backwards from the way I expect, or perhaps your gearboxes are doing an extra reversal from the actual motor direction. It's not really important which one is which, only that the wheels go in the direction you want them to.) |
|
#7
|
|||
|
|||
|
Re: Inverted Turning
Quote:
By my understanding shoulden't the robot invert its turning if I switch the PWM channels? It doesn't seem to make sense to me that the robot goes backwards when the PWM's are switched. Last edited by Darkknight512 : 29-01-2010 at 13:33. |
|
#8
|
|||
|
|||
|
Re: Inverted Turning
Ive tried to switch the motors and use setinverted motor. It still seems to turn the wrong way, forwards and backwards seems to be right though...
|
|
#9
|
|||||
|
|||||
|
Re: Inverted Turning
Quote:
When you swap the motor control, you're telling each motor to turn the way the other one used to. That runs the robot in the other direction. Just look at the code, and at the robot wiring, and make sure that the PWM signal configured as the left motor is the same one physically connected to the left motor. Do the same for the right motor. Then if either side of the robot runs in the wrong direction, invert that motor's control in the code. |
|
#10
|
|||
|
|||
|
Re: Inverted Turning
Quote:
Both motors seems to be turning in the right direction, else the bot would be going backwards. The bot still turns the wrong way. |
|
#11
|
|||||
|
|||||
|
Re: Inverted Turning
Quote:
|
|
#12
|
|||
|
|||
|
Re: Inverted Turning
PWM 1 is connected to the Jaguar controlling the LEFT motor, and PWM is controlling the RIGHT motor
This is the whole program Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Setting inverted motor help | kiettyyyy | C/C++ | 1 | 14-01-2009 19:09 |
| pic: lego inverted pendulum | colin340 | Extra Discussion | 6 | 01-02-2007 14:56 |
| Inverted color mind tricks! | thegathering | Chit-Chat | 19 | 31-08-2006 18:05 |
| Camera Picture is Inverted | winners | Programming | 2 | 27-01-2006 20:09 |
| IR signals inverted | Atheist | Electrical | 10 | 08-02-2004 16:27 |