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, we’ll 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

Document3d

  • Upload
    tarunch

  • View
    212

  • Download
    0

Embed Size (px)

DESCRIPTION

gdefjkwembdc dbjwsmdbwuj hdujdbyehdj

Citation preview

Page 1: Document3d

Transcript of A Touchless 3D Tracking InterfaceTEAM MEMBERSOBJECTIVEOur objective is to create a 3D computer interface using little more than an Arduino, six resistors, and some aluminum foil!A Touchless 3D Tracking InterfaceUsing ArduinoArpit Reja12BEE0116Pulkit Agrawal12BEE0206In this project, we’ll 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 DIAGRAMTHANK YOU!!Arduino UnoPower supplyCapacitive SensingX-AxisZ-AxisY-AxisProcessing SoftwaresComputer ScreenCOMPONENTS 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 DIAGRAMCONNECTIONS• On the other non-alligator end of the cables, twist togetherthe 3 shield wires and solder them. The shield will be connectedto the 5V pin on the Arduino. This will minimize the antenna effect of the

Page 2: Document3d

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 betweenthe end of the cable and a pin on the Arduino. The circled area indicates that this wire should be shielded, with the shield connectedto +5V.

• Use a small piece of jumper wire to make the connection betweenthe 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++)

Page 3: Document3d

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;}

Page 4: Document3d

unsigned long checkTimer() {return ((timer0_overflow_count << 8) + TCNT0) << 2;}

OUTPUTCONCLUSIONIn this,we introduced the concept ofcapacitive sensing. Nearly all sensing of this kind depends upon how long it takes a capacitor to charge (known asthe time constant). Placing an objectwithin the electric field of a capacitor will affect the capacitance value and the corresponding time constant.