[Help!] Design Review/Debug: 40x40 Force Sensing Resistor Matrix Mat  - Page 1
Forum section: electronics / projects

author: Rjc987
author_rank: Contributor
timestamp: May 24, 2025, 05:45:52 am
content: Hey everyone - I'm building a custom FSR matrix mat system for a client that consists of 5x 40x40 matrix FSR mats but I'm having some issues. I built a 32x32 prototype a few months ago that used an expanded version of this:https://www.sensitronics.com/tutorial-res/docs/MatrixArrayExampleSchematic.pdfwith 4x 74HC595 Shift Registers and 4x 74HC4051 Multiplexers with an arduino uno esp32 controlling everything. Worked great.So for this project I decided to basically do the same thing for each mat, and then just connect them all to a hub Nano via I2C for combining and displaying the data. The mat boards are essentially a further scaled up version of the prototype/sensitronics design, this time using 5x of the 595's and 3x 16 bit CD74HC4067's in place of the 8bit 74HC4051 and controlled by a Nano Every vs Uno, on a custom PCB. It uses the same basic circuit structure but with a tiny bit of extra filtering/ pull-ups/downs for stability.I attached a screen cap of the PCB layout as made - although it's had some bodges since then - as well as the current revision of the schematic as actually wired w/ bodges. (I'm fairly green when it comes to spinning custom PCB's btw so apologies for the layout, not the prettiest job for sure - any layout pointers for the future would be welcome too!).The problem I was originally having was any matrix position that was pressed would ghost across the entire row even though when measured, the other positions are all well over >10+Mohms to completely open circuit with the pressed position measuring below 200ohm. After changing some pull-up/pulldown values and rewriting the code, I'm now not seeing nearly as much ghosting but also the sensitivity is extremely low and the values are backwards - with no pressure the ADC is reading 1024, and with full pressure it's only reading 8-900.Before I go soldering on test leads and breaking out the logic analyzer and scope, I was hoping you guys could give me a quick sanity check on the schematic/PCB to see if I'm missing something obvious which I just can't see from being so close to it for months nowThe fact that the prototype worked perfectly and I'm getting reasonable data makes me think that the code and hardware are all at least working but some values or placements are just incorrect, but I'm not 100% at this point either. Any help would be greatly appreciated!

author: Rjc987
author_rank: Contributor
timestamp: May 24, 2025, 03:19:41 pm
content: Thanks! Changed.

author: Simmed
author_rank: Frequent Contributor
timestamp: May 24, 2025, 04:17:40 pm
content: maybe looking at keyboard scanning method/design can be of some helphttps://fantechworld.com/blogs/fantech-tips/anti-ghosting-nkro-gaming-keyboardQuotei am not the experti think it has to do with adding diodesso you need to use your googlefu

author: Doctorandus_P
author_rank: Super Contributor
timestamp: May 24, 2025, 04:52:48 pm
content: a 40 x 40 matrix would require 1600 diodes, and mounting them on the sensor sheet would be difficult or fragile. If your ADC can read sensor values between 8 and 900, that near to 10 bit of resolution. That already seems quite good to me.Your PCB layout is atrocious though. Always strive to have a continuous GND plane on one side of the PCB. You can do whatever you like on the other side, but cutting up both sides into little GND zones is probably worse then no GND fills at all. Do some research into this area. Design for EMC is an intrinsic part of PCB design, and if you're serious (mandatory for commercial projects) this really is a mandatory subject.I also had a short peek at the linked schematic. There is no signal conditioning at all. No filtering, no buffering, no amplification, no mitigation of ESD events from external wiring, no filtering of the power supply, etc. Without such measures your product will be unreliable, and signal integrity will also be compromised.

author: Rjc987
author_rank: Contributor
timestamp: May 24, 2025, 08:23:09 pm
content: Thanks for the constructive feedback- this is just a one off project that would obviously go through major redesigns if it was going any further but all are very helpful pointers. The fastest signal is barely 2khz and the rest are 10's of hz so I figured it wasn't super critical but you know what they say about assuming.... If I had more time I would respin the board and spend a lot more time on layout and design but time is super critical so I just need to do whatever I can to improve the current board.However I just noticed that clipping my scope probe to the arduino A0 pin that's reading the actual FSR values out from the Mux's completely fixes everything. The ghosting, the reversed values, the sensitivity, everything immediately corrects and it starts behaving perfectly. This works whether it's in 1x or 10x, with the probe clipped to board ground or just floating, and even with the scope turned off, no difference (although the scope itself is grounded and the problem mostly comes back if the scope is unplugged from the wall). Am I right to think this is a capacitance issue rather than an impedance issue or is it something else and how should I approach it?

author: Doctorandus_P
author_rank: Super Contributor
timestamp: May 24, 2025, 09:17:45 pm
content: your sensor sheet is a big 40 by 40 cm antenna that picks up lots of noise. Without any filtering, this picks up anything, from mains frequency hum to all nearby RF signals. Try making a phone call near your sensor.Your sensor sheet already is a big resistor, so adding a capacitor already generates a primitive RC filter.Whether capacitive is really the issue is easy to verify by adding a small capacitor (cope probe is 15pF or so) to the input of the ADC.Using an ADC without any sort of filtering is somewhere in between ignorance and madness, especially with such a big antenna added.Sometimes you have a loose joint, and just mechanical pressure from the probe can be what appears to "fix" it.Now I see R1, 20k. (Why not standard E12?)One way to extend the measuring range is to add another resistor. If you add for example a second 2k2 resistor to a digital pin, then you can switch the mode between output low (grounded) In that case you have 20k parallel to 2k2. Or you can set the digital pin to floating. In that case you're measuring only though the 20k resistance. This same trick is also used in the ubiquitous component tester. (That's a really nice circuit. Buy at least one if you don't have it yet.)

author: andreahmed
author_rank: Newbie
timestamp: July 26, 2025, 07:23:54 pm
content: @RJC987I'm doing he same circuit with same resoultion 40*40.Did you solve the problem ?Can you post the final schematic?