Haptics » Experiment 4: Haptics Buffet

3 minute read

Beverly Chou, Caleb Cloitre-Ferguson, Heng Tang, Lin Zhang, and I gathered on Sunday to explore the Touch Triggered Vibration prompt.

As I recall the group struggled a bit coming up with a concept, which was surprising since touch and haptics are such close kin. Force Sensing Resistor (the Interlink FSP 406) seemed an obvious choice as a means to trigger, that much was clear at least:

Eventually someone brought up petting, which led to cats and the inescapable correlation between purring and vibration. Finally, a scrap of faux fur I scrounged from someone’s cast-off Halloween-themed PhysComp midterm sealed the deal.

Caleb was quick to pull together some code but the part of the build that required the most time was wiring, specifically the bare leads on the vibrating motors and the similarly fragile leads on the force sensing resistors:

On the fabrication side, our initial assumption (or perhaps it’s more accurate to say my initial assumption since I was first to start fabricating) was to use an even distribution of sensors and motors alternating at regular intervals and ‘petting’ would be measured as a function of readings taken from two FSRs:

I seem to recall it was important to everyone that the technology be as visibly ‘out of the way’ as possible and that required getting the Arduino and breadboard some distance from the interface. If I had to venture a guess I’d say it was anthropomorphization at play, which is perhaps a testament to how quickly one can cathect to an object based solely on a swath of (faux) fur.

From a sensory standpoint the interaction is undeniably pleasant but what I found most satisfying about the exercise is it seemed to hit multiple notes: it was tactile (the fur), haptic (the vibrating motors), and triggered by touch (the force sensing resistors).

Speaking only for myself, it was especially rewarding to see Antonio check out the piece, since these are ways of perceiving that play such a prominent role in how he negotiates the world around him:

Below is the code as it was written by end of the weekend session:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//vibrating motor pins
#define PINA 11
#define PINB 10
#define PINC 9

//force sensor pins
int FSRA = A0;
int FSRB = A1;


int threshold = 255;      //max strength of cat purr
int fsrAreading;          // the analog reading from the FSR resistor divider
int fsrBreading;          // t  he analog reading from the FSR resistor divider
bool pettingNow = false;

void setup() {
  Serial.begin(9600);   // We'll send debugging information via the Serial monitor

}

void loop() {
  fsrAreading = analogRead(FSRA);
  fsrBreading = analogRead(FSRB);
  Serial.print("A reading: ");
  Serial.print(fsrAreading);
  Serial.print("  | B reading: ");
  Serial.println(fsrBreading);

  if (fsrAreading + fsrBreading >=70) {
    pettingNow = true;
    Serial.println("combo sensor threshold");
  }
  if (pettingNow == true) {
    purr();
    pettingNow = false;
  }
}

void purr() {
  for (int fadeValue = 0 ; fadeValue <= threshold; fadeValue += 10) {
    // sets the value (range from 0 to 255):
    analogWrite(PINA, fadeValue);
    analogWrite(PINB, fadeValue);
    analogWrite(PINC, fadeValue);
    // wait for 30 milliseconds to see the dimming effect
    delay(20);
  }

  // fade out from max to min in increments of 5 points:
  for (int fadeValue = threshold ; fadeValue >= 0; fadeValue -= 10) {
    // sets the value (range from 0 to 255):
    analogWrite(PINA, fadeValue);
    analogWrite(PINB, fadeValue);
    analogWrite(PINC, fadeValue);
    // wait for 30 milliseconds to see the dimming effect
    delay(20);
  }
}

Go team!

Categories:

Updated: