Log in

View Full Version : Alternative to limit switches?


RbtGal1351
27-11-2005, 18:02
Hello,

Our team has been using limit switches for our past two years to see if our arm is fully extended, so if it is, then the software doesn't let the arm extend more. However, we've had some problems with the limit switches breaking, so is there an alternative to limit switches? Have any other teams tried something else? What about reed switches?

Thanks
~Stephanie
Control Systems Leader

Al Skierkiewicz
27-11-2005, 18:11
Stephanie,
A good alternative is opto couplers. You can find them in the Digikey catalog under optoelectronics. Effectively they are an LED and a phototransistor. When the the light from the LED reaches the phototransitor a current flows. When the light path is blocked, no current flows. There are a variety of single package devices that work on reflective or direct light paths. I recommend an IR type so that regular light sources don't interfere with the device you are trying to sense. It then becomes a simple matter of mounting the device where it will be sensed by something moving on the arm and connect it to power and an RC sensor input. You can use the Banner sensors but they are an expensive alternative. If you have extras laying around the robot shop you can easily use them if you want.

gburlison
27-11-2005, 19:56
Team 662 used reed switches last year. We made hard stops put of HDPE and imbedded a reed switch and magnet into the two pieces of HDPE. The magnetic field was strong enough to trigger the reed switch before the hard stops made contact.

[527]phil
27-11-2005, 20:10
I have a great story for this. My team used a limit switch to stop the arm when it it's fully retracted (we used an extruded aluminum extending arm). so during one match I tried to retract the arm after we got back for those extra 10 points it wouldn't retract!!. we tried everything at the pits to get it to retract. we could extend it but not retract it. So we formulated a plan so we weren't totally useless to our alliance. About 20 seconds before the next match started the Driver ken Yells out to our mentor "It's the limit switch!!" so our mentor runs from the driving station to the robot and rips out one of the wires on the limit switch. then of course it worked. They blame me for it, but then again i successfully turned an electronic stop, to a mechanical stop :D . so it's all good. I think you should go with the idea from Al Skierkiewicz. But another alternative is to use those sensors from house alarm systems, the kind you put on doors.

Greg Needel
27-11-2005, 20:28
i personally am a big fan of encoders. if you put an encoder on the motor driving the arm, or any other rotating shaft in the system; you can figure out the set number of rotations from start to your limit. I think this works well because at any given time you can change the location of your stop just by changing the number of rotations. You will still need a limit switch at the bottom of your arm movement to act as a "zero switch" so that the system re-calibrates itself when it comes in. Another advantage to this is you can make buttons that go to exact positions on the arm. since you know the number of rotations at any given height you could make a "center goal" button and not have to drive the arm manually to get there.

sciguy125
27-11-2005, 20:42
i personally am a big fan of encoders. if you put an encoder on the motor driving the arm, or any other rotating shaft in the system; you can figure out the set number of rotations from start to your limit.
The thing is, encoders only tell you where the system is supposed to be, not where it is. A limit switch (or the like) will tell you when the system is at its limit and should stop. If you only have an encoder you know that you're supposed to be somewhere, but if you have a loose cable or chain, you'll actually be somewhere else.

Andrew Blair
27-11-2005, 21:00
I'm wondering about the use of pots. I know that they can be a degree or two off occasionally, and all the teams I've seen using them have a limit switch backup. Does anyone use pots exclusively?

Andrew Blair
27-11-2005, 21:13
http://www.sparkfun.com/images/Components/CNZ1120.jpgHeres another option, the infrared beam breaking integrated into one piece, on the cheap. http://www.sparkfun.com/shop/index.php?shop=1&cart=483346&cat=71& Its at the bottom of the page.

CraigHickman
27-11-2005, 21:18
This year team 114 only used pots for our bot... Seemed to work perfectly on the arm (after a little tuning), and worked quite well on the wheels (we had one on the rotator chain of our swerve drive.

Rickertsen2
27-11-2005, 21:56
If your limit switches are breaking then its probably a design issue or you need some beefier limit switches. Do you have a pic of the assembly the keeps breaking. I have never once broken a limit switch and we always have limit switches everywhere on everything. If used properly they will not break.

Bharat Nain
27-11-2005, 22:09
Hello,

Our team has been using limit switches for our past two years to see if our arm is fully extended, so if it is, then the software doesn't let the arm extend more. However, we've had some problems with the limit switches breaking, so is there an alternative to limit switches? Have any other teams tried something else? What about reed switches?

Thanks
~Stephanie
Control Systems Leader

We had problems with the limit switch breaking all year. We made it as simple as possible to replace it(not that easy). And then we put a limit switch override button in programming. That way in competition if it did not work the operator could use his/her judgement and decide how far up/down the arm should go. The button came in really handy, especially at palmetto where we took finalist.
-Bharat

Gdeaver
27-11-2005, 22:32
There are many different grades of limit switches. If you look in a Mcmaster-Carr or Grainger catalog you will find some real beefy limit switches.

Greg Needel
27-11-2005, 23:21
The thing is, encoders only tell you where the system is supposed to be, not where it is. A limit switch (or the like) will tell you when the system is at its limit and should stop. If you only have an encoder you know that you're supposed to be somewhere, but if you have a loose cable or chain, you'll actually be somewhere else.


while this is true that they tell you in a theoretical world what your position is, if the system is decently designed and tested you should be abel to have them calibrated with little error. This is the reason for the calibration limit switch at the bottom, so each time you go to zero the calibration gets checked.

sciguy125
27-11-2005, 23:44
if the system is decently designed and tested you should be abel to have them calibrated with little error.
The main reason we use limit switches is to prevent damage. Despite my many warnings, people have, on occasion, decided to forego the implimentation of limit switches to save themselves some time. Needless to say, it usually ends badly. The limit sensor tells you when it's time to stop. Maybe something got jammed. Maybe something broke. Maybe there was a design oversight. It doesn't matter how the system got into that position, but going further could damage it.

KenWittlief
28-11-2005, 00:05
there is absolutely no reason why a Cherry or SwitchCraft limit switch should ever break on your bot.

Im going to chance a guess here and bet you had the switch mounted so it was acting as a physical stop to the motion. A limit switch is suppose to actuate as a mechanical tripper slides PAST the switch lever, not INTO the lever from 90 degrees.

maybe I should sketch this out - thousand words and all that!

the red/black square is the moving arm tab that will engage the switch level. Note that it moves/ slides into the level and the lever closes the switch.

With the switch mounted like this there is no way its going to break, no matter what your SW does.

sciencenerd
28-11-2005, 00:10
I'm wondering about the use of pots. I know that they can be a degree or two off occasionally, and all the teams I've seen using them have a limit switch backup. Does anyone use pots exclusively?

Last year our team used only pots to determine the angle of our arm. However, we found that because of the inherent error, if we wanted the middle joint to bend as close to 360º as was safe, we would often slightly overshoot, pushing together two of our arm segments, bending the metal slightly and putting a huge amount of strain on the chain/motors. This was obviously a big problem, so we ended up retrofitting a limit switch to our arm halfway through the regional. The moral of this story: don't try to cut weight/save time by skipping the limit switch, you'll always regret it in the end.

Al Skierkiewicz
28-11-2005, 07:05
I agree with Ken here. There should be no reason to break a limit switch. You must remember that the mechanism it is designed to protect has momentum and will not come to a stop immediately. The microswitches shipped in our kits have long actuating arms that can be bent and/or cut to any form that is useful for you application. Design mechanical stops accordingly, backup the backup.
As for reed switches, I do not recommend them for this application. They have a bad habit of disengaging with vibration and magnets get knocked off leaving you defenseless. Additionally, the contacts don't always meet properly and high resistance occurs. With very little current being supplied by the RC, there is a source of error there. Microswitches are designed to "wipe" the contacts when they make contact, minimizing this effect.
If you are at an event where I am present please ask me to look at problems on your robot. I love to see other robots and what other teams have done to solve problems.

sciguy125
28-11-2005, 09:44
I agree with Ken here. There should be no reason to break a limit switch.
They are properly mounted, they usually break from battle damage. Either a direct result or something else gets misaligned and snags it. Although, I do admit that there are some that could be positioned better to prevent snags.

The problem is that they're usually the last thing to go on. Last year, they weren't on until our second match. By this time, they hadn't been tested yet. Needless to say, whoever made the decision to run the arm anyway made a pretty bad call. Although, the damage was a testament to how powerful our arm actually was.

KenWittlief
28-11-2005, 09:53
if you are not protecting your microswitches, then anything else you put on thats unprotected will get smashed as well.

You might consider a lever or spring that actuates the microswitch from a distance, so the switch doesnt need to be exposed to the parts of the bot that get bashed during a match.

An example is the power switch in most PCs. The switch is back by the power supply, but the on/off button is on the front panel, connected by a long push rod.

Tristan Lall
28-11-2005, 10:33
An example is the power switch in most PCs. The switch is back by the power supply, but the on/off button is on the front panel, connected by a long push rod.Ken, I think you're trapped back in the days of the AT form factor (or before)! Modern PCs (i.e. nearly anything within the last eight years) use an electrical connection directly to the motherboard, with a momentary switch. Cross two pins (one is connected to 5VSB, if I remember correctly), and the motherboard instructs the power supply to turn fully on.

There is a second switch on the back of most power supplies, but I don't think that that's the one to which you were referring; it just interrupts the power completely (preventing the motherboard from receiving standby power).

Cuog
29-11-2005, 21:15
And did you know that if you touch those two wires together in that switch they will weld themselves together(I accidentally did that)

But instead of limit switches on the arm i like pots our 2006 robot is going to have almost all the analog in ports utilized if i can help it

sciencenerd
29-11-2005, 22:08
But instead of limit switches on the arm i like pots our 2006 robot is going to have almost all the analog in ports utilized if i can help it

Like I said in my post above, our team found out the hard way that pots have inherent inaccuracies that make it inadvisable to use them as the safety cutoff. They can be used to determine position when a couple of degrees don't matter, but when something like the motors of your arm/whatever the arm is capable of running into is at stake, don't trust a potentiometer to be 100% accurate.

Gdeaver
29-11-2005, 23:50
I'll post again on this subject. There are industrial limit switches in the 5 to 20$ range that are much more robust and reliable than the small micro limit switches. They come in several configurations of levers, rods, and rollers. Several brands also have die cast bodies and can take abuse.

Billfred
29-11-2005, 23:56
I'll post again on this subject. There are industrial limit switches in the 5 to 20$ range that are much more robust and reliable than the small micro limit switches. They come in several configurations of levers, rods, and rollers. Several brands also have die cast bodies and can take abuse.
Just for a point of reference, where do the Vex limit switches fall in the grand pecking order of limit switches?

Cuog
30-11-2005, 13:52
Thats why our arm has a physical stopper just in case, and the pot is set so that 0 is about 3 inches from the stopper,


Just for a point of reference, where do the Vex limit switches fall in the grand pecking order of limit switches?


somewhere in the big thing range i would certainly use them for a limit switch but as long as it isnt likely to get hit since the plastic on them is not the best.

mechanicalbrain
30-11-2005, 21:02
The thing is, encoders only tell you where the system is supposed to be, not where it is. A limit switch (or the like) will tell you when the system is at its limit and should stop. If you only have an encoder you know that you're supposed to be somewhere, but if you have a loose cable or chain, you'll actually be somewhere else.
Thats only if you design it that way. If you wanted a measurement on the extension of the arm you might use a linear encoder while if you wanted a measurement of arm angle you would mount an encoder to the arm. Your measurements would be accurate.

Personally I like a magnet sensors because the lack of actual contact. I especially like the ones that detect ferrous metals rather then other magnets because it leaves you room to be creative with how you position the sensors (like for example we used little metal strips that we could bend to different shapes). I don't exactly using pots for measuring the angle of an arm because of already said inaccuracy but for measuring objects with smaller radius it is extremely useful. By the way, have any FIRST teams used linear encoders?

Sparks333
09-12-2005, 20:32
As for reed switches, I do not recommend them for this application. They have a bad habit of disengaging with vibration and magnets get knocked off leaving you defenseless. Additionally, the contacts don't always meet properly and high resistance occurs. With very little current being supplied by the RC, there is a source of error there. Microswitches are designed to "wipe" the contacts when they make contact, minimizing this effect.

This is very true. The good news is that reed switches aren't used too much anymore (on account of being mechanical instead of solid-state) and the Hall-Effect sensors have all but replaced them (Could be hyperbolizing, but I see many more hall effect sensors than reed switches). Best of all, they both work about the same: bring 'em into a magnetic field, and they trip, except hall effect sensors output a digital 0-5vdc signal almost 100% of the time (depending on the sensor). So, if you have a real hankering for magnetic switches, halls are the way to go. The ones in the kit last year were decent, but they were designed to count the teeth on a gear of a ferrous metal. Halls in general just respond to magnets. One final note: Some halls (most? I actually don't know) respond to the flipping of a magnetic polarity (aka N, S, N, S, etc.). This is not what you want for limit switch application, but it works rather well for encoder operation (So you don't count a magnet twice). We used a pair of hall-effect sensors on our robot last year in place of encoders. Can't say we used them well, but the scope says they worked great.

Sparks

Al Skierkiewicz
10-12-2005, 15:30
Sparks,
That is true for most of the prepackaged sensors but the actual Hall effect device is much like an optical transistor. The magnetic field will cause an increase in current in the transistor or send it into saturation. Individual Hall transistors are available if you look for them. Interfacing is then up to you.