On our current robot, we are coming across issues of subsystems, such as the flywheel, slowing down when our robot is driving, or vice versa. In an attempt to combat this, we are attempting to implement current limiting. Our current motor layout (for the systems with the most current draw) is the following.
2x Neos geared 1:1 on the flywheel on 40a breakers
6x Neos (3 each side) geared 11.03:1 on the drive on 5in wheels on 40a breakers. (18.5ft/s high gear)
What would the process be for finding the optimal current limits for these two systems? Is there a general rule of thumb for calculating this?
Just to confirm, you are doing closed loop control, or at least voltage-compensated feed forward? Just using %Vin will cause the actual motor output to be lower as the battery voltage drops, which is not what you want.
You can also use the DS Log Viewer to view current consumption for each PDP/PDH channel, which will give you a sense of the average/peak currents that are currently occurring, as well as the battery voltage droop you’re seeing.
In general, setting this kind of current limiting may be best to be done via testing rather than any kind of analytical method.
A quick look in ILite will at least calibrate your expectations a bit… well worth it for understanding brown out and wheel slip.
A 6 neo drive train with no limits can -really- load up a battery on takeoff
I, um, might have had this discussion with my team a few hours ago…
Last year, we computed it by launching the robot and backing down the current limiting until the robot wasn’t doing brownout stutters. We settled on 80A for drivetrain and just used the SPARK MAX’s built-in current limiting function to do so.
Generally speaking, I’d consult with motor testing that VEX and REV did to determine what the motor can handle safely and for how long. That’ll tell you the real upper limit; anything else is just you being easy on your battery and breakers.
Last time I got seriously into this, I believe we settled on a max temporary draw of 180 amps across all the sub systems. Ctre has a feature that will allow you to set a high initial current for a time then jump down. We would change our max allowed current to the subsystem based on what was running. If only the drivetrain was commanded it got the full 180. If other systems were coming online we would limit the drive so we could distribute the current elsewhere. The first key though is doing some testing so you know what your systems are going to be drawing when they are spooling up and running. Just be very careful doing too many set current commands. I remember they used to carry quite a bit of overhead on the can network (much like setting pid constants too often). At the same time, make sure you are setting your voltage compensation down to 12 or 11.5. This will help your systems remain linear or at least follow your model as voltage sags from high current draw.
Thanks for they help so far everyone! We will be implementing this tomorrow night.
Today we were just doing some drivers practice with the bot (~100lbs with everything) and experience one of our left side NEOs overheat and burn out (ah the smell of magic smoke)… the other two on the drive are perfectly fine, and about room temperature.
We aren’t sure what caused this, whether it was because of the current or because of something else (we did NOT pop a breaker). We plan on investigating further, but are short on actual reasons why as we have a very limited student base and only two mentors.
On a multi-Neo drive train (from painful experience) you should put sticky tags on each channel. IE, SparkMax, SparkMax output wires, NEO can, Neo input wires, and Neo encoder wires. That allows you to do a quick visual to check for cross connection. Next up is making triple sure that the wires are right: white to white, red to red, black to black. If you didn’t buy white andersons, use white tape/fingernail polish to code it.
Finally, tug on the wire for absolutely every single anderson, and then look inside the shell to verify that the contact is fully in.
We, um, -might- have had just about every one of these problems… Made worse by long extensions to all the cables without having white wire…
Yep, we definitely did not have any cross connections or anything like that. All of the neos and sparks are mounted and labeled right next to each other.
Be sure you do not have one motor fighting the other two – this will cause all sorts of fun. You can use the REV Hardware Client to drive the motors one-at-a-time to check. They should all result in driving the same direction. Look for any signs of uneven performance that could indicate something on the mechanical side while you do this. Keep an eye on the motor temps to see if they are uneven, same for current draw data from the PDP/H.