Our FRC team (2175) has only started using NEO motors this year, and while we were setting one up with a Spark max to test a prototype, we noticed weird (though predictable and repeatable) behavior in the motor controller. Here’s what we observed:
Spark max with correct firmware and everything, connected to a NEO with the encoder disconnected from the controller gave us: jittery, seemingly PID behavior from the motor that would fight to stay at its current position Also, after a few seconds of running at +1.0 speed, it seemed like the Spark max lost power, as the green lights on the spark completely turned off and then after a few seconds went to purple
After plugging in the encoder cable to the Spark max: absolutely nothing (no green light, no spinning)
After leaving everything plugged in (as it was in 2) we then power cycled: correct behavior (i.e. motor was spinning at full speed forwards, as programmed)
Then disconnecting the encoder cable from the Spark max after that first power cycle (and no additional power cycles): absolutely nothing
After connecting the encoder cable again and then power cycling: correct behavior
From this testing, it this is what we’ve gathered about the behavior:
The Spark max cannot run the NEO without the encoder cable plugged in
The Spark max must have the encoder cable for the NEO plugged in before powering on (If the encoder cable is disconnected from the Spark max when it powers on, it must be plugged in and power cycled)
Is this standard behavior? If not, is there any solution to this problem (i.e. if the encoder comes unplugged while powered on, is there any way to get it working without a power cycle)?
1 is 100% true. The encoder wire is required in order for the motor to move. Its a requirement of any* controllable BLDC.
2 wouldn’t shock me, but rev would have to be the one to ask about that, since it probably does some checks that the sensor is plugged in to ensure it will be able to drive it.
Note you can control a brushless motor without a sensor, but not well, and definitely not at low speeds.
I suppose it could’ve been made more clear, but the encoder wire isn’t just to give you feedback; it’s required. The SPARK MAX does not support sensorless commutation in brushless mode. This is due to how brushless motors work.
Worse than that, it could possibly damage the motor if the encoder becomes disconnected while it it’s running. I heard of a few cases last year where that happened.
@Greg_Needel I’m assuming this is intentional but it’s not a great failure mode for momentary loss of encoder signal to take you out for the rest of the match. Can you provide more insight to how this works and if there is any workaround to get the motor back operating without a power cycle?
This is correct, as others have stated as of today we only support sensored operation.
This is absolutely not the case, there are no ‘latching’ faults like this and the SPARK MAX can have the sensor wired removed and plugged back in during operation. You will find a ‘sensor error’ in this case if you were to read the faults on the controller.
How were you powering the Spark Max in your test, was this directly with a battery?
To re-iterate, this is not the behavior, momentary loss of encoder signal will stop the motor only during the time that the signal is lost.
Thank you. After further testing, we did find a momentary encoder loss to not be an issue once it’s plugged back in. We were powering the SPARK MAX through the PDP.
We’ve now found that 1 NEO is now acting very strange (the other NEO on the same SPARK MAX works great) - I assume this could be because of what @Domtech was saying? (Although I don’t believe we ever unplugged the encoder cable while running)
The Spark Max is working fine now, and here’s the potentially bad NEO’s behavior:
Running motor at -.25 speed, the NEO doesn’t move at all until we give it a twist clockwise, after the NEO runs normally until it decelerates, then needing a twist to start again
If the shaft is twisted the other way, it snaps back into place with a jittery movement
When put at +.25 power, the behavior is the same, except when twisted counter-clockwise the motor goes and when twisted clockwise it does the jittery movement
What type of connectors are you using between the NEO and the SPARK MAX? We have seen this behavior if one of the three phases has a higher resistance connection than the others. Not quite an open circuit, just not as good as the other two. The majority of cases like this have had an Anderson contact not fully seated in the housing.