Enginursday: Prototype Capacitive Touch Dance Floor with a Teensy and XBees
I’ve always wanted to build an interactive dance floor. After hearing about the capacitive touch pins available on the Teensy from Joel, I decided to try it out on a prototype made out of cardboard. While it is not the most durable floor, it was sufficient enough. I also added a pair of XBee Serial 1's configured for I/O line passing to make it simple for controlling something at a distance.
To test, I had my crewmate Julio come in from Block 1750. Every summer, we go out and fundraise by dancing in Boulder for a few events such as Block 1750’s Block Party. It takes a lot of work to fundraise and every dollar counts so for the finale, we usually have Julio hand hop for every dollar donated. I set up a counter with a 7-segment display to keep track of the number of hand hops and to see if the capacitive touch tile was reacting as expected. To verify that it is working, I had some people counting the hops at the same time. Check out the project demo below.
Results from stress testing the Teensy's capacitive touch sensing pins
While it seemed like a straightforward build, I had some interesting results from stress testing the Teensy's built-in capacitive touch pins. The sensitivity varied depending on the setup or environment. This required a few adjustments to get it working but it was not the most reliable. I would have to constantly tweak the sensitivity or set-up to get it working.
Power supply
The Teensy's capacitive touch pins read differently depending on the power supply. Switching from a wall adapter to a LiPo battery for remote power was enough to cause the Teensy to not react as expected. The Teensy was able to detect a touch by touching the LiPo battery and copper electrode. Adding a piece of copper under the cardboard floor with a wire leading to the battery for reference seemed to help.
Differences in material and location
After testing the tile on different floors, I noticed that the tile would not react the same on each. The sensitivity with the tile and battery on carpet was not the same when testing it on concrete. With the wire touching the battery for reference, the Teensy had a false trigger when no one was directly touching the electrode. By keeping the same sensitivity, I had to add a piece of carpet under the tile and disconnect the wire from the battery. The sensitivity changed once again when placing it over a wooden floor. The tile also had false triggers when testing it out on the same type of floor around the building (i.e. first floor to second floor and different rooms).
Carpet | Concrete | Wood |
Direct contact vs. proximity
Another characteristic of capacitive touch sensing is the ability to detect something even when the object is not directly touching the electrode. The sensitivity of the Teensy's capacitive touch pin was set just enough to detect a hand even though it was not touching. This was not ideal when my friend was hopping on his hand. The Teensy would still detect my friend even if he was above the electrode.
Making it better
If I were to continue using the Teensy's built-in capacitive touch pins for the interactive dance floor, I would try to:
- Utilize more of the capacitive touch pins that are available instead of just one small tile for a wider area.
- Add the TeensyView OLED or use the serial pass-through with the XBee’s UART pins to help adjust the sensitivity.
- Use a more durable floor material instead of a flimsy piece of cardboard.
- Seal the capacitive touch material to prevent the electrodes from damage.
- Make the copper electrode bigger.
- Add rubber pads below the tile to prevent sliding when a person is moving over the floor.
- Place the electronics in an enclosure for protection.
Resources and going further
If you are interested in the circuit and example code used for the prototype, check out the GitHub repository.
Capacitive Touch Dance Floor with Teensy
That’s all for now. Until next time!
Via Westline T2B http://www.rssmix.com/
Comments
Post a Comment