Introduction: Pressure Sensitive Floor Mat Sensor
In this Instructable I will share a design for a pressure sensitive floor mat sensoer that is capable of detecting when you stand on it. While it cannot exactly weigh you, it can determine if you stand on it with your full weight or if you simply make contact with it.
The mat measures people using Velostat, a material that changes its electrical resistance based on the amount of pressure applied to it. I made the whole mat for under €20 (excluding the rug).
Step 1: What You Will Need
This is what you will need to make the sensor:
- Velostat: To cover enough area under the rug, I used 2 squares of 28cm (11") bought at an Adafruit reseller.
- Copper tape: I used 5mm wide, and around 6-7m of tape.
- A thin insulating tape: I used 25mm wide kapton tape.
- Wiring to hook the rug up to something.
- A soldering iron with some tin.
- A multimeter for testing.
To actually use this rug with a microcontroller, you will need.:
- A 47ohm resistor (or similarly small value).
- (optional, an N-channel mosfet with 10k resistor and 220ohm resistor).
Step 2: (How Not to Apply Copper Tape to Velostat)
I will start by telling how NOT to apply copper tape to Velostat.
I started by assuming that the "conductive glue" on the tape was conductive. This seemed a fair assumption, but either my tape is not of this "conductive glue" type, or the "conductive" part is barely conductive.
I started by taping the 2 squares of Velostat together on both sides with kapton tape. I then cut 25cm long strips of copper tape and applied these on even intervals. The copper tape on either side is in exactly the same location, so that there is only a thin layer of Velostat between the copper. In the images a schematic view of the mat with a cutout for an overview.
A long strip of copper tape (around 50cm) is used to connect all of the rows together on either side.
A wire was soldered to either side, and a resistance measurement was made.
When I tried testing it, the multimeter values would swing wildly between 10k and 100ohm. Also, standing on the mat or not made very little difference for the measurement. Something was horribly amiss. A quick measurement of the tape showed that the glue was not really that conductive. The sandwich of materials was copper, glue, Velostat, glue, copper, and the glue was kind of an insulator.
The moral of the story, do small scale tests if you are uncertain if it will work.
Step 3: Small Scale Test
Back to the drawing board. The glue side of the copper tape clearly does not conduct enough. The front side is pure copper though. What if I invert the tape so that the copper side faces the Velostat.
A single trace was reversed on both sides. I took the tape that was glue side down, and stuck it to a piece of kapton tape. Reusing copper tape is finicky, but this stuff is slightly too expensive to just throw away. This piece of kapton tape with the copper facing away from the sticky side was stuck on the Velostat.
A new measurement was made. This instantly gave a stable result. One thing though. A single trace seemed to be 24 ohms when high, and 200 when low. This was while pressing only a small amount with my hand. If I have 12 traces, and fully stand on it, the mat might drop to below 1 ohm, drawing way too much current.
I revised the design so that only small parts of the tape make contact with the Velostat. This way I hoped to get the resistance to a manageable amount.
Step 4: Applying Copper Tape to Velostat
Armed with the knowledge on how to actually make this work, I set out to repair the sensor mat. In the photo's you will see the old mat being modified to the new mat.
The first thing I did is add small pieces of tape as an insulator. The tape is on both sides. The gaps between the tape needs to be somewhat constant and around 1-3cm big, depending on how much resistance you want. The gap needs to be on the same spot on both sides.
Get a strip of copper tape and a strip of kapton tape long enough to span the Velostat. The copper tape needs to be 1-2cm longer than the kapton tape. Stick the copper tape on the sticky side of the kapton tape, with one side of the copper tape going past the kapton tape.
Stick the assembly to the Velostat, over the insulators. Make sure that the copper is in the same place on both sides. Also make sure that the excess copper is on the same side every time. Fold over the excess copper so you have a place to mount the connecting strip of copper. One advice is to have the excess copper over an insulated part of the mat so it is easier to solder to it later.
Repeat this step for all rows.
Add a top row of copper tape that connects all previously mounted strips of copper together. It is wise to insulate this row from the Velostat to prevent unwanted shorts or leaks. The top row connects to the folded over tabs left in the previous steps.
Carefully solder all the short strips to the top strip. This solder is needed because otherwise the top strip will not make contact with the rows of copper. Be careful not to add too much heat to the copper. The copper is mounted on plastic (Velostat), and melting through the plastic would be bad.
Solder wires to the top rows on both sides. Anywhere is fine, I picked a corner.
Test the mat to make sure it works. Connect a multimeter to the mat, and see if the resistance drops if you press any of the uninsulated parts. Also check if the resistance is somewhat stable if you do nothing. If this is the case, congratulation, the mat now works.
As a final step, apply kapton tape to all exposed copper. While it will probably not cause shorts, it is bad form to leave exposed copper.
(In the schematic images, the top row of copper is not shown. The image only serve to show the configuration of kapton and copper to make this mat work.)
Step 5: Testing the Mat
The new mat was hooked up to a multimeter to test it again. This time, with no load applied, the resistance of the mat is a stable 17-20 ohms.
When I fully stand on the mat, the resistance drops to 4-6 ohms. One foot on the mat gives around 10 ohms.
This is a bit lower than I am happy with, but it is still a workable value. There is plenty of difference between no load and a person standing on the mat. An observation made is that the pressure does not really define the resistance. The surface area does. If I stand on more of the mat with less weight, the resistance becomes lower than if I stand with all of my weight on a single spot. For what I need this sensor for, this is great, but do keep it in mind if you do build one.
Step 6: Wiring It Up
Since the mat is just a big variable resistor, taking measurements from the mat is fairly simple.
The simplest way is using a voltage divider. Add a resistor before the pressure sensor mat (called R_mat in the schematics) and measure the point between the resistor and the mat (called MatA1). I used 47 ohm, but your mat might need something else. My logic level is 3.3V, you can use whatever your logic power level is.
I added an optional on off circuit to my mat. I did not want the constant 50mA draw on my mat. I simply do not know how Velostat likes a constant current through it, and I expect it to be bad for the longevity of the mat. The circuit consists of an N-channel mosfet with the required resistors. Whenever I want to take a reading, I turn on the mosfet. The rest of the time, the mosfet is off, and the mat has no power going through it.
Step 7: How to Use It
Using the mat with an Arduino (or any other microcontroller) is simple. If you only have the voltage divider, simply attach your mat to an analog pin, set the pin you attach the mat to as input, and use an analog read command. The value you get from this will drop depending on how much weight is applied to the mat.
If you have the mosfet installed, remember to make the input of the mosfet high before you make a measurement. Else you will simply measure the voltage you used for the mat (3.3V in my case).
The value you get back from the mat does not change much over time. I simply use a threshold value to determine if something stands on the mat, and after a month of continuous use, the mat still works fine.
Step 8: What I'd Do Different Next Time
One important project related thing is that I would properly test a small scale version of the mat first. I did actually do a tiny piece of copper on the Velostat, saw numbers on the multimeter, and assumed that all was working. This was a mistake.
A mat related point is that I would use smaller patches of copper. I currently have 48 patches of 2-3cm of copper. This gives a resistance of 20 ohm when idle, and around 5 ohm when I stand on it. While this is a workable number, it would be easier if it were a bit lower. 1cm of exposed copper would be more than enough for this mat. I am not going to do this on mine anymore, but perhaps anyone else wanting to make this can benefit from this.
Step 9: How I Use It
Why specifically did I make this pressure sensitive mat? I made a fancy ESP32 alarm clock. It is connected to my Domoticz system, it can return sensor values like CO2 and temperature, and can control my lighting. It also tells the time and has an alarm.
This is where the sensor mat comes in. I have no real issue waking up. I wake up with wake-up light, and usually am awake when I need to get out. I do however have an issue getting out of bed. The mat forces me to get out of bed. The alarm only turns off when I actually stand on the mat (or pull the plug from the alarm clock). This forces me out of my bed, and once I am out of bed, I rarely get back in. While it is a bit of an overkill solution to a problem that has many other solutions, I am happy with it. So far, I have gotten out of bed on time every morning for around a month. Before I used to stay in bed for up to an hour.
20 minutes before my alarm goes off, the mat becomes active. The mat powers on, It takes a voltage reading, and the mat powers off again. This happens every second. When I stand on the mat, either before or during the alarm, it turns the alarm off.
Participated in the