|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Twitchy Motors
So we have another problem with the roborio (the connection issue is fixed). I noticed that the motors twitch, regardless if it is a Talon SR or VIctor SP. We have tried another schools Talon SRs and PWMs, it still twitches, so I think it may be an issue with the wiring or the physical roborio. It is not a shortage since the electronics board is mounted on a wooden board and the only wires touching the metal frame are the motor wires and the battery cables, which I am fairly sure is not causing the issue.
|
|
#2
|
||||
|
||||
|
Re: Twitchy Motors
What programming language?
Is it possible you're addressing motors from more than one area in your program? It's a favorite mistake I find with my students. They forget that somewhere else in the program a motor is set to 0 and in another part they're trying to run it at some speed. Causes motor twitch. |
|
#3
|
|||
|
|||
|
Re: Twitchy Motors
I am using Java. There are only four lines of codes that tell the motors to do something.
LF.set(-stickL.getRawAxis(1)); LR.set(-stickL.getRawAxis(1)); RF.set(stickR.getRawAxis(1)); RR.set(stickR.getRawAxis(1)); I can determine these are the only lines of code that make the motors move by commenting them out. When I do that, the talons blink orange. Last edited by hwu24110 : 11-02-2016 at 20:33. |
|
#4
|
|||
|
|||
|
Re: Twitchy Motors
It sounds like it is something wrong with the joystick. What joystick are you using? You should be able to recalibrate your joystick to fix it.
Last edited by Lireal : 11-02-2016 at 20:53. |
|
#5
|
|||
|
|||
|
Re: Twitchy Motors
Put the robot up on some blocks of wood, and change your teleop code to this:
Code:
LF.set(-1.0); LR.set(-1.0); RF.set(1.0); RR.set(1.0); |
|
#6
|
|||
|
|||
|
Re: Twitchy Motors
Check the battery voltage. Sometimes with brownout protection the wheels will be a bit twitchy.
|
|
#7
|
||||
|
||||
|
Re: Twitchy Motors
We've seen the same behavior from victor sp's in past years. Our best guess is that they can be sensitive to noise on the PWM wire. Are your PWM wires running along side power wires?
|
|
#8
|
||||
|
||||
|
Re: Twitchy Motors
Interesting, with a digital line like PWM, noise shouldn't be a big deal unless it's really, REALLY bad. Hopefully OP comes back with a response soon cause I'm genuinely curious. The only thing that hasn't been mentioned is the faint possibility that both motor controllers are incorrectly calibrated, but it is still feasible.
|
|
#9
|
|||||
|
|||||
|
Re: Twitchy Motors
Need more description of the symptoms.
For all we know the drive motors are wired into 30amp breakers, rather than 40a breakers. Last edited by Mark McLeod : 12-02-2016 at 09:30. |
|
#10
|
|||
|
|||
|
Re: Twitchy Motors
I have tried setting each motor to a value of 0 and it still twitches.
I do not have the robot in front of me to confirm the breakers. We've calibrated the victors and talons multiple times. I don't think we're calibrating it incorrectly. |
|
#11
|
|||
|
|||
|
Re: Twitchy Motors
Since you mention different types of motor controllers, are the correct motor controller types being initialized for each of them in the code?
|
|
#12
|
|||
|
|||
|
Re: Twitchy Motors
Yes, I had made sure of that.
|
|
#13
|
|||||
|
|||||
|
Re: Twitchy Motors
Perhaps photos of your wiring setup would help identify additional potential problems/solutions.
P.S. I do have a rookie team describing motor controller twitching, too, but they always have the robot apart when I've been visiting so I haven't been able to diagnose it yet. Last edited by Mark McLeod : 12-02-2016 at 16:46. |
|
#14
|
|||
|
|||
|
Re: Twitchy Motors
You could also post all of your code, that will help us make sure something isn't inadvertently happening.
|
|
#15
|
||||
|
||||
|
Re: Twitchy Motors
Quote:
Since we are getting a strange error in the driver station about PWM (something like PWM 0FRC in some WPIlib). |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|