GMU:Sensor Hacklab/Christian Doeller: Difference between revisions

From Medien Wiki
No edit summary
No edit summary
 
(28 intermediate revisions by the same user not shown)
Line 2: Line 2:




I am interested in exploring different ways of interaction between humans and their everyday environment of things.<br>
I am interested in exploring different ways of interaction between humans and their everyday environment of things. <br>


In this case I am focusing on the common activity of walking in connection with the carpet as a customizable floor covering.<br>
In this case I am focusing on the common activity of walking in connection with the carpet as a customizable floor covering.<br>
I want to create a carpet / a collection of carpets that sense people walking on it / them and then trigger a certain output as a response.<br>
I want to create a carpet / a collection of carpets that sense people walking on it / them and then trigger a certain output as a response. <br>
 
I would like to create a complex environment in which people have to move through the space in order to explore its different features. <br>
Therefore I want to explore possibilities of creating an unpredictable output environment by introducing a certain amount of coincidental behavior.<br>
 
The minimum goal of this course is creating a single interactive carpet.<br>
The minimum goal of this course is creating a single interactive carpet.<br>


I would like to create a complex environment in which people have to move through the space in order to explore its different features.<br>
This idea is related to another project in which I designed a kind of yoga mat.<br>
Therefore I want to explore possibilities of creating an unpredictable output environment.<br>
I did not yet include electronics in the mat because I am doubtful about the determined amount of switches and their pre defined outputs.<br>
 
The interactive carpet is somehow an attempt to find out what happens if electronics are included and how the outputs can become unpredictable.<br><br>


[[File:Sketch_hacklab_1.jpg]]
[[File:Sketch_hacklab_1.jpg]]
Line 16: Line 20:




My technical interest consists of using a matrix structure to create a higher number of input options.<br>
== Technical implementation ==


I accomplished different experiments in order to outline the needs of my final idea:<br>


1) exploring touch sensor material<br>
I want to construct a matrix structure in order to implement a „multiple switch device“ that can be triggered by peoples walking on it.<br>
2) creating a simple button matrix / button resistor ladder<br>
Therefore I want to design switches that can handle the weight of a person standing on them.<br>
3) hacking a toy keyboard + exploring its inner architecture<br>
The switches have to be made of a flexible material so that they automatically return to their „off-state“ when the person changes his/her location. <br>
4) reverse engineering and connecting a keyboard matrix with Arduino + exploring its functions<br>
5) using different matrix systems as a) a resistive sensor and b) a switch based in- and output structure <br>
6) trying out different ways of implementing switches in a carpet


 
I will try to implement a kind of resistor ladder in order to reduce the amount of input pins needed.<br> This amount can easily become very high depending on the amount of sensors.<br>
This work is related to another project in which I designed a kind of yoga mat.<br>
The outputs will be controlled by an Arduino Micro controller board.<br>
I did not yet include electronics in the mat because I am doubtful about the determined amount of switches and their pre defined outputs.<br>
It will trigger certain sounds or other outputs such as motor movement or LED lights. <br> <br>
 
The interactive carpet is somehow an attempt to find out what happens if electronics are included and how the outputs can become unpredictable.<br>




== Technical implementation ==
I accomplished different experiments in order to outline the needs of my final idea: <br>


1) exploring touch sensor material <br>
2) creating a simple button matrix / button resistor ladder <br>
3) hacking a toy keyboard + exploring its inner architecture <br>
4) reverse engineering and connecting a keyboard matrix with Arduino + exploring its functions <br>
5) the toy keyboard matrix as a resistive sensor
6) exploring different ways of implementing switches in a carpet


I want to construct a matrix structure in order to use it as a sensor for peoples walking on it.<br>
Therefore I want to build a certain number of switches that can handle the weight of a person standing on them.<br>
The switches have to be made of a flexible material so that they automatically return to their „off-state“ when the person changes location.<br>
I will try to implement a kind of resistor ladder in order to reduce the amount of input pins needed (this amount can easily become very high depending on the amount of sensors).<br>
The outputs will be controlled by an Arduino Micro controller board.<br>
It will trigger certain sounds/other outputs of sound/motion/.. devices.




== Protoyping experiments ==
== Protoyping experiments ==
 
<br>
 
<br><br>
'''1) DIY Sensor Materials'''
'''1) DIY Sensor Materials'''


During the first hours we investigated different materials and their conductivity / resistivity.<br>
During the first class we investigated different materials and their conductivity / resistivity.<br>
I was mostly interested in materials that produce variable resistance when they are pushed and squeezed like „resistive plastic foam“.
I was mostly interested in materials that produce variable resistance when they are pushed and
squeezed<br> like „resistive plastic foam“.


Another nice discovery was combining a metallic sponge and a piece of aluminium foil. <br>
Another nice discovery was combining a metallic sponge and a piece of aluminium foil. <br>
The outcome is a sensor that reacts to force.<br>
The outcome is a sensor that reacts to force.<br><br>
<br>
 
[[File:touchsensor_tryout_hacklab.jpg]]<br><br>
[[File:touchsensor_tryout_hacklab.jpg]]<br><br>
[[File:touchsensor_hacklab.jpg]]
[[File:touchsensor_hacklab.jpg]]
Line 66: Line 61:
'''2) „Button Resistor Ladder“'''<br>
'''2) „Button Resistor Ladder“'''<br>


The first experiment with matrix structures consists of buttons that are connected via a series of resistors. <br>
The first experiment including matrix structures was about a chain of buttons.<br>
The last resistor of that kind of „resistor ladder“ ends up in the analog pin of the arduino.<br>,
Each of these buttons were connected via different resistor values.<br>
This way each button evokes a specific value in the analog input reading. <br>
The last resistor of that kind of „resistor ladder“ connects the whole structure to the Arduinos analog input<br> via a voltage divider with a 100K resistor.<br>
—> see the circuit drawing below <br><br>


This „button - resistor structure“ assures that each button provokes a specific and distinguishable value<br> in the Arduinos serial reading.<br>
The experiment could lead to a more complex button structure that can be used as an „analog input matrix“. <br><br>


[[File:button_matrix_ladder.jpg]]<br><br>
[[File:button_matrix_ladder.jpg]]<br><br>
[[File:button_matrix_circuit.jpg]]<br><br>
[[File:button_matrix_serial.jpg]]
[[File:button_matrix_serial.jpg]]
<br>
<br>
Line 79: Line 78:
'''3) hacking a toy keyboard, triggering it with relays + exploring its inner architecture'''  
'''3) hacking a toy keyboard, triggering it with relays + exploring its inner architecture'''  


In the second experiment we took apart a toy that included a keyboard matrix to play a collection of sounds. <br><br>
In the second experiment we took a closer look at a toy including a keyboard matrix to play a funny collection<br> of sounds.<br>
 
At first we traced each tone back to its switch on the matrix.<br>
We traced each tone on the matrix and soldered external wires to the sound terminals. <br>
Then we soldered wires to the sound terminals in order to make the sounds externally accessible.<br><br>
This allowed us to access the sounds by using another switching concept in order to trigger each sound.<br>
We chose relays as our main switches and connected them to the sound device.<br>
The relays were connected to the arduino and we were able to trigger and cut off single sound files coming out of the toy electronics.<br><br>


[[File:hacked_toy_matrix_l1.jpg]]<br><br>
[[File:hacked_toy_matrix_l1.jpg]]<br><br>
[[File:hacked_toy_matrix_l2.jpg]]<br><br>
[[File:hacked_toy_matrix_l2.jpg]]<br><br>
We had the idea to further influence and control the sounds with an external switching device.<br>
Our solution was a chain of two relays [http://cdn-reichelt.de/documents/datenblatt/C300/RELAIS-FTRK1.pdf (this one)] controlled by the arduino via a darlington transistor [http://www.pollin.de/shop/downloads/D101063D.PDF ULN2803].  <br>
These relays allowed us to turn the sound on and off so that little pieces of the sounds could be cut out.
We stopped our experiment as soon as we realized that we would need a lot of (expensive) relays to control<br> every available sound on the toy chip.<br>
[https://en.wikipedia.org/wiki/Darlington_transistor see "Darlington Transistor" on Wikipedia ]
<br><br>
[[File:hacked_toy_matrix_sound.jpg]]<br><br>
[[File:hacked_toy_matrix_sound.jpg]]<br><br>
[[File:hacked_toy_matrix_relay_draw.jpg]]<br><br>
[[File:hacked_toy_matrix_relay_draw.jpg]]<br><br>




I then decided to explore the matrix of the toy keyboard a little further. <br>
After that I decided to explore the toy matrix a little further.<br>
A drawing helped me to understand and trace the switches of each bottom connector. <br>
A drawing helped me to understand and trace the connections inside the matrix structure.<br>
I then attached an extension in order to access the bottom connectors. <br><br>
I then attached a DIY connector in order to use the bottom connectors.<br><br>


[[File:hacked_toy_matrix_pic.jpg]]<br><br>
[[File:hacked_toy_matrix_pic.jpg]]<br><br>
Line 103: Line 109:




'''3) hacking a toy keyboard, triggering it with relays + exploring its inner architecture'''  
'''4) Reverse-engineering and programming a common keyboard matrix'''  


This is a common keyboard matrix with a 4 x 3 buttons number plate.<br>
This is a common keyboard matrix with a 4 x 3 buttons number plate.<br>
I „reverse engineered“ the matrix structure (hidden in the case) after I soldered pin headers to its connectors in order to plug it into the bread board.<br>
I „reverse engineered“ the matrix structure (hidden in the case) after I soldered pin headers to its connectors<br> in order to plug it into the bread board.<br>
<br>
I was mostly interested in using the matrix as a variable resistor rather than using it as a „multiple digital<br> pin input device“. (see experiment no. 2)<br>
I was mostly interested in using the matrix as a variable resistor rather than using it as a „multiple digital pin input device“.<br>
I achieved that by connecting different resistor values in between each contact of the vertical and the horizontal<br> button lines.<br>
I achieved that by connecting different resistor values in between each contact of the vertical and the horizontal button lines. <br>
In the end a voltage divider helped to create different voltage changes for the Arduinos analog input.<br>
In the end a voltage divider helped to create different voltage changes for the arduinos analog input.<br>
The matrix is actually meant to be used as a "multiple digital pin input / output interface" like shown on this<br> website (http://pcbheaven.com/wikipages/How_Key_Matrices_Works/) . <br><br>
The matrix is actually meant to be used as a "multiple digital pin input / output interface" like shown on [http://pcbheaven.com/wikipages/How_Key_Matrices_Works/ this website].<br>
 
<br><br>
In my experiment every button represents a certain value in the analog input.<br>
This way every button represents a certain value in the analog input of the arduino.<br>
By doing that I discovered a major problem: some of the values almost overlapped. <br>
By doing that I discovered a major problem: some of the values almost overlapped. In addition to the arduinos analog input pin generated quite some noise.<br>
Another problem was the amount of noise produced by the analog input. <br><br>
Therefore I had to define a certain range of values for each button. Although this worked a bit better there was still a lot of overlap.<br>
 
This overlap sometimes lead to the effect that the interpretation of buttons being pressed was wrong.<br>
Therefore I had to define a certain range of values for each button. <br>
<br>
Although this worked a bit better there was still a lot of overlap.<br>
This overlap sometimes lead to the effect that the interpretation of buttons being pressed was wrong. <br><br>
 
Another interesting part of that experiment was the code.<br>
Another interesting part of that experiment was the code.<br>
I did not use any library - instead of that I tried to use my basic programming skills to set it up by myself.<br>
I did not use any library - instead of that I tried to use my basic programming skills to set it up by myself.<br>
It surprisingly worked out quite well - despite the mentioned overlap problem and the face that I needed a lot of memory. <br>
It surprisingly worked out quite well - despite the mentioned overlap problem and the face that I needed<br> a lot of memory. <br><br>
<br>
In order to solve these issues in the future I need to learn about programming „arrays“ and „for-loops“ that can help minimizing the amount of code.<br>
The overlap problem could be solved by using binary functions / average measurements that define clearer value states.<br><br>


In order to solve these issues in the future I need to learn about programming „arrays“ and „forloops“ that<br> can help minimizing the amount of code.<br>
The overlap problem could be solved by using binary functions / average measurements that define clearer<br> value states. <br>


[http://playground.arduino.cc/Main/KeypadTutorial see "Arduino Keyboard Matrix Tutorial"]
<br><br>


[[File:matrix_sketch_1.jpg]]<br><br>
[[File:matrix_sketch_1.jpg]]<br><br>
Line 131: Line 140:




'''5) using different matrix systems as a) a resistive sensor and b) a switch based in- and output structure'''
'''5) the toy keyboard matrix as a resistive sensor'''
 
The idea of using a matrix as a variable resistor was a good way of connecting the toy-keyboard to the<br> arduinos analog input.<br><br>


The idea of using a matrix as a variable resistor was a good way of connecting the toy-keyboard to the arduinos analog input.<br>
My hacked version of the toy keyboard does not really work as a system of clear state switches.<br>
My hacked version of the toy keyboard does not really work as a system of clear state switches as I rather used a resistive than a conductive material in order to access the matrix (graphite lines). <br>
I used a very resistive material in order to access the matrix (graphite lines).<br>
The multimeter shows that - if I combine all the vertically and all the horizontally connected „lines“ together - I get a certain value of resistance for each button.<br><br>
This material in combination with the original matrix circuit material (also very resistive) makes it hard to<br> define clear input values.<br><br>


A cool discovery:
The multimeter shows that I get a certain value of resistance for each button when all the<br> vertically and all the horizontally connected „lines“ are connected together. <br><br>


[[File:resistor_values_toy_matrix.jpg]]<br><br>
[[File:resistor_values_toy_matrix.jpg]]<br><br>
Line 142: Line 155:




This way it is possible to use the matrix for instance as a variable resistor for an astable 555 timer chip between pin 6 and pin 7:<br><br>
This way it is possible to use the matrix for instance as a variable resistor for a 555 timer chip in astable<br> mode between pin 6 and pin 7: <br><br>


[[File:555_toy_matrix.jpg]]<br><br>
[[File:555_toy_matrix.jpg]]<br><br>
VIDEO<br><br>
[https://vimeo.com/170149984 ===> VIDEO]<br><br>
 
 
'''6) exploring different ways of implementing switches in a carpet'''
 
The final idea after my matrix explorations is to modify our environment by implementing a similar structure<br> in everyday objects.<br>
I want to use a carpet as the main interface object as it is 1) easy to access and 2) something casual and<br> omnipresent.<br>
The first problem is to install switches inside / underneath the carpet.<br>
I solved this problem by using an anti-sliding mat that separates the contacts of the switches.<br>
It is a very flexible material that is easy to manipulate without the need of professional tools.<br>
Another problem is designing and building the switches. <br>
The material needs to be 1) flexible (coming back into its original form) and 2) conductive.<br>
I experimented with different materials such as aluminium foil, aluminium plates and a conductive sponge.<br>
My solution consists of a piece of cardboard covered with aluminium foil. <br><br>
 
[[File:carpet_switch_alu.jpg]]<br><br>
[[File:carpet_switch_alu_build.jpg]]<br><br>
[[File:carpet_switch_mmeter.jpg]]<br><br>
 
 
I also discovered that the size of the gaps inside the flexible grid plays a big role in connection to the performance<br> of the switches.<br>
I tried different sizes until I found a size that responds to the size and pressure of an „average human footstep“. <br><br>
 
[[File:carpet_grid_sw1.JPG]]<br><br>
[[File:carpet_grid_sw2.JPG]]<br><br>
[[File:carpet_switch_final.jpg]]<br><br><br>
 
A larger set-up with 4 switches and matrix-structure:<br><br>
[[File:carpet_switch_proto.jpg]]<br><br>
[[File:carpet_switch_proto_circuit.jpg]]<br><br>
 
[https://vimeo.com/170147174 ===> VIDEO]
 
 
== Finishing the Prototype ==
 
 
<br>
The plan was to implement more switches into the carpet-matrix in order to allow playing with more output possibilities.<br><br>
 
I achieved that by changing the design:<br><br>
 
1) Layout<br>
2) Switch Design<br>
3) Programming<br><br>
 
1) <br>
I designed a bigger and more complex layout of „switch holes“ inside the „distance grid“.<br>
The switch holes are VERTEILT all over the mat.<br>
I kept all the cut out pieces in order to change the design as I need it by putting them back in place.<br><br>
 
[[File:Raster_Styro.jpg]]<br><br>
 
 
2) <br>
I changed the switch design: they now consist of two carpet-size cardboard pieces that are supplied with „circuit lanes“ made of aluminium foil. <br>
There are two cardboard pieces: one is equipped with the bottom part of each switch, the other one is equipped with the upper part. <br>
The bottom part features eight and the upper part features six „circuit lanes“ that are located in a way so that they form a kind of matrix-grid <br> when they are put on top of each other. <br>
 
[[File:Raster_Karton.jpg]] <br><br>
[[File:Zeichnung_Karton.jpg]]<br><br>
[[File:Zeichnung_Karton2.jpg]]<br><br>
[[File:Zeichnung_Karton3.jpg]]<br><br>
[[File:Alu_Karton.jpg]]<br><br>
[[File:Raster_Alu_Karton.jpg]]<br><br>
[[File:Alu_Karton2.jpg]]<br><br>
 
I first planned to use a resistor ladder for the Analog input pin of the arduino in order to minimize the amount of pins being used.<br><br>
 
[[File:Schematic_Raster_Styro.jpg]]<br><br>
[[File:Alu_Resistor_Ladder.jpg]]<br><br>
[[File:Alu_Resistor_Ladder2.jpg]]<br><br>
 
As this did not work out (too many delays in the code, too slow, a lot of noise) I changed the design by attaching a separate <br>wire to each of the eight „circuit lanes“ that go to the Arduinos digital input.<br>
Now there are 6 + 8 = 14 wires coming out of the carpet. 6 of them are used as „digital out HIGH signals“ and the other 8 <br>are used as „digital in, normally LOW“ pins that check if a button is pressed.<br>
 
 
[[File:Arduino_Raster_Karton.jpg]]<br><br>
 
 
3)<br>
The resistor ladder idea did not really work.<br>
Therefore I decided to get a bit more into working with the Arduino Keypad library.<br>
The library is made for a 4x3 keypad matrix.<br>
This layout can easily be changed by adding more COLS and ROWS to the array.<br><br>
 
You can find more information about the library here:<br><br>
 
 
[http://playground.arduino.cc/Code/Keypad] <br>
[http://www.dummies.com/how-to/content/how-to-specify-userdefined-functions-for-your-keyp.html]<br><br>
 
 
[[File:Arduino_Raster_Matrix_Carpet.png]]<br><br>
 
 
External pullup or pulldown resistors do not need to be added.<br>
The code uses the built in IMPUT_PULLUP command. <br>
It is also configured to have a multi button press function for which you normally have to add diodes to each input<br> in order to prevent short circuits.<br>
I don’t exactly know why but the comments tell that these external diodes do not have to be added when using <br>the keypad library.<br>

Latest revision as of 08:33, 1 August 2016

Project Overview

I am interested in exploring different ways of interaction between humans and their everyday environment of things.

In this case I am focusing on the common activity of walking in connection with the carpet as a customizable floor covering.
I want to create a carpet / a collection of carpets that sense people walking on it / them and then trigger a certain output as a response.

I would like to create a complex environment in which people have to move through the space in order to explore its different features.
Therefore I want to explore possibilities of creating an unpredictable output environment by introducing a certain amount of coincidental behavior.

The minimum goal of this course is creating a single interactive carpet.

This idea is related to another project in which I designed a kind of yoga mat.
I did not yet include electronics in the mat because I am doubtful about the determined amount of switches and their pre defined outputs.
The interactive carpet is somehow an attempt to find out what happens if electronics are included and how the outputs can become unpredictable.

Sketch hacklab 1.jpg


Technical implementation

I want to construct a matrix structure in order to implement a „multiple switch device“ that can be triggered by peoples walking on it.
Therefore I want to design switches that can handle the weight of a person standing on them.
The switches have to be made of a flexible material so that they automatically return to their „off-state“ when the person changes his/her location.

I will try to implement a kind of resistor ladder in order to reduce the amount of input pins needed.
This amount can easily become very high depending on the amount of sensors.
The outputs will be controlled by an Arduino Micro controller board.
It will trigger certain sounds or other outputs such as motor movement or LED lights.


I accomplished different experiments in order to outline the needs of my final idea:

1) exploring touch sensor material
2) creating a simple button matrix / button resistor ladder
3) hacking a toy keyboard + exploring its inner architecture
4) reverse engineering and connecting a keyboard matrix with Arduino + exploring its functions
5) the toy keyboard matrix as a resistive sensor 6) exploring different ways of implementing switches in a carpet


Protoyping experiments


1) DIY Sensor Materials

During the first class we investigated different materials and their conductivity / resistivity.
I was mostly interested in materials that produce variable resistance when they are pushed and squeezed
like „resistive plastic foam“.

Another nice discovery was combining a metallic sponge and a piece of aluminium foil.
The outcome is a sensor that reacts to force.

Touchsensor tryout hacklab.jpg

Touchsensor hacklab.jpg



2) „Button Resistor Ladder“

The first experiment including matrix structures was about a chain of buttons.
Each of these buttons were connected via different resistor values.
The last resistor of that kind of „resistor ladder“ connects the whole structure to the Arduinos analog input
via a voltage divider with a 100K resistor.
—> see the circuit drawing below

This „button - resistor structure“ assures that each button provokes a specific and distinguishable value
in the Arduinos serial reading.
The experiment could lead to a more complex button structure that can be used as an „analog input matrix“.

Button matrix ladder.jpg

Button matrix circuit.jpg

Button matrix serial.jpg


3) hacking a toy keyboard, triggering it with relays + exploring its inner architecture

In the second experiment we took a closer look at a toy including a keyboard matrix to play a funny collection
of sounds.
At first we traced each tone back to its switch on the matrix.
Then we soldered wires to the sound terminals in order to make the sounds externally accessible.

Hacked toy matrix l1.jpg

Hacked toy matrix l2.jpg

We had the idea to further influence and control the sounds with an external switching device.
Our solution was a chain of two relays (this one) controlled by the arduino via a darlington transistor ULN2803.
These relays allowed us to turn the sound on and off so that little pieces of the sounds could be cut out.

We stopped our experiment as soon as we realized that we would need a lot of (expensive) relays to control
every available sound on the toy chip.

see "Darlington Transistor" on Wikipedia

Hacked toy matrix sound.jpg

Hacked toy matrix relay draw.jpg


After that I decided to explore the toy matrix a little further.
A drawing helped me to understand and trace the connections inside the matrix structure.
I then attached a DIY connector in order to use the bottom connectors.

Hacked toy matrix pic.jpg

Hacked toy matrix alu.jpg

Toy matrix connect.jpg

Hacked toy matrix ohm.jpg

Hacked toy matrix.jpg


4) Reverse-engineering and programming a common keyboard matrix

This is a common keyboard matrix with a 4 x 3 buttons number plate.
I „reverse engineered“ the matrix structure (hidden in the case) after I soldered pin headers to its connectors
in order to plug it into the bread board.
I was mostly interested in using the matrix as a variable resistor rather than using it as a „multiple digital
pin input device“. (see experiment no. 2)
I achieved that by connecting different resistor values in between each contact of the vertical and the horizontal
button lines.
In the end a voltage divider helped to create different voltage changes for the Arduinos analog input.
The matrix is actually meant to be used as a "multiple digital pin input / output interface" like shown on this
website (http://pcbheaven.com/wikipages/How_Key_Matrices_Works/) .

In my experiment every button represents a certain value in the analog input.
By doing that I discovered a major problem: some of the values almost overlapped.
Another problem was the amount of noise produced by the analog input.

Therefore I had to define a certain range of values for each button.
Although this worked a bit better there was still a lot of overlap.
This overlap sometimes lead to the effect that the interpretation of buttons being pressed was wrong.

Another interesting part of that experiment was the code.
I did not use any library - instead of that I tried to use my basic programming skills to set it up by myself.
It surprisingly worked out quite well - despite the mentioned overlap problem and the face that I needed
a lot of memory.

In order to solve these issues in the future I need to learn about programming „arrays“ and „forloops“ that
can help minimizing the amount of code.
The overlap problem could be solved by using binary functions / average measurements that define clearer
value states.

see "Arduino Keyboard Matrix Tutorial"

Matrix sketch 1.jpg

Matrix ardu 1.jpg


5) the toy keyboard matrix as a resistive sensor

The idea of using a matrix as a variable resistor was a good way of connecting the toy-keyboard to the
arduinos analog input.

My hacked version of the toy keyboard does not really work as a system of clear state switches.
I used a very resistive material in order to access the matrix (graphite lines).
This material in combination with the original matrix circuit material (also very resistive) makes it hard to
define clear input values.

A cool discovery: The multimeter shows that I get a certain value of resistance for each button when all the
vertically and all the horizontally connected „lines“ are connected together.

Resistor values toy matrix.jpg

Toy matrix values.jpg


This way it is possible to use the matrix for instance as a variable resistor for a 555 timer chip in astable
mode between pin 6 and pin 7:

555 toy matrix.jpg

===> VIDEO


6) exploring different ways of implementing switches in a carpet

The final idea after my matrix explorations is to modify our environment by implementing a similar structure
in everyday objects.
I want to use a carpet as the main interface object as it is 1) easy to access and 2) something casual and
omnipresent.
The first problem is to install switches inside / underneath the carpet.
I solved this problem by using an anti-sliding mat that separates the contacts of the switches.
It is a very flexible material that is easy to manipulate without the need of professional tools.
Another problem is designing and building the switches.
The material needs to be 1) flexible (coming back into its original form) and 2) conductive.
I experimented with different materials such as aluminium foil, aluminium plates and a conductive sponge.
My solution consists of a piece of cardboard covered with aluminium foil.

Carpet switch alu.jpg

Carpet switch alu build.jpg

Carpet switch mmeter.jpg


I also discovered that the size of the gaps inside the flexible grid plays a big role in connection to the performance
of the switches.
I tried different sizes until I found a size that responds to the size and pressure of an „average human footstep“.

Carpet grid sw1.JPG

Carpet grid sw2.JPG

Carpet switch final.jpg


A larger set-up with 4 switches and matrix-structure:

Carpet switch proto.jpg

Carpet switch proto circuit.jpg

===> VIDEO


Finishing the Prototype


The plan was to implement more switches into the carpet-matrix in order to allow playing with more output possibilities.

I achieved that by changing the design:

1) Layout
2) Switch Design
3) Programming

1)
I designed a bigger and more complex layout of „switch holes“ inside the „distance grid“.
The switch holes are VERTEILT all over the mat.
I kept all the cut out pieces in order to change the design as I need it by putting them back in place.

Raster Styro.jpg


2)
I changed the switch design: they now consist of two carpet-size cardboard pieces that are supplied with „circuit lanes“ made of aluminium foil.
There are two cardboard pieces: one is equipped with the bottom part of each switch, the other one is equipped with the upper part.
The bottom part features eight and the upper part features six „circuit lanes“ that are located in a way so that they form a kind of matrix-grid
when they are put on top of each other.

Raster Karton.jpg

Zeichnung Karton.jpg

Zeichnung Karton2.jpg

Zeichnung Karton3.jpg

Alu Karton.jpg

Raster Alu Karton.jpg

Alu Karton2.jpg

I first planned to use a resistor ladder for the Analog input pin of the arduino in order to minimize the amount of pins being used.

Schematic Raster Styro.jpg

Alu Resistor Ladder.jpg

Alu Resistor Ladder2.jpg

As this did not work out (too many delays in the code, too slow, a lot of noise) I changed the design by attaching a separate
wire to each of the eight „circuit lanes“ that go to the Arduinos digital input.
Now there are 6 + 8 = 14 wires coming out of the carpet. 6 of them are used as „digital out HIGH signals“ and the other 8
are used as „digital in, normally LOW“ pins that check if a button is pressed.


Arduino Raster Karton.jpg


3)
The resistor ladder idea did not really work.
Therefore I decided to get a bit more into working with the Arduino Keypad library.
The library is made for a 4x3 keypad matrix.
This layout can easily be changed by adding more COLS and ROWS to the array.

You can find more information about the library here:


[1]
[2]


Arduino Raster Matrix Carpet.png


External pullup or pulldown resistors do not need to be added.
The code uses the built in IMPUT_PULLUP command.
It is also configured to have a multi button press function for which you normally have to add diodes to each input
in order to prevent short circuits.
I don’t exactly know why but the comments tell that these external diodes do not have to be added when using
the keypad library.