Button Coding Progress #1

Building the “SUI cube” prototype is progressing quickly and with only some pain…

My initial electronics design made use of a very small code library that would allow me to sense the touch of the button. This method did not require any additional hardware and used only a small amount of code to detect the touch. (See photo above) It is a great piece of code and only requires connecting a single wire to a single digital pin on the Arduino.

However, this method did not work for the level of control that I need for my cube. My basic debugging showed that the touch is being consistently detected, but the detection cycles quickly between “touch” and “no touch”. For my cube, I need to be able to detect when a finger is touching the button for more than 1.5 seconds, an action I’m calling a “hold”. This “no hardware touch detection” would cycle between “touch” and “no touch” so quickly when my finger was “holding” on the button, that I wasn’t able to accurately interpret the “hold” action.

I instead moved towards a “hardware required touch detection”… (see video)

The button touch is now being detected by the Quantum QT110 QTouch Sensor IC (chip). Only a simple setup is required, connecting the chip to power, ground, a capacitor to filter out noise, a wire that will be touched, and one digital pin on the Arduino to receive the HIGH/LOW output signal. The good thing about using the chip, is that it does the touch processing for me and outputs a simple HIGH/LOW signal to the Arduino, and also allows me to detect the “hold” action! Integrating this chip to the electronics was almost too easy. The only custom wiring I did was to lengthen the “auto timeout” from 10 seconds to 60 seconds. I changed one wire from power to ground for one pin on the chip to achieve this.

Functionality so far:

  • button press (red light on)
  • tap button touch (blue light on, repeats number of taps)
  • hold button touch (blue light, cycles brightness up and down)
  1. No comments yet.

  1. No trackbacks yet.