Absolute Positioning of Intake

Our intake is going to have to be stored at an odd position to be within frame perimeter. We are going to be using a Falcon500 commanded in postion mode to do this.

My only problem is knowing where the ‘Home’ postion. Because this setup could be variable, i cant just zero it in boot…because then i won’t know where in respect to the total rotation of the mechism…such as a stowe and deploy target

Normally my solution to this is to drive until a limit to home it.

But there has to be another way to run this so i won’t have to do that. Perhaps some sort of absolute encoder? A potentiometer?

It would be great on boot to know exactly where it is. No zero…

Any recomendations? The falcon is geared to a hex shaft

Maybe use an absolute encoder like REV’s Bore and then take the Falcon reading according to that by resetting the Falcon internal encoder to the absolute reading?

1 Like

Maybe im misunderstanding but wouldn’t that still be based on your starting position?

Or am I not understanding something about through bores rev

Unless the rev through bore is absolute through many turns?
Like if i boot it and befoee doing anything itd at 3 turns. But i figured its zero on boot

The bore encoder persists in its reading so when you reboot, if you were at 20 degrees before, you should still be reading 20 degrees at that rotation. That was why I suggested an absolute encoder, can’t you position it to any variable setpoint you want beforehand?

Oh wow. Didnt realize that!

Is there an easy way to do that in code? If you are using java and phoenix 6, is there a better way than simply calling something like: motor.setPosition(boreEncoder.getDistance()) in the periodic() function of the subsystem?
I tried looking into FeedbackConfigs in the Phoenix 6 docs to set the Through Bore Encoder as the encoder source of the motor, but that way seems to only work with CTRE’s CANcoders on the CAN bus, which is a problem since the Through Bore Encoder is connected to DIO on the rio.

You can use a cancoder on a hex shaft with an adapter, that might make programming easier by using ctre stuff.

2 Likes

That still only gets you where you are in 1 revolution though right?

Yes, to my understanding, that is the case. Setting the position periodically is an option, we tried to give the current bore angle to the Falcon encoder when the robot boots up when we are controlling an arm with Motion Magic, but we didn’t update the reading regularly so at some point the angle difference was quite large. I think using it in periodic would be suitable.

yes, it just has to be on a 1 to 1 ratio to your pivot.

One way to do this with the relative encoder in the motor (instead of an absolute encoder)…

Create a command that simultaneously:

  • Drives the motor in the direction of stowing (such that the motor stalls)
  • Constantly re-zero your relative encoder

Bind this to a button, or run it for a set amount of time at the beginning of a match.
This will obviously NOT persist between boots.

We did this last year with our Everybot arm to end up with an absolute-“ish” position.
We would run it for 1/2 a second at the beginning of autonomous before we did anything else and it worked fine for the rest of a match.

The only thing to consider is that if you are reducing the motor at all, this position is before the reduction, so there will possibly be some slop. Our arm was reduced 75:1 through a max planetary and we never had an issue though!

Unless I’m misunderstanding something I dont see how this will work. Your motors wont be enabled until the match begins so you wont have any holding power.

1 Like

Does you intake move in a linear motion or a rotational motion. There are different devices that a best suited to each of these.

Yeah… this is probably the biggest issue @roboguy281 is going to run into with this.

If you are relying on a motor to hold your intake in position before the match starts, you WILL have problems. Motor outputs are disabled. This in addition to the encoder difficulties.

There’s ways around both. I would probably lean towards having a hard stop that the intake leans against. Intake leaned against hard stop triggers switch that zeros sensor, load preload and tilt, you’re set sort of thing.

Yes. If there is a way to get an absolute encoder in the shaft go for that. Failing that you can always use a beam break sensor to tell if you are in the start configuration.

You will need to have some way of holding position without the motor. The best way to do this is have the intake mechanically balanced so it doesn’t create much if any torque on the gearbox in its stowed position (using a gas spring or surgical tubing). Another method is just to attach a long piece of Velcro to an intake axle you have control over (like a Velcro style cable tie) and on the start of auton run this axle which will wrap the Velcro around it and pull the Velcro off of whatever it was attached to.

Interesting! Ive used a a rev through bore before connected to a talonsrx.

I was under the impression it clears between boots though…

If im understanding correct the position will stay the same between each boot? As long as i don’t clear it?

Yes, and you should get the absolute position in your code with something like boreEncoder.getAbsolutePosition()

Ah. Its connected through the talonSrx, so i dont have any other access to it other than .getSelectedSensorPosition

Although that might be the absolute position

In the past we 'zero’ed it at the home position. Sounds like i could just do that once now…assuming that returns absolute

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