Go to Post Honestly, no one at a FIRST competition is gonna judge you. Chances are, there are least 20 people dorkier than you. - JohnnyB [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 12-02-2007, 13:58
3dude_2231's Avatar
3dude_2231 3dude_2231 is offline
no one messes with a Thingy =|
AKA: Menscher,Ran Menscher =]
FRC #2231 (Onyxtronix)
Team Role: Leadership
 
Join Date: Feb 2007
Rookie Year: 2007
Location: Shoham, Israel
Posts: 233
3dude_2231 is a jewel in the rough3dude_2231 is a jewel in the rough3dude_2231 is a jewel in the rough
Send a message via MSN to 3dude_2231
Spikes

since I couldn't find it,

Until an hour ago I was pretty sure spikes are used like the victors,
and that they were connected to the PWMs.


well, now that I know it's not,
how do I control the spikes (reverse,stop and forward) from the code?
  #2   Spotlight this post!  
Unread 12-02-2007, 14:20
TubaMorg TubaMorg is offline
Programmermechanicalelect ricalcoach
AKA: Dan
FRC #1480 (Robatos Locos)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Houston
Posts: 450
TubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond repute
Re: Spikes

Helpful posting tip:
When you ask a question on ChiefDelphi, you should pretend like no one has any idea what you are talking about, then explain your problem from there.

In this case, you are asking about Spike relays. You do use PWM cables to connect them to the RC, but at the Relay bus rather than the PWM bus. As far as telling them what to do via software, what code are you using? MPLAB version? EasyC? What are you trying to control with the Spike?
  #3   Spotlight this post!  
Unread 12-02-2007, 14:48
Travis Hoffman's Avatar Unsung FIRST Hero
Travis Hoffman Travis Hoffman is offline
O-H
FRC #0048 (Delphi E.L.I.T.E.)
Team Role: Engineer
 
Join Date: Sep 2001
Rookie Year: 2001
Location: Warren, Ohio USA
Posts: 4,047
Travis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond repute
Re: Spikes

Someone more familiar with current pneumatics rules, please chime in here if I am mistaken anywhere in this post.

This is how you control relays in MPLAB. I am unfamiliar with the EasyC method, but I am sure it is "Easy".

The following assumes you attach a standard PWM cable between Relay Output 1 on the Robot Controller and the PWM port on one of your Spike relay modules. Be sure to follow the color code labels for a proper connection.

**********************************************

Assume you have a motor connected to the Spike. Red wire on the M+ terminal, Black wire on M-. The relay1_fwd variable controls voltage on the M+ terminal, while relay1_rev controls voltage on the M- terminal.

//Full Voltage Forward
relay1_fwd = 1; //+12V on M+
relay1_rev = 0 ; //0V on M-

//Full Voltage Reverse
relay1_fwd = 0; //0V on M+
relay1_rev = 1; //+12V on M-

//Motor stop
relay1_fwd = 0;
relay1_rev = 0;

//Do Not Use This State
relay1_fwd = 1;
relay1_rev = 1;

*****************************************

Now assume you have the air pump connected to the Spike. Red wire on M+, Black wire on M-. The relay1_fwd variable controls voltage on the M+ terminal, while relay1_rev controls voltage on the M- terminal.

//Always true for safe and correct pump operation
relay1_rev = 0;

//Pump On
relay1_fwd = 1; //+12V on M+

//Pump Off
relay1_fwd = 0; //0V on M+

*************************************************

The following two examples assume you are still allowed to control 2 different solenoid valve outputs with a single Spike. I assume this is still legal, even though I can't find the explicit wiring diagram in the rules like they used to provide back in the day (when 48 last used pneumatics on our robot).

Assume you have a double solenoid valve connected to the Spike. The Red wire for one of the valve's solenoids is on M+, the red wire for the other solenoid is on M-. The black ground wires for both solenoids are sent to a convenient and legal ground point in the robot's electrical system. The relay1_fwd variable controls voltage on the M+ terminal, while relay1_rev controls voltage on the M- terminal.

//State 1 - Shift cylinder controlled by double solenoid valve to one extent
relay1_fwd = 1; //+12V on M+
relay1_rev = 0 ; //0V on M-

//State 2 - Shift cylinder to opposite extent
relay1_fwd = 0; //0V on M+
relay1_rev = 1; //+12V on M-

//State 3 - Do nothing (cylinder holds current position)
relay1_fwd = 0;
relay1_rev = 0;

//State 4 - Do Not Use This State - Unpredictable behavior
relay1_fwd = 1;
relay1_rev = 1;

Typically, I think you'd want your relay to either be in State 1 or 2. Is there ever a reason to use State 3?

***********************************************

Finally, assume you have two independent single solenoid valves connected to the Spike. The Red wire for one of the valves is on M+, while the red wire for the other valve is on M-. The black ground wires for both valves are sent to a convenient and legal ground point in the robot's electrical system. The relay1_fwd variable controls voltage on the M+ terminal, while relay1_rev controls voltage on the M- terminal.

In this situation, you can treat each valve and variable independently from the other. Since there are independent devices connected to each of the Spike output terminals, there is no link between the state of the "fwd" variable and the "rev" variable.

//Shift cylinder controlled by M+ valve to one extent
relay1_fwd = 1;

//Shift cylinder controlled by M+ valve to opposite extent
relay1_fwd = 0;

//Shift cylinder controlled by M- valve to one extent
relay1_rev = 1;

//Shift cylinder controlled by M- valve to opposite extent
relay1_rev = 0;

When the robot is disabled at the end of the match, cylinders controlled by single solenoid valves will be forced to shift to their "relay1_xxx = 0" states. Make sure you plumb your cylinders so the "= 0" state is the one you want the cylinder to be in after the match is over.


You can also wire your pneumatic valves similar to the "air pump method" mentioned above. You'd have to devote 2 Spikes to controlling a double solenoid valve and 1 entire Spike to controlling a single solenoid valve (instead of getting 2 single solenoid valves on one Spike as described above), but why would you want to waste money, space, and weight on that? I would hope "because it's in the rules now" is not a forthcoming answer to that question.....
__________________

Travis Hoffman, Enginerd, FRC Team 48 Delphi E.L.I.T.E.
Encouraging Learning in Technology and Engineering - www.delphielite.com
NEOFRA - Northeast Ohio FIRST Robotics Alliance - www.neofra.com
NEOFRA / Delphi E.L.I.T.E. FLL Regional Partner

Last edited by Travis Hoffman : 12-02-2007 at 14:57.
  #4   Spotlight this post!  
Unread 12-02-2007, 16:53
3dude_2231's Avatar
3dude_2231 3dude_2231 is offline
no one messes with a Thingy =|
AKA: Menscher,Ran Menscher =]
FRC #2231 (Onyxtronix)
Team Role: Leadership
 
Join Date: Feb 2007
Rookie Year: 2007
Location: Shoham, Israel
Posts: 233
3dude_2231 is a jewel in the rough3dude_2231 is a jewel in the rough3dude_2231 is a jewel in the rough
Send a message via MSN to 3dude_2231
Re: Spikes

thanks
got it.
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
Spikes macwhoo Electrical 5 16-01-2007 19:31
Programming Spikes X-Istence Programming 3 17-02-2006 14:53
Spikes Denman Control System 17 16-11-2004 07:51
Spikes? st28 Programming 2 24-02-2004 11:36
Spikes with Motors GregTheGreat Electrical 22 11-11-2003 10:25


All times are GMT -5. The time now is 02:54.

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