Brownout Prevention?

How do teams accomplish this?

My idea was to have secondary batteries in-between our main battery and our component, so if we lose power from our battery at any point, we continue on extra power from the extra battery until either the match ends or power is restored. Unfortunately, this is illegal on many levels.

So my question: How do we prevent brownouts and power-cycling?

We anticipated having brownouts, but never saw them. As a preventative measure, the code would check if there was a brownout (using DriverStation.isBrownedOut()) and then throttle down on the drivetrain if so. The arm would also measure current and stop if it detected a stall.

Yeah the whole back up battery thing won’t fly.

If you really want to get into Brown Out Prevention

  1. Load Test your batteries. I recommend sharing this with your alliance partners at competition.

  2. If you want to get more advanced: Have your code monitor the power usage on the PDP and reduce power to motors accordingly: http://www.ctr-electronics.com/control-system/pdp.html#product_tabs_technical_resources

  3. You can prevent it by design if you do some analysis for your power consumption and set a power budget. There has been discussion on various threads here in the past about that.

Depending on your design I would add the ability to control power on your motors on the driver station and allow the drivers to override/control power as necessary.

This doesn’t really fall under the category of a brownout, but it seems like the most common way that teams lost power on the field this year was due to power plugs coming loose. It happened to even the best teams this year. Make sure you tape in or secure power connectors for the radio and roboRIO. Make sure that battery lugs are tightened at the battery terminals, at the main breaker and PDP, and that your SB50 is plugged in solidly. Any high-resistance connection can cause excessive voltage drop when you pull a lot of current.

Your roboRIO will automatically shut off PWM outputs and disable CAN based motor controllers if it detects a brownout condition. This happens at 6.3V. If you want to avoid this, then you will need to decide on a way to monitor voltage, and scale back motor controller output (reduce current) under certain conditions.

Page 7 of this document describes the roboRIO brownout bahavior in detail.
https://decibel.ni.com/content/servlet/JiveServlet/download/30419-60-90614/roboRIO+User+Manual.pdf

There are plenty of good ways to prevent brown out.

On the electrical side, make sure the battery wire terminals are tight on the battery terminals. Use lock or star washers. The type of battery that come in the KOP have them included. Make sure that the screws holding the wire on the PDP are also tight. Any ability to turn them is bad. Also make sure the 6 gauge wire is crimped well. These loose connections will cause higher resistance in the whole circuit. I solved that problem on our robot and on other team’s robots.

On the code side, if you’re using TalonSRXs then you can use current limiting. The motors for drive will pull lots of current. So if you have the code write the motor output to 0 when the current is too high, the problem will go away and you won’t notice the brown out symptoms.

I was just browsing and found some good documentation from FIRST/WPI on current monitoring and brownout prevention. Figured I’d leave it here too.
https://wpilib.screenstepslive.com/s/4485/m/24166/l/289498

OK, spoiler alert, Al is going to talk about electrical issues again

In most cases brownouts are preventable with a good electrical system design. To begin, let’s talk about real world issues that every team experiences.

  1. Wires have resistance! Resistance drops voltage when current flows. V=I*R.
  2. The battery has internal resistance. Typical is 0.011 ohms. At 400 amps that resistance drops 4.4 volts. Yes that is real and it occurs with a freshly charged battery. Stall or start four CIM motors and that is what you will actually measure at the battery terminals.
  3. Batteries do age, typical for our batteries is about 400 charge discharge cycles maximum. The Battery Beak will give you some indications but a true test is one that duplicates the curves published by the manufacturer. The West Mountain Radio CBA-IV is capable of performing this test and keeping the data from year to year so that you can overlay the tests and see graphically the deterioration of the battery capacity.
  4. Terminals, connectors, breakers, and hardware all add resistance to the robot electrical system.
  5. Smart chargers can be confused by certain battery conditions and operation. Read the charger manual and follow the instructions.

Many of us (Inspectors and CSAs) saw these issues throughout the season. They are preventable and we showed teams how to overcome these issues.

  1. Make the terminations on the battery tight and non-moving. Add a #10 external tooth star washer between the battery terminal and the wire terminal to cut through all the surface crud and to prevent the terminals from moving. Use the supplied locking hardware to keep the screw and nut tight as well. These two steps will keep the termination as low resistance as possible over the possible three or fours years of the battery life. If the terminals move, any locking hardware will loosen. Loose connections are high resistance.
  2. Terminate the #6 wiring so it won’t pull out and it won’t loosen. If you use the screw type terminals, strip the wire sufficiently to push bare copper all the way through the connector. This one step will prevent wire pullout. I don’t like the type where the screw actually compresses the wire (as shown below). I prefer a clamping type where the wire is held between two moving parts. With the type shown, wire strands will be pushed to the side, reducing the wire gauge and increasing resistance.
    http://www.homedepot.com/catalog/productImages/400/0e/0efe598b-d499-4049-afff-1a8890207b86_400.jpg
    If you use this type, attach it to the battery terminal so that the screw faces the center of the battery. This will give you less of a chance of having the terminal catch on mechanical parts in your robot when you install the battery. Follow up with good insulation. Duct tape is not insulation. Use electrical tape or heat shrink tubing.
  3. I prefer the Burndy crimp type terminals. You can obtain these at AndyMark (am-0805) or many other locations. You can use a vise to crimp (see my other posts) these but the tool sold also by AndyMark (am-3326) is the perfect device. We follow up with solder to improve reliability and reduce resistance.
  4. Tighten all hardware, Al tight, not freshmen tight. If you use any terminal that is 1/2" wide, be sure that your tighten the hardware on the PDP sufficiently that the terminal is in firm contact with the PDP terminals. It is easy to think you have done a nice job, but the plastic cover may be preventing you from having maximum contact with the PDP. This is a source of increased resistance.
  5. Center the battery, the main breaker and the PDP in the robot to keep all wiring as short as possible. You may have to rotate the PDP to get this right. Every foot of #6 wire will drop 0.2 volts at 400 amps. All of your robot current flows through this wire. Make sure it is as short as possible.
  6. Make sure the fuses at the very end of the PDP are fully inserted. Take the time to inspect this when the PDP is not in the robot. The shape of the fuse has a handle molded into the fuse to let you grab it. That handle should be almost touching the surface of the PDP when correctly inserted. The fuse feeds power to the RoboRio. If it is loose, the Rio gets upset or completely reboots.
  7. The push type terminals require that wire insulation be stripped to 3/8" (0.375" or just under 1cm) . If you do not meet that minimum specification, the wire will not be retained in the terminal and the resistance will be high. Be sure to check that there are no whiskers touching the other wire.
  8. Inspect your main breaker often for correct operation. Lightly tapping the red button while your robot is on, should not cause any blinking lights. If you see that, replace the main breaker. If there is any damage to the outside of the breaker (cracked or chipped case, broken handle or cover) assume the breaker has been damaged and replace. When you push the flag in, there should be one, smooth, movement. If you feel a slight resistance (as if the handle is moving over a speed bump) and then it pushes the rest of the way, the breaker is bad. This is an indication that the handle is damaged and will fail at some point.
  9. It is possible that your drive system is drawing excessive current. This could be do to the type of drive you are using, the friction of the tires with the carpet or how aggressively your driver turns. Tank treads are the highest current demand in turns. Eight (or more) wheel drives with no drop center wheels are next. Knobby tires are also notorious for high current in turns. If you are experiencing problems in turns, it could be any one of these designs. Practice with your driver to not turn in place but do arcing turns to reduce the current draw. High friction drives in turns will put the drive motors into near stall conditions. A CIM motor stalls at 131 amps but typical robots will see current in excess of 100 amps per motor.
  10. Finally, too many teams do not follow the instructions that came with their battery chargers. Let your battery rest for at least 30 minutes prior to charging. This will bring the internal temperature down to near ambient and allow your charger to optimize charge current. Charging a ‘hot’ battery may not get you full charge.

Al did a great job of covering electrical sources of brownouts, which were the most common reason for brownout I saw. There was one non-electrical source of brownouts – drivetrain designs. Specifically, six-wheel drop-center (i.e., KOP chassis) drivetrains with AndyMark AM-0970 pneumatic wheels, or similar.

Teams needed to pay particular attention to robot CG and tire pressure to keep the turning current low.

One test I use is to put the robot, with battery and bumpers installed, on carpet. Put a sheet of paper underneath each of the corner tires, and pull it out. If the force needed to pull the sheet out varies dramatically, you need to balance the robot.

Another way to check is to put the robot, with battery and bumpers installed, on carpet, and try to turn the robot by pushing on the corner of the robot with your finger. If you can’t turn the robot, it’s probably going to take a lot of energy to turn.

Don’t bother doing either of these tests on a hard surface. The results don’t replicate the actual field. Don’t have a piece of real field carpet? Ask the Regional Planning Committee about getting some leftovers after the event. Or go to the carpet store and buy a remnant of a low pile carpet made of the same material as the field carpet. It won’t be exactly the same as the field, but close enough to test it.

Here’s what we did. First, we used a similar tire, but with a smooth profile like this. Second, we paid close attention to robot balance, ensuring that the CG of the robot was near the center. Third, we ran the center tires on each side at 30 PSI and the outer tires at 10PSI. This caused the center tire to be bigger, and helped with turning energy.

Our drivers could tell instantly whether the pit crew had forgotten to set the tire pressure.

I also saw a couple four wheel pneumatic tired robots – they had the same difficulties as the six wheel ones, but are fundamentally difficult to fix.

1 Like

Did you post the wrong image, or am I seeing it wrong? What I see looks to me like the kind where the wire goes on the other side of the tab from the screw, to get sandwiched between the bottom of the tab and the inside of the rectangular cage. The screw doesn’t touch the wire itself.

The AM crimper is great, but for about the same price you can also buy a hydraulic crimper from Harbor Freight. We’ve used it for years, and it crimps amazingly. Highly recommended for any large gauge wire crimping.

This year, we actually crimped ferrules onto all of these wires, and they worked amazingly all season. Only time we lost a wire was when our shooter came down on one of the connectors and literally snapped the crimp. Otherwise they worked amazingly. There are lots of places to purchase these.

NOTE: This solution does not fix the problem of brownouts, rather it provides a way to eliminate the brownout from affecting the compressor.
This was a problem my team faced during the end of the build season, right down to the final hours. This year we used a six wheel drivetrain with a dropped center and pneumatic wheels. Our problem was caused by a rapid changes in direction from a CIM motor. This would cause a brownout to the PCM, cutting off power to the compressor for about 3 seconds. Normally this wouldn’t bother us, but this year we relied on pneumatic to deploy our boulder intake, and fire our catapult.
Instead of running the compressor off of the PCM as is normal, run it instead off of a spike using 20 Amp breaker. Connect the spike directly to the power distribution board with a 20 Amp breaker, then connect the spike’s PWM to one of the RoboRIO’s relay pins. Connect the compressor to the spike, and with a little coding, the compressor will be unaffected by any brownouts. This is also completely legal. While this may not fix your problem, hopefully it mitigates the effects.

I should point out that you also MUST wire the pressure switch into the roboRIO as well.

You can’t simply hook up the spike and say in your code:

compressorRelay.Set(Forward);

It has to turn off when the pressure switch trips.

See R88: (Insert remark that 2016 rules don’t apply to 2017 or offseason projects).

But yes, this is a valid way to do so. Also doing it this way allows you to turn the compressor OFF when you are in a high-current draw situation, where every last bit of power helps.

Brownouts turn off all actuator outputs from the roboRIO, including relay outputs. The compressor will still shut down when the battery voltage drops into the brownout zone.

You can turn off the compressor at will using the PCM connections too.

I was not aware of that, thanks!

The talon SRX if used with CAN buss control Has the ability to ramp. A slight ramp can do wonders to control current spikes and brown out. We did this this year.

We took the N’th degree approach this year, and it turned out relatively well:

-Monitor battery condition over time. Generate an adaptive model of the battery to determine how much current can be drawn from it before system voltage drops too low.

-Proactively estimate how much current draw a given driver command will pull from the battery. Involves knowledge of the physical parameters of the motor, and its present speed (measured via encoders)

-If the estimated current from the driver commands is sufficient to cause the system voltage to go too low, scale back driver commands.

The algorithm we used this year is still in trial - it kicked in plenty during competition, and we never browned out. However, we don’t have good enough data yet to support that it was 100% necessary. We are working on a whitepaper (there are a few drafts of it floating around the internet), and will hopefully by end of summer have more data on the limits of what we came up with.

We actually came across this exact problem earlier this season. We tried a purely software approach by writing a “power controller” that essentially monitored all the current draw by all the systems (RIO, drivetrain, intake, outtake, compressor, etc), then the controller would dynamically modify the current flow to or from these systems depending on priority. The priority changes when the particular subsystem is being used, and takes into account the battery voltage.

The numbers we used were based on a lot of testing (we generated a linear regression model for current - speed of the drive train motors, for example, so we’d know how much current each motor would pull depending on speed) and didn’t really seem to match up perfectly all the time to what the WPILib tells you about your max current. ie we would draw up to 200 amps sometimes for a second before the brownout sequence kicked in.

Obviously, it’s not /perfect/ since the power methods in the WPILib are pretty noisy, so we had a switch on the driver station to turn the power controller on or off. We had a match at champs where it was pretty clear that the power controller was modifying currents – and we never had a brownout during a match our whole season!

We had a very extensive flowchart for the logic and passed out flyers to people explaining how awesome it was :^)

1 Like

Yes this is legal but, the Spike has been discontinued from what I have been told.

+1 Everything Al said.

In every case of brownouts I investigated at champs, 100% of the time there was at least one of (A) loose battery cable, (B) loose connection at breaker, or © loose connection into the power distribution board.

If you can move the battery cable up and down, the bolt isn’t tight.
If you can move the cable back and forth at the breaker, the bolt isn’t tight.
If you can move the cable back and forth at the PDP, the bolt isn’t tight.

The PDP connector is harder to reach because the covers.

Was anyone brave enough to run a 6-CIM drive this year? If so, how frequent were brownouts? Also, what were the gear ratios and wheels used?