Making piezo hit detecting tile

Hello Guys..

Making a floor of 30 tiles .. and each tile is has 5 piezo connected in parallel each other and connected to 2x16 channel mux with 1M ohm resistor to each channel. i have tested this setup works well but after adding the layer of foam it detect unwanted hits to tile.. any suggestion calibration method to make them better.

Thank You : )

Edit:

This setup is used for a sequence-based tile press game.

Each tile contains five piezo sensors connected in parallel. The output of each tile is connected to a 16-channel analog multiplexer (2 × 16 MUX used for 30 tiles). Each MUX channel has a 1 MΩ resistor connected for signal stabilization.

The MUX select lines S0, S1, S2, and S3 are shared between both multiplexers and connected to common GPIO pins. The signal output pins of both MUXes are connected together and read using a single ADC GPIO pin. The enable pins E0 and E1 are controlled separately using two GPIO pins to select the active multiplexer.

When a tile is pressed, the piezo sensors generate a voltage spike that is detected by the ADC. The system worked correctly during initial testing. However, after adding a yoga rubber mat glued to the tile surface, the system started detecting unwanted hits due to vibration propagation between tiles.

I am looking for calibration and filtering methods (mechanical, hardware, or software) to reduce false triggers and improve detection accuracy.

With such a perfect description of what it’s doing wrong, I thought that the solution would be apparent. Oh… wait….

So we don’t waste time, please tell us about all the other designs you tried before settling on this current one!

Remove the offending layer of foam.

Or change to a different type or thickness of foam. Why foam?

A border of foam around the detectors to hold the added layer of foam above the detectors.

1 Like

Not knowing the nature of the false signals leaves making assumptions about them.

Perhaps more can be known, like with contact bouncing.

updated description. my mistake its yoga rubber mat thickness 8mm around just using as extra layer of protection to hardware

Is it protecting the hardware as you want?

first thought to make it as piezo matrix scanner type connection worthless lot of diode and resistor needed so discarded the idea.

as piezeo can give signal in +/- so i think will connect one diode between piezeo ground to ground of mux pin.

piezeo are in parallel red that they can cancel each other signals

so i need to detect highest impact among those continuous noisy adc values.

And you have tested this? My intuition tells me the voltage created by one piezo will excite all others connected in parallel.

yup stick with glue to base floor. in this case piezo if pressed with foam so giving some noisy value to adc IG also my code has

#define TOTAL_TILES       30
#define SAMPLES_PER_TILE  4
#define HIT_THRESHOLD     200
#define HIT_COOLDOWN_MS   200
#define BASELINE_ALPHA    0.01f 

these parameter which i change threshold in my case to not detect that tile .. also i need to do auto calibrate at start working on it.. will do test multiple piezo let you know..

You can connect a piezo to 2 opto-isolator channels to get press and release reduced to digital events. Optos come in chip packages of 1 to many channels. Bipolar junctions flatten spikes.

What is the temporal manner of the false signals? Do they all come quickly then end like vibrations? Is there a time window after the first signal to ignore more that is shorter than the next strike can come or expect to count?

I checked all ADC channels one by one using the multiplexers. From my observations, the signal is not caused by vibrations. Most of the time the ADC value is 0 or very low (around 20–50), and when a proper hit occurs, it jumps to values between 200 and 800.

Based on this, I set the threshold to 120, and it is working correctly now.

I finally identified the real problem: the power supply. I was using a 7805 regulator to convert 12V to 5V, which introduced a lot of noise into the system. Because of this, the ADC readings were unstable.

When I powered the system from a laptop USB supply, the ADC values became stable and the issue disappeared.

Thank you all for the help : )

Hi, @tex0x

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
Hand drawn and photographed is perfectly acceptable.
Please include ALL hardware, power supplies, component names and pin labels

Can you post some images of your project?
So we can see your component layout.

Have you put one sheet over all the tiles?
OR
Have you cut a sheet for each tile?

A picture(s) is worth a thousand words.

Tom.... :smiley: :+1: :coffee: :australia:

Long ago I found that leds and diodes flatten piezo strikes, even direct with a screwdriver handle that makes the table bounce.

A piezo tap will drive a led flash. Opto-isolators have a led and detector inside of the chip, piezo-digital without ADC is faster.

I found these things out while finding ways to keep my MCU from getting high-V spikes from piezos used as force sensors.

1 Like