Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Technical Discussion (http://www.chiefdelphi.com/forums/forumdisplay.php?f=22)
-   -   How do you code the compressor? (http://www.chiefdelphi.com/forums/showthread.php?t=82032)

Jessi-Team 2156 06-02-2010 14:40

How do you code the compressor?
 
please help!

Michael DiRamio 06-02-2010 14:47

Re: How do you code the compressor?
 
What programming language are you using?

ericand 10-02-2010 11:27

Re: How do you code the compressor?
 
The C++ compressor class works well. You just need to tell it the digital I/O pin that you read the pressure switch from and which relay to turn on/off to charge the system when needed.

This class is a standard part of the WPI lib and is covered in the WPI documentation.

joek 10-02-2010 18:20

Re: How do you code the compressor?
 
why don't they make it a closed, automatic system within the compressor? it would make thing much easier, and save cRio processor power, and eliminate the need to program the compressor, and probably make inspection easier for FIRST volunteers.

Numbers 11-02-2010 11:01

Re: How do you code the compressor?
 
Quote:

Originally Posted by joek (Post 917411)
why don't they make it a closed, automatic system within the compressor? it would make thing much easier, and save cRio processor power, and eliminate the need to program the compressor, and probably make inspection easier for FIRST volunteers.

You mean we can't do that?

Currently, we just have our analog pressure switch wired to battery terminals and a spike relay to automatically turn on the compressor with no programming.

Racer26 11-02-2010 11:13

Re: How do you code the compressor?
 
No, you cant. The sensor is not allowed to directly affect power pathways between the Spike and the compressor.

You must wire the sensor to a digital input, and use that input in your code to switch the compressor on and off.

I've always thought this was silly too, but maybe there's a reason for it.

Ether 11-02-2010 11:49

Re: How do you code the compressor?
 
Quote:

Originally Posted by Numbers (Post 917899)
You mean we can't do that?

Currently, we just have our analog pressure switch wired to battery terminals and a spike relay to automatically turn on the compressor with no programming.

What you describe is forbidden by Rule <R78>:

<R78> The Nason pressure switch must be connected to the high-pressure side of the pneumatic circuit (i.e. prior to the pressure regulator) to sense the “stored” pressure of the circuit. The two wires from the pressure switch must be connected directly to a digital input and ground port on the Digital Sidecar, and the cRIO-FRC must be programmed to sense the state of the switch and operate the relay module that powers the compressor to prevent over-pressuring the system.

I don't know why your approach is not allowed. Perhaps someone with further insight could shed some light.


~

Alan Anderson 11-02-2010 12:11

Re: How do you code the compressor?
 
Taking the cRIO out of the loop removes the ability to turn off the compressor when the robot is disabled.

<R78> is clear and unambiguous.

Racer26 11-02-2010 12:26

Re: How do you code the compressor?
 
I'm not suggesting to take the cRIO out of the loop, but why is it forbidden to have cRIO->Spike->Pressure Switch (its NC, so this works)->Compressor.

In 2003 this is how we wired it till we got to competition and told to change.

I don't understand why this configuration has always been disallowed... Its functionally identical, and there is no possibility for code to screw up.

Alan Anderson 11-02-2010 12:38

Re: How do you code the compressor?
 
Quote:

Originally Posted by 1075guy (Post 917958)
I'm not suggesting to take the cRIO out of the loop, but why is it forbidden to have cRIO->Spike->Pressure Switch (its NC, so this works)->Compressor.

The Nason pressure switch is rated for only 5 amps, nowhere near the current required by the compressor.

Ether 11-02-2010 12:41

Re: How do you code the compressor?
 
Quote:

Originally Posted by Alan Anderson (Post 917950)
Taking the cRIO out of the loop removes the ability to turn off the compressor when the robot is disabled.

That sounds like a good reason. The only downside might be that the prevention of over-pressurization, which is the clearly stated intent of the Rule, is made less robust by including so many more components in the loop.

Of course, one might argue that the pressure-relief valve mitigates this concern. Unless, of course, the "factory pre-calibrated" pressure relief valve is in fact not properly calibrated as-received (as some teams have discovered).

With Alan's clarification of the likely intent of the rule, it certainly seems like a good rule, all things considered.


Quote:

<R78> is clear and unambiguous.
The rule is completely clear and unambiguous as to what is required.


~

Racer26 11-02-2010 13:01

Re: How do you code the compressor?
 
Quote:

Originally Posted by Alan Anderson (Post 917966)
The Nason pressure switch is rated for only 5 amps, nowhere near the current required by the compressor.

That makes sense. Interesting that it worked for us though... guess it would dramatically shorten the lifespan of the switch / leave you open to risks of the switch welding itself or something.

I've seen things like that happen before. On my race car I have a switch on the radiator fans. The switch is rated for 10A (the biggest switch I could find without going online to a specialty supplier), and the fans pull 20-40A. Switch works, but on 2 instances has ceased to function. I thought about replacing it with an old automotive relay or something, but never got around to it. We hadn't realized what happened at first until I thought of the current draw of the motors, and the rating on the switch.

Omar 11-02-2010 13:35

Re: How do you code the compressor?
 
It's a SAFTY issue.

When the field control system shuts down the competition, it will shut down everything including the compressor
When the robot is disabled, all OUTPUTS are disabled including the compressor.

Don’t want a compressor kicking on and pressurizing a line and possible kicking unexpectedly>

Omar

Racer26 11-02-2010 15:14

Re: How do you code the compressor?
 
Omar, with the system I described, FMS will still be able to shut it down, it just takes the cRIO out of the Overpressure-ShutDown condition.

Alan's answer about the 5A rating on the NASON switch was the part I didn't know about, and now it all makes sense to me.


All times are GMT -5. The time now is 14:44.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi