OCCRA
Go to Post If only all this food for thought happening in this thread could somehow be funneled into solving world hunger... - artdutra04 [more]
Home
Go Back   Chief Delphi > Technical > Pneumatics
CD-Events   CD-Media   CD-Spy   FRC-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 02-24-2004, 04:28 PM
Jared Stofflett Jared Stofflett is offline
Registered User
#0123
 
Join Date: Nov 2003
Location: Hamtramck
Posts: 10
Jared Stofflett is an unknown quantity at this point
Send a message via AIM to Jared Stofflett
pneumatics and joysticks

Here is my question. We have our robot set up to use one joystick driving, so the motors are wired to pwm13 and pwm15 My question is how would I wire and program a pair of pneumatics cylinders so that if the joystick is in the forward position both fire, if the joystick is in the left position one fires and another doesn't, and so on. My problem is I understand how to make motors move but don't understand how to make the cylinders fire based on joystick input. Also I don't know where I'd have to remap the joystick and where to put the code for the pneumatics. Appreciate any info on this.
  #2   Spotlight this post!  
Unread 02-24-2004, 04:57 PM
Greg Ross's Avatar
Greg Ross Greg Ross is offline
Grammar Curmudgeon
AKA: gwross
FRC #0330 (Beach 'Bots)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Hermosa Beach, CA
Posts: 2,244
Greg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond repute
Send a message via AIM to Greg Ross Send a message via Yahoo to Greg Ross
Re: pneumatics and joysticks

Quote:
Originally Posted by Jared Stofflett
Here is my question. We have our robot set up to use one joystick driving, so the motors are wired to pwm13 and pwm15 My question is how would I wire and program a pair of pneumatics cylinders so that if the joystick is in the forward position both fire, if the joystick is in the left position one fires and another doesn't, and so on. My problem is I understand how to make motors move but don't understand how to make the cylinders fire based on joystick input. Also I don't know where I'd have to remap the joystick and where to put the code for the pneumatics. Appreciate any info on this.
Code:
if (p3_y > 132) {
    relay1_fwd = 1;
    relay1_rev = 0;
    relay2_fwd = 1;
    relay2_rev = 0;
}
if (p3_x > 132) { 
    relay1_fwd = 1;
    relay1_rev = 0;
}
and so on. (And without a little more detail on your "and so on", I can't give you any more detail on mine. )




[edit]
Aww, what the heck. I'll give you a few more details for free.

1) This code could be added to Default_Routine() in user_routines.c. You would probably also want to remove any other code in Default_Routine() that has anything to do with these joystick axes and relays.

2) I don't know whether you are planning on ever having to retract the cylinders. You said you wanted to "fire" (extend?) two cylinders when the joystick is forward. If, for instance, you want to retract the same two cylinders when the joystick is pulled backwards, you will also need something like:
Code:
if (p3_y < 122) {
    relay1_fwd = 0;
    relay1_rev = 1;
    relay2_fwd = 0;
    relay2_rev = 1;
}
3) Notice that I'm testing for < 122 and > 132. This gives you a dead band in the middle, so that you don't get the cylinders firing spuriously (and/or furiously ) because the joystick is not perfectly centered.

4) The last time I checked (last year with the old OIs) the joystick X axis increases to the left, and decreases to the right. That is why I tested for p3_x > 132, and not less than 122.

[/edit]
__________________
Greg Ross (The Grammar Curmudgeon formerly known as gwross)
S/W Engineer, Team 330, the Beach 'Bots
<--The Grammar Curmudgeon loves this cartoon.
ôLife should not be a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming "Wow! What a Ride!" Hunter S. Thompson
"Playing a practical joke means doing something mean and calling it funny." Me

Last edited by Greg Ross : 02-24-2004 at 05:24 PM.
  #3   Spotlight this post!  
Unread 02-24-2004, 08:05 PM
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Itinerant Programmer
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: 7,354
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: pneumatics and joysticks

You sound like you're having too much fun with this.
__________________
Deduction is limited by knowledge, and knowledge is limited by preconceptions
358 Beta notes & results
  #4   Spotlight this post!  
Unread 02-24-2004, 10:56 PM
greencactus3 greencactus3 is offline
occra 23.
AKA: ryo
None #1481
Team Role: Alumni
 
Join Date: Feb 2004
Rookie Year: 2006
Location: North Farmington, MI
Posts: 1,523
greencactus3 is a name known to allgreencactus3 is a name known to allgreencactus3 is a name known to allgreencactus3 is a name known to allgreencactus3 is a name known to allgreencactus3 is a name known to all
Send a message via AIM to greencactus3 Send a message via MSN to greencactus3
Re: pneumatics and joysticks

we want to extend two cylinders when we push forward on the joystick,
both cylinders to retract when we pull back the joystick,
and one extend and the other retract when we pull the joystick to the side, and when we pull the joystick the otherway, we want the opposite (one extend and the other one retract)


well, anyways. the point of the question is...
we need to figure out how to use the analog part of the joystick to activate the spikes.

it'd really be nice if we could do it on the small 8(?) directional analogish button on the 'new' joysticks. the kit ones
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 05:21 AM.

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


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