Is it possible to use 2 neos to spin 1 flywheel

This year my team has a shooter with 2 neos driving a single flywheel hooded shooter through a 1:1 gear set. The software team tells me that programming this setup is impossible since getting the two NEOs to move in a coordinated fashion while still maintaining RPM control of the flywheel via PID control is impossible, but that if we replaced the motors with falcons this would be trivial. This makes no sense to me. Who is right? Is what I’m asking impossible?

2 Likes

They had me remove one of the NEOs for our first competition, and then complained about the spin up time of the flywheel being too slow…

3 Likes

You can have one NEO do speed control, and another NEO be a “follower” to the first (will receive the same voltage signals). This works really well if two motors are geared together on the same mechanism.

Do you not do something similar with your drive gearboxes?

12 Likes

The Falcons can do the same - I suspect your programmers are aware of this for Falcons but not for the Spark Max’s - in both cases, adding a second motor is trivial for programmers.

2 Likes

It is not trivial! Velocity control on the Spark Max is difficult, and setting up a follower can be hairy. But it can be done.

2 Likes

So they had you remove half the torque, then complained that they only got half the acceleration?

Have they met Mr. Newton?


On a more serious note, Nate is correct above. This can be done with some effort using Neos and MAXes, but it is almost trivial using Falcons. Now, about getting those Falcons…

3 Likes

It is entirely possible. This is how our 2020/2021 robot was set up and it worked great. Don’t ask me about programming and all the magic that goes into it to make it work well…

We do.
image

I should add… we have this setup with position control on our climber working flawlessly, and it really wasn’t an issue for our programmers.

1 Like

Is this supposed to be sarcasm? There is an issue with velocity control (100ms measurement delay on the internal encoder), but setting up followers is a single line of code.

4 Likes

Rev website has example code on how to do the follower.
REV Example Code

You might need to invert the follower if you need it to actually spin the opposite direction of the other motor.

2 Likes

If you want to test the inversion of the 2nd motor and the system is already mechanically coupled, then you might have to pause and think about the test procedure for a sec.

Always good practice not to assume what will be hard/easy for others!

1 Like

Yeah, it takes a second to figure out. The easiest way is to unplug one motor at a time and make sure they both spin the mechanism in the same direction while in follower mode.

Edit: REV has actually made this pretty easy. setInverted doesn’t have an effect on followers. Instead, you specify in the follow method whether you want the follower to match or mirror the leader. By default (single arg follow) it matches the leader

4 Likes

I’m always happy to see other teams that think a technical issue we have struggled to solve is trivially easy. It usually means we are overlooking something obvious. I would encourage your team to put up a YouTube video clearly explaining how you solved the problem so that others in the community can benefit from your experience. We’d love to be able to point our students, and the other teams who are struggling with the same problem, to your video. We’d be most appreciative.

1 Like

Here’s the code from the SW team:

@Ryan_Blue does this look reasonable?

For the most part that looks reasonable.

Are the two neos linked through a gearbox (rotating the same direction)? Or are they opposing each other (rotating opposite directions, as in the picture @Nate_Laverdure posted above)?

If it is the second case, you’ll want to include an invert argument to your call to follow():

shooterMotor_2.follow(shooterMotor_1, true);

The motors are connected through a gearbox - they should spin in the same direction.

In that case, the code should be adequate.

We regularly use 2 (and sometimes even 3) motors to drive our shooters. Doesn’t seem to be all that much trouble.

IMG_7537

We use 2 NEOs with one as an inverted follower and have had no issues on our PID+FF. Even with significant voltage swings. You just need to tune the PID+FF with both on there for best results.