Anda di halaman 1dari 4

Transcript of A Touchless 3D Tracking Interface

TEAM MEMBERS
OBJECTIVE
Our objective is to create a 3D computer interface using little more than
an Arduino, six resistors, and some aluminum foil!
A Touchless 3D Tracking Interface
Using Arduino
Arpit Reja
12BEE0116
Pulkit Agrawal
12BEE0206
In this project, well take a very simple idea the length of time it takes a
capacitor to charge and make something rather amazing with it: a 3D
interface that can track the position of your hand.
BLOCK DIAGRAM
THANK YOU!!
Arduino
Uno
Power
supply
Capacitive Sensing
X-Axis
Z-Axis
Y-Axis
Processing Softwares
Computer Screen
COMPONENTS USED
Aluminum foil (1)
Masking tape (1)
Computer with Processing and Arduino software installed (1)
Shielded cable, cut off the ends, cut into (3) 2' lengths (1)
Arduino (1)
10K resistors (3)
220K resistors (3)
Alligator clips (3)
pieces of cardboard (3)
CIRCUIT DIAGRAM
CONNECTIONS
On the other non-alligator end of the cables, twist together
the 3 shield wires and solder them. The shield will be connected
to the 5V pin on the Arduino. This will minimize the antenna effect of the

cable on the circuit.


Referring to the schematic, connect the resistors to the three inner wires
of the cables as shown and connect this to the ends of the three wires.
The 220K resistors all connect between the inner wire of the cable and
5V. The 10K resistors will each be connected between
the end of the cable and a pin on the Arduino. The circled area indicates
that this wire should be shielded, with the shield connected
to +5V.
Use a small piece of jumper wire to make the connection between
the shield wires and the 5V output pin on the Arduino.
Connect each of the 10K resistors to pins 8,9, and 10 respectively.
Connect the red wire to the +5V pin on the Arduino.
Attach each of the alligator clips to a foil plate. The clips should be
attached in the following order: pin 8=left plate (x), pin 9=bottom plate
(y), pin 10=right plate (z). Make sure that each clip is making good
electrical contact with the foil and is only touching one plate.
ARDUINO CODE
#define resolution 8
#define mains 50

#define refresh 2 * 1000000 / mains

void setup() {
Serial.begin(115200);

for(int i = 2; i < 14; i++) {


pinMode(i, OUTPUT);
digitalWrite(i, LOW);
}

for(int i = 8; i < 11; i++)

pinMode(i, INPUT);

startTimer();
}
void loop() {
Serial.print(time(8, B00000001), DEC);
Serial.print(" ");
Serial.print(time(9, B00000010), DEC);
Serial.print(" ");
Serial.println(time(10, B00000100), DEC);

long time(int pin, byte mask) {


unsigned long count = 0, total = 0;
while(checkTimer() < refresh) {

pinMode(pin, OUTPUT);
PORTB = 0;
pinMode(pin, INPUT);
while((PINB & mask) == 0)
count++;
total++;
}
startTimer();
return (count << resolution) / total;
}
extern volatile unsigned long timer0_overflow_count;

void startTimer() {
timer0_overflow_count = 0;
TCNT0 = 0;
}

unsigned long checkTimer() {


return ((timer0_overflow_count << 8) + TCNT0) << 2;
}
OUTPUT
CONCLUSION
In this,we introduced the concept of
capacitive sensing. Nearly all sensing
of this kind depends upon how long it
takes a capacitor to charge (known as
the time constant). Placing an object
within the electric field of a capacitor
will affect the capacitance value and
the corresponding time constant.

Anda mungkin juga menyukai