Walter Chen

Maxim - Senior Scientist, Applications


Dr. Chen specializes in mixed-signal processing at Maxim Integrated Products

Web Links

Maxim home page

EEWeb Stats

Walter's Blog :

Return to Blog

Key-Switch Controllers Enhance Smart Phones

h5. Walter Chen, Principle Member of the Technical Staff, Applications

Maxim Integrated Products Inc., Sunnyvale, CA

The key pad of most smart phones employs one of two key-scanning methods: conventional or low-EMI. By describing and comparing these methods, the following discussion illustrates a major benefit of the low-EMI method— it eliminates the need for EMI filters. Estimates are then made of the capacitive-loading allowance associated with external ESD-protection diodes. We conclude that the use of a low-EMI key-scanning controller provides the best performance in smart phone applications.

The brain of a smart phone is the baseband (BB) controller, which contains a microprocessor and special-purpose signal-processing circuits. General purpose input/output (GPIO) pins may be available to implement the key-switching circuitry, but that depends on the complexity of the BB controller.

Special-purpose key-switch controller chips are used in many of the recent smart cell phones. Such chips are often used because not enough GPIO pins are available on the BB controller. This can happen when a BB controller designed for a feature phone is used for a smart phone as well, to avoid the cost of redeveloping the system infrastructure. In other cases, a dedicated controller chip is used to minimize the number of wires between the BB controller and the key pad. This approach applies especially for systems with a slide-out key pad – where the BB controller and the key pad are located on different PCBs or chassis. The key-switch controller usually connects to the BB controller via an (I^2)C or SPI™ interface [1].

You can implement a dedicated switch controller with an off-the-shelf GPIO chip, or a small microcontroller using the conventional key-scan method. Conventional key-scan methods are also used in a few dedicated, special-purpose key-switch controller chips. In this article, a comparison of the conventional and low-EMI methods of key scanning shows that the low-EMI method eliminates the need for EMI filters.

Conventional key-scan method

The conventional key-scan method (Figure 1) is used with BB controllers that include GPIO pins, and also with some dedicated key-switch controllers. Some GPIO pins are used as column-output ports to drive the switch matrix, and other GPIO pins are used as row-input ports to detect the contact of switches. Usually, the system applies no voltage to any key switch unless it is being touched. Once a key is pressed, the key controller begins a scan of all the keys. This scanning is carried out by raising the column voltages one at a time, while checking (also one at a time) the input level of each row. An 8×8 switch matrix can be scanned in 64 clock cycles, and the clock frequency can range from a few tens of kilohertz to a few megahertz. During a key scan, the column-output levels swing between logic low and logic high, which is 1.8V to 3.3V depending on the key controller’s power supply.

The conventional key-scan method.

The conventional key-scan method.

Because of sudden rises and falls in the column-scanning signals, corresponding electromagnetic emissions can affect the qualification of EMI tests, especially when long wires extend from the key pad to the BB controller’s GPIO pins. EMI filters are usually required on these column ports to minimize the effects of electromagnetic emission. An EMI filter can be a first-order RC or a second-order CRC lowpass filter (Figure 2a-2b). Such filters are available in small TDFN or CSP packages, or they can be implemented using discrete passive components. But of course, any EMI filter adds component cost and occupies board space.

Basic EMI filter structures.

Basic EMI filter structures.

Low-EMI (passive scan) method

Certain key-switch controllers (MAX7347-49, MAX7359, MAX7360) use a passive-scan technique in which the switch contacts are detected by sensing currents that flow when the switch matrix is driven by current sources (Figure 3). Once a key is pressed, the key controller starts to scan all keys. The scanning is carried out by applying constant-current sources to all column outputs (with port-output voltages of about 0.5V) while sensing the current that flows through the rows as they are turned on one at a time. For this passive-scan technique, an 8×8 switch matrix can be scanned in 64 clock cycles, because the flow of constant current is detected one column at a time. During the key scan, all column voltages are static at 0.5V except the one with a key pressed, whose voltage drops to nearly 0V during the time slot for scanning the corresponding row port.

Each column port is driven by a constant-current source of about 20μA. This amount of current flows through the column and row ports for which a switch makes contact, but only for a short time interval. Power consumption for the passive-scan method can therefore be much lower than that of the conventional approach, in which the voltage swings must drive capacitive and resistive loads.

Maxim’s low-EMI key scan method.

Maxim’s low-EMI key scan method.

Electromagnetic emission comparison

For a 1.8V power supply, a voltage swing of 0.5V instead of the whole rail can provide a reduction in electromagnetic emission of more than 11dB. The less-frequent swings of the low-EMI method also help to reduce the level of electromagnetic emissions. Figure 4 shows the simulated power-spectrum-density (PSD) levels for the conventional and low-EMI methods of key scanning. Tests assume a clock frequency of 1MHz, a supply voltage of 1.8V, and rise/fall times of 0.2μs. The blue curve represents the conventional method, and the green curve shows Maxim’s passive-scan method. The results show that the PSD level for the low-EMI method is 15dB lower. In fact, the low-EMI method produces electromagnetic emissions about 15dB lower than those of the conventional method. This reduction lets you avoid the use of EMI filters.

Simulated key scan PSD levels. The blue curve represents the conventional method, and the green curve represents the passive-scan method used by Maxim.

Simulated key scan PSD levels. The blue curve represents the conventional method, and the green curve represents the passive-scan method used by Maxim.

The dark blue trace (channel 1) in Figure 5 shows the column port and the light blue trace (channel 2) displays the row port voltages of a MAX7359 key-switch controller. A key that crosses these column and row ports is pressed at around 26ms. The key controller then wakes up with a delay of ~2ms, applies a current source to the column port (producing a voltage of about 0.5V), and starts scanning. It scans twice at the chosen debounce time before deciding whether a key is still depressed, or has been released. For a pair of adjacent scanning pulses, the one on the left is the original scan and the one on the right is the secondary debounce scan.

Simulated key-scan PSD levels. Channel 1 shows the column port, and channel 2 shows the row port voltages for the MAX7359 key-switch controller.

Simulated key-scan PSD levels. Channel 1 shows the column port, and channel 2 shows the row port voltages for the MAX7359 key-switch controller.

ESD protection and capacitance loading allowance

Because ports connected to the key pads are exposed to ESD (ElectroStatic Discharge), they need to be protected, sometimes up to 15kV. The built-in ESD protection for certain key-scan controllers is ±2kV (MAX73447, MAX7348, MAX7349, MAX7359), and for the MAX7360 is ±8kV. External ESD diodes in conjunction with internal circuitry usually provides adequate protection, but the diodes add capacitive loading to those ports. Although distinctive “key pressed” and “key released” codes enable the system to recognize multiple simultaneous key presses and their sequences, this capacitive loading is multiplied on the column and row ports involved. Each column port is driven by a constant-current source of 20μA ±30%, and each row port is pulled to ground by applying a positive pulse at the gate of the row port’s output transistor. The system detects a key-press action when the closure of a key switch pulls a column port to ground while the row port is at ground level.

While a positive pulse is applied to the gate of the row port’s output transistor (and shortly thereafter) the switch’s closing point discharges and then charges. Right after the positive pulse, the closing point quickly discharges to zero from 0.5V. After the positive pulse disappears, the closing point charges back to 0.5V, based on the formula

V=\frac{1}{C}I_{c}t=\frac{1}{C}20\times 10^{-6}\: t

where C is the total capacitance at the switch closing point. As an example, for C = 30pF it takes

t=\frac{V\times C}{20\times 10^{-6}}=\frac{0.5\times30\times10^{-12}}{20\times10^{-6}}=\frac{15\times10^{-7}}{2}=0.750\: \mu s\: \textup{ to\: reach 0.5V}

The scan period is

\sim \: \frac{1}{64\times 10^{3}}=15.625\: \mu s

In an application circuit, the charging process is affected by the capacitance of column and row ports including those with attached ESD-protection diodes. When the charging time is longer than the scan period, a false “key pressed” detection can occur. The falsely detected key can be the one whose row scan follows the pressed key on the same column.

To limit the charging time to less than 13μs while giving the circuit about 2.625μs to detect the “key pressed” state (while also considering the constant-current-source tolerance of 30%), the total capacitance should be less than 364pF:

C_{total}=\frac{1}{V}I_{c}t=\frac{1}{0.5}20\times 10^{-6}\times 0.7\times 13\times 10^{-6}=364\: pF

Assuming that a shift key and a regular key are pressed simultaneously, the capacitance at each port, including those with an ESD-protection diode attached, should be less than

C_{port}=C_{total}/3=121\: pF

This calculation includes the capacitances of two row ports and a column port. If the port capacitance is 20pF the allowed external capacitance is 101pF, but this approach applies only when the pressed keys share the same column port.

The excessive capacitance problem can also be avoided by reassigning a frequently pressed key in a multiple-key-pressing action (such as the shift key) to a separate column port, where only the capacitances from one column port and one row port are considered. For the case of a single key to be pressed in each column port, the capacitance allowed at each port can be increased to

C_{port}=C_{total}/2=182\: pF

With a port capacitance of 20pF, the resulting external capacitance is therefore 162pF.

We have examined the merits of using a dedicated, low-EMI key-switch controller for smart phones, and found that the EMI filters required in the conventional approach can be avoided in the low-EMI approach. Equally important, the use of a low-EMI key-switch controller in many smart phones can improve the overall system design and cost. Note that the estimated capacitive loading allowances are reasonable for most cell-phone keypad hardware, but you should avoid the use of ESD devices that impose heavy capacitive loading.

[1] SPI is a trademark of Motorola, Inc.

Tags: key-switch, controller, EMI, capacitive loading,

Comments on this post:

There are currently no comments.

Login or Register to post comments.
Click Here