Introduction: Pressure Activated Hug-Detector (PAD)

Picture of Pressure Activated Hug-Detector (PAD)

While attempting to design our Pressure Activated Hug-Detector or PAD, we spent a lot of time considering our technology within the realm of David Phillips’ article on ubiquitous computing (Phillips, David. “Ubiquitous Computing, Spatiality, and the Construction of Identity: Directions for Policy Response,” in Ian Kerr, Valerie Steeves and Carole Lucock (eds.), Privacy, Identity and Anonymity in a Network World: Lessons from the ID Trail. New York: Oxford University Press. 2009). Phillips relates ubiquitous computing to how we understand and present ourselves in public spaces, and in turn how we use that information to understand others.  One thought that stuck with us through the making of this design was that of control. As in, how do we control what we reveal to others? How do we control the assumptions other people make about us?  Or even, how in control of ourselves are we in public? 

This is where PAD comes in. The idea was a result of a mixing of the Safe Cuddling (Fisher, Helge 2010) suit for children, and the desire to choose how people approach each other in public and in what context. 

PAD is designed to be worn somewhere on the upper body and has two LED settings for red and green. The wearer is able to choose whether to emit red or green light. The red light signals that the individual is to be approached with caution and not to be touched at all. The green light indicates that the wearer is open to touch communication. The LED is controlled by a push button so that the wearer can change their mind about colour selection at any point. This is to enable easy transition from public transit, where the wearer would prefer to not be approached or touched, to perhaps a bar, where they are looking to engage with other people. By using the push button, the wearer is in complete control at all times about what signals they are sending out, and also making their personal status aware to the public. 

The second part of PAD is measuring the pressure of physical contact such as a hug. With each individual sensor, the wearer can set the ideal length of time for a hug. If the hugger exceeds that limit, the LED will go off red, thereby informing the hugger that it is time to break contact. This keeps the wearer in control of all physical contact and determines how friendly with another person they are willing to be. The sensor allows the wearer to feel comfortable knowing that a limit has been set and they are the one that set it. Once the hugger breaks free, the LED will change back in colour to green, the acceptable colour for initiating physical contact. 

So let’s talk about building your own PAD.

Step 1: Materials

Picture of Materials

Electronics
1 Arduino Uno
1 Breadboard
1 9V Battery + 1 battery snap to connect to Arduino
1 Piezo sensor disk (measures the pressure)
1 Flora RGB Smart NeoPixel by Adafruit
1 Pushbutton ( = 2Pin Tactical Switch)
1 1K Resistor for the button
2 Alligator wires for the NeoPixel
A lot of jumper wires (we used the pre-bent and the premium ones in male/male, male/female, and female/female)

Other materials
Masking tape for fixation
Masking tape for decoration - Japanese paper tape
Foam board (black or white)
Pins to connect foam boards
Different sizes & types adhesive tape for sensor patch
1 Large button with 4 holes for LED
1 Fixing pin

Tools
Wire stripper
Scissors
Cutter
Cutting matt
Ruler

This is the list of materials we used to build this prototype. You might replace some of it e.g. foam board with cardboard, add more LEDs etc.

Step 2: Circuit & Sketch of Wearable Hug-Detector

Picture of Circuit & Sketch of Wearable Hug-Detector

We had to connect three elements: the NeoPixel, the Piezo pressure sensor, and the pushbutton. For all of them we found suitable example of circuits that we integrated in our own one. Instead of describing how they are connected, we provide this circuit diagram made with Fritzing.

In making our technology diagram, we used an open source program called Fritzing, that allows us to illustrate the technical model of the Pressure Activated Hug-Detector. 

An issue with creating a diagram with an open source program is that some technologies that are not widely used, may be harder to represent in the diagram—due to the fact that there may not be a image library for that certain technology. For example, this is evident with our connection to the Piezo Sensor, where jumper cables would connect the Piezo sensor to wires on the breadboard (not directly connected as seen in our diagram). Also, the LED indicated in the diagram is not a NeoPixel LED, the connectors in the diagram has 4 prongs (which are anode pins associated with RGB) whereas the NeoPixel has 4 connectors (5V, ground, A9, and an output —to connect to another NeoPixel).

Initially, we connected the Arduino board, the breadboard, and the three elements to see if it works, as we want it. You should first test on small scale without your final design of the wearable, if your elements and the code work as you like. Further, this will allow you some modifications before you proceed with the final design.

Once tested, the next step was to decide what is the best possible package design for our wearable technology. Because of certain limitations given in the size and format of the Arduino Uno and the breadboard, we decided to pack these two including the battery in a small “blackbox”. This one is supposed to be small enough to fit in a pocket or a handbag.

The only user interface is the pushbutton on top of the box. By pushing it, the wearer can self-regulate the displayed colour of the display. Therefore allowing themselves to control not only how others will interact with them in a public space, but also how comfortable they’re able to feel. Hopefully the option of control will allow for a certain sense of security in knowing that their boundaries have been clearly stated through this wearable device. The pushbutton will allow them at any point to change their minds about what limits they’re setting.

In addition, the wires to the Piezo pressure sensor and the LED come out of the top of the box. The sensor is intended to be placed underneath the clothing on a preferred position on the torso. The LED is intended to be attached on the clothing, visible for the person approaching the wearer.

Above is a rough sketch how we imagined the construction.
 

Step 3: Connecting Everything

Picture of Connecting Everything

Arduino board & breadboard: GND and 5V on Arduino to correspondent – and + on the breadboard. You might want to cross-connect the other side of the breadboard too.

Piezo sensor: A0 on Arduino to the pin on the breadboard, where the alligator wire connected to the + (red) of the sensor. The – (black) of the sensor is connected to the other pin on the breadboard, which itself is connected to 5V via a jumper.

NeoPixel: Directly with a long jumper to A9. With two other long jumpers to GND and 5V through the breadboard.

Pushbutton: It is connected to the breadboard. One pin is connected to 5V, the other pin with one jumper to A2, and with another through the 1K resistor to GND (– on the breadboard).

As described in the previous step, we initially connected everything with the ‘premium’ jumpers for a faster testing. Once everything was working, we replaced all the jumpers that go/in and out the breadboard and the Arduino with the flat pre-bent one, so we can keep the packaging as small as possible. The ‘premium’ ones are good for extensions and testing, but if you need to make something compact, they don’t bend enough. Then, we extended the flat pre-bent ones that go to the LED, the sensor, and the pushbutton with the different of the ‘premium’ ones. Here you would need to get the different types (m/f, f/f, m/m). You might also need to cut the pins of the resistor to keep the construction as close-fitting as possible.

Step 4: Code

The code is based on a couple of if-conditions. The code reads the value of the pushbutton (pressed or not), and the measured pressure from the sensor. The first if-condition checks if the button is pressed or not. If the wearer has pressed it, the LED will immediately emit RED light and stay in this state until the wearer presses the button again. In the else-condition, the code checks the censored pressure value. Above the threshold (in our case 500), the LED will change to RED. Under the threshold it will stay GREEN. These colours were chosen as they are best recognized as the colours for ‘stop’ and ‘go’ respectively. The Piezo sensor is sensitive and involves some testing to discover the suitable threshold. In most tutorials this sensor requires an 1MOhm resistor, but because in our circuit we have another one attached to the pushbutton, it affected extremely the values.

For the NeoPixel you will need to install the NeoPixel library to your Arduino library. You can find it here. We used for our code the strandtest example, and more specifically the colorWipe-part of the code.

For the pushbutton, we used the pushbutton-example 3C from Getting Started with Arduino by Massimo Banzi.

For the Piezo sensor, there are as well several tutorials online. You should check which one serves your purpose the best. For this tutorial it is simply reading the value.

Here is our code based on the examples found elsewhere:


#include

#define PIN 9

// Parameter 1 = number of pixels in strip
// Parameter 2 = Arduino pin number (most are valid)
// Parameter 3 = pixel type flags, add together as needed:
// NEO_KHZ800 800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
// NEO_GRB Pixels are wired for GRB bitstream (most NeoPixel products)

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

// this constants won't change:
const int piezo = A0;
const int buttonPin = 2; // the number of the pushbutton pin

// Variables will change:
int buttonState = 0; // current state of the button
int old_ButtonState = 0;
int state = 0; // 0 = GREEN and 1 = RED

void setup(){
Serial.begin(9600);
pinMode(buttonPin, INPUT);

strip.begin();
strip.show(); // Initialize all pixels to 'off'
}

void loop(){ /
/ read the state of the pushbutton value:
buttonState = digitalRead(buttonPin);
int piezoVal = analogRead(piezo);
Serial.println(piezoVal);

// check if the pushbutton is pressed.

if ((buttonState == HIGH) && (old_ButtonState == LOW)){
state = 1 - state;
delay(10);
}

old_ButtonState = buttonState;

if (state == 1) {
colorWipe(strip.Color(255, 0, 0), 50); // RED
} else {
if (piezoVal <= 500) {
colorWipe(strip.Color(0, 255, 0), 50); // GREEN
} else {
colorWipe(strip.Color(255, 0, 255), 50); // RED
}
}

// wait 2 milliseconds before the next loop
// for the analog-to-digital converter to settle
// after the last reading:
delay(2);
}

// Fill the dots one after the other with a color
// This part is required for the NeoPixel, just include it

void colorWipe(uint32_t c, uint8_t wait) {
for(uint16_t i=0; i<strip.numPixels(); i++) {

      strip.setPixelColor(i, c);
      strip.show();
      delay(wait);
  }
}

Step 5: Packaging

Picture of Packaging

In the final step, we built the box for the Arduino and the breadboard, and the wearable design for the sensor and the LED.

To keep the box as small as possible, we attached the Arduino and breadboard together on their largest side. As both have similar sizes the box stays as small and flat as possible. The button and the wires go out on the top side of the box, which is then closed. On the bottom , we left enough space to attach the battery and then close it finally.

To make sure everything is as compact as possible and also doesn’t loosen itself, we sticked it with masking tape. We wanted to make sure our device was discreet enough to be feasible as a wearable tech in a social situation, but still plainly visible enough so as not to dilute its purpose.

The box is built with foam board. All sides are connected with 2 pins each, and then secured with masking tape. On the top side, we pulled out the wires for the LED and the sensor, and the pushbutton. The pushbutton needs to go out only as much as to be usable. You can also build a box, and cut out a hole for it and the cables, so that it won’t stand out of the box.

For the sensor we built a small patch made of adhesive tape, on which we mounted the Piezo sensor with masking tape. You could also use a different material for the sensor ground and finally glue it instead of taping it. For the side that is attached to the human body we worked with a small piece of medical adhesive tape which is not too strong to hurten, and not too loose to fall off. The idea behind the design is so that the device can be worn on various areas of the body depending on the user. Ideally, for maximum visibility with the LEDs, the device would be worn somewhere on the front facing part of the upper body, either the arms or the torso.

The NeoPixel LED we decided to attach to a large button. Basically, you pull the LED pins through the buttonholes, and then attach them on the backside to the jumpers. To pin the button we added a fixing pin on its backside.

After this you should be all set to take your new PAD on the town.

Step 6: Demo Video

Here is a video demonstrating how the hug detector works: 

Comments

terrydosher (author)2015-01-31

Mesaure groundnmovem3nt

About This Instructable

2,008views

11favorites

License:

More by jvy14:Pressure Activated Hug-Detector (PAD)
Add instructable to: