|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Alternating Compressors
This past week Team 291 was finishing up the off-season t-shirt cannon we had been working on. We quickly realized that we would need to add a second compressor to avoid overheating. We wanted to be able to alternate between the compressors in order to give each a break.
This is the code that I wrote to allow us to alternate between the 2 compressors. It's in C++ and being used with an old cRio. We thought this was a really neat idea so I figured I would share it here. As you might have guessed 'comp1' and 'comp2' are the compressors. 'di1' is the pressure switch. A button on the controller was added to allow for a manual override so we could run both at once if needed. We haven't had any issues yet but suggestions for improvements are always appreciated. Code:
int toggle_comp=1;
bool comp_previous=0;
bool button1=0;
button1 = stick->GetRawButton(1);
if(di1->Get()==1 && comp_previous==0)
{
comp1->Set(comp1->kOff);
comp2->Set(comp2->kOff);
toggle_comp++;
comp_previous=1;
}
else if(di1->Get()==1 && comp_previous==1)
{
comp1->Set(comp1->kOff);
comp2->Set(comp2->kOff);
}
else if(di1->Get()==0 && comp_previous==1)
{
comp_previous=0;
}
if(di1->Get()==0 && toggle_comp%2==0 && button1==0)
{
comp1->Set(comp1->kOff);
comp2->Set(comp2->kOn);
}
else if (di1->Get()==0 && toggle_comp%2!=0 && button1==0)
{
comp1->Set(comp1->kOn);
comp2->Set(comp2->kOff);
}
else if (di1->Get()==0 && button1==1)
{
comp1->Set(comp1->kOn);
comp2->Set(comp2->kOn);
}
|
|
#2
|
||||
|
||||
|
Re: Alternating Compressors
Why not just use a compressor that's rated for continuous duty instead?
IMO, the KoP/FIRSTChoice compressors are not a great solution for a T-shirt cannon anyways. I designed a T-Shirt cannon that used 2 Vlair 450c compressors running off of their own battery, and even that seemed like it would be under-powered. Last edited by cbale2000 : 11-07-2015 at 12:00 AM. |
|
#3
|
||||
|
||||
|
Re: Alternating Compressors
This is mostly just intended as an off-season project to get more students interested. It won't be seeing heavy use so we wanted to build it using only parts we already had. Thanks for the suggestion though! We might look into making it more heavy duty in the future.
|
|
#4
|
||||
|
||||
|
Re: Alternating Compressors
Quote:
There's a lot of room in these types of projects to dive into some of the math involved... Something that teams may do during the season with their robot, or they may just wing it, using their experience to get something "close enough" without bothering with all the math. But now's the time to teach them how to analyze the problem from multiple angles to find the best solution ![]() |
|
#5
|
|||||
|
|||||
|
Re: Alternating Compressors
neat project!
of course just putting a small fan so it blows on the compressor would solve the problem.... Engineering is fun! |
|
#6
|
||||
|
||||
|
Re: Alternating Compressors
According to everything that I've read, a non-continuous duty compressor will produce less air over time, even if it is well cooled. They simply aren't made to be run for long periods of time. Maybe with sufficient cooling you can prolong that time to longer than 5 minutes.
|
|
#7
|
||||
|
||||
|
Use an scba tank or a nitrogen tank hooked into a regulator that has an inlet pressure rating of 4k and an outlet rating of 150-400 psi. Can go a whole football game on 1 battery and 1 tank.
|
|
#8
|
|||||
|
|||||
|
Re: Alternating Compressors
We've done at least two football games on a scuba tank, with a fresh battery for each game. The standard scuba regulator produces about 150 psi, and we used a stock FRC regulator to charge our cast iron accumulator tank to 50-60 psi. We then used 1"+ plumbing and a 3/4" solenoid valve (way beyond FRC legal in volume, though not pressure) to feed into our launcher. With 60 psi and 50 ms of "solenoid open" time, we have tossed t-shirts and foam mnii-footballs over our press box onto Ninth Street. To date, we have run 40-50psi during games, keeping a 50ms "valve open" time, to get most of our shirts and footballs to land somewhere in the stands..
|
|
#9
|
||||
|
||||
|
Re: Alternating Compressors
You have two compressors, just run them both at the same time. Would that not do the trick and be simple?
And fans, fans are good. |
|
#10
|
||||
|
||||
|
Re: Alternating Compressors
Quote:
Quote:
Thanks for the suggestions everyone! |
|
#11
|
|||||
|
|||||
|
Re: Alternating Compressors
Adding a little fan to one of those little compressors does amazing things...try it first....may be all you need.
|
|
#12
|
||||
|
||||
|
Re: Alternating Compressors
That did do amazing things. We added a fan to each compressor and they stay perfectly cool.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|