Go to Post Never Underestimate the power of zip ties! - tonyargote [more]
Home
Go Back   Chief Delphi > Competition > OCCRA
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 20-10-2010, 14:29
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
[OCCRA]: Spikes on Cortex

I noticed that someone asked (in the Q&A) how to connect a Spike to the Cortex. Since I cannot reply there, I will help them here (in the general forum):

What I did:
I took a standard PWM cable and cut the red wire. The SPIKE wants a gnd(black), sig(red), sig(white), where the first sig is REVERSE and the second is FORWARD. A Digital channel on the Cortex provides gnd(black), +5v(red), and sig(white). If you don't cut the red wire, then REVERSE will always be on and FORWARD will be determined by the digital output. If you connected a pneumatic valve to that, it would see 0v on the output and +12 on what should be it's ground, and would not work.

If you need two: You can connect the red wire of each valve to the M+ and M- terminals on the SPIKE (the one on m+ will be "forward", the one on m- will be "reverse"), and the blacks to the ground block. Connect the black on the spike to a black on the digital bus, and the red and white on the spike to two digital channels (you would probably have to cut at least 2 PWM cables and solder them together to achieve this, or make your own PWM cable.)


EDIT:
If you want to use the second joystick to control, you have 12 buttons to map to.
(you don't have to do this,this is what I did)
I used an enumerated type to determine mechanism state, and set that based on buttons.
(I had a stack of IF statements, each one set the state as appropriate)
I then had an array of motor speeds and another of piston positions for each state
Since the enum. maps names to integers, you can index the array with the state directly
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack

Last edited by apalrd : 20-10-2010 at 14:39. Reason: more detail
Reply With Quote
  #2   Spotlight this post!  
Unread 21-10-2010, 21:43
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: [OCCRA]: Spikes on Cortex

I found a *slight* problem with this solution:

The digital IO pins are controlled by the user processor, not the master. Thus, when in disabled, the user still has control of the outputs. Why is this bad? You can fire your pneumatics when disabled.

It's still the only way to do it (BTW, it MUST be on the digital section, since those are the only ones that can be used as outputs), so just check if you're enabled before setting the pin high.
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
Reply With Quote
  #3   Spotlight this post!  
Unread 01-11-2010, 20:39
marccenter's Avatar
marccenter marccenter is offline
Registered User
FRC #3548 (RoboRavens2)
Team Role: Coach
 
Join Date: Sep 2004
Rookie Year: 2004
Location: Royal Oak
Posts: 406
marccenter has a spectacular aura aboutmarccenter has a spectacular aura about
Re: [OCCRA]: Spikes on Cortex

Andrew,
I believe your answer is incomplete. As well as the required hardware modifications (you need 2 signals from a PWM wire, whereas normally we only get one), software modifications are necessary.
Forward must be implemented with one control signal being high and the other control signal being low. Vice-verse for reverse. Forward and reverse are relative terms, it depends on how you one hooks up the plus/minus motor leads and it's relationship to movement for your robot.
To summarize, both hardware and software modifications to the Cortex wiring and base program are required to make the spikes work as in the past with the IFI control systems.
__________________
Marc Center
FIRST FRC Mentor/Coach - Team 3548 Royal Oak RoboRavens#2 - on Sabbatical 2017 season
marc.center@gmail.com
Mobile: 248-255-7377
Reply With Quote
  #4   Spotlight this post!  
Unread 02-11-2010, 20:17
Mike Martus's Avatar Unsung FIRST Hero
Mike Martus Mike Martus is offline
Registered User
FRC #0051 (Wings of Fire)
Team Role: Coach
 
Join Date: May 2001
Rookie Year: 1996
Location: Pontiac Michigan
Posts: 1,187
Mike Martus has a reputation beyond reputeMike Martus has a reputation beyond reputeMike Martus has a reputation beyond reputeMike Martus has a reputation beyond reputeMike Martus has a reputation beyond reputeMike Martus has a reputation beyond reputeMike Martus has a reputation beyond reputeMike Martus has a reputation beyond reputeMike Martus has a reputation beyond reputeMike Martus has a reputation beyond reputeMike Martus has a reputation beyond repute
Re: [OCCRA]: Spikes on Cortex

BTW I will have "New" version of the Spike available for Saturday.

Wiring the same but higher reliability.
__________________
Mike Martus
Reply With Quote
  #5   Spotlight this post!  
Unread 03-11-2010, 11:09
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: [OCCRA]: Spikes on Cortex

What makes these new spikes more reliable?
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
Reply With Quote
  #6   Spotlight this post!  
Unread 05-11-2010, 15:10
Mike Martus's Avatar Unsung FIRST Hero
Mike Martus Mike Martus is offline
Registered User
FRC #0051 (Wings of Fire)
Team Role: Coach
 
Join Date: May 2001
Rookie Year: 1996
Location: Pontiac Michigan
Posts: 1,187
Mike Martus has a reputation beyond reputeMike Martus has a reputation beyond reputeMike Martus has a reputation beyond reputeMike Martus has a reputation beyond reputeMike Martus has a reputation beyond reputeMike Martus has a reputation beyond reputeMike Martus has a reputation beyond reputeMike Martus has a reputation beyond reputeMike Martus has a reputation beyond reputeMike Martus has a reputation beyond reputeMike Martus has a reputation beyond repute
Re: [OCCRA]: Spikes on Cortex

They are "New" and Improved. They were specifically designed to work with the new Cortex. I have a small supply for teams having issues with the older spikes only.
__________________
Mike Martus
Reply With Quote
  #7   Spotlight this post!  
Unread 05-11-2010, 16:40
marccenter's Avatar
marccenter marccenter is offline
Registered User
FRC #3548 (RoboRavens2)
Team Role: Coach
 
Join Date: Sep 2004
Rookie Year: 2004
Location: Royal Oak
Posts: 406
marccenter has a spectacular aura aboutmarccenter has a spectacular aura about
Smile Re: [OCCRA]: Spikes on Cortex

Mike,
What kind of changes did they make? How did they make it work using only one PWM cable, or did they use 2 PWM cables? Doesn't the Cortex software also have to be programmed?
__________________
Marc Center
FIRST FRC Mentor/Coach - Team 3548 Royal Oak RoboRavens#2 - on Sabbatical 2017 season
marc.center@gmail.com
Mobile: 248-255-7377
Reply With Quote
  #8   Spotlight this post!  
Unread 05-11-2010, 18:40
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: [OCCRA]: Spikes on Cortex

My *GUESS* is that is has a different optoisolator that runs at 3.3v minimum, instead of the current one that runs at 5v (But could work at 3.3v, just not perfectly). They might have also changed the pinout so it directly accepts two PWM cables, for two digital ports, or created a cable to map two digital outputs to a single Spike.
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
Reply With Quote
  #9   Spotlight this post!  
Unread 06-11-2010, 18:50
Mike Martus's Avatar Unsung FIRST Hero
Mike Martus Mike Martus is offline
Registered User
FRC #0051 (Wings of Fire)
Team Role: Coach
 
Join Date: May 2001
Rookie Year: 1996
Location: Pontiac Michigan
Posts: 1,187
Mike Martus has a reputation beyond reputeMike Martus has a reputation beyond reputeMike Martus has a reputation beyond reputeMike Martus has a reputation beyond reputeMike Martus has a reputation beyond reputeMike Martus has a reputation beyond reputeMike Martus has a reputation beyond reputeMike Martus has a reputation beyond reputeMike Martus has a reputation beyond reputeMike Martus has a reputation beyond reputeMike Martus has a reputation beyond repute
Re: [OCCRA]: Spikes on Cortex

The new spikes are wired and programmed the same, they are just more reliable.
__________________
Mike Martus
Reply With Quote
Reply


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
[OCCRA]: spikes and cortex bernieseaholm OCCRA Q&A 2 26-10-2010 18:23
[OCCRA]: OCCRA VEX Cortex Test Program marccenter OCCRA Programming 0 12-10-2010 22:23
[OCCRA]: Assembly on the cortex Fireball9199 OCCRA Programming 3 04-10-2010 21:35
[OCCRA]: cortex power supply off/on bernieseaholm OCCRA Q&A 1 23-09-2010 08:32


All times are GMT -5. The time now is 06:57.

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