A Socket's Revenge

Made by hongfeij

"Save energy and prevent fire accidents!" But what if the "smart socket" you brought home is a revenger? After being inserted and drained of power, the socket decides to "protest" instead of silence. When the socket feels "abused", if the "abuser" is nearby, it makes noise and makes your energy use a nightmare.

Created: February 17th, 2023

0

Intent

Drawing from my think piece, I'd like to discuss how humans and objects in daily life should treat each other when the objects become alive. Imagining how the socket works in our everyday life, we insert all kinds of appliances inside it and extract power from it endlessly. Nonetheless, it can only keep silent since it has nothing but three holes. Thus, I propose a scenario that the socket decides to "protest" after being abused by human beings. This project will let us notice the neglected family members and reflect on our convenient modern life will also hurt something else. We can't take it for granted.

Context

Three examples are influencing my project the most.

The Spirits in the Lamp, made by C. Zhang and T. Chu offered me a fascinating perspective to critically reflect on human's relationship with our everyday objects. It's not just a one-way demand but a mutual influence. 

TEACHER OF ALGORITHMS made by automato.farm triggered my critical thinking. Humans play the master role in giving intelligence to smart objects. What if objects affect human behavior as a teacher instead? 

Our "What if" exercise made me notice that most objects "want" our attention by messing our life in our minds. There must be something wrong with our attitude toward treating them. This finding shapes my project's character.

Prototype/Outcome

The physical prototype comprises two parts: The first is a laptop bracket. A breadboard and a Nano sensor are embedded in the wood shell. It can feel the temperature change in the laptop and send the signal to control the second part. The second part is a "black box": an enhanced socket. The original socket is wrapped by the same color cube and only shows its face to the user. A servo is hidden in the cube. A metal coil strangles the arm of the servo.

Two parts of code control the behavior of the prototype: The p5.js code integrates the machine learning model. The classifier has two classes: "Human Detected" and "No Person". The code uses the model to judge if anyone is using the appliance and send information back to the Arduino IDE for the next step. The Arduino code controls the physical activities of the prototype: read the temperature, map it into the delay time, and rotate the servo with the delay time interval.

Therefore, the socket is ready to rebel. If the user uses the appliance, the camera detects him and sends a red signal. If the user also uses the appliance for a long time or runs a high-power demand program. The temperature will surpass the set threshold. When both conditions are satisfied, the servo will be activated. As the temperature rises, the rotation speeds up, making the noise much harder to bear. But when the user realizes he is abusing the socket and stop the high-demand behavior, the temperature will go down, and the noise will also disappear.


Process

The project went through two week’s iteration:
Version 1: explore the servo on the Nano board.

  • Issue: the servo can't rotate.
  • Result: replace the Nano board with the Uno board but get resolved on version 3.


Version 2: explore the multiple possibilities of servo + temperature sensor.
  • Issue: Since I use the external sensor, I had trouble finding the library, and the code is also problematic for messing up the loop.
  • Result: Make it work and narrow my scope to the rotation frequency change affected by the temperature.


Version 3: explore the multiple possibilities of servo + temperature sensor.
  • Issue: Mostly conceptual: need to be more precise about connecting human behavior with the object's nature and how to make a complete product. Technically I can't upload the sketch to the board.
  • Result: Reset the Nano board to make it work again, finish the transplantation from Uno board to Nano board, and a relatively straightforward concept in completing the speculative proposal


Version 4: perfect the object's character and reflect the multiple possibilities of servo.
  • Issue: trapped by the servo's nature limitation
  • Result: Finish the demo for desk crit


Reflection

There are two things I would like to be more satisfied with within the prototype. First, noisemaking could be more effective. When I tried to use the coil attached to the servo scratched some coarse surfaces, the servo easily got stuck. It's easy to imagine some large-power appliances will make louder noise. The second is the incomplete integration of objects and functions. The noise comes from the servo, but the servo's primary function is to drive or rotate something rather than make noise. The socket has the same issue. The only action it can do is to cut off the power, but since I have no relay, it's hard to achieve. In this project, the sensor reads temperature from the appliance, but it's separate from the socket, which is inappropriate.

Open Questions and Next Steps

In the desk crit, the aim of this project is well achieved. I heard the comments such as "I feel an animal inside.", "I want it to stop right now". The "abuser" is indeed annoyed by the socket. But there are also some valuable suggestions for inquiry and next step iteration:

  1. Explore the materiality for effective noise making: I mentioned and experienced in version 4, but the next step is improving the prototype.
  2. Give a more vivid character to the socket, for example, how to soothe it when it's angry: This suggestion raises my concern about how people project real-world characters into objects. Ann has a similar concept. Her object imitates a human in the flow state. It will work well with the proper stress level, but when overwhelmed, it will stop working and give an angry sound. This project has a rich image, but we still judge an object by its function from that perspective. A rebel kid will be abandoned and asked for repair. It could be a more exciting direction to explore: what will it do when no one reacts to its rage? What will it become after a long time of being overwhelmed?
  3. Face recognition can help find the actual abuser: this advice is promising but hard to achieve. To realize it, we need the prototype to catch the user and train a model in real-time. I don't think the board has this capacity, but it would make the project more interesting.

Attribution and References

[1] Code Reference Source: Teachable Machine to Arduino (notion.site)

[2] TEACHER OF ALGORITHMS: http://automato.farm/portfolio/teach_algorithms/

[3] the Spirits in the Lamp- Alternatives with Home Electronic Devices: the Spirits in the Lamp- Alternatives with Home Electronic Devices | Project | IDeATe (cmu.edu)

Video Documentation

Vimeo

0
/*

  Investigation I - Creative Project: RME 2023 Spring
  Author: Hongfei Ji
  Andrew ID: hongfeij

*/
#include <Servo.h>
#include <Arduino_LPS22HB.h>

float mapFloat(float x, float in_min, float in_max, float out_min, float out_max)
{
  return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
}

Servo myservo;
int pos;
boolean isCounterwise = false;
boolean isHere;
float peakTemp = 0;
float sootheVal = 0;

void setup() {
  Serial.begin(9600);
  while (!Serial);

  if (!BARO.begin()) {
    Serial.println("Failed to initialize pressure sensor!");
    while (1);
  }

  myservo.attach(D9);

}

void loop() {

  float temperature = BARO.readTemperature();

  Serial.print("Temperature = ");

  float valMapped = constrain(temperature, 26, 30);
  float mappedTime = mapFloat(valMapped, 26, 30, 490, 10);
  Serial.print(valMapped);
  Serial.println(" C");
  Serial.println();

  Serial.print("Frequency: ");
  Serial.print(1000 / mappedTime);
  Serial.println(" times/s.");

  if( Serial.available() ){
    // Judge if the user is in front of the screen
    String incoming = Serial.readString();
    Serial.print("Received Data => ");
    Serial.println(incoming);
    
    if( incoming.startsWith( "Human Detected" ) > 0) {
      isHere = true;
    } else {
      isHere = false;
    }
  }
  
  if (isHere == true) {
    // Red Signal for warning
    digitalWrite(LEDR, LOW);
    delay(10);
    digitalWrite(LEDR, HIGH);
    delay(10);
    peakTemp = max(valMapped, peakTemp);
    sootheVal = peakTemp - valMapped;
    Serial.println(sootheVal);

    // Making noise when temperature surpasses the threshold
    if (valMapped >= 28 && sootheVal < 0.25) {
        myservo.write(pos); 
        if (pos == 180 || pos == 0) {
          isCounterwise = !isCounterwise;
        }
        if (pos >= 0 && pos <= 180 && isCounterwise == true) {
          pos = pos + 6;
        }
        if (pos >= 0 && pos <= 180 && isCounterwise == false) {
          pos = pos - 6;
        }
    }
  } else {
    // Peace state or being soothe
    digitalWrite(LEDG, LOW);
    delay(5);
    digitalWrite(LEDG, HIGH);
    delay(5);
  }
  delay(mappedTime);
}
Click to Expand
x
Share this Project


Focused on
About

"Save energy and prevent fire accidents!" But what if the "smart socket" you brought home is a revenger? After being inserted and drained of power, the socket decides to "protest" instead of silence. When the socket feels "abused", if the "abuser" is nearby, it makes noise and makes your energy use a nightmare.