Internal Falcon Encoders vs External Encoders

Our team makes our own swerve modules, we use 2 falcon 500s and a ma3 absolute analog encoder for keeping the wheel offsets between boots. While driving, the talon’s internal encoder becomes very misaligned with its actual rotation, and we have created a button on our controller that calls setSelectedSenorPosition on each rotator motor with the external encoder’s rotation, which fixes the misalignment until it happens again. Do other teams which use swerve drivetrains have to do this?

In an attempt to solve this problem, we are thinking about switching to mainly using the analog potentiometer instead of the integrated encoder, yet we have some concerns: right now we’ve been using the PID features of the TalonFX motor controllers, and the only feedback sensor you can use is the integrated one. Also, the previous code leads have informed me that the external encoder is less accurate than the internal one, therefore we should use the external for offsets on startup and realigning during the match, and internal encoder for PID feedback. Is this true?

On another note, we also have an encoder issue with our arm, which may or may not be the same as what we are encountering with swerve. Some necessary context: our arm is powered by two Falcon 500s and an external 3.3 V potentiometer. Similar to swerve, we also use the internal talon encoder for position controlling our arm and set it to the 3.3V potentiometer value only on startup. Recently, however, we’ve experienced some issues with this method as the internal encoder has begun significantly shifting in both starting point and range as we use the arm in match. Do you interpret this as the same problem my teammate was explaining regarding our swerve? If so, is it worth switching to using external encoders for both? How can you position control a Falcon 500 using external potentiometer values?

I think you need to re-evaluate your code. Your motor is directly tied to the wheel angle. There is no way it should be varying significantly. You know how many counts are in exactly one revolution of your module. There shouldn’t be an issue in them becoming misaligned.

Assuming there isn’t some kind of issue with the Falcons internally (I’ve never used Falcons so I can’t speak to their functionality), it sounds like something is slipping. For Swerve, depending on the module this could be a belt like in the sds mk4i. for your arm, belts and chains can skip (former is usually from wear or high torque, later is usually from low tension), IDK how your arm mechanically linked. First thing I’d check is if anything can be done to solve that sort of issue.

As for software solution, you could have code just periodically checking the state of both encoders/potentiometer and perform the correction automatically, rather than have drivers manually asking for it.

I would like to add to this.
My team had issues where the falcon would power bounce and reset its
rotation randomly. This could be an electrical issue.
Also double check the gear ratio between the falcon and the external

Power bounce?

We’ve had our falcons down to 7 volts and not lost encoder counts. What does power bounce mean?

In my example, the falcon completely disconnected from power due to a loose cable connector

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.