Pressure mat

Does anyone have any experience with something like this?
image
Large Floor Pressure Alarm Switch Pad Mat - PM156 | eBay

And connecting it to a ESP with 3.3 volt?
I tried to talk with the manufacturer (not Ebay seller) but they didn’t want to help me because I did not have a company.
They even refused to answer if it works with 3.3 volt.

EDIT:
Datasheet says:

1 Like

Yes it will work with 3.3V.

Two of the wires (red I think) will connect like a switch when you step on it. It will actually have a higher resistance than a switch (~10 Ohms) but this is fine for use with the ESP as the pull up or down resistors in the ESP are between 10K and 100K Ohm, so compared to this your mat is for all intents and purposes a short circuit when you step on it. Just dont try to pass large currents through it to switch loads directly. Connect it to a GPIO only.

The other two wires are nothing more than a loop of wire used for tamper protection (cut the loop and they go open circuit, pretty low tech).

Try to keep the mat as flat as possible, dont fold it or roll it up.

I just received two larger ones that were shipped folded into quarters and one of them is kaput.

1 Like

That sounds great!
Thank you!

One thing I did find is that these mats are great antennas and pick up a lot of 50Hz noise when nothing is stepping on them. Enough to trigger my GPIO. This was easily fixed by putting a 0.1uF capacitor from the GPIO to GND.

3 Likes

Hello,

I bought one of these pressure mats and need some help setting it up. I would like to connect it to a NodeMCU ESP8266 to trigger an automation in Home Assistant.

I am using ESPHome to program the NodeMCU and my code for the switch is below.

switch:
  - platform: gpio
    pin:
      number: D1
      mode:
        input: true
        pullup: true
    id: relay1
    name: "Pressure Switch"
    on_turn_on:
      - delay: 500ms
      - switch.turn_off: relay1

I cannot figure out what to do with the four wires coming from the pressure mat. How do I connect the pressure mat to the NodeMCU?

Thank you for your help.

Do you have a multimeter?
If so then connect two wires at the time, set the multimeter in beeping mode and and press down on the mat and see if you get connection.
If you do then that is the two wires you should use

And as you are using the input configured with a pull up resistor you should connect the pair of wires to D1 and GND.

You should also invert the input configuration.

If you were using a pull-down config you would use D1 and 3.3V without configuring for invert.

Thank you both for your responses!

I do have a multimeter and was able to identify the correct pair of wires. Thanks again!

I have updated my code to include the inverted input as well.

switch:
  - platform: gpio
    pin:
      number: D1
      inverted: true
      mode:
        input: true
        pullup: true
    id: relay1
    name: "Pressure Switch"
    on_turn_on:
      - delay: 500ms
      - switch.turn_off: relay1

I will be using the Pull Up configuration. What size resistor do you think I should use? I tried wiring the switch ground to the 3.3v ground on the NodeMCU and the other wire to D1, but it did not work. Do you know why?

Thank you for any help you can give.

with the config you have here connect one wire of the pressure mat to D1 and one to GND and it should work.
The resistor is internal on the ESP.

No I don’t. That should have worked.

Hi! I saw this post and I have a similar question. I purchased a similar mat here:

I’ve extended the wires and attached jumper wires, tested it with original battery alarm that came with it, and ensured the alarm still went off when I applied pressure on the mat. All good there.

However when I attached it to my ESP32 is where I get stuck. I applied the below code. But when I check the logs, I don’t get any response to applied pressure.

I’m using the below ESP board, connecting one wire to ground and the other to D4.

Also, would I need to set the noise encryption to yes? If so how would I do that?

I get this from the logs: [C][api:143]: Using noise encryption: NO

Any help would be appreciated!

Best

esphome:

  name: "doggy-door-pressure-mat"

esp32:

  board: esp32dev

  framework:

    type: arduino

# Enable logging

logger:

# Enable Home Assistant API

api:

ota:

wifi:

  ssid: !secret wifi_ssid

  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails

  ap:

    ssid: "Esphome-Web-C92A14"

    password: "3nTfEoSedK9M"

captive_portal:

binary_sensor:

  platform: gpio

  pin:

    number: 5

    inverted: true

    mode:

      input: true

      pullup: true

  name: Doggy Door Pressure Mat

Hey did you ever get this working? I’m thinking of trying this out

Here is someone who explains in detail how to use these pressure mats. Making my own Bed Sensor — Home Automation Guy