Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Electrical (http://www.chiefdelphi.com/forums/forumdisplay.php?f=53)
-   -   Twitchy Motors (http://www.chiefdelphi.com/forums/showthread.php?t=143663)

hwu24110 02-11-2016 06:45 PM

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.

pribusin 02-11-2016 07:20 PM

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.

hwu24110 02-11-2016 07:38 PM

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.

Lireal 02-11-2016 08:50 PM

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.

nighterfighter 02-11-2016 09:12 PM

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);

That will rule out the joysticks being a problem. I'd also double check all your code, just to be sure.

Dan Waxman 02-11-2016 09:44 PM

Re: Twitchy Motors
 
Check the battery voltage. Sometimes with brownout protection the wheels will be a bit twitchy.

Tom Line 02-11-2016 10:45 PM

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?

evanperryg 02-11-2016 10:58 PM

Re: Twitchy Motors
 
Quote:

Originally Posted by Tom Line (Post 1538917)
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?

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.

Mark McLeod 02-11-2016 11:06 PM

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.

hwu24110 02-12-2016 12:06 AM

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.

scca229 02-12-2016 12:26 AM

Re: Twitchy Motors
 
Quote:

Originally Posted by hwu24110 (Post 1538953)
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.

Since you mention different types of motor controllers, are the correct motor controller types being initialized for each of them in the code?

hwu24110 02-12-2016 12:34 AM

Re: Twitchy Motors
 
Yes, I had made sure of that.

Mark McLeod 02-12-2016 09:46 AM

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.

nighterfighter 02-12-2016 01:10 PM

Re: Twitchy Motors
 
You could also post all of your code, that will help us make sure something isn't inadvertently happening.

Omer Huly 02-12-2016 03:42 PM

Re: Twitchy Motors
 
Quote:

Originally Posted by hwu24110 (Post 1538818)
so I think it may be an issue with the wiring or the physical roborio.

We had a twitching talon SR... we managed to solve this by connecting the talon to another PWM port.
Since we are getting a strange error in the driver station about PWM (something like PWM 0FRC in some WPIlib).


All times are GMT -5. The time now is 05:04 PM.

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