Introduction: TfCD Touch / Slide Bar
After seeing the new apple touch bar, we had the feeling we could do this too. That is how this project started. We did some research and found out that capacitive sensors were the key. If we would combine two sensors we could make a slide bar.
Step 1: Testing the Sensors
This is the most important part. If the sensors don't work, the whole touch bar won't work.
We had some trouble making it work for a whole afternoon. It turned out a wire was internally broken.
The sensors only exist out of two pieces of aluminium connected to a resistor and an Arduino. Because of capacitive phenomena it can sense a persons hand without touching it.
The first step is to download the add-on in the Arduino software: http://playground.arduino.cc/Main/CapacitiveSenso...
After you install this, you can open the Arduino program that we added.
The next step is to connect the Arduino to the breadboard like in the schematic image above. The two resistors in connection with the sensors are of 10 Mega ohm. The resistors in connection with the LED's are of 220 Ohm.
Then make the sensors. just connect two wires to a small sheet of aluminium. 5x3 cm's for example. When you start with measuring, don't touch it. because this influences the results.
When everything is connected and uploaded, you should get an input above 0 in your serial monitor. How closer you hand is to the aluminium, the higher the output number. If it is -2 it means something is not connected or in the wrong socket.
Make sure the LED's are properly connected. If you want to see the LED's work well, you should maybe change some of the thresholds in the code.
Step 2: Making the Interface
Use a saw and drill or use a lasercutter to make the components for the ‘touchbar’ interface. We used 5mm plywood and a lasercutter. We’ve uploaded some simple schematics which you can use as a template.
When you have the parts, attach the standard in which the lights go to the base. Use a good double sided tape to attach both parts to each other, and finally to the base.
Next, we have to cut the aluminium. Use a ruler and a small knife (a pair of scissors will do as well). To make sure the aluminium doesn’t touch the bolts on either side of the bar, we cut out a T-shape.
Connect the wires to the aluminium with a small piece of tape. Then, place the aluminium on the base of the bar (we used a small piece of tape to keep it in place) and place the top layer of plywood. It’s important that you turn the bolts and nuts tightly, so that there’s no space between the aluminium and the wood. Make sure your wires aren’t in the way.
Step 3: Solder the Wires
Now we solder wires to the LEDs. Connect them to your breadboard in the way that the schematics show. We used 220 Ohm resistors.
Step 4: Connect the Wires for the Sensors
You might want to make the sensors again. We saw we had a lot of benefit by redoing this, taping them everywhere and make sure they are locked properly between the two wooden plates.
We used 10 Mega Ohm resistors, but you might want to vary. The rule is: the higher the resistor, the more sensitive your capacitive sensor will become. For a 10 Mega Ohm resistor the distance at which the sensor will respond is around 4-6 inches.
Step 5: Almost Done!
Finally, run the code on your arduino! Make sure you calibrate it. Hover over your touch bar and read the values in your serial monitor. You can read the value for each light and calibrate it according to your finger’s position on the bar. If you want the 2nd light in the sequence to go on a bit sooner, simply lower its treshold value.