Class Notes: 3 September, 2019

Class stuff

Alternative Technologies Maker’s Fair

My office hours this semester will be Thursdays, 4:30-6:30pm in Hunt A10.  If you need to meet at some other time we can probably work out a Skype call.

Setting up the SparkFun RedBoard Turbo

Installation instructions

Official Sparkfun hookup guide.

If you have a working board, please read the details of how this is an improvement on the Arduino.

Debugging

Test things in this order.

  1.  Do you have a good USB cable?  If you plug in a USB cable and the RedBoard LEDs don’t light up, it’s a bad cable.  In my studio I just tried 8 cables and 1 did not light up the RedBoard unless I forced it in to an odd position.  If the cable connection isn’t super-snug between the cable and your RedBoard, try other cables.   My good cables lit up all of the RedBoards, including ones that didn’t work in class.
  2. Reboot your system after installing the SparkFun updates to the Arduino IDE.
  3. Can your laptop “see” the RedBoard over USB?   This is a bit trickier, but on Win10 the Arduino IDE should show “SparkFun RedBoard Turbo” in the text on the list of ports.
  4. If you’re getting a lot of red text that looks like compilation errors, try compiling the script in the installation instructions.  It should sequence the LEDs near the USB connector.
  5. Serial() doesn’t work.  Use SerialUSB() instead.

Setting up p5.js / serial

There are two steps here.

First, set up p5.js using these instructions.  Don’t use the web editor, download the p5.js package and use a local editor.  Run a few “Hello World” sketches to verify that things are working correctly.

Second, install p5.serialcontrol.  There’s a set of instructions at ITP for making the connection between p5.js and the Arduino, but if it doesn’t work for you on the first go, don’t waste a lot of time trying to sort it out.  We’ll do that on Thursday at the start of class.

Responses and First Thoughts

IGOE

I agreed with many of his positions on overused trends and have personally seen many iterations of them in my time exploring the field of physical computing. I felt, however, that he threw blankets over some really cool potential ideas. Yes, single-input single-output networked devices such as the “Remote Hugs” project can definitely be considered to be overused, however I feel that throwing a blanket over “technologically enabled gloves” is a bit of a misdiagnosis, as there are dozens of possibilities of what the gloves can be tracking, whether they are monitoring or being used as inputs, and what types of devices they are controlling, whether the output is digital or mechanical.

DESCENDANTS

I found the idea of an intelligent machine having personality and even lying to its user amusing and a little terrifying. A seemingly seamless conversational user interface, the suit walks a fine line between person and device. It has necessary functionalities that are conveniently accessible through speech, however, making a device too “human” seems to leave a lot of room for unintended consequences in execution, such as the suit being able to lie to its user (as insinuated by the user believing the suit to be lying about their chances of survival). In a seemingly “perfect” design, new problems seem to have arisen.

 

SKILLS AND BACKGROUND

I am an Information Systems and Human Computer Interaction undergraduate. I focus my studies on full stack application design, and small device design and programming.

I have experience with Arduino, 3D printing, laser cutting, CAD, Rhino, Solidworks, Photoshop, InDesign, and various other softwares.

I have worked on a few physical computing projects before, including being a part of a team designing wearables and applications for alzheimers/dementia patients, built interactive displays, and helped design a temporary display at the Computer History Museum in Mountain View, CA.

Assignment 2: Expect the Unexpected

Problem

I read through a number articles and lists of problems people with disabilities face, and was intrigued by one I found that mentions that deaf people are often jumpy because they are regularly surprised by people coming up behind them. https://www.ranker.com/list/things-deaf-people-have-to-deal-with/nathan-gibson

Solution

If deaf people could be discreetly be alerted of people approaching them from behind they would be startled less often.

Proof of Concept

An Arduino (in this case a Sparkfun RedBoard Edge) connected to a human sensor to detect humans, a motion sensor to know when the person wearing the device is moving (to ignore humans while in motion to prevent false positives), and a vibration motor to silently alert the wearer of the device that someone is coming. By putting this all in a small case that clips to the back of someone’s belt, it should provide some warning of approaching humans.

Basic system diagram for Haptic Human Sensor
Basic system diagram for Haptic Human Sensor
Haptic Human Sensor Physical Layout
Haptic Human Sensor Physical Layout

Arduino sketch of how the logic would flow.

Aiding Visually Impaired People with Shopping

Problem: As I was thinking about ideas for this project I decided to go through my daily routine and place myself in those situations as a differently-abled person. When I thought about grocery shopping, I realized that the entire process leans on the assumption that the person can see. After doing some more digging I found this video.

In short, currently, visually impaired people usually need an assistant to guide them through the store and pick out the things they need. The problem is that visually impaired people have difficulty being independent while shopping.

General Solution: A handheld barcode scanner which blind people can use to gather more information about the product to understand if it is what they are looking for.

Proof of Concept: an Arduino with a barcode scanner and a speaker. If there is internet connection, the speaker can give a short description of the product. If this is not an option, user can put in names of specific products and their universal product code beforehand. When product is scanned, if it is on the list, a specific sound can be played and a different one if it is not.

Fritzing Sketch:

 

Drawing:

 

 

 

 

Assignment 2: Smart Entrance Lighting

Issue

Returning home after a long day is a great feeling, but for those with less-sensitive vision, it may be difficult to locate a light switch in a dimly-lit or dark environment. 

General solution

Ideally, the house should be able to sense when someone has returned, whether through the motion of the person, the opening of the door, or the location of one’s smartphone. Combining this input with a reading of the ambient light level (i.e. if it’s still bright enough outside that light coming in through windows make the house sufficiently navigable without artificial lighting), the system should determine whether it is necessary to turn on the lights. Then, once an individual has found their way past the foyer, the system could automatically turn off the lights that it had turned on earlier based on motion in other areas of the house, the turning on of other lights, or the location of a person’s smart device (using Bluetooth beacons, for example).

This solution would aid those with vision impairments and older people, whose eyes adjust slower to different lighting conditions. However, such an implementation could conceivably improve the life of a perfectly-sighted person by eliminating the need of hunting for a light switch in the dark, especially if both hands are full.

Proof of concept

An Arduino connected to an IR proximity sensor detects when a person has entered a zone and turns on an LED. A second IR proximity sensor detects movement in another zone, and another LED is connected to a switch. If motion is detect in the second zone or if the second LED is turned on via the switch, the first LED is turned off by the controller.

Initially, I wanted to use the RCWL-0516 Doppler radar motion sensor available in the physical computing inventory, but the documentation seems thin (a GitHub project page depicts oscilloscope scans), so I decided to use a simple IR proximity sensor instead.

Fritzing sketch
Proof of concept schematic for a smart entrance lighting system.
Arduino sketch (untested)
const int SWITCHPIN = 9; // controls interior light
const int DOORLIGHT = 3; // LED near entrance
const int INTERIORLIGHT = 6; // LED inside house
const int DOORMOTION = A0; // IR proximity sensor near entrance
const int INTERIORMOTION = A1; // IR proximity sensor inside house
const int motionThreshold = 30; // set motion threshold here

void setup() {
  pinMode(DOORMOTION, INPUT);
  pinMode(INTERIORMOTION, INPUT);
  pinMode(SWITCHPIN, INPUT);
  pinMode(DOORLIGHT, OUTPUT);
  pinMode(INTERIORLIGHT, OUTPUT);
  
  Serial.begin(9600);
}

void loop() {
  int switchVal;
  switchVal = digitalRead(SWITCHPIN);

  int doorRead;
  doorRead = analogRead(DOORMOTION);

  int intRead;
  intRead = analogRead(INTERIORMOTION);

  if(doorRead > motionThreshold) {
    digitalWrite(DOORLIGHT, HIGH);
  }
  
  if(intRead > motionThreshold || switchVal == HIGH) {
    digitalWrite(DOORLIGHT, LOW);
    digitalWrite(INTERIORLIGHT, HIGH);
  }
}
Visual sketch
A simple floorpan showing locations for IR proximity sensors and lights.

Assignment #2 – Laundry

Problem: I live in a double duplex (quadplex?) with one washing/dryer unit in the basement.  Living on the top floor, it’s mildly inconvenient if I take the three flight journey to the basement only to find someone else already using the laundry machines.  Then I often forget I was waiting for laundry, or take too long and end up having someone else take my slot.  I believe there is a better way to not only check if its being used (more than a webcam!) but also to smartly inform behavior if it is in fact being used.  While this is somewhat a selfish assignment from my end, I do think processes like this that can allow users to not exert themselves on staircases are helpful overall.  My grandmother lived in a two-story house, walking up and down the steps daily, for probably too long, and this would ease the burden.

Solution: A system that broadcasts availability of the laundry machines, and also reminds users upon their availability after checking to ensure efficient use patterns of both.  Users are alerted via a beep and red LED.

Proof of Concept: The user would activate the system whenever they were wanting to do laundry.  If available, the system would immediately beep and let them know it was “safe” to do so.  If not, the system would remain dormant until either a) the wash cycle on the washer had passed or b) the washer stopped running.  Choice A is more of a failsafe in case the accelerometer isn’t working as it is a “maximum possible time the washer could run,” but the real meat of the concept is in B. An accelerometer responds to the washing machine movement to let the user know easily if it is in use or not.

Fritzing Sketch:

Chance Lytle Assignment 2

Basic sketch w/ speaker and LED on digital out with an overkill accelerometer only outputting its change in Y.  A less intense accelerometer would be fine, but this is the one I found first.  The only major assumption is on the accelerometer being 3 flights below the controller, but it wouldn’t be that hard to make it broadcast wirelessly.

Arduino Psuedocode:

Single-state of waiting when powered on by the user to check the laundry machine availability.

bool isTime, isInUse;
float timer = 60f * 30f; // 60secs * 30mins, adjustable dependent on wash cycle
float timeToOff = 60f * 2f;

void loop() {
    isInUse = MotionSensorStatus(); // base it off some function that reads motion input
    timer -= deltaTime; // whatever the time since powering on is
    if (!isInUse || timer <= 0f) {
        itsTime();
    }
}

void itsTime() {
    // power on LED and make a beep to notify them
    // power off system after a certain amount of time
    timeToOff -= deltaTime;
    if (timeToOff <= 0) Quit();
}

 

 

Assignment 2 — Night Light

Premise

You can’t breathe. It’s dark. Your heart is pounding through your skull. You’re sweaty. It felt so real. You know it was a nightmare. It was not real. Yet it was. You’re alone. You stare into the abyss. You try to calm down. You hope the darkness helps. But it doesn’t.

A lot of people struggle with daily nightmares, whether due to underlying anxieties, PTSD, sleeping issues or anything of the sort.

Having nightly nightmares can have large effects on your mood and health. Artwork: Kuevda©

NightmareLight

We already have Fitbits and Smart Devices that track our heart rate and track our sleep and REM cycles. Theoretically, the data is all there, so the device could tell when you’re having a nightmare. Imagine a device that emits soothing sounds and lights up with calm colors, helping soothe you after a nightmare. It feeds on the sleep data and reacts accordingly, creating a better sleeping experience.

How Would it Work?

Data flow of Nightlight from watch to new Light Device

As you sleep, your smartwatch collects data as usual, and when your heart rate elevates drastically and it realizes you are having a nightmare, it signals the night light to turn on. When the night light is on, it uses the combination of smell, sound and sight to help soothe you back into sleep.

 

Sample product prototype sketch

In terms of Ardiuno and Fritzing sketches, I am not entirely sure on the process of reading live data using Bluetooth, but I imagine it would be uploaded on the cloud and Ardiuno would have to read the stream of data and certain functions would be called upon when they are needed.

Input is the online updating dataset (I am unsure of how this part works). Outputs are the LED, Speaker and a toggle mechanism for mist sequence.

i.e. if heart rate is above 120 bpm, then execute A, B and C.

A- release mist

B- play tune

C- turn LED to on and change color of LED from warmer to cooler red to slow down heartbeat.

Here, I used a Bluetooth micro-controller as a way to communicate between the fitbit and the nightlight.
Sample animation of how night light would adapt with your sleep.

Audiolizing Heat in a Visually Impaired Person’s Kitchen

The Problem:

Think of the different ways that you deal with hot surfaces in your own kitchen—you might hold your hand near something to see if it’s hot, you might touch something briefly if you’re unsure of whether it is too hot to hold, or there may even be warning lights that tell you if something is safe or not to touch.

In a visually impaired person’s kitchen, however, many of these methods don’t work, and one must rely on audio queues to accomplish the same tasks. This video outlines some of the methods that the visually impaired use in order to navigate their kitchen:

Inspiration/Solution:

Thinking about the various audio queues present in a kitchen, one of the sounds I kept returning to was that of a kettle boiling water. I think there’s a beautiful simplicity in the way that users interact with kettles by associating the iconic steam whistle sound with heat and completeness.

My ideas is to incorporate increasing tone (similar to a kettle whistling) and apply it to stove tops in order to accomplish a couple main goals. First, if the stove top emits a tone as it heats up, visually impaired persons will be able to gauge the temperature of their surface from anywhere in the kitchen. In addition, I would like to include proximity as a variable—perhaps heat could affect the pitch of the tone while proximity to the hot surface itself affects volume. The goal is for these inclusions to not only make the kitchen safer for visually impaired persons, but more functional as well.

 

Proof of Concept:

Below is a depiction of how a user might encounter tone as he/she reaches near a hot cooking surface.

A simple circuit sketch shows the components that would be necessary to make this happen. There is a speaker to emit the tone, a heat sensor that affects the tone’s pitch, and an infrared proximity sensor to relay information to the microcontroller. Ideally these electronics would be integrated into the design of the stovetop itself, rather than as its own add-on device.

Assignment #2. Prevent alarm ringing after I got up

1) Find a problem to solve

I often woke up before my smartphone alarm rings and it keeps ringing while taking a shower, which is noisy and gives discomfort to my roommates.

 

2) Describe the general solution

I am going to design a thermal camera device that is attached to the ceiling and scans the temperature of my bed. It is connected to my smartphone through Bluetooth. When I lie on my bed and it could detect my temperature so that allows the smartphone alarm to keep ringing. When I get up and get out of the bed, the device detects my awakeness and stop the alarm.

 

3) Proof of Concept

The device is composed of an infrared array sensor, a thermal camera, Bluetooth module, and a battery with an Arduino board. The camera keeps detecting the temperature changes in my bed. Since the average human temperature is around 37.5°C, I will use 36.5°C as a threshold for stopping the alarm. When the temperature of my bed goes over 36.5°C, the device allows smartphone alarm to be on, if any alarm is set. When the temperature goes under 36.5°C, which means there is no one on the bed, the device turns off the alarm not to make unnecessary noise.

 

4) Fritzing Sketch

Components: Arduino Uno, Adafruit AMG8833 IR Thermal Camera Breakout, or Adafruit AMG8833 IR Thermal Camera FeatherWing, and HiLetgo HC-05 Wireless Bluetooth

 

5) Arduino Sketch

I tried to figure out how to code the features that I explained above for several hours, but I couldn’t. Most of all, to be honest, I have no idea how to connect the device with a smartphone through Bluetooth and control it… :

char Incoming_value = 0; //Variable for storing Incoming_value
Adafruit_AMG88xx amg;

void setup() {

Serial.begin(9600); //Sets the data rate in bits per second (baud) for serial data transmission
pinMode(13, OUTPUT); //Sets digital pin 13 as output pin

status = amg.begin();
if (!status) {
Serial.println(“Could not find a valid AMG88xx sensor, check wiring!”);
while (1);
}
}

void loop() {

if(Serial.available() > 0){
Incoming_value = Serial.read(); //Read the incoming data and store it into variable Incoming_value

Serial.print(Incoming_value); //Print Value of Incoming_value in Serial monitor
Serial.print(“\n”); //New line

if(Incoming_value == ‘1’){ //Checks whether value of Incoming_value is equal to 1
digitalWrite(13, HIGH); //If value is 1 then LED turns ON
}
else if(Incoming_value == ‘0’){ //Checks whether value of Incoming_value is equal to 0
digitalWrite(13, LOW); //If value is 0 then LED turns OFF
}
}

float pixels[AMG88xx_PIXEL_ARRAY_SIZE];
amg.readPixels(pixels);

if(pixels >= 36.5) {
//turn the alarm of the smartphone off
}
else{
//keep the settings of the alarm of the smartphone
}

}

 

6) Proof of Concept Sketches