|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
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... |
|
#2
|
|||
|
|||
|
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.
|
|
#3
|
|||||
|
|||||
|
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? ![]() |
|
#4
|
||||
|
||||
|
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?
|
|
#5
|
|||
|
|||
|
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.
|
|
#6
|
|||||
|
|||||
|
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 |
|
#7
|
||||
|
||||
|
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. |
|
#8
|
|||
|
|||
|
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. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Low Cost Planetary Gearbox Source... | Joe Johnson | Motors | 32 | 14-11-2006 18:02 |
| Inductance of CIMs | phrontist | Electrical | 13 | 06-01-2006 09:17 |
| Cheap Torque Measurement? | ChuckDickerson | Motors | 15 | 13-06-2005 13:57 |
| **FIRST EMAIL**/Important Fisher-Price motor and gearbox information | sanddrag | FIRST E-Mail Blast Archive | 1 | 11-02-2005 18:19 |
| DC motor design project | Ian Mackenzie | Motors | 0 | 29-01-2005 13:30 |