The one thing that wasn’t quite behaving right about the LED lamp was the touch sensor. I was having trouble both with it being far too sensitive (and sensitive to interference from other devices nearby — I’d plug in my laptop to an adjacent outlet and it would sense a “touch”), but also it was often not self-calibrating properly.
So, I reread Quantum Research Application Note AN-KD02, “Secrets of a Successful QTouch Design”, and I finally tried properly doing the procedure in section 3 for probing the sensor field. And I discovered one thing: the Rsns value I’d previously guessed at was far too small. I was using 1K, while I got the appropriate sort of risetime with about 18-25k. I decided that Cs was probably also far too high, so I tried reducing it from .044 uF to .022 uF.
It’s a little bit less sensitive now — you have to touch the area on the outside of the glass with at least a couple fingertips, but it’s far more reliable and less prone to interference.
Also, it seems to be recalibrating its threshold more quickly now.
I may try adjusting the value of Cs a little more (need to buy more values of 1206 surface-mount capacitors), but I think I’m almost “done” now.
On another note, I think there’s some FPGA design in my future. It’s got quite a learning curve, but it looks like fun.