Close

Recalibrating after Framing the Map

A project log for The Interactive Air Quality Map

A Physical Touch Reactive Map that shows the Air Quality of a location

ahmed-oyenugaAhmed Oyenuga 10/20/2022 at 20:370 Comments

Capacitive touch sensing is very sensitive, to both physical and electrical changes, so I wasn't surprised to find that touch detection on the map became erratic after I enclosed it, the switching power supply and large aluminum back panel is the likely cause of this problem.

I did anticipate the noise issue which is why I designed a coplanar shield into the touch pads, but I underestimated the severity of the noise and elected not to wire the shield on the pads to ground.

Fix

To deal with a noisy signal, you first have to record and study it, I implemented an auto-updating touch detection algorithm, by collecting a little signal sample and then recalculating the threshold based on how noisy the sample is, for the spikes in the signal, I implemented a gate to allow only a specific range of values through, and I also used an exponential filter to smooth out the signal, MPLAB'S  Data visualization software helped a lot here.

Luckily I thought to break out the SWD pins for programming the capacitive touch controller board to a side on the frame, so I did not have to open up the map to recalibrate it.

See the Project repository to see the full code.

Discussions