|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#16
|
|||
|
|||
|
Re: Twitchy Motors
These are the images
![]() ![]() ![]() ![]() ![]() Those are 40 Amp breakers |
|
#17
|
|||
|
|||
|
Re: Twitchy Motors
The wiring looks correct to me (except for your lack of CAN). Does not having the roboRIO connected to the PDP cause any watchdog errors? Not sure...
Anyway, you could try 4 different PWM ports to see if maybe those ports are bad. Also if you post your code we can rule out the code being an issue. |
|
#18
|
|||||
|
|||||
|
Re: Twitchy Motors
The wiring looks good to me too.
Take a look at the Driver Station Log File after these twitches occur. To see if the Event List or the graphs show unusual behavior. |
|
#19
|
|||
|
|||
|
Re: Twitchy Motors
The new radio is 12V, the old radio is 5V.
Edit: Weird, I got an email saying a new post said that the voltage should be changed. Ignore this post I guess Edit2: Also, when youre testing, do you have the robot up on blocks, so the wheels arent touching the ground? Its possible that they are drawing too much current. Last edited by nighterfighter : 12-02-2016 at 18:45. |
|
#20
|
|||
|
|||
|
Re: Twitchy Motors
We do prop it on blocks when we test it.
I swapped the PWM ports to 4, 5, 6, and 7 and it still twitches. Code:
package org.usfirst.frc.team988.robot;
import edu.wpi.first.wpilibj.SampleRobot;
import edu.wpi.first.wpilibj.Talon;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.Victor;
import edu.wpi.first.wpilibj.smartdashboard.SendableChooser;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
public class Robot extends SampleRobot {
Joystick stickL;
Joystick stickR;
final String defaultAuto = "Default";
final String customAuto = "My Auto";
SendableChooser chooser;
Talon LF;
Talon RF;
Talon LR;
Talon RR;
public Robot() {
stickL = new Joystick(0);
stickR = new Joystick(1);
LF = new Talon(4);
RF = new Talon(5);
LR = new Talon(6);
RR = new Talon(7);
}
public void robotInit() {
chooser = new SendableChooser();
chooser.addDefault("Default Auto", defaultAuto);
chooser.addObject("My Auto", customAuto);
SmartDashboard.putData("Auto modes", chooser);
}
public void autonomous() {
String autoSelected = (String) chooser.getSelected();
// String autoSelected = SmartDashboard.getString("Auto Selector", defaultAuto);
System.out.println("Auto selected: " + autoSelected);
switch(autoSelected) {
case customAuto:
break;
case defaultAuto:
default:
break;
}
}
public void operatorControl() {
LF.setSafetyEnabled(true);
LR.setSafetyEnabled(true);
RF.setSafetyEnabled(true);
RR.setSafetyEnabled(true);
while (isOperatorControl() && isEnabled()) {
LF.set(-stickL.getRawAxis(1));
LR.set(-stickL.getRawAxis(1));
RF.set(stickR.getRawAxis(1));
RR.set(stickR.getRawAxis(1));
Timer.delay(0.005); // wait for a motor update time
}
}
/**
* Runs during test mode
*/
public void test() {
}
}
|
|
#21
|
|||
|
|||
|
Re: Twitchy Motors
I do not know if anything is out of the ordinary for the event logs since I don't know what to look for. Is there anything that would be a big sign something is wrong?
|
|
#22
|
||||
|
||||
|
Re: Twitchy Motors
Check main power connections and battery/battery voltage.
(didn't read the whole thread, this has been the cause of many a twitchy motor though...) |
|
#23
|
|||
|
|||
|
Re: Twitchy Motors
The code looks correct also, only thing I can think of is instead of doing GetRawAxis(1), try getY(), but that shouldn't make a difference.
You said that you tried just setting their value to a constant? 0 or 1, and it still twitched? If it twitches with a value at 1, it could be a power issue, but if it twitches at 0, that sounds like a roboRIO issue. Make sure there are no metal shavings in the PWM ports on the roboRIO. Last thing I would try, hook up another Talon and put a new motor on it. Unplug the other Talons and comment them out. See if it twitches with just one Talon/motor. |
|
#24
|
|||
|
|||
|
Re: Twitchy Motors
I set it to a value of 0 and we've ran the vacuum over it a few times already.
|
|
#25
|
|||
|
|||
|
Re: Twitchy Motors
Hm. Do the motors twitch if the joysticks are unplugged?
Also I would try reimaging the roboRIO. |
|
#26
|
||||
|
||||
|
Re: Twitchy Motors
You have a really long wire run between the battery and the PDB. This will cause a significant voltage drop under load. You should keep your wire runs as short as possible. This may or may not be causing the twitchy motor issue, but it could cause problems for you in the future.
Can you post a driver station log of the battery voltage for when the twitching occurs? |
|
#27
|
|||
|
|||
|
Re: Twitchy Motors
The motors do twitch when the joysticks are unplugged.
We have tried reimaging the roborio multiple times already. Where can I find the driver station logs? |
|
#28
|
||||
|
||||
|
Re: Twitchy Motors
This article explains how to view the logs. They are under the Diagnostics tab in the driver's station.
Just post a screenshot of one of the graphs. |
|
#29
|
||||
|
||||
|
Re: Twitchy Motors
Quote:
Last edited by evanperryg : 12-02-2016 at 23:05. |
|
#30
|
|||
|
|||
|
Re: Twitchy Motors
Do you have a PWM Generator such as the AndyMark ThriftyThrottle? You can use something like that to totally eliminate the RoboRio and the software from the equation. People who fly model airplanes or helicopters often have something like this too.
http://www.andymark.com/Thrifty-Throttle-p/am-2936a.htm |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|