does anyone know how the pressure switch work? how to make it automatically turn on and off? thanks…
The pressure switch functions by balancing the pressure applied from the inlet side vs. the spring tension from the adjustment screw(remove the black rubber plug from one end and you’ll see a slotted adjustment device). As the adjustment reduces spring tensiion against the internal diaphragm, it takes less air pressure to overcome the spring tension and make/break the switch. As the adjustment increases the tension against the diaphram, it takes a greater air pressure to overcome the spring tension and make/break the switch. All devices of this type have an inherent dead zone. If the switch makes/breaks as the air pressure reaches 90 psi, lowering the pressure to 89.9 psi will not result in a reversal of state. The pressure will have to drop through the dead zone before the spring tensioin can overcome the air pressure against the diaphragm and make/break the switch. Put an ohmmeter across the switch terminals and run the compressor until the switch changes state. Record the pressure from the guage attached to the compressor side of the system. Slowly let the air escape until the switch reverts to its original state. record the psi. The difference is the dead zone. If you want a different range of pressures, turn the adjustment 1 turn ccw or cw and re-perform the experiment. continue until you get the results you need. This year they gave you two of thses devices. use one to turn it on and the other to turn it off if you like.
Hey Junkyard, that sounds like an “engineer” answer. I was thinking Pico was looking for a “programmer” answer. (Or maybe he needs an electrical technician’s answer.)
In any case, here’s my programmer answer:
FIRST gave you two switches this year. They are preset to trigger at two different pressures. If you turn the pump on when the lower pressure switch closes, and turn it off when the high pressure switch opens, you will prevent the pump from cycling excessively (which is what your electrical people want you, the programmer, to do.)
There are other threads that also tell you how to do this, but I will give you my answer here:
'( Make sure you know which switch is which before you use this code.)
if low_pressure_switch = 0 then DontTurnOn
' The low pressure switch is closed, (and the high pressure
' switch is assumed to be also) so turn on the compressor.
pumpRelayOn = 1
DontTurnOn:
if high_pressure_switch = 1 then DontTurnOff
' The high pressure switch is open, (and the low pressure
' switch is assumed to be also) so turn the compressor off.
pumpRelayOn = 0
DontTurnOff:
If you don’t want to take the trouble to figure out which switch is which, this code should work:
if (switch1 = 0) or (switch2 = 0) then DontTurnOn
' Both of the switches are closed, so turn on the
' compressor.
pumpRelayOn = 1
DontTurnOn:
if (switch1 = 1) or (switch2 = 1) then DontTurnOff
' Both of the switches are now open, so turn the
' compressor off.
pumpRelayOn = 0
DontTurnOff:
Thanks to both of you for your sincere and helpful answer. I’ll try it and see if there is other questions come up. Thanks a lot.
How do you wire them up? What kind of wire and where do you wire them to?
You can use either of the small wire cables you were given, either the two-wire cable (one run per switch, with black carrying ground, red the signal), or the three-wire shielded cable (one run does both switches), using the black to go to both switches, and red to one and white to the other.
It doesn’t matter which terminal is connected to ground. We use ring terminals at the switch terminals.
Ours are wired with 3-wire; the black goes to pin 3 of the digital input (one of several grounds), and red to 2, and white to 1. You can pick any digital input you wish, we use rc_sw1 (pin 1) and rc_sw2 (pin 2).
When the switch is below the set-point pressure, it is closed, and the input the program sees is a ‘1’. When the pressure goes higher than the set-point, the switch opens and the program sees a ‘0’.