Mechanically zeroing a TalonFX driven climber

Programming mentor here, attempting to ask a question out of my realm:

We have a talonFX driven climbing mechanism, that we are considering zeroing by driving it to a mechanical stop and detecting a current spike and then resetting it to zero.

My questions are:

  • Is it mechanically safe to the motor and climber (two steel plates squishing together) to do so?
  • Is it reliable, have you encountered issues electrically or programmatically?
  • Which measured values do I care about? (Stator current, supply current)?
  • Is there a best way to program is (examples appreciated)?

Purely from a controls POV, my first instinct would be to recommend using a limit switch instead. That way you can avoid stalling the motor for longer than necessary to zero your mechanism. I suspect the Talon FX has a way to zero on a limit switch too.


It may come to this, but we’ve had unfortunate circumstances with limit switches breaking or repositioning.

So at minimum we’d need a fail safe such as a mechanical stop.

1 Like

I think we can avoid lengthy stall times by measuring current spikes and determine what current level tells us that we’re home

Magnetic limit switches are a great alternative.


I’ve done this pretty successfully in the past with no issues to report. I would recommend using velocity as a measure of if you’ve stopped rather than current, as the resolution and update rate of the current measurements isn’t great (it’s much easier to just detect “I’ve been at (near) zero speed for .25 seconds, I’m homed”).

I’d recommend using a low-ish voltage during this homing so you aren’t pushing anything too hard.

1 Like

Interesting solution!

Instead of a limit switch, you can look into a Hall Effect sensor or an optical solution like the Talon Tach, provides the same function as zeroing while remaining contactless

Do you guys have an example of a hall sensor you’d use?

I’m a fan of these:

Works with either polarity magnet. easy to mount and adjust. Cheap (use your Digikey PDV)

Digikey and Adafruit are good places to look at. Also found this on the WCP website.

As @came20 stated, you most likely don’t need to apply full power when zeroing your mechanism. You can start with some very low power level that cannot do any damage to see if can overcome the friction and makes the mechanism move. You can then gradually bump up the power level until it does move. Depending on the range of motion, it may be difficult to measure the position frequently enough to calculate the velocity when the mechanism is unloaded and you are using a high power level.

If you can monitor the motor current and can keep it in the safe range for your motor when using a low power level, it may be possible to estimate or measure how long the motor needs to be on to get the mechanism to hit the mechanical end stop then use a slightly longer on-time. This technique is used frequently by the more accomplished FLL teams but I have never heard of the motors they have available to them being damaged by being stalled.

1 Like

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