That’s a good question. I know our code last year used “getAverageValue()” and seemed to be very consistent - our arm (controlled with 3 pots - shoulder and elbow using 270 degree pots, and winch using a 10-turn pot) didn’t seem to be affected by power, at least not until the power got so low the motor on the winch couldn’t get the robot all the way up. In our build space testing, we saw no visible difference in how the arm operated when going from a dead battery like that to a fresh, fully charged one.
It’s very easy to add a jumper to the analog board and read in the supply voltage. Since it’s a 0.1" pin header, you can just use a standard 0.1" jumper between the center (5v) and signal pins.
If you’re having trouble with the Analog Breakout, the Digital Sidecar isn’t far behind, with much worse symptoms. It might be helpful to make a new thread about how you’re killing batteries over the course of a match, and describe your robot and power systems so that people can provide suggestions on how to reduce power draw.
The dropout of Analog Breakout regulator decreases as the load decreases. You may be able to reduce the number or size of loads to gain a little more margin. See attached chart from the MIC5209 datasheet.
I agree with Max that you can’t tap into the radio power supply in any way.
One option, without adding an external boost converter, is to use power a Solenoid breakout with cRIO 24v (allowed per R42). Turn on a Solenoid Output (allowed per R51), and then use a voltage divider to bring it down to 10v (The NI analog module is +/-10v). This has the disadvantage that you can’t read the pot during disabled mode. You’re also switching from a linear regulator to a switching regulator.
Could you wire the positive terminal of the potentiometer to the 5v port on the PDB? I’m not sure how low of a battery voltage it takes to brown that port out, but I don’t see anything against it in the rules.
I’m shocked that you’re having this problem and we have not run into this. My team has a penchant for using a TON of motors (13-15) and at least 3-5 pots each year and we haven’t run into this. Plus our driver drives like a bandit and we have our 6 CIM drive geared to the moon this year so I know we’re sucking some serious juice out of the battery. We do buy ten brand new batteries every year and use a freshly charged battery every match which helps us.
Any major mechanical inefficiencies in the system?
Are all your crimps and terminals good? Anything getting super warm?
I’ll email our programmer and ask him to post it or send it to you. Due to work schedules, it likely won’t be available right away. Thanks for following up with this.