14
EE 242 - Section 02 Final Project: 3D Sensor Box using Capacitive Sensing Lab Group #6: Niven Prasad and Willy Okpobua Delivery Date: 12/01/15 Introduction The purpose of this experiment was to build a 3D sensor box made out of capacitive plates which senses the position of a human hand. The experiment also consisted of measuring the charge and discharge curves of the capacitive plates in different contexts. Lab Equipment Used (All sections): Agilent InfiniiVision MSO-X 2022A Stanford Research Systems Model SR715 LCR Innova 3320 Auto-Ranging Digital Multimeter 2 BNC to banana cable Alligator Clips Background There are two main forms of sensing used in electric appliances today, resistive sensing and capacitive sensing. The change in resistance is the fundamental concept behind how devices that utilize resistive sensing work . Devices such as 4-wire resistive touch screens work based off of this principle. The device is made of two layers, the top layer is the resistive layer and the bottom layer is the conductive layer. The two layers are separated by transparent microdots known as spacers. A voltage is applied across the conductive surface of the device so as to maintain a constant flow of current running through the conductive layer at all times. When a probe such as a pen credit card or finger is used to apply pressure to the top film of the device, the screen is activated. The pressure applied by the probe to the top layer causes the film to flex inwards, making the top resistive and bottom conductive layers to make contact thus causing a drop in voltage. The potential difference is detected by the controller

3D Sensor Box Using Capacitive Sensing

Embed Size (px)

Citation preview

Page 1: 3D Sensor Box Using Capacitive Sensing

EE 242 - Section 02

Final Project: 3D Sensor Box using Capacitive Sensing

Lab Group #6: Niven Prasad and Willy Okpobua

Delivery Date: 12/01/15

Introduction The purpose of this experiment was to build a 3D sensor box made out of capacitive plates

which senses the position of a human hand. The experiment also consisted of measuring the

charge and discharge curves of the capacitive plates in different contexts.

Lab Equipment Used (All sections):

Agilent InfiniiVision MSO-X 2022A

Stanford Research Systems Model SR715 LCR

Innova 3320 Auto-Ranging Digital Multimeter

2 BNC to banana cable

Alligator Clips

Background There are two main forms of sensing used in electric appliances today, resistive sensing and

capacitive sensing. The change in resistance is the fundamental concept behind how devices

that utilize resistive sensing work . Devices such as 4-wire resistive touch screens work based

off of this principle. The device is made of two layers, the top layer is the resistive layer and

the bottom layer is the conductive layer. The two layers are separated by transparent

microdots known as spacers. A voltage is applied across the conductive surface of the device

so as to maintain a constant flow of current running through the conductive layer at all times.

When a probe such as a pen credit card or finger is used to apply pressure to the top film of

the device, the screen is activated. The pressure applied by the probe to the top layer causes

the film to flex inwards, making the top resistive and bottom conductive layers to make

contact thus causing a drop in voltage. The potential difference is detected by the controller

Page 2: 3D Sensor Box Using Capacitive Sensing

which in turn computes the X and Y coordinates of the user’s touch and executes a command

synonymous to that coordinate on the device. The diagram below briefly describes how

resistive sensing works.

Figure A: Resistive sensing screen

From http://www.dawar.com/touch-screen-tools

Capacitive sensing on the other hand, which is what this lab is mainly about, is a technology

which relies on human capacitance as an input by means of capacitive coupling. Capacitive

sensing is based off of the principles of capacitance which state that when a voltage is applied

to the plates of a conductive object, an electric field is created between the plates which

polarizes the charge in the voltages source thus leading to the collection of positive and

negative charges on either plate of the plates of the conductive object and a reverse in the

polarity will cause the charge to act in the opposite manner. Capacitive sensors make use of

this concept by using alternating current which causes the charge to continuously reverse its

position. The constant motion of the charges creates an alternating current which is detected

by the sensor. The amount of current flow is determined by the capacitance which is in turn

determined by the area and proximity of the conductive objects. This principle is important in

the manufacture of capacitive sensors in that larger and closer objects cause a greater change

in current than smaller more distant objects. The diagrams below briefly describe how

capacitance in capacitive sensors works.

Figure B

Page 3: 3D Sensor Box Using Capacitive Sensing

From http://www.dawar.com/touch-screen-tools

Many devices today utilize the concept of capacitive sensing, A classic example is the iPhone

which has a touch-sensitive screen consists a layer of capacitive material. The device’s

capacitors are arranged according to a coordinate system that has advanced circuitry capable

of detecting changes at each point along the grid. The grid then generates its own signal and

relays it to the device processor for processing. This in turn enables the device to determine

locations and simultaneous touches at different locations on the device. Because of the

reliance on the capacitive material used to build the iPhone screen, it only works through

touch by a fingertip as opposed to a stylus which can not be used since it has no coupling

effect on the screen unlike the the human body that can transfer charge to or away from the

surface of the screen, a concept crucial to the functioning of capacitive sensors. The iPhone

screen fundamentally detects touch through one of two ways; mutual or self capacitance.

Under mutual capacitance the circuitry of the phone contains two distinct layers of material.

The first layer houses driving lines which carry the current and the other layer contains the

sensing layer which sense the amount current and charge being carried by the driving lines.

The lines are oriented perpendicular to each other on the glass substrate. When a probe such

as the human finger is placed on the screen of this device, this changes the amount of charge

in the driving lines and this change in the driving lines is detected by the sensing lines which

relay this information to the processor which strips out the background noise and determines

if you have touched one place, two places or made a swipe across the screen for

example. However, recent advancements have been made to this technology and now we

have on-cell where the touch-screen technology is on the surface of the smartphone screen

and in-cell technology where the touch-screen technology has been embedded into the screen

of the smartphone. The second mechanism through which the iPhone detects touch is self

inductance which uses one layer of individual electrodes connected with iPhone.

Page 4: 3D Sensor Box Using Capacitive Sensing

Below are diagrams which best describe how capacitive sensing works in modern day

devices such as the iPhone.

Figure C: A diagram illustrating the different layers of the iPhone screen and its components.

From: http://electronics.howstuffworks.com/iphone1.htm

Figure D: A diagram illustrating how touch sensing works on an iPhone.

\ From: http://electronics.howstuffworks.com/iphone1.htm

The 3D Sensor Box Build and Theory:

Page 5: 3D Sensor Box Using Capacitive Sensing

Materials and equipment used:

RadioShackⓇ 6’ Shielded Audio Cable

Arduino Uno Microcontroller

Alligator Clips

10㏀ and 220㏀ resistors

Cardboard and Reynolds aluminum foil

Short wires

The sensor box was built according to the schematic below Figure 1

The plates and wires are connected through 3 of the shielded audio cables. These shielded

cables are used to minimize any antenna effects. All connections are soldered the 60/40 lead-

based solder. The plates are simply made of aluminum foil glued onto three 11in. x 11in. x

11in. cardboard. Also the three 10㏀ resistors are connected to digital I/O pins on the

Arduino. The finished product is shown below.

Figure 2

Note: left plate = X plate, bottom plate = Y plate, right plate = Z plate

Page 6: 3D Sensor Box Using Capacitive Sensing

This 3D box uses a simpler form of capacitive sensing to detect the position of a hand inside

the box. The general idea of this box is to use the charge time of the plates to detect the

position of the hand on a digital representation of the box on the computer screen (Figure 3).

In the Arduino code, the digital pins output a voltage and charge the three plates and then

reads the state of each of these plates. The program starts a timer when the digital pin outputs.

While the plates are not fully charged, the digital pins read a “0”. and when the plates are

fully charged, the “0” turns into a “1” and the program stops the timer and records it. The

three plates take a certain time to charge when the hand is not near it. When a hand is near the

plates, the charge time of the plates increases because as the hand approaches the plate, the

body electrically couples with the plate to increase the capacitance of the plate. A diagram of

a simple circuit with a human hand affecting capacitance is shown in Figure E below:

Figure E

From: http://playground.arduino.cc/Main/CapacitiveSensor?from=Main.CapSense

So when the capacitance increases, the charge time increases since the capacitor charging

equation is:

VC(t) =Vo(1-e-t/RC)

Charge time depends on the time constant, τ = RC. So when the capacitance is increased, the

time constant increases, therefore making the capacitor take longer to charge.

Another coding program on the computer uses all this information from the Arduino code to

track the hand. This software is called, Processing. It essentially uses the time difference

from the three plates to charge to triangulate the position of the hand. So if a hand is near the

X and Y plates, those plates will take longer to charge while the Z plate will charge quicker,

so the program can track that your hand is near the X and Y plates. The tracking graphic is

drawn by the code is shown in Figure 3 below,

Figure 3

Page 7: 3D Sensor Box Using Capacitive Sensing

The yellow tracking ball represents where the hand is and the little cubes are just points on

the sensor box. The tracking ball follows where the hand goes as the person moves the hand

inside the sensor cube.

Note: The code for both the Arduino and Processing programs were written by the designer

of this 3D box and is open source. It can be found at: https://github.com/Make-

Magazine/3DInterface

Procedure and Data Section 1: Measuring resistor values The values of the resistors used in our circuit were measured and are shown below:

Table 1

Nominal Actual % diff

10㏀ 9.81㏀ -1.9%

10㏀ 9.62㏀ -3.8%

10㏀ 9.94㏀ -0.6%

220㏀ 0.223㏁ 1.36%

220㏀ 0.221㏁ 0.45%

220㏀ 0.223㏁ 1.36%

Procedure Section 2: Measuring curves First, Channel 1 of the oscilloscope was connected to the X plate of the sensor box. The

positive end made contact with the plate and the negative to the digital ground on the

Arduino. The resulting waveform on the oscilloscope was recorded without the presence of a

hand near that plate. Then a hand was placed on the plate, making contact, and the resulting

waveform was recorded. This was done for the Y plate as well.

Data Section 2: Measuring the charging curves:

Page 8: 3D Sensor Box Using Capacitive Sensing

The graphs below show the voltage taken from the plate and the arduino ground pin. The

voltages are not representative of the actual voltages across the capacitor themselves since it

was difficult to make this measurement, but these curves do give us the main idea of how the

capacitor behaves in this sensor box.

Graph 1 below shows the curve obtained for the X capacitive plate when there was no hand

present near the plate.

Graph 1

Graph 2 below shows the curve obtained for the X capacitive plate when there was a hand

touching the plate.

Graph 2

Page 9: 3D Sensor Box Using Capacitive Sensing

Graph 3 below shows the curve obtained for the the Y capacitive plate without the presence

of a hand in the box.

Graph 3

Graph 4 below shows the curve obtained for the the Y capacitive plate when a hand was

touching this plate.

Graph 4

Page 10: 3D Sensor Box Using Capacitive Sensing

Section 2 Discussion:

As seen from the graphs above, the two plates behave almost exactly the same which is

important for the sensor box to work properly. Also, the graphs obtained are what we

generally expected. As seen from Graphs 1 and 3, the curves have a familiar capacitor

charging and curves when the hand is not near the plate. When the hand does touch the plate,

the curves stretch out (as seen in Graphs 2 and 4) because the capacitance of the plate

increases and therefore the time constant increases since τ=RC.

Procedure Section 3: Measuring the time constant Then, the cursor function on the oscilloscope was used to measure the time constant of the Y-

plate curve by placing a horizontal cursor at 63% of the peak voltage and vertical cursors to

measure that time. This time was recorded when there was not a hand making contact with

the plate and with the hand making contact with the plate.

Section 3 Data:

The graph below shows the time constant measurement of the Y plate capacitor with no

contact made on the plate.

Graph 5

Page 11: 3D Sensor Box Using Capacitive Sensing

As seen from the graph, the time constant is about 32µs for the Y plate without a hand near it.

Now a hand was placed and the time constant was measured again as shown below in Graph

6

Graph 6

With the hand touching the plate, the time constant changed to about 55µs.

Section 3 Discussion:

The time constant measurements further confirm how the time constant increases as the hand

makes contact with the plate. The time constant was 32µs without the hand and 55µs with the

hand contact.

Procedure and Data Section 4: Measuring the Capacitance The LRC bridge was used to measure the capacitance of the plates. The positive lead was

connected to the plate and the human hand was used as the ground by holding the negative

Page 12: 3D Sensor Box Using Capacitive Sensing

lead in hand. The capacitance was measured when the hand was not making contact with the

plate and then with contact. This was done for all the plates. Note that these measurements

are fairly crude and rounded since the capacitance fluctuated a bit depending on how close an

object or person was as well as other interference. The table below summarizes the measured

capacitances:

Table 2

Plate No hand contact Hand Contact

X 15pF 40nF

Y 18pF 46nF

Z 12pF 50nF

Section 4 Discussion:

As seen from Table 2, the capacitance when there was no hand contact is in pF and when

there was contact from the hand, the capacitance went into the nF range. So the hand had a

significant effect on the capacitance of the plate. Once again, these values fluctuated a bit

when measuring it and how much of the contact the hand made on the plate varied from plate

to plate, however, the difference between no contact and contact is clear in the measurements

for all three plates.

Procedure and Data Section 5: 3D box performance The box was tested by placing the hand at various locations inside the sensor box and

recording the corresponding tracking on the computer.

Figure 4 shows some of the tracking snapshots.

Figure 4.1 Figure 4.2

Figure 4.3 Figure 4.4

Page 13: 3D Sensor Box Using Capacitive Sensing

Figure 4.4 Figure 4.5

Section 5 Discussion:

So as seen from the figures above, the box can sense the position fairly well at these corner

points, however, sometimes when the hand is in the middle of the box, the sensor box is not

very accurate. The reason for this may be because the capacitive plates are not big and

sensitive enough for the capacitance to change when the hand is in the middle. The more

likely reason is due to electrical interference since the large surface area of the plates can

make it act like an antenna, so other electrical interference can change the capacitance of the

plates and reduce the effect of the hand on the plates. When the sensor box is placed in a

more electrically isolated location, though, the tracking ball remains pretty accurate in all

parts of the box and the plates do not need to be touched for the tracking ball to move.

Conclusion

Niven Prasad:

In our project, we built a sensor box out of capacitive plates which sensed the position of a

hand based on the time to charge. It used the time difference from three capacitive plates to

track the position of the hand inside the cube. We also saw how the capacitor charging curve

changed when there was no hand making contact with the plates versus a hand making

contact. We saw this change when measuring the time constant as well. Finally, we saw how

the 3D box was able to perform. We found that it worked significantly less accurately in a

Page 14: 3D Sensor Box Using Capacitive Sensing

location with a lot of electrical devices since there was an antenna effect. Overall, though, the

box performed well.

Willy Okpobua:

In this project we learned about the fundamentals of capacitive sensing and how it is

applicable in appliances that we use on a day to day basis such as smartphones and

thermostats. Using this knowledge we were able to devise a sensor box that identified the

position of a human hand next to it based off the amount of time it took the charge. We were

also able to learn that for any form of capacitive sensing to take place, there has to be direct

contact with the human body which acts as a medium through which charge is channeled to

ground through human coupling. This was evident in the change in the curve of a charging

capacitor which exponentially increased as a result of transference of external charge by

human contact to the electric network.