View Single Post
  #4   Spotlight this post!  
Unread 19-01-2013, 19:08
Sparks333's Avatar
Sparks333 Sparks333 is offline
Robotics Engineer
AKA: Dane B.
FRC #1425 (Wilsonville Robotics)
Team Role: Alumni
 
Join Date: Feb 2004
Rookie Year: 2003
Location: Wilsonville, Oregon
Posts: 184
Sparks333 is a glorious beacon of lightSparks333 is a glorious beacon of lightSparks333 is a glorious beacon of lightSparks333 is a glorious beacon of lightSparks333 is a glorious beacon of lightSparks333 is a glorious beacon of light
Send a message via AIM to Sparks333
Re: Compressor with Pressure Switch

I can't remember exactly (been a few years), but if memory serves the pressure switch is normally closed (NC), or is shorted when the pressure is lower than the threshold pressure. This implies that the DIO port controlling the compressor is set up so that when it sees a logic high, it turns the compressor on - since the DIO ports have internal pullups, disconnecting the pressure sensor would be the same thing as saying the pressure switch is in its open state. My guess is that the controller needs to be inverted, so a logic low on DIO 1 corresponds to compressor on - the sensor definitely needs to be hooked between ground and signal - check the markings on the sensor itself for more info.

As to why the compressor works when you plug it into the DIO port - the Spike relays don't use the PWM pinout schemes like the Vics do (namely, ground, +5, signal). The ground pin is still ground, but the other two pins are supposed to be signal, and by changing them around you can get one of 4 states (2 of them are 'off'). Plugging a Spike into a Digital IO (which would have the same pinout as a PWM pin) would hook one signal line into +5 and one signal line into the digital output, which, assuming the DIO port was driven low, corresponds to an 'on' state. It would then turn off if the DIO line was pulled high. It's nifty, but as slijin points out, really shouldn't be used in this manner.

If that doesn't solve your problem, check your pressure sensor with a voltmeter - make sure that when it's shorting when it should be shorting and opening when it should be opening. If you play your cards right, shorting should correspond to a DIO logic 0, and opening should correspond to a DIO logic 1. If it doesn't work like that, you might have a bum sensor.

Sparks
__________________
ICs do weird things when voltage is run out of spec.

I love to take things apart. The fact that they work better when I put them back together it just a bonus.

http://www.ravenblack.net/random/surreal.html