Go to Post I give props to your programmers and programming mentors. - Sgraff_SRHS06 [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 23-01-2007, 05:14
Japper's Avatar
Japper Japper is offline
Registered User
FRC #3692 (RocknRobots)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Rutland Wisconsin
Posts: 147
Japper has a spectacular aura aboutJapper has a spectacular aura about
I need a kill switch

For those times when my robot or joysticks goes out of control I need a kill switch which disables all input to the motors ASAP.

I would like to find a way to do this where I press the trigger button to stop all motor activity and then resume once the button is pressed again.

Has anyone done this before in code or does anyone have any ideas on how to do this?

Please advice

Thanks

Last edited by Japper : 23-01-2007 at 05:18. Reason: Sorry, I forgot to subscribe to instant notification
  #2   Spotlight this post!  
Unread 23-01-2007, 05:30
intellec7's Avatar
intellec7 intellec7 is offline
108 programmer
AKA: Gustavo
FRC #0108 (SigmaC@ts)
Team Role: Programmer
 
Join Date: Sep 2005
Rookie Year: 2006
Location: Hollywood, Florida
Posts: 65
intellec7 is on a distinguished road
Send a message via AIM to intellec7 Send a message via MSN to intellec7
Re: I need a kill switch

If the RC doesn't see the OI, it should set all PWMs to 127, and SPIKES to OFF turning off all motors. You can build a competition port dongle that allows you to disable the robot.
  #3   Spotlight this post!  
Unread 23-01-2007, 06:55
whytheheckme's Avatar
whytheheckme whytheheckme is offline
Registered User
AKA: Jacob Komar
no team
 
Join Date: Feb 2006
Rookie Year: 2005
Location: Providence, RI
Posts: 1,320
whytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond repute
Send a message via ICQ to whytheheckme Send a message via AIM to whytheheckme Send a message via MSN to whytheheckme Send a message via Yahoo to whytheheckme
Re: I need a kill switch

You can write a little checker at the beginning of your While loop that checks to see if the trigger is depressed. If it is, you can have it go off to a section of code that turns off the motors. If you want a system where click once disables and click again enables, then you need something to keep track of how many times the trigger has been pressed and released.

What software are you using?

If you need more help, let me know,
Jacob
  #4   Spotlight this post!  
Unread 23-01-2007, 06:58
chris31 chris31 is offline
Team 2021 Captain
AKA: Chris Davidson
FRC #2021 (FA Robotics)
Team Role: Mentor
 
Join Date: Nov 2005
Rookie Year: 2006
Location: Atlanta, GA/ Fredericksburg,VA
Posts: 949
chris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond repute
Send a message via AIM to chris31
Re: I need a kill switch

If you wanted to write it in code you could do

PHP Code:
if(trigger_pressed)
{
motor1=127;
motor2=127
motor3
=127

  #5   Spotlight this post!  
Unread 23-01-2007, 08:29
aaeamdar's Avatar
aaeamdar aaeamdar is offline
Post-A-Holic
AKA: Paul Dennis
FRC #1719 (The Umbrella Corp)
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Baltimore, MD
Posts: 231
aaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant future
Re: I need a kill switch

Quote:
Originally Posted by chris31 View Post
If you wanted to write it in code you could do

PHP Code:
if(trigger_pressed)
{
motor1=127;
motor2=127;
motor3=127;

Yes, but you need to make sure to put that at the end of your code section. If it's not at the end, it will just get overwritten. Also you need to convert the half-pseudo code half code to real code - I've added the semi-colons for you.

I would definitely suggest using the dongle. It's the safest approach. However, a programatic approach would be a fine addition if that's how you roll (so to speak).

Good luck this year!
  #6   Spotlight this post!  
Unread 23-01-2007, 08:37
Unsung FIRST Hero
Al Skierkiewicz Al Skierkiewicz is offline
Broadcast Eng/Chief Robot Inspector
AKA: Big Al WFFA 2005
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1996
Location: Wheeling, IL
Posts: 10,766
Al Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond repute
Re: I need a kill switch

Simple answer...Build the dongle linked above. ALL TEAMS should have at least one!
__________________
Good Luck All. Learn something new, everyday!
Al
WB9UVJ
www.wildstang.org
________________________
Storming the Tower since 1996.
  #7   Spotlight this post!  
Unread 23-01-2007, 08:52
EricS-Team180's Avatar
EricS-Team180 EricS-Team180 is offline
SPAM, the lunchmeat of superheroes!
AKA: Eric Schreffler
FRC #0180 (SPAM)
Team Role: Engineer
 
Join Date: Apr 2002
Rookie Year: 2001
Location: Stuart, Florida
Posts: 561
EricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond repute
Re: I need a kill switch

Quote:
Originally Posted by Al Skierkiewicz View Post
Simple answer...Build the dongle linked above. ALL TEAMS should have at least one!

On S.P.A.M. it is REQUIRED for safety. No-one tests
or drives a 'bot without one. ...and no-one drives or operates a robot while also holding the dongle.

Like Al said ... see intellic7's post

Eric
__________________

Don't PANIC!
S. P. A. M.
  #8   Spotlight this post!  
Unread 23-01-2007, 09:13
Chris_Elston's Avatar
Chris_Elston Chris_Elston is offline
Controls Engineer
AKA: chakorules
FRC #1501 (Team THRUST)
Team Role: Engineer
 
Join Date: Feb 2004
Rookie Year: 2001
Location: Huntington, Indiana
Posts: 746
Chris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond repute
Re: I need a kill switch

Build a dongle and wire it to an E-STOP button.

Make your dongle part of your OI board so it goes with it every where.

Rockwell Automation has them. Either 22.5 mm or 30 mm. Twist and release style. Our button is 60mm in size, so it's pretty big.
Attached Thumbnails
Click image for larger version

Name:	oi3.jpg
Views:	86
Size:	89.6 KB
ID:	4923  Click image for larger version

Name:	oi1.jpg
Views:	66
Size:	71.2 KB
ID:	4924  
__________________
Team T.H.R.U.S.T. 1501
Download all of our past robot's source code here:Repository

Favorite CD quote:
"That can't be their 'bot. not nearly enough (if any) rivets to be a 1501 machine." ~RogerR: Team #1369
  #9   Spotlight this post!  
Unread 23-01-2007, 09:16
fluffy's Avatar
fluffy fluffy is offline
What color was that wire again?
AKA: David
FRC #3663 (CPR)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2002
Location: Seattle
Posts: 139
fluffy is a splendid one to beholdfluffy is a splendid one to beholdfluffy is a splendid one to beholdfluffy is a splendid one to beholdfluffy is a splendid one to beholdfluffy is a splendid one to beholdfluffy is a splendid one to behold
Send a message via MSN to fluffy
Re: I need a kill switch

we have a "competition" box with a disable switch and an auton switch on it and its been used more then a few times...
  #10   Spotlight this post!  
Unread 23-01-2007, 15:45
chris31 chris31 is offline
Team 2021 Captain
AKA: Chris Davidson
FRC #2021 (FA Robotics)
Team Role: Mentor
 
Join Date: Nov 2005
Rookie Year: 2006
Location: Atlanta, GA/ Fredericksburg,VA
Posts: 949
chris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond repute
Send a message via AIM to chris31
Re: I need a kill switch

Quote:
Originally Posted by aaeamdar View Post
Yes, but you need to make sure to put that at the end of your code section. If it's not at the end, it will just get overwritten. Also you need to convert the half-pseudo code half code to real code - I've added the semi-colons for you.

I would definitely suggest using the dongle. It's the safest approach. However, a programatic approach would be a fine addition if that's how you roll (so to speak).

Good luck this year!
Sorry, I just posted it quickly to give him the idea. You would need to do it for all your motors and put it at the end else it will be over written.
  #11   Spotlight this post!  
Unread 23-01-2007, 16:06
Matt Krass's Avatar
Matt Krass Matt Krass is offline
"Old" and Cranky. Get off my lawn!
AKA: Dark Ages
FRC #0263 (Sachem Aftershock)
Team Role: Mentor
 
Join Date: Oct 2002
Rookie Year: 2002
Location: Long Island, NY
Posts: 1,187
Matt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond repute
Send a message via AIM to Matt Krass
Re: I need a kill switch

This cannot be stressed enough, I have enough scars to make the point very obvious, BUILD A DONGLE! OR BUY ONE! Just get one, its not worth your hands/toes/knees/eyes/someone elses one of those/ to save the time/money on making a dongle, and a programming solution is a terrible thing to trigger accidentally during a match.

Right here is a top quality one you can buy: http://andymark.biz/am-0016.html

Or just use the above link to make one, its worth it, I promise. And all of my sore bones/joints and scars also promise.
__________________
Matt Krass
If I suggest something to try and fix a problem, and you don't understand what I mean, please PM me!

I'm a FIRST relic of sorts, I remember when we used PBASIC and we got CH Flightsticks in the KoP. In my day we didn't have motorized carts, we pushed our robots uphill, both ways! (Houston 2003!)
  #12   Spotlight this post!  
Unread 23-01-2007, 16:12
dtengineering's Avatar
dtengineering dtengineering is offline
Teaching Teachers to Teach Tech
AKA: Jason Brett
no team (British Columbia FRC teams)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Vancouver, BC
Posts: 1,827
dtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond repute
Re: I need a kill switch

Two tricks that also help:

1) Pull the breakers from your drive circuit. This disables the drive motors and allows you to isolate the lifts, compressor, pneumatics and actuators for testing.

2) Put your robot (securely) up on blocks so the wheels don't touch the ground. That way you can spin your wheels and do all your testing without the robot driving all over the place.

Both of these techniques are handy if you have limited space (say, you're hooked up to a programming cable, or maybe working in a 10' x 10' pit area) but don't provide that full-motion feeling that you may be looking for. For that, the dongle is most useful. (But if you're ever stuck, just unplug the OI. Not good practice to do it that way all the time, but it works in a pinch.)

Jason
  #13   Spotlight this post!  
Unread 23-01-2007, 21:10
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: I need a kill switch

Quote:
Originally Posted by dtengineering View Post
...the dongle is most useful. (But if you're ever stuck, just unplug the OI. Not good practice to do it that way all the time, but it works in a pinch.)
It works, but I believe it's worse than "not good practice". It's definitely bad practice. Unplugging the OI leaves the RC running for about a half second before it decides it has lost communication and shuts its outputs off. The switch on a competition port dongle disables it now. That extra half second can make a real difference, safety-wise. It's also a whole lot faster to slap a big red emergency stop button than it is to find, grab, and yank (with a real chance of damaging) the OI power cord.
  #14   Spotlight this post!  
Unread 23-01-2007, 21:23
Chris_Elston's Avatar
Chris_Elston Chris_Elston is offline
Controls Engineer
AKA: chakorules
FRC #1501 (Team THRUST)
Team Role: Engineer
 
Join Date: Feb 2004
Rookie Year: 2001
Location: Huntington, Indiana
Posts: 746
Chris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond repute
Re: I need a kill switch

I like to always relate what I can to the students.

In the real world, automation "safety" requires the use of hardware interlocks. No software code or programming must be used or act as a safety device. All safety devices must be hardwired through a safety circuit. Depending on the hazard different categories of safety must be achieved. Category 4 is a redundant hardware safety circuit with safety monitoring relays that monitor the safety circuit of an automated machine. These safety circuits are important and not controlled by any software code.

Here is a great article online that references real world safety circuits. The dongle is a hardwire safety, er uh…as close as we can get to hardwire….anyway… hopefully you’ve got enough information to decide what’s right.


Article:
http://www.roboticsonline.com/public...ils.cfm?id=938
__________________
Team T.H.R.U.S.T. 1501
Download all of our past robot's source code here:Repository

Favorite CD quote:
"That can't be their 'bot. not nearly enough (if any) rivets to be a 1501 machine." ~RogerR: Team #1369
  #15   Spotlight this post!  
Unread 23-01-2007, 22:43
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: I need a kill switch

Quote:
Originally Posted by Chris_Elston View Post
The dongle is a hardwire safety, er uh…as close as we can get to hardwire….anyway…
We typically don't fasten our programming or tether cables to the connector with the provided screws. But I try always to make sure the box with the disable switch is securely locked to the competition port on the OI. We certainly don't want it being pulled out and disconnected by someone who is trying to duck a misbehaving robot arm!

For a future redesign of the control system, I would like to see it require an external connection in order to enable the robot. That would be much more fail-safe than the present scheme.
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
Need help with stereo switch box Simon Strauss Technical Discussion 7 30-10-2006 08:21
Need Help Wiring Micro Switch/Limiting Switch Windward Electrical 2 07-02-2006 18:26
Urgent need for Nason pressure switch!! PLEASE HELP! haverfordfords Pneumatics 12 18-02-2005 02:04
Autonomous Kill Switch UCGL_Guy Programming 8 15-01-2003 17:39
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 10:43.

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