The Electronic Thumbwheel Switch

(Article published in 'Electronics For You' magazine in 1983)
(and republished in 'Electronics Projects Volume 5)

Thumbwheel switches are very popular in applica­tions requiring data to be preset. The ones pres­ently available are mechanical devices. In this article construction details of its electronic version are given.
The basic module
The electronic thumbwheel switch is centered around a decade up/ down counter IC 74192. This IC can produce a BCD count at its output pins. It counts in the forward direction if clock pulses are given at pin 5—provided pin 4 is at logic 1. It down counts if the clock pulses are given at pin 4—provided pin 5 is at logic 1.


The circuit of the basic module is given in Fig. 1. On pressing switch A, pin 3 of IC2 goes to logic 1, thereby permitting clock pulses fed at pin 5 of IC2 to pass through (after an inversion) to pin 5 of IC3. Since pin 8 of IC2 is held at logic 1, the counter counts upwards with each clock pulse. On releasing switch A the NAND gate is disabled and no further clock pulse reaches the counter, thereby locking its output. The count is displayed after decoding by 1C4 on a 7segment display. On pressing switch B the thumbwheel switch can be ‘rotated’ in the reverse direction.
The switches have been debounced by having a highly asymmetrical clock pulse output from pin 3 of IC 1. The duration for which the clock pulse remains high has been I kept very small by the use of diode D1 across resistor R2. It will be observed that the NAND gates are enabled only for I very brief periods, thereby reducing the probability of the pulses generated during make/break of the switches from reaching the clock inputs of the counter.
The output of the thumbwheel switch is available at pins 3-2-6-7 of IC3.
The layout of the thumbwheel switch can be built as shown in the photograph of the prototype (or Fig. 2). The PC board is placed perpendicular to the display board so that a number of these thumbwheel switches can be stacked side by side.


8 or 16 position switch
The basic module described above has 10 possible switch ‘positions'. An 8 or 16 position switch additional circuitry to indicate the position of the switch is required as IC 7447 can only display numbers between 0 and 9. To achieve this, a binary-to-BCD converter 1C 74185 has been used. The modi­fications required to the basic module are shown in Fig. 3.

To obtain a 16-position switch additional circuitry to indicate the position of the switch is required as IC 7447 can only display numbers between 0 to 9. To achieve this a binary-to-BCD converter 1C 74185 has been used. The mod­ifications required to the basic module are shown in Fig. 4.


Switch with dial positions other than 8, 10 or 16
There are applications where the number of dial positions required is other than 8 or 10—the standard available in mechanical thumbwheel switches. The electronic version offers the advantage of a user programmable number of dial positions. Suppose a 5-position switch is required, then the sequence in which the output should roll would be 01234 01234 01.... The circuit modification is shown in Fig. 5.

The maximum number of desired switch positions is set by coding the number in binary form by opening (logic 1) or closing (logic 0) the switches S3 to S0. The binary code is given in Table I for different switch positions.

The output of the counter is compared by IC 7485, a 4-bit magnitude comparator. In the up-count mode, when the output of the counter indicates a number greater than the preset number, the ‘clear' pin is brought high-resetting the counter to count ‘0000/ During down- count the ‘borrow’ pin goes low at count 9. This is connected to the parallel load input, thereby loading the maximum count set at the switches S3 to SO. The ‘clear’ pin is disabled during down count. Thus, the thumbwheel switch rolls between *0’ and the maximum desired switch position.
One of 10 or one of 16 outputs
The output of the counter IC (74192/ 74193) can be fed to IC 7442, a BCD to decimal decoder or to IC 7454, a 4-line to 16-line decoder, to obtain a one of 10 or one of 16 output. On inverting the outputs a ring counter code can be obtained The connections are shown in Figs 6 and 7.


Excess 3 code output
To obtain an excess 3 code output, the output of the counter is fed to IC 7483, a 4-bit binary full adder. The coded output is available at pins 9, 6, 2 and 5, as shown in Fig. 8.

Gray code output
To obtain Gray code output, the output of the counter is fed to 1C 7486, a quad 2-input EXOR gate. The coded output is available at pins 8, 6, 3 and 1, as shown in Fig. 9.

Tri-state outputs
Tri-state outputs can be had by adding IC 74125, as shown in Fig. 10.

CMOS compatible outputs
CMOS compatible outputs can be obtained by use of 1C 7407, an open collector buffer, as shown Fig. 11.

The electronic thumbwheel switch thus offers a very wide choice of codes and number of switch positions not available in mechanical switches.

No comments :

Post a Comment