Spark Max Ramsete Brownouts

My team was experimenting with the Ramsete control but ran into issues. We used the tutorial from WPILib.

We tried both constructors for Ramsete (voltage control and m/s control) and both ended up with the drivetrain stuttering and browning out. The drivetrain does not normally brownout when driving in teleop. Our drivetrain has 3 Spark Maxs per side. We are using the new DifferentialDriveKinematics class for our drivetrain.

Here is our code

Here is a picture of the log file

Any advice would be appreciated!

I’m not on programming, but here are my guesses as to what could be going wrong:

  1. Check that the battery is actually fully charged (from a standstill, manually drive the robot to full speed and then suddenly back)
  2. If that doesn’t brown out, check that in your teleop code you don’t implement some kind of ramp up or amperage limit. If you wrote your teleop code but copied the auto code, there’s a good chance your programmers either implemented your own current limits or ramp up the speeds of the motors. If this isn’t copied into the auto code, this could cause issues because of the very sudden high current draw.
  3. Make sure that in your auto code the motors in each gearbox all spin the same direction. Again, this might be incorrectly configured if you just copied the auto code from WPI’s tutorial.

Hope this helps. Again I’m not on programming team so there’s a good chance I’m missing something obvious, but from my experience this is what I would check.

  1. The batttery was definitely fine (You can barely see but the voltage says 12.39)

  2. I am the programmer and I don’t believe I added that. I know the Spark Max’s have their own Smart Current Limit but I can look into that

  3. They should be going the same direction since I am using the .follow method but I can check again tomorrow by unplugging all the motors

  4. I just realized that our gyro is not parellel to the ground which might be causing the stuttering/confusion

I would still try replacing the battery. We’ve had batteries above 12v that drop well below 8 or 9 when drivers suddenly jerk the robot around. Other than that, what you pointed out with the gyro sounds pretty promising. Good luck fixing it!

There’s a bug in the example code where the motor safety watchdog is not fed. Add a call to m_drive.feed() in your tankDriveVolts() method to fix this. This is likely causing the stuttering you are seeing.

It’s worth noting that a fully-charged new battery should read somewhere in the vicinity of 13.5V, so sitting at 12.39V while idle isn’t dead, but certainly isn’t fully charged. Alternatively, it could indicate some kind of internal issue with the battery where the voltage will drop significantly with only a moderate load.

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