Introduction: Tfcd 3D Motion Tracking Through Capacitive Sensing and LED Output

In this instruction is explained how the movement of a hand can be tracked in a 3D space by using the principle of capacitive sensing. By changing the distance between a charged foil of aluminum and your hand, the capacity of the capacitor will vary. This method can be used as a low-end alternative for inertial- and optical systems to track motion in 3D space. In this prototype, we added LED’s which will glow when the object moves too close to the sheet of aluminum foil.

Step 1: Required Tools & Materials

- 3x 270k Ohm resistor

- 3x 10k Ohm resistor

- 3x Alligator clip

- 1x Red LED

- 1x Blue LED

- 1x Green LED

- 3x 220 Ohm resistor

- Solder

- Heat shrink

- Shield cable

- Arduino Uno

- Aluminum foil

- Cardboard

- Tape

- Spray glue

- Breadboard

- Connection wires (varying lengths)

Step 2: Constructing the Frame

Cut out three squared pieces of cardboard (250x250 mm) and three squared pieces of aluminum foil (230x230 mm). Apply spray glue to one side of the aluminum foil and apply each on the pieces of cardboard. In this prototype the sheets of aluminum foil will act as our capacitive sensors. Therefore make sure that there is enough space between the aluminum foil and the border of the cardboard, so there won’t be contact between the different sheets of foil once the frame is assembled. Once the foil is applied to the cardboard it’s time to assemble the three pieces of cardboard using tape to complete the frame. Again, make sure there is no contact between the different sheets of aluminum foil.

Step 3: Wiring of Shield Wires to the Plate and Arduino

It is important to use a shielded cable to connect the foils to the circuit. Using normal cables will generate an antenna effect and interfere with your sensor readings. Make sure you have 3 shielded cables that are about 50 cm long. Take one cable, strip down the wire, cut off the shielding wires and use only the inner wire to connect it by soldering the wire to the alligator clip. Make sure to apply a heat shrink to cover up the solder connection. Clip the alligator clips to the aluminum foil.

Connect all the shield wires to the positive row of your breadboard. Then connect this positive row to the 5V connection on your Arduino. Now take the main wire from the shield cable, and connect a 10k Ohm and 220k Ohm resistor in parallel. Connect this to the output port of your Arduino (we used 8, 9, & 10).

Repeat this step another 2 times for the other planes of the prototype.

Step 4: Wiring of the LEDs

Solder the ends of LEDs to long wire so that it can reach the corners of the respective plates from the arduino board.

We used pins 2, 3 & 4 as the output pins for our LED’s. This output is connected to the breadboard and connected to the positive leg of the LED. The negative leg of the LED is then connected to the 330 Ohm resistor. The other end of the resistor is connected to the ground of the breadboard, which is connected to the ground of the Arduino. Repeat this for all 3 LED’s. In our prototype the blue LED is connected to the Y-plane, the red LED to the Z-plane and the green LED to the X-plane. Tape the LED’s to the corresponding planes to get direct feedback when using the prototype.

If you don’t use a breadboard and you want to connect the shield cable directly to the Arduino, you can see the attached image for a nice overview of the solder connections. Your final connections should look like the overview image.

Step 5: Coding

In the attachment we placed the code we used for this experiment. For extra insights, after each main command a comment is placed, explaining what is happening in the code. Open the code in your Arduino software on your PC, and upload it to your Arduino. If you are using a laptop, make sure that it is being charged; otherwise your prototype won’t work.

Step 6: Using the Prototype

This way of 3D motion tracking is very sensitive for surrounding variables. Therefore make sure to calibrate the values in the code to your own situation. You can simply use the serial monitor to get the right values. Tip: you can build in a calibration by yourself, where it takes the average values + 10 % when running the code. In the video is demonstrated how the prototype should work correctly.