Strange sparkmax issue

So i have a weird problem, my sparkmax doesn’t output more than 0.76 (duty cycle) even though my pid output range is -1, 1 . Even when farthest from the setpoint the highest it goes is 0.76 (it’s not because of a pid issue,even if i set p abysmally high, or if i just do motor.set(1.0) in code it doesnt exceed 0.76) any ideas?
the current limit is also 40A, and it doesnt come anywhere near close that so thats not the issue.
I’ve tried factory resetting the sparkmax using the recovery mode, it didn’t change anything

im using the getAppliedOutput() method to measure it

i dont think it’s code related but here’s the code anyway FMWill-2024-robot/src/main/java/frc/robot/subsystems/Arm.java at main · FMWill-7576/FMWill-2024-robot · GitHub
Would appreciate it if you have any suggestions!

How are you measuring this?

i call armMotor.setSmartCurrentLimit(40);
during config and i measure the applied current via putting armMotor.getOutputCurrent()); on smartdashboard

1 Like

If you have any plots showing the applied output, the setpoint, the sensor position, the current, and the battery voltage, that would help. There isn’t too much in the signal path that would prevent it from reaching 100% output. The ones I can think of are current limits, min/max output settings, and steady state error from pid.

oh it might be a battery voltage thing maybe… i think the battery I was using was pretty depleted. Also can’t be steady state error because it doesn’t exceed 0.75 when I just call motor.set(1.0) either

I don’t think battery voltage have an impact, e.g. even if the battery is 6V, as long as you’re not drawing too much current, then motor.set(1.0) should set it to 1.0.

do you think our spark is just broken then? It’s fresh out of the box…

I am logging all of this data but haven’t put it in a plot, would i need glass for that?

Glass or AdvantageScope are both great options.

1 Like

Alright, now i think it’s probably the current limit that’s stopping it,but I am confused on why armMotor.getBusVoltage() is returning values greater than 16V, is that normal?

plotting (1)

Your image is not showing up. You can just paste images right into CD that will be easier. In some cases its possible for the bus voltage to exceed 16V, e.g. if you have a lot of inertia in the system and you go from a high speed to a low speed.

1 Like

Oh apologies… I tried to send it as a GIF earlier but didn’t realize I sent a URL instead, it should be fixed now. The thing is the reported bus voltage is sitting at 16V when there’s 0 output and going up to 18V while moving, I found that rather odd and compared it to our intake motor, which does sit at 12V as it should.

While its concerning that its reading that voltage level, I would either send REV support a message or just ignore it if you’re not using any voltage modes (setVoltage() or voltage compensation). It sounds like an issue with the controller itself?

The current plot is a bit low resolution, so it may be missing fast current spikes, but its pretty clear that its hitting the 40A. So I agree that’s likely why the applied output is lower. If you need more power, you can increase the current limit (unless this is a neo550) or change the mechanical design.

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