Mechatronics Art: Speculative Object

AVL-4274

Introduction

Throughout my life, I’ve always been fond of robots. Similar to how most people are far more emotionally attached to dogs in a movie than people, I am the same with robots. Below are a few clips of robots who, despite their good intentions, are punished. WARNING: Content is violent and saddening.

The piece: Meet AVL-4274

AVL-4724: Imprisoned. NOTE: There should be chains on him, and the back gate of the cage should be sealed; also, the piece is aesthetically incomplete with respect to my original vision.

A video of the monitor panning and looking at each plant:

A video of it being fully-functional (albeit not fully aesthetic with the LEDs).

Speculation

This piece envisions a future in which the issues of mass incarceration, global warming, and the ethics of artificial intelligence are exacerbated to the extent where they intersect. AVL is a robot who was part of a farming robot colony, but malfunctioned and ended up destroying a few crops. However, AVL is extremely fond of plants - it’s all he cares about. Unfortunately, due to his glitches, he isn’t able to take care of them well. The engineers in the world have ceased to exist - they are just unempathetic technicians now who care only about efficiency. Outdated notions of corrections, which involve raw imprisonment, still exist in this world. Therefore, AVL was never fixed, he was simply locked up. Despite his good intentions, despite all the potential he has to sustain the dying world, he was just locked up, and forgotten. Now, AVL simply watches whatever plants he can from within his cage. He monitors them, but he’s chained up and can’t water them. He’s grateful for the kind souls who water the plants, whether that be the clouds above, or a passerby. He’s far more grateful if that passerby shows empathy.

This story isn’t far-fetched. Over two million human beings are incarcerated, with a recidivism rate of over 50% nationally. Our society is one that throws away that which doesn’t work even if fixing it takes less energy. This mentality applies directly to global warming, and how our throw-away society has polluted this Earth. It seems like something inextricable from our nature; perhaps robots are the only beings with absolutely pure intentions of maintenance and sustained care. However, the ethics of imprisonment are unjustified, and the ethics of intelligent robots are not established; it would make sense if the latter inherited the former philosophy: lock up robots instead of fixing them. Empathy is the key factor, the ultimate solution, to all these issues; it’s in short supply today, so perhaps AVL can demonstrate what it’s like to see through a perspective of pure, sustained, focused, good intention behind bars.

Function

The head is an old black and white TV, which connects to a camera mounted on the top of the cage. The camera direction is controlled by a servo motor. There’s a soil moisture sensor in each plant. The camera pans from plant to plant, “scanning” each one (reading the moisture levels) and outputting its status (red = dry, yellow = good, green = currently being watered). The moment a plant is being watered, the camera will look at it and express joy (through LEDs or otherwise in a future implementation). The code omits delays, and replaces the functionality of delays with moisture level readings (in a parallel manner which doesn’t require interrupts).

Circuit Schematic

specobj_bb.png

Code

Main Code (NOTE: The LED’s in this code are simple; I may improve that aspect w/ an RGB LED before class)

/*
 * The goal of this code is to pan the servo motor whilst reading 
 * sensor data, and react to that sensor data ASAP (as if they were 
 * occurring in parallel). This is done by substituting the delay between
 * servo turns with sensor checks. 
 * 
 * Now, we're checking the status of three water sensors by panning to each one. 
 * Meanwhile, if any one of them becomes wet, the camera will react by looking
 * at that plant for a short duration. 
 * 
 * Now, the reaction entails LED responses.
 */

#include <Servo.h>
Servo myservo;
int pos = 0; // position of servo  

// sensor IDs of the plants
const int S1 = A0;
const int S2 = A1; 
const int S3 = A2;

// angle values of the plants
const int P1 = 58;
const int P2 = 83;
const int P3 = 110;

// soil moisture sensor thresholds
const int WATER_THRESH = 750;
const int HUMID_THRESH = 500;
const int DRY_THRESH = 300;

// LEDs
const int R = 9;
const int G = 10;
const int Y = 11;

void setup() {
  Serial.begin(9600);
  myservo.attach(6);
  pinMode(R, OUTPUT);
  pinMode(G, OUTPUT);
  pinMode(Y, OUTPUT);
}

void loop() { 
  
  pan(P1, S1, P2);
  pan(P2, S2, P3); 
  pan(P3, S3, P2); 
  pan(P2, S2, P1);

}

void pan(int plant1, int sensor1, int plant2) {
  scan(plant1, sensor1);
  // pan from plant1 to plant 2
  if (plant2 > plant1) {
    for (int i = plant1; i <= plant2; i++) {
      myservo.write(i);
      check();
    }
  } else {
    for (int i = plant1; i >= plant2; i--) {
      myservo.write(i);
      check();
    }
  }
}

/* scans a single plant for approximately a second
 * whilst panning 
 */
void scan(int plant, int sensor) {
  myservo.write(plant);
  for (int i = 0; i <= 50; i++) {
    check();
    status(sensor);
  }
}

/*
 * Takes a little over 30ms to accomplish this
 * 
 * checks all the plants for watering
 */
void check() {
  for (int i = 0; i <= 100; i++) {
    checkPlant(P1, S1);
    checkPlant(P2, S2);
    checkPlant(P3, S3);
  }
}

// checks if an individual plant is
// being watered
void checkPlant(int plant, int sensor) {
  if (analogRead(sensor) > WATER_THRESH) {
    react(plant, G);
  } 
}

// reacts to a plant being watered
void react(int plant, int reactLED) {
  resetLEDs();
  myservo.write(plant);
  delay(1000);
  for (int i = 0; i < 5; i++) {
    Serial.println("Water!!!!");
    digitalWrite(reactLED, HIGH);
  }
  delay(2000);
  digitalWrite(reactLED, LOW);
}

// reports the status of the given plant 
// with LED 
void status(int sensor) {
  resetLEDs();
  if (analogRead(sensor) > HUMID_THRESH && analogRead(sensor) <= WATER_THRESH) {
    digitalWrite(Y, HIGH);
  } else {
    digitalWrite(R, HIGH);
  }
}

void resetLEDs() {
  digitalWrite(R, LOW);
  digitalWrite(G, LOW);
  digitalWrite(Y, LOW);
}

Calibration Code - Servo Motor Angle:

/*
 * Helps callibrate the camera angle
 */

#include <Servo.h>
Servo myservo;
int pos = 0; // position of servo 

void setup() {
  Serial.begin(9600);
  myservo.attach(6);
}

void loop() {
  int angle = Serial.parseInt();
  if (angle != 0) {
    myservo.write(angle);
  }
}

Calibration Code - Water Sensor Check:

/*
  MODIFIED BY: Anand Sekar (11/12/18) 
  
  # Example code for the moisture sensor
  # Editor     : Lauren
  # Date       : 13.01.2012
  # Version    : 1.0
  # Connect the sensor to the A0(Analog 0) pin on the Arduino board
  
  # the sensor value description
  # 0  ~300     dry soil
  # 300~700     humid soil
  # 700~950     in water
*/

void setup(){
  Serial.begin(57600);
}

void loop(){
  Serial.print("MSV 1:");
  Serial.println(analogRead(A0));  
  Serial.print("MSV 2:");
  Serial.println(analogRead(A1));
  Serial.print("MSV 3:");
  Serial.println(analogRead(A2));
  delay(100);
}
Anand Sekar