Many years ago I was called by a company that was experiencing problems with an industrial packaging machine. It was a fairly simple product, with several motors, heaters, indicators, etc. It was controlled by 5-volt CMOS logic configured as a simple state machine. The inputs were sensors and a few front-panel "oil-tight" industrial switches.
The company's engineer showed me the product, gave me a schematic, and left for a few minutes. When he returned, I said "I know what the problem is." He replied, "What? I haven't even told you what the symptoms are". Arrogantly, I said, "You don't have to; I know what they are."
He probably mumbled something under his breath, but he told me to continue. I replied, "I bet that sometimes the front-panel switches work, and sometimes they don't."
He said, "That's exactly right; how did you know?" I should have said that I was ordained with special powers by the spirit of Nikola Tesla. Instead, I opened the schematic and pointed to the circuit that interfaced to the front-panel switches. I have drawn this circuit below, in Figure 1.
Figure 1
It was immediately clear that the problem was that the big, gross, front-panel switches were not making and breaking enough current for reliable operation. Yes, "Use it or Lose it" applies to switches, -or at least "Use it with Lots of VA (volts x amps) or Lose it.
The problem is that switches have contacts. Being metal, they are subject to formation of oxide films. Naturally, switch designers try to select a contact material or plating which is optimum for their application. For example, the oil-tight switches in my story were rated at something dainty like "10A, 600V." To switch at levels like this, they use copper contacts plated with silver. This is a great choice for big, hairy, high-power contacts. Even though the silver will oxidize to produce a thin insulating film of silver oxide, the film is easily blasted away when the switch opens or closes in a high voltage, high current application. Unfortunately, the designer of this circuit used low voltage and an extremely large pull-up resistor; therefore there was not enough energy to break down and burn off the oxide layer. Incompetence reigns again.
During my lectures, I try to demonstrate this problem as part of my famous repertoire of exciting pedagogical moments. However, in the past I usually embarrassed myself in front of the class because a high-power switch will sometimes work on a low -energy circuit. Then, at a garage sale I found a box of very old microswitches. Eureka! These old switches are rated at 10A, 220V, and when I wire them up in a circuit like Figure 1, the contacts do not electrically close. since the switches have not been actuated for a long time. If I raise Vcc and decrease the pull-up resister, the switch will eventually operate reliably. Note that if a switch is repeatedly actuated, the "wiping" action may eventually clean the contacts, even at low voltages and currents.
So, what do you do with circuits and switches? Well, if you have a "dry" circuit (less than a few volts and a few milliamps), you MUST use a switch with gold contacts; gold will not form oxide layers. These switches can usually be identified because they have very low VA ratings, such as "0.4 A, 30V. Keyboard or tiny board-mounted push-buttons are usually rated for dry-circuit operation.
If you must interface with a "standard" push-button, toggle, or microswitch with silver contacts, you will have to present high voltage and current to the switch. However, since your circuit is probably 5 or even 3 volts, you will require a special interface circuit.
The exciting conclusion will follow in an upcoming blog.
