Log in

View Full Version : I need a kill switch


Japper
23-01-2007, 05:14
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

intellec7
23-01-2007, 05:30
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 (http://www.ifirobotics.com/docs/competition-port-pinout-guide-reva.pdf)that allows you to disable the robot.

whytheheckme
23-01-2007, 06:55
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

chris31
23-01-2007, 06:58
If you wanted to write it in code you could do


if(trigger_pressed)
{
motor1=127;
motor2=127
motor3=127
}

aaeamdar
23-01-2007, 08:29
If you wanted to write it in code you could do


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!

Al Skierkiewicz
23-01-2007, 08:37
Simple answer...Build the dongle linked above. ALL TEAMS should have at least one!

EricS-Team180
23-01-2007, 08:52
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

Chris_Elston
23-01-2007, 09:13
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.

fluffy
23-01-2007, 09:16
we have a "competition" box with a disable switch and an auton switch on it and its been used more then a few times...

chris31
23-01-2007, 15:45
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.

Matt Krass
23-01-2007, 16:06
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.

dtengineering
23-01-2007, 16:12
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

Alan Anderson
23-01-2007, 21:10
...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.

Chris_Elston
23-01-2007, 21:23
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/articles/articlesdetails.cfm?id=938

Alan Anderson
23-01-2007, 22:43
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.

Uberbots
23-01-2007, 23:36
with the way i program... the kill switch is the trigger on the magnet gun (=

but seriously, coding in a kill switch is not always fail-safe... what i tend to do is just pull out the power supply on the OI

Ted Weisse
24-01-2007, 00:04
We have two different dongles, one with a rocker switch for auto mode and one without. Both have a NC disable switch that someone needs to hold open for the bot to operate. Let it go or drop it switch closes and the bot stops. Never drive/work alone but if you must you can always hold the switch with your foot, take your foot off and stop...:cool: