Go to Post (The wheels) need to be green anodized, and then assembled with yellow anodized spinners. ... and then, on the spinners, you can etch "JVN is a dweeb". That would be cool. - Andy Baker [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 15-02-2008, 07:21
programmr's Avatar
programmr programmr is offline
Registered User
AKA: Face
FRC #0522
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Staten Island, NY
Posts: 83
programmr is a jewel in the roughprogrammr is a jewel in the roughprogrammr is a jewel in the rough
Send a message via AIM to programmr
Exclamation COMPRESSOR & PRESSURE SWITCH HELP...

Does anyone know how to program in mplab the compressor and pressure switch, compressor at relay7_fwd and the pressure switch connected at rc_dig_in02??? I need the compressor to go on and then stop once it has reached its max pressure. SOMEONE PLEASE HELP ME!!!!
  #2   Spotlight this post!  
Unread 15-02-2008, 08:27
SuperBK's Avatar
SuperBK SuperBK is offline
Registered User
AKA: BrianK
FRC #1225 (Amperage Robotics)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Henersonville, NC
Posts: 358
SuperBK is just really niceSuperBK is just really niceSuperBK is just really niceSuperBK is just really nice
Re: COMPRESSOR & PRESSURE SWITCH HELP...

One line of code:

/* Power pump only if pressure switch is off. */
relay7_fwd = !rc_dig_in02;


Put it in both the teleop code (usually Default_Routine) in in autonomous if you are doing autonomous (in User_Autonomous_Code())

Brian
__________________
Brian K
Team 1225 Robotics Mentor

Last edited by SuperBK : 15-02-2008 at 08:29.
  #3   Spotlight this post!  
Unread 15-02-2008, 08:29
Racer26 Racer26 is offline
Registered User
no team
Team Role: Alumni
 
Join Date: Apr 2003
Rookie Year: 2003
Location: Beaverton, ON
Posts: 2,229
Racer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond repute
Re: COMPRESSOR & PRESSURE SWITCH HELP...

The Nason pressure switch is a normally closed switch, which means it will normally pull your digital input to 0, except once it reaches 120psi, it will switch to 1. All you do to run the compressor knowing that, is set whichever relay you have it connected to, to the opposite of the input.

In your case, I believe this is:

Code:
 relay7_fwd = !rc_dig_in02;
  #4   Spotlight this post!  
Unread 15-02-2008, 09:29
programmr's Avatar
programmr programmr is offline
Registered User
AKA: Face
FRC #0522
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Staten Island, NY
Posts: 83
programmr is a jewel in the roughprogrammr is a jewel in the roughprogrammr is a jewel in the rough
Send a message via AIM to programmr
Exclamation Re: COMPRESSOR & PRESSURE SWITCH HELP...

still nothing someone please help
  #5   Spotlight this post!  
Unread 15-02-2008, 09:30
Team 135 Team 135 is offline
Registered User
FRC #0135 (Penn Robotics)
 
Join Date: Jan 2008
Rookie Year: 1998
Location: Mishawaka, Indiana
Posts: 139
Team 135 will become famous soon enough
Re: COMPRESSOR & PRESSURE SWITCH HELP...

We used the digital input #7 to do our because of the different way that the digital IOs work. You should look at a wiring diagram of the digital IOs and determine witch is best for you.
  #6   Spotlight this post!  
Unread 15-02-2008, 10:48
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,919
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: COMPRESSOR & PRESSURE SWITCH HELP...

Add
Code:
relay7_rev = 0;
to the previous answers.

These answers assume you are using MPLAB w/IFI or Watson default code.
What are you using?

Tell us what is happening.

--Is the compressor turning on, but not off?
--What color is the compressor Spike light?
--Is your pressure switch wired with only the ground and signal lines (black & white usually), NOT the red wire?
--Is the Spike fuse replaced with a 20a snap-action breaker?
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #7   Spotlight this post!  
Unread 15-02-2008, 10:50
Jon Stratis's Avatar
Jon Stratis Jon Stratis is offline
Mentor, LRI, MN RPC
FRC #2177 (The Robettes)
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2006
Location: Minnesota
Posts: 3,838
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: COMPRESSOR & PRESSURE SWITCH HELP...

Quote:
Originally Posted by programmr View Post
still nothing someone please help
First a clarification question - do you have the compressor hooked up through a spike to relay 7?

Next, check a few things:
- does your compressor run if you hook it up straight to the 12V battery?
- Can you get the compressor to run through the system (ignoring the pressure switch for right now)? Just set relay7_fwd = 1; and see if it turns it on (make sure the hoses are disconnected so you don't blow something up)
- Can you get a reading from the pressure switch? throw in a printf("pressure switch = %d\r\n", rc_dig_in02); somewhere, hook up the hoses, and manually control the compressor to see it run through the full range 0-120psi and back down. Watch the input from the pressure switch on the terminal window, and see how it changes as the pressure changes.

Assuming all of that works out, you should be able to see pretty clearly how to wire in the pressure switch to turn on/off the compressor.
  #8   Spotlight this post!  
Unread 15-02-2008, 12:24
Racer26 Racer26 is offline
Registered User
no team
Team Role: Alumni
 
Join Date: Apr 2003
Rookie Year: 2003
Location: Beaverton, ON
Posts: 2,229
Racer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond repute
Re: COMPRESSOR & PRESSURE SWITCH HELP...

The code that has been given by myself and others WILL work. So if that code has been flashed into your robot, you must make sure that your compressor is working, and that the pwm cables and spikes and everything are set up properly. There is some point in the system that is not working, and its not the code.
  #9   Spotlight this post!  
Unread 15-02-2008, 12:33
eugenebrooks eugenebrooks is offline
Team Role: Engineer
AKA: Dr. Brooks
no team (WRRF)
 
Join Date: Jan 2004
Rookie Year: 2001
Location: Livermore, CA
Posts: 601
eugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond repute
Re: COMPRESSOR & PRESSURE SWITCH HELP...

The connection between the male PWM cable and the
socket in the spike is a frequent source of problems.
If you have inspected the code and find it to be in proper
order, you can try another spike and/or pwm cable. You
should also carefully check that the pwm cable is seating
all the way into the socket on the spike.

Eugene
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Programing the compressor and pressure switch in easy C Mr Monte 83 Programming 1 30-01-2008 15:39
[OCCRA]: Problem with the compressor, pressure switch, or Bosch relay. BrittanyV OCCRA 3 16-10-2006 15:42
Urgent need for Nason pressure switch!! PLEASE HELP! haverfordfords Pneumatics 12 18-02-2005 02:04
HELP US PLEASE?!?!(pressure switch code) kingpin3787 General Forum 1 21-02-2004 15:13
NEED HELP with Delay loop for compressor relay switch archiver 2001 10 24-06-2002 02:11


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

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