Week 1 -- Statement of Purpose

What's in a name?

I don't really like the word manifesto, it sounds archaic to me. Manifesto conjures up images in my head of a text about that plight of the proletariat that bears little relevance to my everyday life. As corporate-speak as it might sound, I think statement of purpose better conveys what I am aiming for.

With that in mind, I wrote a statement of purpose for myself as a creator, maker, and artist.

I will create work that is honest, engaging, and challenging. Work that challenges me--and inspires others--to push boundaries. Work that makes the world a better place. Work that forces me to grow my skills, to empathize with others, and to be fully present.

I will focus on the human side of design and experience, rather than just the technical. I will follow through and complete projects, even when I don't want to. I will express my voice, fully and authentically, without regard to the judgement of others.  I will empower others to find their voice.

I can't wait to revisit this in a year, 5 years, 10 years to see what changes and what doesn't!

Final (Planning) -- The Hand

Tong and I decided to team up again for the Pcomp final. We want to continue exploring human-computer communication with robotic/humanoid arms, but in a larger context than rock, paper, scissors. Both of us are interested in how humans experience "connection" with computer devices, and how we can create that experience when users interact with these humanoid arms. UPDATE (Nov 13): We spent the week after play testing finalizing our design, integrating the leap motion, and updating the hardware. Tong posted a nice write up of our current design on her blog.

I spent the week porting/rewriting the game code in JavaScript, and wrote a node.js app that reads in frames from the leap motion and talks to the arduino via the johnny-five library. We printed new parts for a movable wrist, and will begin assembling them Wednesday when the additional servo comes in the mail.

We have a shared doc with BOM, project plan, and system diagram. Updated screenshots below:

BOM:

Project Plan:

It's raining, It's pouring

For Pcomp this week I used an analog raindrop sensor board to simulate rainfall in p5. The sensor "senses rain" when water shorts the connections running throughout the board. I adapted some code Daniel Shiffman wrote for a purple rain sketch to create the rain effect when p5 reads the sensor value in via serial. This was my first time using p5 and I found it super easy to use, if not a little basic (seems a lot easier to get started with than something like d3).

 

The circuit itself was super straightforward, nano + sensor:

Fritzing diagrams:

 

Arduino code:

#define RAIN_SENSOR_PIN A7

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

void loop() {
  int rainValue = analogRead(RAIN_SENSOR_PIN);
  rainValue = map(rainValue, 0, 1023, 50, -16); //map sensor on 0-50 scale
  Serial.println(rainValue);
  delay(1);
}

Sketch.js code:


// Code adapted from Daniel Shiffman's purple rain coding challenge
// https://youtu.be/KkyIDI6rQJI

// define global vars
var drops = [];
var serial;
var portName = '/dev/cu.wchusbserial1410';
var sensorData = 0;
var rainData = 0;
var rainSound;

function preload(){
  rainSound = loadSound("rain.mp3");
}

function setup() {
  createCanvas(640, 360);
  for (var i = 0; i < 1000; i++) {
    drops[i] = new Drop();
  }

  rainSound.play();

  serial = new p5.SerialPort();
	serial.on('connected', serverConnected);
	serial.on('open', portOpen);
	serial.on('data', serialEvent);

	serial.list();
	serial.open(portName);
}

function serverConnected() {
  //println('connected to server.');
}

function portOpen() {
  //println('the serial port opened.')
}

function serialEvent() {
	sensorData = serial.readLine();
}

function draw() {
  background(220,220,220);

  rainData = lerp(rainData, sensorData, 0.04);
  text("rain percentage: " + round((rainData /50)*100) + "%", 30, 30);

  var rainAmount = rainData * 15; 
  for (var i = 0; i < rainAmount; i++) {
    drops[i].fall();
    drops[i].show();
  }

  var rainVol = rainData * 2
  var volume = map(rainVol, 0, 50, 0, 1);
  rainSound.setVolume(volume);
}

Leather Pouch/Chalk Bag

Over Columbus Day weekend I stayed in a cabin up in the Adirondacks with my dad. One morning when we went into Saranac Lake there was a small farmers market going on. One of the vendors was a guy selling rustic furniture--Adirondack chairs, tables, etc. I talked with him for a bit about the materials he was using, and he offered to sell me all the leather scraps he had on him for $10. I forgot to take a photo of this while it was happening, but I did get one later of my dog sleeping behind the pile I took home:

I waited a little too long to start on this project, and getting the leather turned out to be the easiest part. I went to Lowes, Blick, and Michael's for tools, and all 3 were sold out of leather punches. Michael's was the only store that carried eyelet grommets in a smaller size, but they were out of the correct size attachment tool. REI Soho was out of both 5mm and 6mm accessory cord. Lesson learned: get it together in advance.

My initial plan was to make a leather chalk bag. I didn't really have enough material to make a full size one, so it ended up being more of a pouch, but it could still be functionally used as a chalk bag.

I first tested a cut on the 75 watt laser using the recommended 30% speed/100% power, and had to make 3 passes to cut through:

My template for the pouch in Ai had 8 holes for eyelets (which turned out to be way too few to cinch the whole thing together):

I used the same settings to cut it out, which worked, but smelled pretty bad:

Next, I added the eyehole grommets. Since I couldn't get the correct size punch tool, I resorted to doing this by hand using pliers and a hammer. I hated the stain/dye color on the smooth side, so I chose to use the rough out side as the outside:

All the grommets pushed through and flattened on the inside:

I knew that I wanted to line the pouch with another material, and I planned to use the sewing machines in the soft lab to do that. After talking to some 2nd years (shoutout to Lindsey!), it became apparent that we did not have the necessary equipment to go through 2 layers of leather and 1 layer of polyester. I resorted to sewing everything together by hand. I used some black polyester scrap material and tested it out on a leather scrap piece:

Hand sewing is hard...the inside (above) looks worse, but the outside was still fairly rough:

The good news is that the stitching wouldn't be very visible once the pouch was finished and cinched together. I took apart a piece of 5mm cord that I was using as a prusik loop for climbing and used it as the cord for the pouch:

Unfortunately, the wide spacing of the eyelets resulted in the pouch not really cinching together as a pouch--more like a lump with a cord through it. I had to pivot a bit and sew the cord directly into the leather and remove all but 2 eyelets. Here it is almost finished (looks kind of like an apple tart crust to me):

Finished stitching:

Cinching it all together after stitching it:

It's not my favorite thing I ever made, but I'm pretty proud of it considering I have never worked with leather before and I haven't stitched anything in over 10 years. It kind of looks like a video game coin purse (Zelda?), which I love.

Pi Music Box

I've been toying with the idea of using a Pi Zero to build a wireless music streaming box for a while. My original plan was to use cherry wood and metal to give the box a Hi-Fi look, but the wood I ordered from Rockler ended up getting delayed, and isn't coming until this Friday (10/6).

While looking at different boxes at the container store I came across a hockey puck display case made of acrylic that fit my parts and would provide an opportunity to etch the top. From a design perspective, I liked the idea of sticking a single metal knob onto the front of the box to control the volume and having the rest of the box remain clear to show off the "guts".

I definitely bit off more than I could chew for a 1 week project. I continued to add complexity (why not add a powered amp on Tuesday!), despite not having a ton of time.  I spent around 20 hours on this project, 3/4 of that was the "comp" side--both hardware (lots of wiring + soldering) and software (I now hate ALSA in linux). Ultimately, if I had scaled down the complexity this would've been more successful. That said, I'm fairly happy with the results as a starting point for a longer project.

Materials Used

  • Raspberry Pi Zero W
  • Pimoroni Phat DAC
  • Acrylic hockey puck case
  • Surface mount parts (10k pot, DC jack, 1/8" stereo jack)
  • Analog to digital converter (MCP3008)
  • 5v voltage regulator
  • Adafruit 20W class D amp
  • Perf board + wiring and solder

On the electronics side, I started with a lot of components I already had on hand:

The Pi doesn't have any analog inputs on the GPIO header, so I had to use an analog to digital chip into my circuit in order to control the volume with a potentiometer. The volume control happens at the software level via a Python script I cobbled together from an Adafruit library:

Poorly soldered (but working) header pins:

I put it all together on a perf board:

Since I had previously soldered pins into the DAC I had to cut some out with clippers to make the A2D chip pins fit:

It works:

[video width="272" height="480" m4v="http://blog.nickwallace.us/wp-content/uploads/sites/2/2017/10/IMG_0088.m4v"][/video]

With the basic hardware setup, I started on the box by drilling a hole for the pot in the center of the case:

Pot mounted:

The next day, I was digging through stuff at home and came across a 20w amp I bought from Adafruit a while ago. "Why not make this project more complicated, even though you have no time to work on it?" I thought. I then spend 2-3 hours pulling off surface mount parts, attaching panel mount parts, and wiring the output to a 5v regulator circuit to power the Pi + DAC:

Wired up with sweet metal knob attached:

In my haste to drill a spot for the DC jack, I cracked the case. Fortunately, the corner remained intact, so I was able to continue for the time being:

I drilled the hole for the audio jack freehand using a dremel:

Aaaand my surface mount audio jack doesn't fit:

Testing the fit. Unfortunately, the way I wired the 12 -> 5v regulator to the perf board really screwd things up, making for a sloppy fit. If I had taken more time to plan it out I could've avoided this:

I laser etched a Pi logo onto the top of the case @ 90%/40%:

Not particularly happy with the "final" product, but it's a start. I bought another hockey puck case and am going to redo this minus the amp + voltage regulator and clean up the wiring. I will probably also add some small spacers between the bottom of the box and the Pi and perf board to give it a cleaner look.

 

 

Adventures with Arduino, PWM, Servos, and Tones

[video width="272" height="480" m4v="http://www.nickwallace.us/blog/wp-content/uploads/2017/10/IMG_0102.m4v"][/video] While reviewing Pcomp concepts this week, I tried mocking up a small scale version of an automated dog feeder that I want to build in the future. I built a cardboard prototype dog feeder that plays a noise and rotates a servo when a button is pressed--the servo is attached to a wheel which dumps the food into a ramp that outputs out of the box it is inside.

This is the initial design sketchup:

Besides learning more about servos and how to create sounds with an Arduino, this was a good lesson in prototyping--my design changed 3-4 times, and I now have a better idea of the tolerances I will need to build into my final design. I also used fritzing for the first time to build a circuit diagram, to decent success.

I build the box and wheel out of cardboard that I laser cut:

Breadboarding the servo setup (fritzing diagram at the bottom):

Testing the servo action:

[video width="272" height="480" m4v="http://www.nickwallace.us/blog/wp-content/uploads/2017/10/IMG_0073.m4v"][/video]

I mounted the servo to the back of the cardboard box, and glued the wheel to the servo horns. Testing:

[video width="272" height="480" m4v="http://www.nickwallace.us/blog/wp-content/uploads/2017/10/IMG_0074.m4v"][/video]

I built out more of the box, and realized I would need some additional "stopped" guards on the inside of the ramps to prevent spillage:

Attempted fritzing diagram:

 

Arduino code:

// Add libraries
#include <Servo.h>
#include <time.h>
#include <TimeAlarms.h>
#include <pitches.h>

// Setup manual feed button
#define MANUAL_FEED_PIN 3
#define SPEAKER_PIN 8
boolean manual;
int buttonState = 0;         // current state of the button
int lastButtonState = 0;     // previous state of the button

// Setup Servo
Servo dogFeeder;
int potPin = 0; // Pin used to control potentiometer for servo
int potVal; // Value of potentiometer

// tone/music code taken from tone sketch by Tom Igoe
// zelda "secret unlock" melody (ish) created by ear
int melody[] = {
  NOTE_G4, NOTE_FS4, NOTE_DS5, NOTE_A4, NOTE_GS3, NOTE_E5, NOTE_GS5, NOTE_C6
};

// note durations: 4 = quarter note, 8 = eighth note, etc.:
int noteDurations[] = {
  8, 8, 8, 8, 8, 8, 8, 8
};

void setup() {
  Serial.begin(9600);
  Serial.println("Doggo-matic Online!");
  Serial.println("------------------------------------------------");
  Serial.println();

  dogFeeder.attach(2); // Servo on pin 2

  // Setup alarms
  Alarm.alarmRepeat(9, 00, 0, feed); // Morning feed: 9am
  Alarm.alarmRepeat(19, 00, 0, feed); // Evening feed: 7pm
}

void loop() {
  buttonState = digitalRead(MANUAL_FEED_PIN); // Read the manual feed button input pin

  // Check if button has been pressed by comparing to previous state
  if (buttonState != lastButtonState) {

    // If the state has changed, feed the dog
    if (buttonState == HIGH) {
      manual = true;

      for (int thisNote = 0; thisNote < 8; thisNote++) {
        // to calculate the note duration, take one second
        // divided by the note type.
        //e.g. quarter note = 1000 / 4, eighth note = 1000/8, etc.
        int noteDuration = 1000 / noteDurations[thisNote];
        tone(8, melody[thisNote], noteDuration);

        // to distinguish the notes, set a minimum time between them.
        // the note's duration + 30% seems to work well:
        int pauseBetweenNotes = noteDuration * 1.30;
        delay(pauseBetweenNotes);
        // stop the tone playing:
        noTone(8);
      }

      feed();
    }

    // Delay a little bit to avoid bouncing
    delay(50);
  }

  // Save the current state as the last state, for next time through the loop
  lastButtonState = buttonState;

}

void feed() {

  // Play food sound
  // CODE HERE

  // Read in pot value and turn servo accordingly
  potVal = analogRead(potPin);
  potVal = map(potVal, 0, 1023, 500, 2000); // Map value to 0.5-2 sec delay

  dogFeeder.write(170); // Move the servo to dispense food
  delay(potVal);
  dogFeeder.write(0); // Reset the servo

  time_t lastFed = now();

  // Play sit command sound
  // CODE HERE

  if (manual == true) {
    Serial.println("Doggo fed at: [TIME GOES HERE]! (manual)");
    Serial.println();
    manual = false;
  } else {
    Serial.println("Doggo fed at: [TIME GOES HERE]!");
    Serial.println();
  }
}

Rapid Prototyping with Cardboard

Before coming to ITP, I had never used Adobe Illustrator (Ai) or a laser cutter. I'm very happy that has changed.

I was previously working on an automated dog feeder project, but had been struggling with material handling. My original design involved a single ramp inside a box, angled toward an opening in the bottom that was blocked by a piece moved by a servo. Unfortunately, the dog food would continuously jam in the opening with this method.

I redesigned the whole thing for version 2.

The new design funnels the dog food to a single point and dumps it into a "wheel" with cross sections that catch the food. The cross section wheel is moved by a servo, which dumps the controlled amount into a final chute and comes out into the dog's bowl from there:

I grabbed a spare cardboard box and cut it into long pieces with a box cutter:

Building out a template file in Ai:

It's alive! I used 30% speed and 90% power to start with, had to make 2 passes:

[video width="640" height="360" m4v="http://www.nickwallace.us/blog/wp-content/uploads/2017/09/IMG_0062.m4v"][/video]

My first cut on a laser cutter:

Putting the pieces together:

Hard to tell from the photo, but they're a little lose after the first try:

I reduced the gap down to .15" and played with a variety of sizes for the circle and height of the X:

I settled on a 7" circle with 3" high sides:

Setting up my breadboard + arduino + servo:

Cam Switches

[video width="272" height="480" m4v="http://www.nickwallace.us/blog/wp-content/uploads/2017/09/IMG_0030.m4v"][/video] I decided to combine my Pcomp and Intro to Fab projects for this week.

I knew that I wanted to build something for ItF that would require me to make compound cuts on the miter saw (something I've never done before), but wasn't quite sure how to integrate that into a switch. I was reorganizing some climbing gear on Sunday when I suddenly had the idea to build a switch that would be connected by the lobes of a cam.

 

I drew up a design for an open frame with metal on the inside. When you insert a cam into the frame, the circuit is completed--lighting up an LED on the top of the frame:

I initially tried ripping a 2x4 on the bandsaw, which didn't work out well:

I ended up switching to some scrap 1" plywood I found and cutting 3" sections on the panel saw:

From there, I setup the miter saw to cut at a 45 degree angle and created a backstop to cut the sides:

Final miter saw cuts:

Pretty rough around the edges, I did a quick pass on the belt sander to smooth most out:

Next, I used the drill press to make holes for the LEDs on top:

All drilled:

I mounted the LEDs into the holes, bent the cathode to one side, and soldered a longer lead to the annode:

I then glued up the bottom 3/4 of the frames:

I used an extra side piece to form and cut the foil:

2 pieces of foil were placed on the inner sides of the frames before I glued the tops on:

At this point, I tested them using a AA battery holder:

[video width="272" height="480" m4v="http://www.nickwallace.us/blog/wp-content/uploads/2017/09/IMG_0030.m4v"][/video]

I then glued the positive wires to the frames:

 

Added batteries in series, hot glued + taped:

It works, but the connection sucks:

[video width="272" height="480" m4v="http://www.nickwallace.us/blog/wp-content/uploads/2017/09/IMG_0053.m4v"][/video]

Afterthoughts

  • Miter angle cuts are hard to get right, need to practice more with this
  • Don't expect to make straight cuts on the bandsaw
  • Taping batteries together sucks, never do this again--use battery holders
  • Need to give myself more time for these projects

Do It Once - Do It Again

For my 14-week project in the Prototyping Electronic Devices class I would like to build a self-contained, remote weather station that operates via GPRS (2G). Ideally, parts will be low cost (> $20) and relatively simple. The device will be built into a waterproof enclosure with a solar panel on the outside. The solar panel will charge a battery, which will provide power to the circuit. The circuit will pull data from a variety of sensors (inputs) at a specified time interval and then transmit that data to an AWS server (outputs), which will be displayed on an HTML page, potentially with some basic data visualization or simply in a table.

Inputs:

  • Tempature sensor
  • Humidity sensor
  • Pressure sensor
  • Light sensor
  • Rain sensor

Outputs:

  • Sensor outputs posted to database via GPRS
  • Possible data visualization overlay for database data

 

Presentation Tuesday, October 31st:

  • What it is?
  • Making process
  • Thoughts and questions
  • Next steps
  • 5 minute presentation

Thoughts on Physical Interaction

In his book "The Art of Interactive Design", Chris Crawford defines interaction as "a cyclic process in which two actors alternately listen, think, and speak." He goes on to apply this definition metaphorically to a variety of different objects and processes to argue that interactivity falls on a scale; it is not simply binary. Ultimately, he argues that many processes are responsive without being truly interactive (refrigerators, reading, etcetera).

I agree with Crawford's premise that interaction requires an exchange between two actors. Ultimately, I see physical interaction as an iterative conversation between these two actors.

 

What makes for good physical interaction?

Good physical interaction is engaging and provides feedback that draws the actors closer together in conversation. As Brett Victor alludes to in his rant on the future, using finger gestures on a digital screen does not fulfill this definition. These are simple, boring, and don't scratch the surface of what our bodies are capable of. Good physical interaction engages the senses, provides clear cues for how to proceed, and invites and excites the user (actor) to continue interacting (communicating).

 

Are there works from others that you would say are good examples of digital technology that are not interactive?

In the vein of Victor's rant, I would argue that smart phones constitute the best example of daily-use digital technology that aren't truly interactive. Watching clips of Apple's annual WWDC on September 12th, I am excited with how far we have come, and reminded of how far we still have to go to get beyond finger gestures on a screen. The FaceID feature of the new iPhone X, which uses IR to map your face in 3D, is an interesting advance in phone security, but I wonder if the underlying technology could be used for more interesting, engaging interactions with the phone (maybe AR related?).

RGB "Flashlight"

My first ITP project, and first project for Intro to Fabrication is a flashlight. Originally, my idea was to build a "disco flashlight" that would cycle through multiple colors and play a 5-10 second disco sample. Unfortunately, the overhead for this proved to be complicated--none of the micro controller chipsets I own have enough processing power + storage to do this, and I didn't want to try to jam a Pi Zero in there. So I ultimately decided to stick with a simpler, multicolor flashlight. I plan to explore the sound processing capabilities of other micro controllers at a later date.

See the flashlight in action here, full breakdown below the break:

[video width="272" height="480" m4v="http://www.nickwallace.us/blog/wp-content/uploads/2017/09/IMG_0003.m4v"][/video]

Project Goals

Build a flashlight, which is defined as an object that:

  1. Creates light
  2. Is portable

Materials Used

  • Bike hand grip (junk shelf)
  • Pushbutton switch (junk shelf)
  • 9v battery & adapter
  • Arduino Nano clone
  • RGB LED (common cathode)
  • Resistors and wiring

 

After scouring the junk shelf, I found a bike grip, a pushbutton switch, and AA battery housing:

I decided that the bike grip would be a great base for the flashlight since it was literally designed to be held. I pencilled in a hole for pushbutton switch on the opposite side of the grip--the natural place where my thumb rested:

I used an expo knife to make a (really) rough cut. The rough cut would eventually be hidden by the pushbutton casing, so I didn't bother clean it up more:

Using the AA battery housing and a breadboard, I tested my RGB LED. A 220 ohm resistor is connected below:

Day 2: After realizing I would need a micro controller to make the circuit cycle through LED, I had to redo my design. I scrapped AA batteries in favor of a single 9V battery + hardness to power an Arduino Nano clone via Vin. Unfortunately, I didn't do a great job of documenting this change, so the next photo is of a fully breadboarded circuit with the updated design:

Testing out the breadboarded circuit:

[video width="640" height="360" m4v="http://www.nickwallace.us/blog/wp-content/uploads/2017/09/IMG_0002.m4v"][/video]

To move the circuit from the breadboard, I soldered resistors to the LED anode wires: 330ohm to blue and green (yellow wire) and 220ohm to red:

I then applied heat shrink tubing to the LED + resistor legs individually:

And I mounted the pushbutton in the grip:

And finally, I wired up all the components to the Nano clone:

It works!

[video width="272" height="480" m4v="http://www.nickwallace.us/blog/wp-content/uploads/2017/09/IMG_0003.m4v"][/video]

 

My arduino code is below. When you press the pushbutton, D2 of the arduino pulls HIGH, which triggers the LED in sequence R-G-B:

int button = 2; // pushbutton on digital pin 2
int state = 0; // variable for pushbutton status

// RGB LED color pin associations
int red = 5;
int green = 6;
int blue = 7;

void setup() {
  pinMode(button, INPUT);
  pinMode(red, OUTPUT);
  pinMode(green, OUTPUT);
  pinMode(blue, OUTPUT);
}

void loop() {
  state = digitalRead(button);

  // if button is pressed cycle through each color of the LED
  if (state == HIGH) {
    digitalWrite(red, HIGH);
    delay(200);
    digitalWrite(red, LOW);

    digitalWrite(green, HIGH);
    delay(200);
    digitalWrite(green, LOW);

    digitalWrite(blue, HIGH);
    delay(200);
    digitalWrite(blue, LOW);
  } else {
    digitalWrite(red, LOW);
    digitalWrite(green, LOW);
    digitalWrite(blue, LOW);
  }
}