###Week9: Input Devices
### Sensor fabrication
Being very ambitious starting off the week, I was hoping to try both pressure and stretchable sensors.
However, reality brought me back to just focus on getting one thing done. Thus, I continued the work from molding and casting week, the pressure sensor.
The difference between this week and last week is that I used the right casting material ExoFlex 00-30 and added another mold to embed copper plate in between two silicone layers, thus not fall off easily.
The result is...alright, but not perfect. When de-molding, the copper plate still stuck to the bottom mold, and fell off. Anyway, at least one side of it is secured, and ready to be a capacitance sensor!
### Resistance sensing
Debating between whether to use capacitance or resistance sensing, I was hoping to do both (seems too ambitious).
There happened to be velostat, a pressure-sensitive conductive sheet, in our lab, and I've been interested in trying piezo-resistive material.
After consulting with Rob and Chris, they thought resistance sensing might be more reliable in terms of reading in cleaner signal, thus I started from here.
However, I had some difficulties just using the multimeter to sense the resistance of velostat. I couldn't detect the resistance changes when giving it more pressure nor could
I tell the resistance difference when varying the distance between the detected pin. As it was close to the end of Monday..., I then decided to pivot to capacitance sensing.
### Capacitance sensing
This is actually the idea continuing from molding and casting week, where Nathan suggested using two copper plates with soft, non-conductive materials in between to form the soft pressure sensor.
To understand the logic of capacitance sensing , I need to know a bit more about the relationship between the electric field(E), the voltage(V),and the distance between two conductors(d). I relied on Rob's documentation of tx-rx sensing
to program the board and understand the logic, such as T(time) = R(resistance) x C(capacitance). When R is a constant value, the capacitance is proportional to time, thus we can read time in the serial monitor in arduino. To be honest, I'm still not fully understanding the programming part, so I will keep looking for more materials.
There's some glitches of my old board, like the port is not appeared in arduino despite it's been powered. After debugging it for a while, I decided to leave the hardware problem away and focusing on sensing.
Thankfully, Chris let me use his board to do the sensing part!
Since I'm using ATSMD11C, I cannot use the built-in capacitance sensing library in arduino. Fortunately, Rob has a version written from scratch, and doesn't need a library!
I modified the code a bit to be able to print the 'press!' when I press it by defining the threshold using the if statement. In my case, 15000 is the threshold.
For more sensors, Rob has a thorough documentation for it.
It's very soothing to see the result!