Final Project Tracking

Final Project

I made a surface that gets more or less fluffy, depending on how you interact with it. I built my own solenoids and attached feathers to the slugs to create this shifting surface.

Project Tracking

Adding PIR Motion Sensor

I wanted to add some interaction to the feathers, so I hooked up a PIR motion sensor to the device, connecting it to an open pin, ground, and 5v.

I used the sample code and tutorial from this page to get started. Here’s the result:

First, I hooked up the PIR sensor and used the basic code to see if things were working. I opened the serial monitor to see that the motion sensor reacted when I put my hand in front of it, and not when I did not. It definitely was reacting to me, but it was a lot less sensitive than I had hoped. I think I can calibrate this later.

Then, I added some of the PIR code to my main C file. This code comes from or is adapted from the link above. I added some variables to the top of the file:

int inputPin = 6;               // PIR input pin
int pirState = LOW;             // set the PIR state to low initially
int val = 0;                    // set the pin status

Then, set its pinMode in setup():

pinMode(inputPin, INPUT)

Then, in the main loop, read the pin value and respond:

void loop(){
	//set all of the solenoids to up, first:
	allUp();

	//read the input value
	val = digitalRead(inputPin);

	//Respond according to inputPin state:
	if (val == HIGH) {
		if (pirState == LOW) {
			Serial.println("Motion detected!");
			allDown();
			delay(3000);

			pirState = HIGH;
		}
	} else {
		Serial.println("Motion ended!");
		pirState = LOW;
	}
}


Programming Patterns

I programmed the feathers’ behavior and uploaded it to the processor via the arduino IDE. The pattern below is one of them, where each pin is cycled through.

First, I mapped the pins. I tried to find a pin mapping online, but didn’t turn anything up, and so did this with trial and error. I used the ‘Blink’ example file (Arduino IDE > File > Examples > 01.Basics > Blink), and updated the pin that was set to blink. Then I used the multimeter to see which pin was blinking. Once I found the correct pins, I defined them at the beginning of my main program:

const int SOL_PIN_A = 15;
const int SOL_PIN_B = 18;
const int SOL_PIN_C = 8; 
const int SOL_PIN_D = 9; 
const int SOL_PIN_E = 10;
const int SOL_PIN_F = 17;
const int SOL_PIN_G = 16;
const int LED_PIN = 13; 

In the setup() function, I needed to set the pinModes, and initialize serial communication so that I could control the pins via miniterm.

void setup() {

  pinMode(SOL_PIN_A, OUTPUT);
  pinMode(SOL_PIN_B, OUTPUT);
  pinMode(SOL_PIN_C, OUTPUT);
  pinMode(SOL_PIN_D, OUTPUT);
  pinMode(SOL_PIN_E, OUTPUT);
  pinMode(SOL_PIN_F, OUTPUT);
  pinMode(SOL_PIN_G, OUTPUT);
  pinMode(LED_PIN, OUTPUT);

  // Begin serial communication and set the baud rate
  Serial.begin(9600); 
  while (!Serial);

  // Send a message to the serial monitor
  Serial.println("Input a number 1 - 7 to see different behaviors");
}

Then, I defined a few different functions, or behaviors:

// Turns all of the solenoids on at the same time, waits, then drops them all at the same time. 
void allUp(){

  // Turn the solenoids on by setting the pins to HIGH
  digitalWrite(SOL_PIN_A, HIGH);
  digitalWrite(SOL_PIN_B, HIGH);
  digitalWrite(SOL_PIN_C, HIGH);
  digitalWrite(SOL_PIN_D, HIGH);
  digitalWrite(SOL_PIN_E, HIGH);
  digitalWrite(SOL_PIN_F, HIGH);
  digitalWrite(SOL_PIN_G, HIGH);

  // Wait
  delay(1000);

  // Turn the solenoids off by making the voltage LOW
  digitalWrite(SOL_PIN_A, LOW);
  digitalWrite(SOL_PIN_B, LOW);
  digitalWrite(SOL_PIN_C, LOW);
  digitalWrite(SOL_PIN_D, LOW);
  digitalWrite(SOL_PIN_E, LOW);
  digitalWrite(SOL_PIN_F, LOW);
  digitalWrite(SOL_PIN_G, LOW);

  // Wait
  delay(1000);
}

and

// Turns lines of solenoids on at the same time, drops them, does the same with the next row, and so on.
void fadeLinearshort(){

  var flashtime = 250;

  //Turn on the first row of solenoids
  digitalWrite(SOL_PIN_A, HIGH);
  digitalWrite(SOL_PIN_B, HIGH);
  delay(flashtime); // Wait 

  //Turn off the first row of solenoids
  digitalWrite(SOL_PIN_A, LOW);
  digitalWrite(SOL_PIN_B, LOW);
  delay(flashtime); // Wait

  //Turn on the second row of solenoids
  digitalWrite(SOL_PIN_C, HIGH);
  digitalWrite(SOL_PIN_F, HIGH);
  digitalWrite(SOL_PIN_G, HIGH);
  delay(flashtime); // Wait

  //Turn off the second row of solenoids
  digitalWrite(SOL_PIN_C, LOW);
  digitalWrite(SOL_PIN_F, LOW);
  digitalWrite(SOL_PIN_G, LOW);
  delay(flashtime); // Wait

  //Turn on the third row of solenoids
  digitalWrite(SOL_PIN_E, HIGH);
  digitalWrite(SOL_PIN_D, HIGH);
  delay(flashtime); // Wait
  
  //Turn off the third row of solenoids
  digitalWrite(SOL_PIN_E, LOW);
  digitalWrite(SOL_PIN_D, LOW);
  delay(flashtime); // Wait
}

Then, I called these functions from loop() to cycle through them indefinitely:

void loop() {
	
	allUp();
	fadeLinear();
}

Questions

What does it do?

I made solenoids to actuate feathers for my final project. The solenoids can be controlled via serial commands to create different patterns. If a user tries to touch the feathers, they retract.

Who’s done what beforehand?

Daniel Rozin’s Interactive PomPom Mirror is a great precedent of fuzzy pixels.

To keep the budget under control, I opted to make my own solenoids instead of using motors like Rozin did. A few people have made their own solenoids to play music on a xylophone, like this example on nerdkits.

What did you design?

I designed: - solenoids - case - feather tips - pcb boards

What materials and components were used, where did they come from, and how much did they cost?

costs

What parts and systems were made, and what processers were used?
  • Solenoids
    • 3d printing
    • PCB Milling and soldering (breakout boards)
    • Wire winding
    • Miniterm (for serial communication and controlling)
  • Case
    • Rhinoceros (to model)
    • Grasshopper (to adjust material thickness parametrically)
  • Processor
    • Mega328p
What processes were used?
  • Rhinoceros (3d modeling)
  • Grasshopper (parametric modeling)
  • 3d printing (solenoids)
  • Laser cutting (case)
  • Arduino IDE (sending code)
  • miniterm (for serial communication)
  • PCB milling
  • soldering
What questions were answered?
  • Can solenoids be produced to create a cost effective material-changing surface? What properties should be calibrated to create effective solenoids? How can solenoids be controlled via serial communication?
How was it evaluated?

Do the solenoids actuate? What is the dimension of their vertical movement? How much variation is achieved in the feather arrangement?

Building a Case

I’m planning to mill and cast a case eventually, but for now, I’ll create a temporary case in the laser cutter. I built this out of masonite. I did the modeling in Rhinoceros, being careful to measure the heights of the nails, the travel distance, the diameters of the metal tubes, and everythign else. I controlled the joint dimensions parametrically in grasshopper to properly size the notches.

laser case

Making Feather Tips

To make the fluffy surface, I needed something light enough that it wouldn’t prevent the solenoids from rising, and something that could go from more compact to more open. I found some ostrich feathers online, which did the trick.

feather cutting

I cut the ostrich feathers up into small pieces, and hot glued them to the magnet on top of one of the nails.

feathers under construction

Here they all are:

feathers all

Here they are in the temporary chassis:

temp

Making the final solenoids

I 3d printed the final solenoids on the Sindoh after modeling them in Rhino. I kept the wire holder dimensions the same, but will rely on the chassis to leave enough clearance for the nails, instead of 3d printing a base. This drastically cut down on the printing time – 30 minutes per solenoid instead of 2 hours. This also cut down on the amount of support material needed, which was a pain to take out of the previous version.

solenoid - 3d printing

I wound the wire roughly 600 times. It took about 20 minutes for each solenoid.

solenoids - wrapping

Then, I wrapped them in tape to keep the wire from unraveling, and added some cable with a 2x2 header to make it easier to connect them to the breakout boards.

solenoid - soldering wires on final

The finished solenoids:

solenoids - all 7

Debugging Serial Communication

I had run into some issues with serial communication during (interface programming week)[../week11]. Now that I switched to the Mega328p, I wanted to give it another go.

I used miniterm (like I did in (week 12)[../week12]) to find the correct port and communicate with the Mega.

Switching to Mega328P

I considered a few options for working with more than the 4 available pins that the Attiny44 had to control more solenoids and potentially an input device as well.

I opted for the Mega328p, in part because it has more pins, but also because it is a bit easier to work with serial communication. Here’s the layout:

processor board

It was harder to mill though–the traces were tiny and it took a couple of attempts to get a clean mill. The first time, my traces were too wide for the 164” endmill, so I needed to revisit the design rules.

I soldered all those little pads by first tinning the pads, then putting the Mega on the board, then adding too much solder, and using the braid to pull it up afterwards. Here it is before using the braid:

mega dirty

And after:

mega clean

I took some time to go through pin by pin with the multimeter to make sure there weren’t any solder bridges by accident. It’s a good thing I did, because I ended up needing to clean up a few extra spaces.

Building a Temporary Chassis - Cardboard

I laser cut a temporary chasis out of scrap cardboard to test and debug the solenoid and their boards.

Processor and Breakout Boards (Solenoid and Power)

Now that the solenoids are working, I worked on making the boards to control them with the microcontroller. To help with debugging later on, I wanted to keep things modular, so I worked with one main processor board, with pins to connect breakout boards.

For the breakout boards, I adapted my board from Week 9. I kept things the same, aside from adding some labels to keep the cables straight, and reorganizing the connectors to be a bit more intuitive when I connect them with other boards.

I also added a board to distribute power to the breakout boards. Each solenoid uses about .7 amps while running at 9v, so this will end up being around 5 amps when all 7 are connected. I drew the traces at 64 mil wide to accommodate this larger current.

Here’s the processor board layout: processor board

Here’s the breakout board layout: breakout board

Here are the breakout boards being milled out on the Roland:

solenoid - milling breakouts

Here’s the new processor board with four connectors for breakouts - one for each available pin on the Attiny.

attiny with 4 breakouts

Here are the breakout boards, almost complete:

breakout boards production

For now, I’ll use the lab’s power supply to put in 9v for the solenoids. To do this, I’ll need a board that distributes this power to the multiple breakout boards, and that also connects to ground:

Here’s the power supply distribution layout: breakout boards production

Solenoid Updates - Magnets

The solenoid works by generating a magnetic field inside the coil. By adding a magnet to the top of the nail, I can give it an extra push when the solenoid turns on (assuming the magnet is oriented the correct way).

I tried it first with the smaller/lighter nail. This ended up being a little too successful.

Eventually, I got the nail to stay in the holder. Here are the two different nails, and the heights that they each achieve. Looks like I’ll be going with the bigger nail.

solenoid - nail big

solenoid - nail small

Solenoid Updates - Longer Nail & New Holder

I wanted to see if I could get some more height on the solenoid, so I bought some longer nails to try. I also printed a new, taller holder.

It seems like the highest the nail will go and maintain equilibrium is if its midpoint is centered around the center of the wire. I left about 34” of space to wrap the wire, and put it at the very top of the holder.

The results were ok, but it seems like the nail is too heavy to get all the way to the equilibrium that I was hoping.

Solenoid / 3d Printing

Given that DC and stepper motors are in the $5-$20 range, it’d be cost prohibitive to do a pixel-based interaction with them for this project. Instead, on Neil’s suggestion, I’ll try making my own solenoids.

Essentially, all a solenoid is is a bunch of magnet wire wrapped around a tube, really tightly, with a steel slug in the middle. I bought some simple nails to use as slugs, and 3d printed the holder.

I modeled the solenoid in Rhino, using a caliper to get precise dimensions for the nail and leaving some clearence to avoid friction and accommodate imperfections in the print.

Measuring the nail:

solenoid - caliper on nail

I printed on the Sindoh, using a raft and support materials to support the top of the solenoid housing.

solenoid - first 3d print

It was pretty easy to hook up to the power supply – I sanded down the ends of the wire to get rid of the inuslating layer, and then attached one end to the supply and one end to ground. It worked!

It worked at 5v, but I wanted to see if it could go any higher. 9v was a little better, but then I let it go a bit too high, and it melted. Whoops.

solenoid - melted

Modular Material Shifting Surface

Using Daniel Rozin’s Interactive PomPom Mirror as a starting point, I’d like to create a modular system of panels that can change from a hard surface to a soft surface. This could vary accoustics in a room if placed on a wall, or could alter the use of furniture, if placed in a coffee table.

Interactive PomPom Mirror by Daniel Rozin


This could be as a wall panel, where the pom poms recede behind a plywood panel.

sketch

If it was used as a table, you could have a soft coffee table for putting your feet up, or a hard one for eating dinner on.

This could be activated via an iPhone interface, or automated with pressure sensors, a hall effect magnetic sensor if included in dinnerware, or kinect output.

sketch

It may be too expensive to make a coffee table with all of those individual actuators, so for the scope of this project, it may make sense to make a modular unit that could be repeated on the wall or inserted into a coffee table.

sketch

Section:

The top surface could be plywood for a truly rigid surface, or a silicone that could allow the surface to close completely when the pom poms retract.

sketch


Responsive Acoustics

I’d like to create a panel that can change the acoustics in a room in response to the conversations going on inside of it.


Mood Meter by Affective Computing


Brixels by Breakfast

Environmental Characteristics

I’d like to make something that can fundamentally alter an environmental characteristic. I’d eventually like to link this to some physiological data, but for now I’m planning to focus just on the environmental change.

Examples of charactersitics are:

  • Room Dimensions
  • Sound
  • Light
  • Humidity
  • Views
  • Location

Physiological Synchrony Blinders

When two people are interacting, physiological indicators like electro-dermal activity (EDA) between the two becomes synchronized. This can indicate that two people are observing and reacting to one another.

I propose a wearable that wirelessly receives data about two individuals’ EDA synchrony, and returns their focus to each other if their attention starts to wane, as indicated by their physiological synchrony.

sketch

sketch

Sensors like the Empatica E4 can measure EDA.

Empatica

Hovding’s inflatable bike helmet provides an example of a wearable technology that could be used to focus the users’ attention on each other.

Hovding


Responsive Window Blinds

This proposal is for a set of window blinds that could selectively focus someone’s attention on something going on outside (or selectively prevent them from seeing something).

Diagram

A sensor on the interior could track a person’s location in three dimensional space. A sensor on the exterior could use machine vision to identify birds, people, or weather events. A milled frame could support blinds that are attached to motors. As the user moves through space, the blinds could be rolled or unrolled to maintain a consistent frame of view for the person.

Animation