Thursday, August 21, 2008

About the limit switches

Two electrical switches wired in series with the drive motor prevent motion past which damage to the mechanism would occur. Here is a picture of the West limit switch in the solar heater at it's full West position. The little roller pushes the arm of the switch up to actuate it and stop the motor from turning the drive screw further in the west direction.

All servo controlled systems must have limit switches. It is important that they are reliable and positive acting and they must be weather sealed in the case of the solar collector since they are outside.

Previously I had used magnetically operated switches of the type used in security systems. These are small inexpensive plastic cased switches which are actuated in the presence of a magnet nearby. Initially, they did the job but had become unreliable after years of duty in previous prototypes, so yesterday I replaced them with the industrial limit switches shown here and tested the operation by driving the motor with an external battery (with the limit switches in circuit) to make sure that they functioned correctly. All is good with the new switches.

By unreliable, I mean that the motor had become sluggish or refused to operate at times. This was because the motor current flows through the limit switches which are normally closed (NC) and if the switches do not make good contact, the current to the motor is interrupted. This is not a good thing.

This is how the limit switches are arranged. The illustration is from Duane Johnson's Red Rock web page. He is the designer of the controller I am using. Here is a direct link.

If you can picture a battery connected to the two open wires at the bottom of the top circuit, if the positive is connected to one end and the negative to the other, the motor will go in one direction. If the battery is the other way around, the motor will go in the other direction. In use, the Red Rock controller is connected where the battery would be and does the job of switching the polarity around and deciding when to apply the current.

In the top picture, both limit switches are closed. The solar collectors are somewhere in the middle of their travel and not at the ends. The motor (the circle in the center) can receive current in either direction through both switches. The diodes do nothing as they are shorted by the switches.

In the center picture, the left switch is open and hence current cannot flow through that switch. The motor cannot go any further in that direction. The diode can conduct current but only in one direction, the direction of the arrow. The motor can turn in the direction away from the limit switch only. This would be say at the end of the day and the sun was approaching the horizon. The left switch would be the WEST limit switch and the motor was not to go any further, but was allowed to move EAST when the sun rose in the morning.

The last picture is the other case, where the right switch is open and the motor cannot move any further in that direction, but can go the other way. It's simple but effective.

Here are some of the switches that I've tried.

At the left are two types of magnetically operated alarm type switches. The one on the far right contains a mini reed relay, the one second from the left contains a mechanical switch with a small slab of steel on the swinging arm which is attracted by the external magnet. If you click on the picture to enlarge it, I think that you'll see that it is pretty rusty inside. This one has been outside for four years and has become unreliable.

At the right are two industrial type mechanically operated switches. These are the type that I will be using from now on. Both of these are Chinese made and cost from $20 to $30 each, but I've decided that the price may be worth the reliability.

The alarm type of switches look neat in little plastic packages, but they aren't sealed. In fact they will pop open with a screwdriver so you can see inside. Certainly rainwater, moisture in the air and salt spray can get into these types of switches. I don't think that they are a good choice for long term reliability.

If you decide to use the burglar alarm type switches (which are more widely available and very low cost (a few dollars each), here are some other things that I learned:

Since the full current of your motor passes through both switches, it is important that they be rated for the current used by the motor. Since they are intended for alarm systems where the current is very small, they may not even show the current rating on the packaging. The motor I use draws only about 0.5 Amp and this was in fact the rating of one of the types of switches that I used. Clearly this was marginal and not good practice on my part.

Normally closed alarm switches seemed to be rare, at least they were when I went looking for them. Most that I found were normally open (NO). Only a few had both NO and NC. You definitely need the switch to be normally closed.

One type of switch I tried had the labeling the wrong way around. The NC contacts were really the NO contacts, but maybe that is just case of interpretation by the switch designer. In an alarm application, is the "normal" when the magnet is nearby or when it is not? It is important for you to test switch operation with an ohmmeter to make sure that you are getting what you expect.

Different alarm switches are made in different way. The ones I used the longest were a mechanical switch with a swinging arm that moved between two contacts. There was a spring to hold the arm against the NC contact. Depending on which way I mounted the switch, whether the terminals were oriented up or down, the force of gravity tended to pull down on the arm, pulling it away from the NC contact. Needless to say, this made the switch less reliable, especially after the spring became tired and rusty after three years outside.

Another type of alarm switch was built around a mini reed switch. While this would sound like a good idea, since the switch contacts are enclosed in a sealed glass tube and thus not exposed to the elements, I found that at least with my two samples that one of them was much more sensitive than the other. When I was testing the switchs with a magnet and ohmmeter, the sensitive one would close the switch when the magnet was about 3/4 inch away whereas the other one, the magnet needed to be virtually touching the case of the switch in or for it to operate. This was a little too close for comfort.

Whatever type of switch you use, keep in mind the following:
  • They should comfortably handle the motor current with some margin.
  • They should be robust and weather sealed.
  • They should be normally closed.
  • Test the operation of the limit switches and ensure that they reliably stop the motor at the desired ends of travel.


Unknown said...

Thanks for the info. Here's my input Get best Limit switch manufacturer Korea. visit:

George Plhak said...

Normally I don't allow product spam but these are nice looking limit switches from Korea. Contact the manufacturer for sales info, I don't sell them.