![]() |
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 |
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! |
Re: Backwards motor
Quote:
|
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...
|
Re: Backwards motor
actually, the wires are right. red-red black-black, and if we change them, someone said we'd fail inspection
|
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?
|
Re: Backwards motor
Quote:
<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. |
Re: Backwards motor
Quote:
|
Re: Backwards motor
we just switched the leads going into the speed controller from the motor
|
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... |
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.
|
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 |
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?
|
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.
|
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 |
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. |
Re: Backwards motor
Quote:
|
Re: Backwards motor
Quote:
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