Intake Motor Lag in only One Direction

hi everyone! my team is experiencing trouble with our intakes. the goal is for them to intake the balls up like a shoot, to the top of the robot to shoot out. We have two sets of intakes on top of each other, using one motor, connected by a sprocket and chain. We’re experiencing trouble with the movement of our intakes. When rotating in one direction the intakes work fine, but when going in the other, they are lagging a lot. We’ve tried replacing the motor, and testing without the sprocket and chain, losing collars, and a lot of other things but we can’t seem to figure out what’s wrong. Can someone help?
Screen Shot 2020-10-19 at 7.21.33 PM Screen Shot 2020-10-19 at 7.21.40 PM

what do you mean by lagging? is the motor stalling, or is it lagging in the controls?
it could either be a mechanical issue with your build or your motor, or it could be an issue in your code.

Because the change of direction is abrupt, the side without the motor may be lagging due to it’s speed.

1 Like

momentum yes

these rapid changes in acceleration on long shafts like this also leads to twisting, or even from the shaft boring a hole in the inserts, so a bunch of slop could be added when changing directions

any combination of those can be the source of your problem, i suggest checking to see how straight your axle is or trying a new one.

a solution some ppl use to avoid these types of issues is having standoffs connecting the sprockets so that the shaft is less likely to bend

5 Likes

Can you show a example? I’m really confused at what you mean.

image

4 Likes

Alternatively or additionally you could use High Strength shaft hardware rather than LS shaft hardware.

3 Likes

As much as it’s an option… We probably can agree it is really unnecessary here. But it is something to consider, it will just be ruled out quickly. I wouldn’t really say what has become the typical hoodbot design this year requires a HS shaft for anything.

Looks like to me from the pictures you provided that the bottom intank is run by a chain on the side. Without being said this could cause a bit of lag because one side could be more tense than the other and it depends on how loose the chain is also. Also, you going to have to be more specific than lagging a lot like what do you mean if you want a valid answer.

when in doubt, reduce friction

when in doubt, rebuild. like take it apart and redo it

hi everyone, thanks for all your advice! I’m late but I ended up fixing it by changing the controls. The way the intake lagged is that it changed speeds a lot, it would not be a smooth controlled movement. It used to be controlled by the up & down buttons in my code, but after changing it to an axis on the controller it began to work. not sure why the button programming didn’t work, does anyone know?

1 Like

In theory it should work the same with buttons or joysticks. Only difference would be the input (buttons constant (for the most part) and joysticks custom/gradual). Assuming you want them to be controlled off of buttons, set them again to the same buttons (or different ones if you want) and switch the actions. If that doesn’t work, I’d recommend posting your code because, as you stated, this doesn’t seem to be a hardware issue but a software one.

#itsalwayscoding

3 Likes

If you throughly checked for any hardware issues, it’s safe to narrow it down to a software issue. I have seen this behavior when there are two conflicting statements in the code that are being run in succession. I think the original button code you had might have had a logic issue that caused the program to try sending conflicting speeds causing the jittery behavior. When you switched to a joystick axis you could use just one condition to set the speed for both directions. As mentioned above, if you post both versions of the code, we could help spot potential issues with the button code. Usually you want to put your intakes on a button since they either go full speed (forwards & backwards) or turn completely off.

4 Likes

Yes, please post the code, having the code AND a picture is very, very, very helpful.

#postthecode

2 Likes