Air Compressor Will Not Initiate

So we have been try to get our air compressor to start when we enable the robot. We believe the wiring is all correct for it and the pressure switch. Now we are wondering if there is something wrong with the code or if it’s something else . Let me now what you think.





The WPI code for the compressor was changed a bit to be easier to follow and debug. Please go to the Periodic tasks VI and enable or remove the disable structure around the compressor control code.

With the new WPI code, instead of having an invisible control loop, you now put it into your project and tell it what compressor to control.

Greg McKaskle

So we checked this today and we are still unable to get the air compressor to run. Now we are believing it might be something else, we plan on doing some major trouble shooting tomorrow.

We are having the same issue. After some quick tests, we realized that if the pressure gauge is hooked up to the (+) and signal pins for one of the GPIO ports, the cRio always recognizes a “true” or “high” input. The GPIO pins seem to have pull-up resistors, so the only way to change the input value is to short (-) and signal. We are going to test this setup tomorrow (fingers crossed!).

Does anyone have any other ideas or confirmations for what we found?

EDIT: This worked.

You believe it’s wired properly. Why should we believe it? :slight_smile: The proper wiring is pretty simple. Tell us how you’ve done it so we can confirm it. It’s often best to double-check the simple stuff before putting forth much effort trying to think of what else might be wrong.

Ok so we have a pwm cable coming from the spike relay of the air compressor to relay spot 1 on the sidecar. Then the pressure switch is wired to the DIO spot 1 on the sidecar. Specifically the signal pin and + pin.

For a switch input to be read by the program, you need to use the signal pin and the ground (-) pin. The Digital Sidecar inputs are already at +5 volts when nothing is connected to them. You have to pull them low in order to register a change.

Ok so you fixed the pins now we have one wire going to the signal and one to the negative. But it will still not start when we enable the robot.

I assume you followed Greg’s advice to make the compressor control loop active in Periodic Tasks?

Disconnect the pressure switch from the Digital Sidecar and measure continuity between the contacts. They should be shorted together when the pressure is too low. If there is an open circuit, replace the switch. Check the Digital Sidecar and look to see whether the relay is being asked to turn on (there should be a green LED lit next to the pins for relay 1). If it is, look at the LED on the Spike (it should change from yellow to green when the robot is enabled).