Pressure Switch to Relay?

The other posts about the pressure swithes didn’t really clear up how the heck you hook up the pressue switch to a relay. I think I understand how to ground the pressure switch, but how do I hook the other end to a relay? What I assume is that you ground the switch to a fuse box, but how the other end is hooked up to a relay, I don’t get it. Unless you hook up the whole thing to a spike… that would solve the relay problem. I just don’t know! Please help!

Like the riddle about how to get down from a camel… you don’t, you get it from a duck!

In this case, you wire both terminals of the switch to the RC, on the digital input connector, and have the RC turn on a relay when the (NC) thing is open:

relay2_fwd = 1-pswitch

you may use higher level constructs like NOT or ~, but this gets the job done without worry.

For the above example, pswitch is an alias you would make in your programming for the input; say you use sw3 - you’d say “pswitch VAR rc_sw3”. Let’s also say you have your compressor connected to the M- (Black wire) and M+ (Red wire) terminals of a Spike, and you plug that Spike’s “PWM” cable into the relay connector two.

I see. So it’s grounded to a fuse box like I said and it’s connected to the positive port on the Robot Controller. And from there, you program the controler to shut off a relay when it detects the pressure switch opening.

The switch goes to ground in the digital port, and to one of the switch inputs.

The Spike can only be turned on via its “PWM” cable input, which applies a current to a LED in the spike. The ground for this is the black wire terminal. Just connect the Spike to the RC output - don’t wire it to the pressure switch.

The compressor’s wires go to the Spike. The Spike needs power from 12V to run itself and its LED. It, not the compressor, should be taken to a breaker and a ground terminal.

Ok, how 'bout you and me grab a beer and sit down at a table so you can depict your description on paper. The digital inputs, aren’t those on the side of the RC with all those blank connector pins sticking out with the adapter over the controller? If so, which of those are pins 6 and 2?

look in the first manual in the electrical section of the robot guide. There is page with sample ways to hook up different sensors to the digital inputs and analog inputs…even has pretty pictures…use this for a reference for how to hook this up.