Why capacitive touch fails behind cover glass
The touch panel worked on the bench. You put it in the enclosure behind a cover lens, or you added a second layer of glass, and now it misses presses, needs a hard push, or registers touches nobody made. Nothing on the board changed. The stack in front of the sensor did.
This is one of the most common ways a working HMI prototype becomes a failing product. The cause is almost always physics plus a configuration that was tuned for a different stack. Both are fixable, but only if you work out which one you have.
What the cover does to the signal
A projected-capacitive controller detects a finger by the small change it makes to the electric field between electrodes. Everything between the finger and the electrodes weakens that change.
Microchip’s touch design guidance states the basic effect plainly: a thicker cover increases the distance between the fingertip and the electrodes and diffuses the field, which lowers the touch signal. It also says that, for maximum sensitivity, each sensor should extend beyond the touch contact by at least the cover thickness. Note the context: that page is guidance for designing the sensor itself. If you buy a finished touch panel, the sensor geometry is fixed and you work with what the vendor chose.
Two separate things change when you move to the real enclosure:
- Thickness. A thicker lens or an extra glass layer moves the finger farther away.
- Material between the layers. Glass has a much higher relative permittivity than air. An air gap is therefore worse for the signal than the same distance of glass.
Riverdi’s explanation of a stacked cover walks through this with their own example. They treat air as roughly 1 and glass as roughly 7, convert a thin air gap into a glass-equivalent distance, and show that the total effective distance can grow to several times the original. Treat their numbers as an illustration of the method, not a rule for your panel. The method is the useful part: convert every layer into an equivalent distance and compare the total with what the panel was specified for.
The air gap is the one people miss
Most teams account for lens thickness because it is on the drawing. The air gap often is not. It appears when a lens is attached with tape at the edges only, when a bezel holds the glass off the panel, or when a second sheet of glass is stacked loosely on the first.
Riverdi’s write-up describes an air-bonded second glass as the second most important factor after the controller grade. Optical bonding fills the gap with an adhesive that has a far better permittivity than air, so it removes the weakest layer. It also affects reflections and rework: a bonded lens cannot be swapped without damaging the stack, and bonding is something to agree with the panel vendor before you order, not after.
If you cannot bond, keep the gap as small and as consistent as you can. An uneven gap gives uneven sensitivity across the panel, so presses work in the center and fail near an edge. The same applies to plastic lenses: the Mouser guide to robust capacitive touch interfaces notes that thickness of PMMA or ABS overlays must stay consistent to avoid uneven sensitivity.
Why gain alone does not fix it
The obvious reaction is to raise the controller’s gain or lower the touch threshold. That helps until it does not. Riverdi’s article makes the key point: raising gain also amplifies background noise, and on a consumer-grade controller the noise can approach the threshold, producing ghost touches.
So a thick stack creates two problems at once. The signal shrinks, and the gain you need to recover it pulls the noise floor up with it. The margin between the two is the controller’s signal-to-noise ratio, which is why industrial controllers and consumer controllers behave so differently under the same glass. Not every vendor publishes this figure, so check before you commit.
Noise sources inside the product matter more once the margin is thin. The Mouser guide lists motors and inverters as sources of broadband interference that can cause phantom activations or missed inputs, and switching supplies as a source of lower-frequency noise that slowly shifts the baseline. Two ordinary things in a finished product can also move a tuning you thought was done:
- ESD parts. The same guide notes that adding a low-capacitance TVS diode adds capacitance to the node and may require retuning thresholds.
- A new enclosure, display or power supply. Each changes the noise the controller sees, even if the stack is unchanged.
How to find which problem you have
Run these in order. Each takes minutes and each narrows the cause.
- Test the same panel with nothing in front of it. If it works bare and fails under the lens, the stack is the cause. If it fails bare in the finished product but worked on the bench, look at noise: the display, the supply, the enclosure grounding.
- Add layers one at a time. Put the lens on with no gap if you can, then the real gap. The step where the signal collapses is your answer.
- Read the controller’s raw signal, not just the touch events. Most controllers can report raw or delta values over I2C or a vendor tool. Record the finger-on and finger-off values and the idle noise, with the product fully running: backlight on, radio transmitting, motors driven. The gap between the finger signal and the noise is your real margin.
- Repeat at the panel edges and corners. Edge failures point to gap or thickness variation, or to field distortion near a metal bezel.
- Test the way users will. If the product will be used with gloves, test with gloves. Thicker materials make glove operation harder, and a design that passes bare-finger tests can fail there.
If the controller does not answer at all, that is a different problem. Our note on why a GT911 touch controller doesn’t respond over I2C covers reset and address timing.
The options, with their trade-offs
Thinner lens or smaller gap. The cleanest fix and the least flexible. It may conflict with impact or ESD requirements, so check with whoever owns the enclosure design.
Optical bonding. Removes the air layer and helps readability. It adds a process step, makes lens replacement harder and needs a panel the vendor will bond.
A different controller or panel. If the stack is fixed by the industrial design, a controller with better noise performance and tuning options may be the only route. Settle this early. Display and touch interface choices interact, and our note on choosing a display interface for a touchscreen product covers that decision.
Retune the existing controller. Many controllers store configuration for sensitivity, gain and thresholds, loaded by firmware at startup. Retuning for the real stack is legitimate and often enough for a modest change, but it only works if the idle noise is well below the finger signal. If it is not, you are trading missed touches for ghost touches.
Shielding and layout. A grounded or driven shield and sensible routing reduce what the sensor picks up. The Mouser guide describes both passive and active shielding. This costs a board spin if the touch controller is on your own PCB.
What to decide before you build the next prototype
Fix the stack, including the glass, any second layer and the gap, before you finalize the controller and its configuration. Tune with the real enclosure, the real display running and the real power supply. Keep the tuning values in version control as part of the firmware, so a production unit gets the same configuration as the prototype you validated.
We handle this by measuring the signal and noise in your actual stack, then deciding between retuning, a firmware change or a hardware change. Send us the panel and controller part numbers, a drawing of the stack with each layer’s material and thickness, and the raw touch readings with and without the lens.
If your touch panel worked open on the bench and fails under the real cover, we would measure the signal in the finished stack and retune or re-spec it.
Tools for this topic
- PCB trace impedance Trace width for a target impedance, or the impedance of a width: microstrip and stripline, single or differential pair, with 4-layer stack-up presets.
- Voltage divider Vout from Vin and two resistors, or the best standard pairs for a target Vout — with tolerance range and load effect.
- Regulator feedback resistors Feedback pairs for any Vref, for feedback-pin parts and three-terminal adjustables, with the bias-current term, worst-case range and divider-current guidance.
Related notes
- Why a MIPI DSI display stays black on an STM32 A bring-up order for STM32 DSI Host and LTDC when the panel stays black: separate the link from the framebuffer, then check lanes, clocks and init order.
- Heat an IMU or compensate its temperature drift? Your IMU's offset moves as the board warms up. Compare a heater with a per-unit temperature calibration, and see what each costs in power, test time and risk.
- Why an ESP32-P4 MIPI DSI display stays black A bring-up order for an ESP32-P4 MIPI DSI panel: DPHY power, timing, init sequence, touch, and the v3.2 silicon change that affects old boards.