A couple of weeks ago I discussed sending off a new PCB for manufacture and hoping things went well. Basically everything went swimmingly. I had all of the functionality done for the initial prototype and was a few weeks ahead of schedule. Then I tried putting all of the electronics into the initial enclosure. . . . disaster ensued. The keypad no longer worked!
The new design implements a 12-key capacitive-sense keypad. This was done for cost savings, enclosure integrity, and the ability to change the graphics down the road. The keypad worked great without the face plate. However, with a 0.100” clear ABS cover, the keys became un-responsive. After much teeth-gnashing and hair pulling, I realized I had become undone with bad decisions during the design phase.
In broad strokes, when using the CTMU found in Microchip microcontrollers to sense finger presses, you are looking at capacitances on the order of 10pF. A finger press generates about 10pF when it directly touches the solder mask on the PCB. However, once a plastic (or glass) cover is placed over the sensor, the finger generates only about 1-2pF. Basically a 50% voltage divider (not really, but bear with me), is changed to a 10% voltage divider. If there is any stray capacitance (I/O pins, connectors, long lines, etc.) this voltage divider gets smaller and smaller so that the dynamic range of the the measurement gets smaller and smaller.
In an effort to make the prototyping and manufacturing easier, I separated the CTMU from the capacitive keypad with two connectors and a ribbon cable. Gack! I added about 30pF of capacitance. Once the cover was on I was trying to sense a little less than 1% change in total capacitance (10 counts with a 10-bit A/D). Factoring signal to noise and other factors, I could not reliably sense the button presses.
I changed the design layout (now the micro is on the same board and close to the capacitive keypad). I have also upgraded the sensing firmware. I will receive the new boards at the end of this week and should have results this time next week. Luckily, all of the other design and firmware is done. I will give another update once I have final results for this prototype.