Issues:
-Compressor won’t automatically turn off after 120 (we tested up to 135)
-We probably wired something wrong somewhere.
Tl;dr below
Today me and my team wired a ViAir Compressor 2011. It’s not the Viair 090C Air Compressor, although we have one.
So here’s what we did:
20-Amp Snap-Action breaker to 20-Amp 12v VEX Spike-relay
From that the M+, M- went to the Air compressor, + to +, - to - ends of course.
Then we wired the 3-pin PWM connector to Relay 1, making sure the black end is on the G on the Spike-relay and on the relay panel the black is on the outermost pin.
But the issue became that it didn’t work. It only showed a reddish-yellow light, until we connected it to the Digital I/O board on slot 1. Then the light became completely red but the compressor started running.
-We get a red light no matter what (unless we switch positive and negative around) on our Spike-relay. We’re not sure whether this is correct or not, but it is working in this fashion.
We wired our two wired pressure-release valve to relay 1, as we thought it would go there instead of the Spike-relay.
-But it didn’t work, we got up to 135 PSI and it didn’t work.
/Tl’dr
If I am reading this right, you have your Spike connected to DIO 1 and your pressure switch wired to Relay 1?
If that is so then it is backwards. The Spike should got to relay and switch to DIO.
Where did you place “Compr Control Loop” and “Compr Enabled” in your code?
Did you also remember to go into Periodic Tasks.vi and remove the Diagram Disable structure around the Compressor Control Loop? If not, I would suggest starting there.
Also, to make it work, you will have to put the PWM cable from the Spike to Relay 1 on the Digital Sidecar. The pressure switch must also be wired to DIO 1 (using the signal and ground wires only).
I don’t have a “Compressor Enabled” node anywhere, should there be one? I haven’t seen any code examples for a compressor that ever require it, the DIO should disable/enable on it’s own as the air PSI in the tanks increases/decreases, correct?
Alright, so Spike-Relay to Relay through PWM cable on 1st slot and the electronic pressure release valve to the first DIO, correct? Should the system automatically then handle it?
No, it doesn’t look like it, but the default code for a compressor does execute ‘Compsr Start’, I forget if this is needed, but it may be worth trying.
Also you don’t need to place Compsr Control Loop in a loop, since the VI loops internally.
And you are correct Spike connects to relay one though PWM cable and pressure shutoff switch to DIO one.
The spike should be wired to the Relay output on the DSC. (There are 8 of them)
The pressure switch should be wired to the DIO on the DSC. (There are 14 of them)
There are two LED’s next to each of the Relay ports on the DSC. They only light up when your code tells the relay to go forward/reverse. You should see the following behavior with these LEDs and the LED on the spike:
– No DSC LEDs lit, spike LED yellow
– Green DSC LED lit, spike LED Green
– Red DSC LED lit, spike LED Red
– Both DSC LEDs lit, spike LED yellow
If you aren’t seeing the LED’s on the spike turn on, then you know there’s something wrong with the code.
To test your code, hook up a simple limit switch to the DIO your pressure switch should go to. Enable the robot, and see if your relay LED’s light up/turn off in sync with the limit switch. If so, then your code is working fine! If not, then you’ve got something wrong - either an error in your code, or you aren’t plugging the switch into the port the code expects.
Once you know your code is working correctly, hook everything up correctly, as listed above, and you should see it work.
As long as you have the Compressor Start in Begin.vi, you should be good. The only problem I see is that you have the Compressor Control loop in another loop. Try removing it from that loop (you can delete the one you placed in the loop, right click on the diagram disable structure below it, and click “Remove Diagram Disable Structure”. Remember to rename the refnum to “Compressor” too.
I got it to work! But there were some other details that were needed to get it running. Would the below be a correct guide?
*PWM cables come in different colors but work the same, the darkest is the ground, positive is the middle and signal is the remaining one.
-Attach a PWM (3 pin) connector to Relay 1 on the Digital Side Car and connect the other end to the Spike-Relay, with the black wire on the furthest right of the slot.
-Attach another PWM(3 pin), but only the Ground (black) and signal (white) to the Pressure detection valve you should have put in place next to the pressure release valve. There should be signs G(B) for ground and signal for the other. And then connect the other end of the PWM to slot one of the Digital I/O slots, (Right above relay slots)
-Make sure M+ and M- are going to the Air compressor, 12v and G(B) are going the over way. Just wire the positive/negative correspondingly across to how the air compressor is wired.
Wire the 12V and G(B) side to a 20-amp Snap-Action breaker on the Power Distribution Board.
-Make sure that you add the correct programming in Labview, here is mine.
Begin.vi:
Teleop.vi:
Periodic Tasks.vi: (Make sure it’s outside of any loops)
With this setup, when you enable your robot in Teleop, it then starts the air compressor and automatically shuts off after 117 PSI. You can set this up to start when your robot initializes if you just put the “enable” node in the Begin.vi right after the registry set node.
The Enabled isn’t necessary.
The compressor is enabled by the start.
Enabled is only used after a Disable has been used (presumably to conserve power).
The normal 20A breakers you use on the PDB will fit into the Spikes. The two contacts slide in just like the yellow fuse, and the breaker sticks up above the spike.
Based on experience, if you don’t replace the fuse, it’ll blow after 15-20 matches. That just happens to be the number of matches you need to compete in to get to the finals Saturday afternoon (plus or minus practice matches on Thursday).