Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   General Forum (http://www.chiefdelphi.com/forums/forumdisplay.php?f=16)
-   -   Backwards motor (http://www.chiefdelphi.com/forums/showthread.php?t=43758)

paulcd2000 11-02-2006 11:26

Backwards motor
 
Hi everyone. We just realized that the way our motors are wired, we have one motor going backward when we tell it to go forward. Has anyone else had this problem, and how have they fixed it?

Thanks in advance

xrabohrok 11-02-2006 11:36

Re: Backwards motor
 
This is probably a very simple problem. Your motor has probably been wired with reverse polarity: so you can probably just flip the wiring. Put the red wire to were the black one is, and vice versa.

That should help!

Bharat Nain 11-02-2006 11:54

Re: Backwards motor
 
Quote:

Originally Posted by xrabohrok
This is probably a very simple problem. Your motor has probably been wired with reverse polarity: so you can probably just flip the wiring. Put the red wire to were the black one is, and vice versa.

That should help!

on the speed controller that is.

steven114 11-02-2006 12:02

Re: Backwards motor
 
Specifically on the motor output end of the speed controller (labelled M+ and M-). Don't reverse the polarity anywhere else! If you reverse the inputs (V+ and GND) you'll fry the poor controller...

paulcd2000 11-02-2006 12:21

Re: Backwards motor
 
actually, the wires are right. red-red black-black, and if we change them, someone said we'd fail inspection

FIRSTnameisJay 11-02-2006 12:35

Re: Backwards motor
 
My only concern with simply switching the wires is the actual performance of the motors. I might be wrong on this but those CIM motors travel slower when going backwards than they do when going forwards. Does anyone know if this is correct?

Al Skierkiewicz 11-02-2006 12:48

Re: Backwards motor
 
Quote:

Originally Posted by paulcd2000
actually, the wires are right. red-red black-black, and if we change them, someone said we'd fail inspection

A common misconception. The rule for wire colors is
<R81> All wires distributing power with a constant polarity (i.e., except for Relay Module, Speed Controller, or
sensor outputs) must be color-coded as follows:
• Use Red, White, or Brown wire for +12 Vdc and +5 Vdc connections.
• Use Black or Blue wire for Common (-) connections.

Since the wires to motors are not constant polarity, you may reverse these leads to allow the motor to run in the needed direction. You may also make the change in software if you are so inclined. You will not fail inspection for reversing the motor leads at the output side of the controller.

charrisTTI 11-02-2006 15:21

Re: Backwards motor
 
Quote:

Originally Posted by Al Skierkiewicz
A common misconception. The rule for wire colors is
<R81> All wires distributing power with a constant polarity (i.e., except for Relay Module, Speed Controller, or
sensor outputs) must be color-coded as follows:
• Use Red, White, or Brown wire for +12 Vdc and +5 Vdc connections.
• Use Black or Blue wire for Common (-) connections.

Since the wires to motors are not constant polarity, you may reverse these leads to allow the motor to run in the needed direction. You may also make the change in software if you are so inclined. You will not fail inspection for reversing the motor leads at the output side of the controller.

Remember that the left and right drive train assemblies are mirror images. If you wire them both the same and send the pwm ports the same values say 200, one set of wheels will be going forward and the other set of wheels will be going backwards. Nothing is wrong with the wiring, the software needs to send the opposite values to the left and right sides. If speed is x then 127 - x to one side and 127 + x to the other will have both sets going forward or both going in reverse

dude__hi 11-02-2006 16:38

Re: Backwards motor
 
we just switched the leads going into the speed controller from the motor

Cody Carey 11-02-2006 17:23

Re: Backwards motor
 
There is about a 2% difference in performance between running the motors forwards or backwards... you might not want to do that :)
instead, just go into the default codes' "user_routines" section, and where it says P1_y or P2_Y, (whichever joystick is messing up) change it to (p1_y*-1)
I believed that that worked for us anyway...

steven114 11-02-2006 17:48

Re: Backwards motor
 
Changing the signal and changing the wires are functionally equivalent - the only way to compensate for a forward/reverse bias would be to mount the motors or to use some sort of closed-loop control.

Cody Carey 11-02-2006 17:50

Re: Backwards motor
 
What do you mean to mount the motors?
I think that they are most likey allready mounted...
But you never know, huh? :D

ida_noeman 11-02-2006 21:22

Re: Backwards motor
 
So, if we reverse the wiring, will the forward/backwards difference be gone? I.e. if we reverse the wiring, and set both values to 254, will they go the same speed?

sanddrag 11-02-2006 21:43

Re: Backwards motor
 
Maybe not, maybe so. There have been reported differences in both motors and speed controls between forward and revers. When you are driving in the forward direction, make sure allyour pwm values are above 127. This should yield better performance. If your robot still doesn't go straight, manually fine tune the software or live with it because the bias is in the motor or your mechanical drive system.

the_short1 13-02-2006 09:57

Re: Backwards motor
 
yes reversing output wires is easiest for coding, then to compensate for bias, drive the robot using pure code (no joystick) with pwm1 being left and pwm2 being right motors...
code:
pwm01 = 175;
pwm02 = 175;

then see if the robot pulls to the left or the right... if so adjust the numbers until it drives straight... you might end up with 175:180 .. then take the difference (5) and add it automatically to the drive code (pwm02 = p2_y +5) so it will send the joysticks value to the pwm but add 5 to compensate for bias.

or for somethign more complicated, use a percentage (as you drive faster add more to the joystick to compensate)

hope that helps

Matt Krass 13-02-2006 12:56

Re: Backwards motor
 
Be careful with that method, if you push the sticks full forward you (theoretically) get 254, adding anything more than 1 to that will cause it to wrap around to 0 and trigger a high speed reversal, that'll make driving kind of difficult.

You could put a software cap that limits joystick input to 254 - bias, whatever it ends up being, then the slower motor will reach full speed and the faster one won't, but that isn't perfect either. A percentage based bias adjustment, plus a sanity check to prevent wrap around would be a good solution.

Schneidie 14-02-2006 12:48

Re: Backwards motor
 
Quote:

Originally Posted by paulcd2000
Hi everyone. We just realized that the way our motors are wired, we have one motor going backward when we tell it to go forward. Has anyone else had this problem, and how have they fixed it?

Thanks in advance

You could reverse polarity and then equalize the torque with your code in the computer.

greencactus3 14-02-2006 18:18

Re: Backwards motor
 
Quote:

Originally Posted by Cody C
What do you mean to mount the motors?
I think that they are most likey allready mounted...
But you never know, huh? :D

i think he means to change the drivetrain so all drive motors will be running clockwise when the robot is going forwards, and counterclockwise to go back..
prolly'll make a less symetrical robot, distributing the weight unevenly leading to left right bias anyways.. with the CIMs. i wouldnt bother. now if we were gonna use those drill motors again... then id try to match the motor rotation... easier than close looping.


All times are GMT -5. The time now is 16:21.

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