Running into an issue where the pressure read by the REV Pressure is off by approximately -3% which is double the stated tolerance (1.5%) in the datasheet. Trying to set the high pressure side of the system (tied in before the regulator) to 120 psi, but the sensor is reading a max of 115-116 psi (code snips below):
(in “public void periodic” in the subsystem):
SmartDashboard.putnumber(“Compressor Value:”, armPH.getPressure(0));
The other interesting note is trying to set the maxPressure in enableCompressorAnalog > 120 causes the code to crash. I can’t find anything documented on this and while it makes sense due to the rules, crashing the code seems an odd way to handle it.
Any thoughts on why my pressure is off by more than the stated 1.5% accuracy? I am thinking possibly that there is something causing my input voltage to be lower than expected (resistance?), but would appreciate any thoughts.
Do you get a stacktrace when the code crashes? I’d definitely be interested in knowing where exactly that is happening (as I’m sure the WPILib and REV folks would be as well).
As for your issue, I presume you’re confirming this by running the compressor and seeing what the pressure is after it shuts off? What’s the layout of your pneumatics system?
If your sensor is too close to the compressor (or otherwise not “buffered” by storage tanks), it may see pressure spikes in tune with the compressor cycle that could push it to read >120 and turn off the compressor. Once that settles back down, the pressure will be lower, though not necessarily low enough to turn it back on.
If this proves to be the case, I would say this is expected behavior. Your solution would be to add a few storage tanks (likely in series, but not certain that actually matters) between the compressor and sensor.
Both the high pressure gauge and the gauge on the regulator which show the same pressure reading (less than the setting specified in the code). The likelihood that both gauges are miscalibrated is somewhat low, I think. And the value read by the sensor (via the getPressure read) is consistently 4-5 psi lower than the setting.
Correct, but we turned it up to see where the error was occurring. At full (unrestricted) pressure, the regulator guage agreed with the high pressure guage. Of course to align with the rules that would be set appropriately.