Passive components: Difference between revisions

Line 42: Line 42:


These simple mechanical rotary encoders are subject to switch bounce. Careful programming of the microcontroller is required to avoid unreliable operation as a result. In [[Glossary:Brushless Motor|brushless motors]] and many types of machinery the rotation of a shaft is detected instead by an encoder using optical, magnetic or capacitive sensors, which are not subject to switch bounce.
These simple mechanical rotary encoders are subject to switch bounce. Careful programming of the microcontroller is required to avoid unreliable operation as a result. In [[Glossary:Brushless Motor|brushless motors]] and many types of machinery the rotation of a shaft is detected instead by an encoder using optical, magnetic or capacitive sensors, which are not subject to switch bounce.
==Relays==
[[File:Standard and Reed Relays.jpg|thumb|right| A standard relay and a reed relay.]]
A relay is simply a switch operated by an [[Glossary:Electromagnet|electromagnet]]. Before electronics became so cheap and capable, relays were used in large numbers in telephone exchanges and automatic controls.
Various configurations of single and multipole switch are avalable including normally off, normally on and changeover. A reed relay consists of a [[Glossary:Reed switch|reed switch]] with a coil wound around it. The coil will be rated for a particular voltage, depending on the requirements of the application.
The switch remains activated only for so long as a current is passing through the coil, though latching relays are not unknown.
Since there is no electrical connection between the coil and the switch, relays are useful for switching mains, the coil activated by low voltage electronics.


==When they go wrong ...==
==When they go wrong ...==

Revision as of 11:08, 11 November 2023

This page covers passive components: switches, push-buttons and connectors, how to identify them and understand their common failure modes, and how to test them.

Summary

You might think of passive components such as switches, push-buttons and connectors as the "country cousins" of electronics, but they are important, none the less. We discover how to identify them, what they do, how they fail and how to test them.

You can read this page on its own if you like, but if you're not already familiar with basic electrical and electronic theory you my find you get more out of it if you first read Electric circuits, volts amps watts and ohms.

Switches

Rotary switches (disassembled) showing the metal fingers and the contacts.

Switches come in many different forms, and being in part mechanical, they are subject to wear and failure.In its simplest form, a switch consists of two pieces of metal that can be made to touch or not, so switching the current through it on or off. Alternatively, a third piece of metal can be moved to bridge the other two.

Often, a single enclosure will contain two switches operated by the same lever or knob. This is known as a 2-pole switch, and it can be used, for example, to disconnect both the live and neutral in a mains outlet, making the outlet completely safe.

A 2-way switch connects one contact to one or other or two other contacts, diverting the current into one of 2 paths. The waveband switch in an older AM/FM radio might well be one of these. You can also have multi-way switches which can switch up to a dozen ways.

Multi-way switches can also have multiple poles, so for example a 2-pole 3-way switch would be able to switch each of two circuits three ways.

A microswitch.

A microswitch is often used in electromechanical devices where a switch needs to be operated for example by a safety interlock or some other mechanism rather than directly by a user. They are designed to operate with very little force and reliably at a particular point. They come in a few standard sizes and hence are easily replaced but come with several different contact configurations. There is also a choice of operation by a lever, or a roller (as in the photo) or directly by the button which is beneath the lever in other types.

Many small switches consist of several springy metal fingers which move across one or more static metal contacts. Sometimes the pressure needs to be increased by bending the springy metal finger. If the contacts are dirty or corroded, they can be cleaned with switch cleaning fluid. In some cases the static contacts are simply tracks on a circuit board, and these can wear through. A solution may be to bend the springy metal pieces to make contact at a slightly different point.

If you try to disassemble a switch be aware that it may contain a spring which can easily take flight and small parts which tend to fall out. This can make it challenging to work out the precise arrangement of the parts and difficult to hold them all in position as you try to put it back together again.

Push-buttons

Push-button switches in a digital alarm clock.

Push-buttons also come in many different forms but are usually single pole single way (on/off) switches. Most rely on the click effect familiar from the safety button on screw-on metal lids to glass jars of jam, baby food and many other food products. At a critical pressure the button flips from a convex to a concave form.

Replacement tactile push-button switches.

In a push button switch it may be a plastic film or a sliver of thin metal. In the case of metal (as illustrated from a digital alarm clock), it may be this that makes contact with a trace on a circuit board beneath, otherwise a piece of conductive rubber may bridge the gap between two circuit board traces when the button is pressed. In either case, cleaning with isopropyl alcohol or switch cleaning fluid can help.

Small push-button tactile switches may not be repairable but can often be easily replaced. Common types are 6x6 or 12x12mm and various heights. The height is measured from the bottom of the body (in contact with the circuit board) to the top of the button. The 4 legs are connected together in pairs. On pressing the button, a connection is made between one pair and the other. Many eBay sellers offer these at very reasonable prices.

Rotary Encoders

A mechanical rotary encoder.

Modern digital radios often use a digital volume control in place of a potentiometer. This is very obvious: instead of the smooth rotation limited to three quarters of a turn of a potentiometer, a rotary encoder used in a digital volume control can be turned endlessly in either direction, but in a series of steps.

The black and white segments represent the on/off states of the two switches in a rotary encoder. The direction of rotation is evident from the order in which they change.

At each step or click of the knob, one of two switches turns on if it was off or vice-versa. At the next step the other switch does likewise. From the order in which the switches change, a microcontroller can easily determine the direction of rotation at each step, as illustrated in the animation. Quite often a third switch operates as a push-button when you press the knob.

These simple mechanical rotary encoders are subject to switch bounce. Careful programming of the microcontroller is required to avoid unreliable operation as a result. In brushless motors and many types of machinery the rotation of a shaft is detected instead by an encoder using optical, magnetic or capacitive sensors, which are not subject to switch bounce.

Relays

A standard relay and a reed relay.

A relay is simply a switch operated by an electromagnet. Before electronics became so cheap and capable, relays were used in large numbers in telephone exchanges and automatic controls.

Various configurations of single and multipole switch are avalable including normally off, normally on and changeover. A reed relay consists of a reed switch with a coil wound around it. The coil will be rated for a particular voltage, depending on the requirements of the application.

The switch remains activated only for so long as a current is passing through the coil, though latching relays are not unknown.

Since there is no electrical connection between the coil and the switch, relays are useful for switching mains, the coil activated by low voltage electronics.

When they go wrong ...

Since switches and push-buttons have moving parts it's almost inevitable that they will occasionally fail. Sometimes this will be a purely mechanical failure, perhaps resulting from excessive force being applied to some plastic part. Or, it may be a problem of wear, dirt or corrosion of the switch contacts.

There are essentially two types of switch or push-button:

  • Power switches that directly control power, whether mains or a lower voltage, and
  • Signal switches, such as push-buttons or multi-way selector switches on many electronic devices, which only need carry a tiny current in order to signal a condition to a microcontroller.


The contacts in a power switch are frequently not accessible, but if they are and they need cleaning, switch cleaning fluid (available in an aerosol can) with a light abrasive can be used.

More often, you will need to replace the switch. This will frequently be a commodity part which you can find online. If the replacement is not identical to the original, make sure its current (in amps) and voltage ratings are the same or greater.

Dirt or corrosion on the contacts of a signal switch will cause unreliable operation. If the contacts are accessible you can try cleaning them with isopropyl alcohol and a stiff brush. Sometimes you may be able to bend a spring slightly to increase the contact pressure.

Behind the external button on many devices is a very common type of tactile push button soldered to a circuit board. These are widely available in a range of sizes, in particular the height of the button.

In devices such as calculators and remote controls, the buttons often consist of a silicone rubber sheet with a dome for each button. The underside of each dome is conductive, and when depressed, forms an electrical path between two (usually gold plated) contacts on a circuit board. These can become unreliable. Cleaning with isopropyl alcohol may help. Applying graphite from a soft pencil to the underside of the domes is sometimes suggested, but this may only be a temporary cure.

Buttons in mice, especially gaming mice, are often of the microswitch type. Very specialised ones are used to achieve reliable operation over perhaps millions of operations. A YouTube video goes into unbelievable detail about what makes a good gaming mouse button.

Connectors

Ribbon connectors. (The wide one has a black clamping bar, but in two adjacent to it the ribbon simply pushes into the connector. Held open at the top, a connector snaps onto the socket on the board below.)

There are many types of connectors. As well as the external connectors used to connect separate items together such as headpones, power supplies and very many others, there is a similar profusion of internal connectors, interconnecting modules or sub-assemblies within an item.

Connectors can often fail if they see a lot of use or are subject to strain or contamination with dirt or moisture.

Dirt and corrosion can be removed with switch cleaning fluid, available in an aerosol can, assisted by gently rubbing with a tissue. Corroded terminals in a battery compartment is a common problem, caused by chemicals leaking from long-dead batteries.

Electrical contact is normally maintained by spring pressure in some form. The pressure may be lost over time and can sometimes be restored by gently bending a springy piece of metal.

Modern electronic equipment often uses ribbon cables to interconnect the sub-assemblies. Sometimes the ribbon can be simply pulled out of its connector and pushed back in on reassembly, but often there is a clamp which must be pulled or lifted in order to release the ribbon. Care is required - if the clamp is broken through being pulled in the wrong direction or with too much force, it may be that little can be done. In other connectors it may be tempting to try to disconnect them by pulling on the wire. If the wire pulls out of the connector body you may have a problem. Our Interal Connectors page describes how to disconnect and reconnect many types safely.

And now ...

... you might like to continue by reading about Protection components.