Game Development Reference

In-Depth Information

constant. As the controller measures the voltage,
V
, at pin 1, we can now solve for

resistance:

R = V/I

With our constant current,
I
, and our known voltage,
V
X
, we can calculate the resistance

of the circuit by inputting (5 -
V
X
) for
V
as follows:

R = (5 -
V
X
) / I (1)

Note that we have to have the change in voltage across our resistor (the wire), so be sure

to use the difference between the two values. Every conductor has an inherent internal

resistance, and through testing we can determine what the resistance is, measured in

ohms per unit length, and use that to determine our total resistance described by:

R = 2rL

where
r
is the aforementioned ohms per unit length and
R
is the total resistance of our

circuit. Note that we have multiplied
L
by 2 to account for both the wire run to the point

of contact and back. If we substitute this for
R
in our earlier equation, we now have:

2rL = (5 -
V
X
) / I

And finally:

L = (5 -
V
X
) / (2rI)

where
L
is the only unknown. To illustrate, let us assume the measured voltage is 4.95V

and the wires are 24-gauge copper wires. A quick look in a standard electrical engi‐

neering book gives the resistance as 0.08422 ohms per meter. When we designed our

constant current source, let's say we picked 50 milliamps:

L = (5 - 4.95V) / ((2)(.08422 ohms/meter)(.05A))

L = 5.9 meters from the controller

As you can see, the material's resistance per meter, the constant current supplied, and

the sensitivity of the voltage-sensing circuit must all be finely tuned to ensure that the

controller is capable of sensing touch events in the appropriate dimensions. In a resistive

touch screen, the wires are microscopic so that the resistance per meter is much higher.

This allows the screen to detect smaller distances.

Four-wire resistive touch screen

With some modification, we can expand our previous model to two dimensions. In the

four-wire touch screen, there are four basic layers and four wires, three of which will be