Our team just built the transmissions for our coder bot. We were trying to test our drivetrain code to see if the wheels would spin in the correct direction, but when we tested the drive code, the falcons made a high-pitched beep/scream noise for as long as the motors were set with voltage.
Does anyone know what this could mean, or what makes falcon motors scream?
That is the sound of the falcons stalling.
You should check if the motors in each gearbox are set to the same direction. Them fighting each other might be what causes the noise
The right side motors are set inverted while the left side motors are not.
Here is the code we have for the drivetrain subsystem
public class Drivetrain extends SubsystemBase {
private MotorController leftFront;
private MotorController leftBack;
private MotorController rightFront;
private MotorController rightBack;
private MotorControllerGroup left;
private MotorControllerGroup right;
private DifferentialDrive drive;
public Drivetrain() {
leftFront = new WPI_TalonFX(1);
leftFront.setInverted(false);
leftBack = new WPI_TalonFX(2);
leftBack.setInverted(false);
rightFront = new WPI_TalonFX(3);
rightFront.setInverted(true);
rightBack = new WPI_TalonFX(4);
rightBack.setInverted(true);
left = new MotorControllerGroup(leftFront, leftBack);
right = new MotorControllerGroup(rightFront, rightBack);
drive = new DifferentialDrive(left, right);
}
public void joystickDrive(XboxController controller, double speed) {
You should take a look at the current for all of the motors. Motors fighting each other will show up as high current…
You may have mapped motors wrong; each gearbox has a right and left motor in it, for example. We, um, might have done that Monday… If its sorta easy to pull the bull gear or motors you might want to. That will allow you to see each of the output shafts and confirm rotation and which one is which.
Also verify that the IDs are correct, you may have one left and one right talon on each gearbox,
In general, following this is helpful, because it ensures each motor individually works before diving into system verification
So I always try to get the team to check out the chassis based on the below procedures. May help for future checkouts
visual check of all wirings
If can, check all can ids of all CAN components
Put chassis on blocks so wheels can turn
manually move all wheels, enough so that each chain link engages all of the sprockets, look for and listen anything out of the ordinary, should have smooth motion throughout, no binding or high resistance
if multiple motors on each side, unhook all but one on each side.
turn on power, make sure all of your speed controllers (and falcon) are lighting up (minus the ones you disconnected)
enable the robot, drive right side forward, make sure right side is moving forward, do the same for the left side (make sure to check this one side at a time), now do backwards, one side at a time
turn off, switch to second set of drive motors, repeat 7, and then the third set if you have 3 motor drive
if all motors check out, then go ahead and connect all motors on drive to verify
check that your screws mounting the falcons are not so long that they go all the way through the housing and bind against the internals of the falcon. most likely your issue if it will not turn by hand