Things used in this project

Hardware components:
Ard nano
Arduino Nano R3
×1
EVA Foam
×1
Mesh Sheet
×1
Plywood
×1
Mfr 25frf52 10k sml
Resistor 10k ohm
×1
copper tape
×1
11026 02
Jumper wires (generic)
×1
Adafruit NeoPixel Strip
×1
Hand tools and fabrication machines:
Bandsaw

Custom parts and enclosures

KeyMat CAD File
This is the complete assembly of the mat. The format is .igs, so it should import to most CAD software programs.
KeyMat.igs
KeyMat Inventor CAD Files
The 3D model was originally done in AutoDesk Inventor. This is a zip file which contains all the separate files as well as the assembly file.
KeyMat Inventor Files.zip
KeyMat Rendering-1
A Rendering of the CAD model using KeyShot
1
KeyMat Rendering-2
Another rendering of the CAD model using KeyShot
2
KeyMat Rendering - Exploded View
An exploded view rendering of the mat. The CAD model was rendered using KeyShot
3

Schematics

KeyMat System
This general system lays out the important components of the KeyMat. It shows how power and data move along the components of the system in a quick and easy diagram. It includes the 3 by 5 copper tape grid that act as touch sensors; this allows the mat to knows where the person is. This diagram also includes how the system connect the arduino, the computer, the LED lights, and the app.
Final%20system
KeyMat Wiring Diagram
This diagram shows the inputs and outputs for the KeyMat in order to allow for easy recreation.
Fina%20wire%20diagram

Code

standingJava
The processing sketch to ive graphic visualization and take i data on the serial bus.

Needs the processing IDE found at processing.org to run
No preview (download only).
standingArduino
Code to upload to arduino nano to light LED strip and send locatio data through serial.

Need to have downloaded the Adafruit pixel libraries
#include <Adafruit_NeoPixel.h>
#include <avr/power.h> // Comment out this line for non-AVR boards (Arduino Due, etc.)

#define PIN 13

int col1[] = {A3, A2, A1};
int col2[] = {A0, 12, 11};
int col3[] = {9, 10, 8};
int col4[] = {5, 6, 7};
int col5[] = {2, 3, 4};

int col1Color = 0;
int col2Color = 0;
int col3Color = 0;
int col4Color = 0;
int col5Color = 0;

//fade speed
int fade = 5;

//which LED in the strip is starting
int start = 13;
//how many LEDs are in each column
int piece = (60-15)/5;
//max intensity of color
int colorMax = 100;

Adafruit_NeoPixel strip = Adafruit_NeoPixel(60, PIN, NEO_GRB + NEO_KHZ800);

//array of values to end up through Serial for metric gathering
int count[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};

void setup() {

Serial.begin(9600);

for(int i = 0; i < 3; i++)
{
  pinMode(col1[i], INPUT);
  pinMode(col2[i], INPUT);
  pinMode(col3[i], INPUT);
  pinMode(col4[i], INPUT);
  pinMode(col5[i], INPUT);
}


strip.begin();
strip.show();

}

void loop() {
  //conditionals to determine inputs and color responses per columns
  for(int i = 0; i < 3; i++)
  {
      if(digitalRead(col1[i]))
      {
        count[i*5+0]++;
        col1Color+=fade;
      }
      else
      {
        count[i*5+0] = 0;
        if(count[0] == 0 && count[5] == 0 && count[10] == 0)
          if(col1Color > 0)
            col1Color-=fade;
      }

      if(digitalRead(col2[i]))
      {
        count[i*5+1]++;
        col2Color+=fade;
      }
      else
      {
        count[i*5+1] = 0;
        if(count[1] == 0 && count[6] == 0 && count[11] == 0)
          if(col2Color > 0)
            col2Color-=fade;
      }
     
      if(digitalRead(col3[i]))
      {
        count[i*5+2]++;
        col3Color+= fade;
      }
      else
      {
        count[i*5+2] = 0;
        if(count[2] == 0 && count[7] == 0 && count[12] == 0)
          if(col3Color > 0)
            col3Color-=fade;
      }
        
      if(digitalRead(col4[i]))
      {
        count[i*5+3]++;
        col4Color+=fade;
      }
      else
      {
        count[i*5+3] = 0;
        if(count[3] == 0 && count[8] == 0 && count[13] == 0)
          if(col4Color > 0)
            col4Color-=fade;
      }
        
      if(digitalRead(col5[i]))
      {
        count[i*5+4]++;
        col5Color+=fade;
      }
      else
      {
        count[i*5+4] = 0;
        if(count[4] == 0 && count[9] == 0 && count[14] == 0)
          if(col5Color > 0)
            col5Color-=fade;
      }
  }
  //edge checking
  if(col1Color>colorMax*2)
    col1Color = colorMax*2;
  if(col2Color>colorMax*2)
    col2Color = colorMax*2;
  if(col3Color>colorMax*2)
    col3Color = colorMax*2;
  if(col4Color>colorMax*2)
    col4Color = colorMax*2;
  if(col5Color>colorMax*2)
    col5Color = colorMax*2;

   //changing the colors based on how long the colors have beeen on
   for(int j = 0; j < piece; j++)
   {
    if(col1Color < colorMax)
     strip.setPixelColor(0*piece+j+start, strip.Color(col1Color, colorMax, 0));
    else
     strip.setPixelColor(0*piece+j+start, strip.Color(colorMax, colorMax, col1Color-colorMax));
    if(col2Color < colorMax)
     strip.setPixelColor(1*piece+j+start, strip.Color(col2Color, colorMax,0));
    else
     strip.setPixelColor(1*piece+j+start, strip.Color(colorMax, colorMax, col2Color-colorMax));
    if(col3Color < colorMax)
     strip.setPixelColor(2*piece+j+start, strip.Color(col3Color, colorMax,0));
    else
     strip.setPixelColor(2*piece+j+start, strip.Color(colorMax, colorMax, col3Color-colorMax));
    if(col4Color < colorMax)
     strip.setPixelColor(3*piece+j+start, strip.Color(col4Color, colorMax,0));
    else
     strip.setPixelColor(3*piece+j+start, strip.Color(colorMax, colorMax, col4Color-colorMax));
    if(col5Color < colorMax)
     strip.setPixelColor(4*piece+j+start, strip.Color(col5Color, colorMax,0));
    else
     strip.setPixelColor(4*piece+j+start, strip.Color(colorMax, colorMax, col5Color-colorMax));
    
    strip.show();

   }
   if(col5Color < colorMax)
     strip.setPixelColor(58, strip.Color(col5Color, colorMax,0));
   else
     strip.setPixelColor(58, strip.Color(colorMax, colorMax, col5Color-colorMax));
    
   strip.show();
  
  for(int i = 0; i < 3; i++)
  {
    Serial.print(count[i*5+0]);
    Serial.print(" ");
    Serial.print(count[i*5+1]);
    Serial.print(" ");
    Serial.print(count[i*5+2]);
    Serial.print(" ");
    Serial.print(count[i*5+3]);
    Serial.print(" ");
    Serial.print(count[i*5+4]);
    Serial.print(" ");

  }

  Serial.println();
  delay(100);
  

}

Credits

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Similar projects you might like

Blynk GPS Tracker
Intermediate
  • 179
  • 4

Full instructions

Simple GPS tracker using a Particle Photon (or Electron) and an EM406 GPS module with location visible on Blynk app map.

Pool Buddy
Intermediate
  • 1,799
  • 11

Work in progress

Monitor and log water quality (pH & ORP) and temperature from everywhere.

DIY Vintage Spotify Radio Using A Raspberry Pi
Intermediate
  • 3,020
  • 17

Full instructions

Make your own vintage radio that streams Spotify, Google Play Music, SoundCloud and your own local music!

Smartphone Controlled Arduino 4WD Robot Car
Intermediate
  • 28
  • 1

Work in progress

This is my next project, a smartphone-controlled Arduino 4WD robot car or Bluetooth Arduino robot.

Smart Garden
Intermediate
  • 2,462
  • 19

Smart Garden is a plant environmental monitoring system.

Arduino101 Bluetooth Interfacing
Intermediate
  • 191
  • 3

Full instructions

Use the Arduino101 Bluetooth wireless interface with the Blynk GUI Library for control of things directly from your phone or tablet !

ProjectsCommunitiesTopicsContestsLiveAppsBetaFree StoreBlogAdd projectSign up / Login
Feedback