Go to Post I encourage the communication of constructive ideas on how to make FIRST a better program. - meaubry [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 06-11-2015, 17:09
mschwab013's Avatar
mschwab013 mschwab013 is offline
Registered User
AKA: Matt Schwabenbauer
FRC #0291
Team Role: College Student
 
Join Date: Jan 2012
Rookie Year: 2008
Location: Erie, PA
Posts: 87
mschwab013 is a name known to allmschwab013 is a name known to allmschwab013 is a name known to allmschwab013 is a name known to allmschwab013 is a name known to allmschwab013 is a name known to all
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);
}
Note: This is just the code pertaining to the compressor in teleop and not the entire program
__________________


2013 Pittsburgh- Gracious Professionalism award, 7th seed, 6th alliance captian, quarter-finalist(291,3492,4601)
2013 Queen CIty- Chairman's Award, 39th seed
2012 Pittsburgh- 23rd seed
2012 Buckeye- 34th seed, 2nd alliance, quarter-finalist(291,1241,4085)
2011 Pittsburgh- 13th seed, 5th alliance, quarter-finalist(291,337,3504)
2011 Buckeye- 18th seed, 8th alliance, quarter-finalist(279,291,3496)
2010 Finger Lakes- 15th seed, 5th alliance, quarter-finalist(291,1507,1559)
2010 Buckeye- Chairman's Award, Imagery Award, Quality Award, 4th seed, 1st pick, 1st alliance, semi-finalist(291,1014,1629)
  #2   Spotlight this post!  
Unread 06-11-2015, 23:50
cbale2000's Avatar
cbale2000 cbale2000 is offline
Registered User
AKA: Chris Bale
FRC #5712 (Gray Matter)
Team Role: Mentor
 
Join Date: Apr 2006
Rookie Year: 2004
Location: Saginaw, MI
Posts: 947
cbale2000 has a reputation beyond reputecbale2000 has a reputation beyond reputecbale2000 has a reputation beyond reputecbale2000 has a reputation beyond reputecbale2000 has a reputation beyond reputecbale2000 has a reputation beyond reputecbale2000 has a reputation beyond reputecbale2000 has a reputation beyond reputecbale2000 has a reputation beyond reputecbale2000 has a reputation beyond reputecbale2000 has a reputation beyond repute
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 : 07-11-2015 at 00:00.
  #3   Spotlight this post!  
Unread 07-11-2015, 00:04
mschwab013's Avatar
mschwab013 mschwab013 is offline
Registered User
AKA: Matt Schwabenbauer
FRC #0291
Team Role: College Student
 
Join Date: Jan 2012
Rookie Year: 2008
Location: Erie, PA
Posts: 87
mschwab013 is a name known to allmschwab013 is a name known to allmschwab013 is a name known to allmschwab013 is a name known to allmschwab013 is a name known to allmschwab013 is a name known to all
Re: Alternating Compressors

Quote:
Originally Posted by cbale2000 View Post
Why not just use a compressor that's rated for continuous duty instead?
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.
__________________


2013 Pittsburgh- Gracious Professionalism award, 7th seed, 6th alliance captian, quarter-finalist(291,3492,4601)
2013 Queen CIty- Chairman's Award, 39th seed
2012 Pittsburgh- 23rd seed
2012 Buckeye- 34th seed, 2nd alliance, quarter-finalist(291,1241,4085)
2011 Pittsburgh- 13th seed, 5th alliance, quarter-finalist(291,337,3504)
2011 Buckeye- 18th seed, 8th alliance, quarter-finalist(279,291,3496)
2010 Finger Lakes- 15th seed, 5th alliance, quarter-finalist(291,1507,1559)
2010 Buckeye- Chairman's Award, Imagery Award, Quality Award, 4th seed, 1st pick, 1st alliance, semi-finalist(291,1014,1629)
  #4   Spotlight this post!  
Unread 07-11-2015, 00:15
Jon Stratis's Avatar
Jon Stratis Jon Stratis is offline
Electrical/Programming Mentor
FRC #2177 (The Robettes)
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2006
Location: Minnesota
Posts: 3,784
Jon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond repute
Re: Alternating Compressors

Quote:
Originally Posted by mschwab013 View Post
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.
As a fun exercise for your students, have them do some calculations - how much air per shot is required, what is the anticipated shooting rate, and thus the required airflow to achieve that rate. Then have them do some research to see if there are better options out there, like one of the season-legal continuous duty compressors, or even a larger compressor that wouldn't be legal during the season. For an anticipated operating period, how much battery would be used, and is that a problem? If it is, how much air storage would you need to generate on a different battery before starting the event in order to keep the battery during the event functional?

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
__________________
2007 - Present: Mentor, 2177 The Robettes
LRI: North Star 2012-2016; Lake Superior 2013-2014; MN State Tournament 2013-2014, 2016; Galileo 2016; Iowa 2017
2015: North Star Regional Volunteer of the Year
2016: Lake Superior WFFA
  #5   Spotlight this post!  
Unread 07-11-2015, 09:49
MrForbes's Avatar
MrForbes MrForbes is offline
Registered User
AKA: Jim
FRC #1726 (N.E.R.D.S.)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2006
Location: Sierra Vista AZ
Posts: 6,008
MrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond repute
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   Spotlight this post!  
Unread 07-11-2015, 10:06
Ari423's Avatar
Happy Birthday! Ari423 Ari423 is offline
LabVIEW aficionado and robot addict
AKA: The guy with the yellow hat
FRC #5987 (Galaxia)
Team Role: Mentor
 
Join Date: Mar 2015
Rookie Year: 2012
Location: Haifa, Israel
Posts: 617
Ari423 has much to be proud ofAri423 has much to be proud ofAri423 has much to be proud ofAri423 has much to be proud ofAri423 has much to be proud ofAri423 has much to be proud ofAri423 has much to be proud ofAri423 has much to be proud ofAri423 has much to be proud of
Re: Alternating Compressors

Quote:
Originally Posted by MrForbes View Post
of course just putting a small fan so it blows on the compressor would solve the problem....
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.
__________________
2017-present: Mentor FRC 5987
2017-present: CSA for FIRST in Israel
2012-2016: Member FRC 423
2013: Programmer
2014: Head Programmer, Wiring
2015: Head Programmer, Wiring
2016: Captain, Head Programmer, Wiring, Manipulator, Chassis, CAD, Business, Outreach (basically everything)


  #7   Spotlight this post!  
Unread 08-11-2015, 21:36
Tangert's Avatar
Tangert Tangert is offline
Registered User
FRC #4467 (Titanium Titans)
Team Role: Coach
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Pennsylvania
Posts: 14
Tangert is an unknown quantity at this point
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   Spotlight this post!  
Unread 09-11-2015, 00:04
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,650
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: Alternating Compressors

Quote:
Originally Posted by Tangert View Post
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.
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..
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.
  #9   Spotlight this post!  
Unread 09-11-2015, 00:48
BJT's Avatar
BJT BJT is offline
uh, should that be smoking?
AKA: Ben Thorsgard
FRC #0876 (Thunder Robotics)
Team Role: Mentor
 
Join Date: Mar 2007
Rookie Year: 2005
Location: Northwood ND
Posts: 250
BJT has a reputation beyond reputeBJT has a reputation beyond reputeBJT has a reputation beyond reputeBJT has a reputation beyond reputeBJT has a reputation beyond reputeBJT has a reputation beyond reputeBJT has a reputation beyond reputeBJT has a reputation beyond reputeBJT has a reputation beyond reputeBJT has a reputation beyond reputeBJT has a reputation beyond repute
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.
__________________


2016 Central Illinois Winner. Curie Division finalist
  #10   Spotlight this post!  
Unread 09-11-2015, 11:47
mschwab013's Avatar
mschwab013 mschwab013 is offline
Registered User
AKA: Matt Schwabenbauer
FRC #0291
Team Role: College Student
 
Join Date: Jan 2012
Rookie Year: 2008
Location: Erie, PA
Posts: 87
mschwab013 is a name known to allmschwab013 is a name known to allmschwab013 is a name known to allmschwab013 is a name known to allmschwab013 is a name known to allmschwab013 is a name known to all
Re: Alternating Compressors

Quote:
Originally Posted by Tangert View Post
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.
We will probably do something like that next off-season.

Quote:
Originally Posted by BJT View Post
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.
We have the option to run them both, but they overheat pretty fast. So alternating helps keep the temperature down. Fans will also be added sometime this week.

Thanks for the suggestions everyone!
__________________


2013 Pittsburgh- Gracious Professionalism award, 7th seed, 6th alliance captian, quarter-finalist(291,3492,4601)
2013 Queen CIty- Chairman's Award, 39th seed
2012 Pittsburgh- 23rd seed
2012 Buckeye- 34th seed, 2nd alliance, quarter-finalist(291,1241,4085)
2011 Pittsburgh- 13th seed, 5th alliance, quarter-finalist(291,337,3504)
2011 Buckeye- 18th seed, 8th alliance, quarter-finalist(279,291,3496)
2010 Finger Lakes- 15th seed, 5th alliance, quarter-finalist(291,1507,1559)
2010 Buckeye- Chairman's Award, Imagery Award, Quality Award, 4th seed, 1st pick, 1st alliance, semi-finalist(291,1014,1629)
  #11   Spotlight this post!  
Unread 09-11-2015, 15:12
MrForbes's Avatar
MrForbes MrForbes is offline
Registered User
AKA: Jim
FRC #1726 (N.E.R.D.S.)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2006
Location: Sierra Vista AZ
Posts: 6,008
MrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond repute
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   Spotlight this post!  
Unread 09-11-2015, 21:29
mschwab013's Avatar
mschwab013 mschwab013 is offline
Registered User
AKA: Matt Schwabenbauer
FRC #0291
Team Role: College Student
 
Join Date: Jan 2012
Rookie Year: 2008
Location: Erie, PA
Posts: 87
mschwab013 is a name known to allmschwab013 is a name known to allmschwab013 is a name known to allmschwab013 is a name known to allmschwab013 is a name known to allmschwab013 is a name known to all
Re: Alternating Compressors

Quote:
Originally Posted by MrForbes View Post
Adding a little fan to one of those little compressors does amazing things...try it first....may be all you need.
That did do amazing things. We added a fan to each compressor and they stay perfectly cool.
__________________


2013 Pittsburgh- Gracious Professionalism award, 7th seed, 6th alliance captian, quarter-finalist(291,3492,4601)
2013 Queen CIty- Chairman's Award, 39th seed
2012 Pittsburgh- 23rd seed
2012 Buckeye- 34th seed, 2nd alliance, quarter-finalist(291,1241,4085)
2011 Pittsburgh- 13th seed, 5th alliance, quarter-finalist(291,337,3504)
2011 Buckeye- 18th seed, 8th alliance, quarter-finalist(279,291,3496)
2010 Finger Lakes- 15th seed, 5th alliance, quarter-finalist(291,1507,1559)
2010 Buckeye- Chairman's Award, Imagery Award, Quality Award, 4th seed, 1st pick, 1st alliance, semi-finalist(291,1014,1629)
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 03:15.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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