The output of the air compressor turns on when the switch is high and turns off when the switch is low. Basically, it’s off when it should be on and vice versa.
Some further information:
Our pressure switch is the Nason one, and seems to be functioning correctly.
getPressureSwitchValue() correctly returns true when it’s low and false when it’s high (above around 110)
Compressor and pressure switch are both plugged into the PCM.
We found out about the behavior by plugging the compressor into an independent source and measuring the voltage of the compressor output from the PCM as the pressure increase.
We have no experienced alumni or even a mentor helping us out, so I might be missing something very obvious here.
Any help regarding this would be much appreciated. My guess is that something is wrong with the wiring, but nothing else seems incorrect except for the inverted output. Thanks in advance!
Would you mind posting your code for your compressor and a bit more detail on your physical setup? Wiring wise nothing sounds immediately wrong so far.
Please post photos where your wiring and pneumatic connections can be seen clearly. It is ok if you post multiple photos to cover it all.
Are there any other teams in Hanoi, Vietnam? Someone with experience, looking at your robot in person can see things that are incorrect more easily and help you get to a solution faster.
Hook up the compressor to the PCMDP, but leave the output open to the air so nothing goes boom.
Unplug the pressure switch from the PCMDP. Insert short lengths of wire (perhaps 10cm) with both ends stripped into each of the pressure switch terminals. Keep the ends of the wires apart from each other.
Enable the robot: The compressor should remain OFF.
Touch the wires together: the compressor should come ON.
If the compressor comes on at the wrong time, contact www.ctr-electronics.com about getting a repair or replacement PCM.
If the compressor comes on at the right time, verify that your pressure switch is normally closed, that is that it conducts electricity between the contacts when the system is not pressurized.