Things we should know to get Neos working with KoP chassis

We have a small team this year, I’m the only technical mentor, and I don’t know much about programming. We have two new programmers who learn quickly, but I don’t know what to tell them to look out for when setting up the code for the drivetrain…we are switching to Neos this year, and I know there is stuff we need to watch out for, but I’m not sure what all.

  1. Update firmware in all SparkMax controllers before trying to use them, and make sure they’re in brushless mode.

  2. There is current limiting somewhere…where?

  3. Are there any safety things we can configure or program that will keep us from burning stuff up?

any other tips?

thanks

1 Like

Yes! Very important. Make sure you use the REV hardware client and not the Spark MAX client.

CANSparkMax (FRC-REVLib API) (revrobotics.com)
There is the docs for setting up the current limit. This can also be set in the REV Hardware client when plugged into the SparkMAX.

Current limiting from above will really help you along with using limit switches where needed.

Have them make sure red goes to red, black goes to black (no reverse polarity)…this seems pretty simply but we have lost a SparkMAX because of this.

When taking out the encoder cables, ALWAYS pull by the connectors not the wire, the encoder wire is very finnicky. I recommend using a flathead on each short side and wiggling it out. Same thing with the CAN that goes into the SparkMAX.

Code examples here:
SPARK MAX Code Examples - SPARK MAX (revrobotics.com)

3 Likes

Moto’s got the right basics. The little I’ll add - most of the settings can be configured in the tuner software and burned to flash (remembered over all future power cycles), or configured in code.

If you trust your software team well, I believe configuring from code is better because it guarantees a certain configuration each power-on, and that configuration gets tracked with your software version control.

However, using the tuner software is a way to sidestep the software configuration if there’s concerns of adding complexity there.

Both are perfectly valid, just a question of which method is less error prone for your team’s processes.

1 Like

I can’t overstate the importance of setting a current limit! Its counter intuitive… The more NEOs in your drive train, the higher the chance of a brownout… IF you don’t limit the current! Six NEOs running with no limits and a driver just slamming the stick forward tends to brown out things. I finally convinced the programming lead that this was valuable.
In a perfect world you want to pick a current limit that is almost enough to break the tires free. Yes, of course friction is the least useful and controllable parameter in the engineering world… So this is kind of a fuzzy number.
Also, a bit of limit has only a tiny effect on the sprint time! Honestly, not breaking the tires free will actually improve your cycle time. Spinning tires have LESS friction and waste power.
The JVN calculator will REALLY help you understand what the tradeoff is.

Ok, step off soap box :wink:

3 Likes

BTW, configuring from software has some race conditions, and occasionally does funny stuff. Greg’s crew is working on it. There are some work arounds. Requires thread digging.

For a rookie team, I would program each NEO directly, NOT via software.

3 Likes

My team’s been using Neos for while, but we have never used the current limits. How do you decide what current limit to use? Is it somewhere in the design calc?

The race conditions I’ve found are:

a) When I set the encoder conversion for velocity and position after burn flash, that they didn’t get set. For that I moved these methods before burn flash.

b) When I had the motor invert and follow methods directly before burn flash, they didn’t get set. For these issues I moved invert and follow further up above where the current limit was set.

3 Likes

The high-tech way to do it is to run the JVN calculator on your drive train. With the right numbers punched in, you can simulate various current limits and see when you stop breaking the tires loose and when it starts to increase your cycle time.

The low tech way is to get your drive team to time some kind of cycle, then turn the current limit down and repeat. Also, see if they can break the tires free. If they can, turn down the current! If you have a 6 NEO drive train, start with 50 Amp limit. For a 4 NEO train you might try 70 Amp limit. For a 2 NEO I wouldn’t limit it at all. For grippy tires (like blue nitrile) you will be able to use more current.

YMMV, this is based on me modelling chassis on JVN! I haven’t been allowed to test this on a robot!!!

1 Like

Interesting. Somehow I ended up with 40 amps at stall and 60 amps at free speed, but maybe should revisit.

For this we write a simple test program that lets us set the current limit on the dashboard while driving. Then we start at a lower current limit, say 40A. We put the robot against a wall and drive full speed into it (nothing is moving), then slowly increase the current limit until the wheels start to slip. Take that current value and back off by 5A or so. Just be careful to run this test against something that can take the force and only run this in the range of 10s of seconds or so to avoid heating up the motors too much. (You can look at the chart here to gauge how long to run it for, as this test is the same).

For reference, our 2019 bot was set to ~55A.

Note that this is not for protecting the motors or preventing brownouts, but rather to provide traction control for pushing. You should design your drivetrain using one of the design tools to a reasonable current level to prevent brownouts, and verify the construction matches the model (i.e. make sure things are assembled correctly).

This should be the opposite, stall should have a higher current limit than free speed.

Edit: To amend this slightly. For a drivetrain, somewhere in the 50-60A range is just fine, even without all of the testing I mentioned above. Unless something goes seriously wrong, or the drivetrain is not assembled well, you won’t fry the motors, even with the default 80A limit set. The brushless motors run significantly cooler than CIMs.

The only extra piece of this is if you are using a NEO550, definitely set a current limit, and look to set it in the range of ~25A

6 Likes

Thanks for the tips, everyone. We’ll see what happens! This will be a fun robot, I hope. It’ll have a couple mechanisms on it when it’s done.

1 Like

Because there are more cables, there are more cables to get snagged on things. That box should help a lot, but we have had multiple situations where cables disconnected causing weird problems.

The drive motor wires are pretty well protected. We plan to have an arm on each side, connected to a ball pickup/dumper, that will have a Neo550 and a Sparkmax on it on one side…that will be where most of our wiring issues will be, I expect. Thanks for the warning.

1 Like

Note on that is that we had the CAN wire from Spark Max disconnect in a 2020 match. And that disconnected the entire CAN bus. Since then they’ve released v2 CAN connectors which add a loop. I’d done that after the 2020 season for a couple wires ourselves, but now it is worth buying and replacing any CAN wires in places they might get disconnected, so that only that controller is affected.

1 Like

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