We’ve encountered a strange issue we can’t seem to figure out. Our Neo motors driven through SparkMax controllers are pulling only around 5 Amps when we stall them. The robot voltage dips only to 12 Volts. The robot can accelerate and go fast when not under any load, but if it is up against anything at all, it struggles to turn the vehicle. The motors are not producing much torque. We’re running 4 Neos in a standard 6WD WCD single speed gearbox. It’s not a mechanical issue and likely not an electrical issue, since all 4 motors seem to pull similarly low current.
Any ideas of what we should be checking in software or configuration to remedy this issue?
hopefully you get responses on CD. We have not encountered any of the issues you describe when under pushing matches. We are quite happy with the power we’ve had with ours.
I’ll find out how much we are pulling also with our climber since its completely powered by NEOs on our rear lifters
Could you post a snippet of your controller configuration section so we can see what settings you are applying?
I’m thinking something with smart current limiting, if you are using that. You can set a stall current and a free current, and the current limit is interpolated between those values. But that’s a bit of a guess right now.
Edit: Also, try running the factory reset method at the beginning of your config section (restoreFactoryDefaults()).
(I’m another mentor from @sanddrag’s team, working on troubleshooting the same issue.) Here’s a snippet of our MAX configuration:
leftFront = new CANSparkMax(leftFrontPort, MotorType.kBrushless);
These are the only config settings being explicitly set from the robot code. The MAXs are currently running firmware 1.1.31 (I’ll try upgrading to 1.1.33 tomorrow). For what it’s worth, we’ve tried running the same robot code on our practice bot, also with MAXs running 1.1.31 (but bought earlier) and were unable to duplicate the issue.
I don’t see anything problematic there. Maybe I am missing something too though…
When you take a look tomorrow, I would suggest logging:
PDP side current
Motor side current
Percent output being sent to the controller (what is the value being put into the set method)
Percent output applied by the controller (getAppliedOutput())
The last two will hopefully give you some insight into where in the chain the limiting is happening (robot code or spark max). (Team 8 had some badly written acceleration limiting code which caused really unresponsive driving if the loop took longer than 20ms, so maybe it could be a rio side issue?)
@dardeshna Through a combination of software and mechanical means (“have a mentor push down on the robot really hard”), I think we’ve been able to reproduce the issue on our practice bot. Here’s the reported PDP currents at “stall”: 4.25 4.125 2.875 4.25
And here’s the currents reported from the MAXs: 39.96875 39.96875 40.0 40.0
On the comp bot, we did print out the CANSparkMax.get() values, and we observed that they varied from -1 to 1 as expected.
Can you try getAppliedOutput()? It may return something different from get() (perhaps further down the pipeline and closer to what is actually sent to the motors). I’m not sure about the implementation.
So this is what doesn’t make sense to me. At 10% output, the scaled stall current at the motors should be ~10.5A (105A stall current * 10% duty cycle).
Maybe this is one of the areas where brushless motors differ from brushed motors… Probably depends on sensored/sensorless and startup implementation… @Will_Toth or @dyanoshak might have more insight on this.
We set the free current limit to 20A and the stall current limit to 80A and the current config rpm to 10,000, which are the advertised factory defaults, and no surprise, the robot has much more torque to turn with. I believe getAppliedOutput is now reporting up in the 0.30s
Hopefully these defaults are safe enough limits to prevent hardware failure on the neo or spark max. The 40A limit was just not anywhere near enough torque. Also, we are geared for about 13 ft/sec.
Still interested in hearing more from others more knowledgeable than me.
Interesting—the advertised stall current of the NEO is 105A, so I am not sure how the NEO can be pulling nearly 80A at 30% output. Would like to hear from REV on this one as I am certain my understanding is lacking here.
Glad you found a solution!
Edit: I finally found the thread I was looking for, I wonder if the results of the testing described here (NEO equipped bot being pushed by a CIM equipped bot) are a result of this current limiting behavior.
My synthesis of the information that has been gathered and shared is as follows:
The NEO has an internal winding resistance of 36.5mOhm from which you can calculate a theoretical stall current of ~330A, but your motor is probably smoking at that point.
My understanding is that folks over at REV did a fair bit of testing and determined that the Spark MAX can safely operate the NEO motor up to around 100A given typical FRC power constraints. The published empirical motor curves reflect the maximum performance of the motor and speed controller that teams can expect under FRC conditions.
Dyno tests (the published theoretical motor curves) with a special no-current-limiting firmware and a robust power supply showed a stall current of 150A with the NEO + Spark MAX. @dyanoshak explained to me that there are a number of factors such as the resistance in the MOSFETs, circuit board and wiring that contribute to power loss at this extreme of an operating point, thus why the current curve intersects the y-axis around 150A rather than 330A.
This said, the Spark MAX controller is not designed to operate above 100A regularly. It appears the default smart current limiting is set to a linear limit from 80A at stall to 0A at free speed. So I guess you could coerce a little more out of the motor by tweaking the current limiting settings up to 100A irrespective of motor speed.
The blue (torque) and purple (current) lines on the “empirical” graph are straight as a ruler, so that does not appear to be actual bench test data (unless only 2 points were tested and then a straight line was assumed to connect them).
I was interested in how linear the actual performance is, given the current limiting.
It is likely a linear fit to the measured data. I too would love to see the dyno accel data if REV is okay publicizing it.
The performance of the NEO in practice is very dependent on how your smart current limit is set up. When you send a output of 1.0 at stall, with an 80A smart current limit the duty cycle actually applied to the motor is about 0.3.