ICM Final : The “Reactive Display”

The Project

Alright we made it this far!

Let’s just remember what the result looked like:

I wanted to go into some details on how things work on touchdesigner. so i made this 9min video explaining how things are.

The Follow Up:

I’ve shown the demo video in class to a few and they all liked the simplicity of it. It got me thinking about doing it on a tisch window, with various themes (maps, charts, data clouds, where’s waldo!), and maybe switch to image processing instead of kinect. Recent algorithms showcased a very robust performance. So that should be tested.



PComp : The Tail Saga – episode 3

The Bone System

Beware of obsession! Play the game of obsession for the road, not for the goal…

Obviously i needed something solid inside the fluffy tail to able to swing it with a servo. Could be a piece of wire, or some laser cut acrylic to be fancy.

But i wanted it to move like a tail! So the spine inside the tail must have joints inside it. Could be to wires looped inside each other. Could be two acrylics screwed to each other to be fancy.

But something more challenging? By this point i thought the whole thing is practically done and i can make the design more… interesting! So i drew a challenge in my head: A complete bone system that can be 3D printed in ONE print with the joints already interlocked.

it’s doable. it’s one of those doable things. I’ve printed interlocking designs before. I did actually try and look for other 3D printable joints designs online. But couldn’t find anything worthwhile. I had printed interlocking designs before. It’s one of the unique things about 3D printing: You can build things inside each other! And the secret? All the parts must be in some way connected to the bed. Look at these designs for example:

NASA ISS 3D Printable Wrench

A few years ago NASA sent a normal FDM 3D printers (Much like the ones we use at iTP) to the International Space Station. A while later, they asked for a new wrench for a common screw inside ISS. So NASA sent them a file for them to 3D print and after a few hours, they had a new ratchet wrench complete with moving parts inside, all in one print. The secret? Everything inside is connected the print bed.

So that was the basis of the design. Two interlocked cylinders.

First Sketch

And to make sure they stay inside eachother, i would make one concave and one convex. Basically the outside of a donut and inside of a slightly larger donut.

So i got the designing in 3D, and the actual bump in the road: I never used parametric design programs! i did do some low-poly modeling, but this was a different thing altogether. Programs like Rhino, Catia, SolidWorks, Inventor, etc. are somewhat similar in functionalities. I chose to use Autodesk’s Fusion 360. I used it a bit before and really liked the aesthetics of it. Plus its free for students and need broadband connection… both of which i have at iTP and didn’t back home. Simple things. So this was a good reason for me to learn Fusion 360 on the way.

Basic Shape
Donut Design

A test print of this should i could print the parts safely with a margin of 1mm between them.

All of this took a week. Mostly redesigning the same concept over and over just because i didn’t anticipate some steps in the process.

In my next iteration, i sought advice from design people on the floor and outside iTP, They couldn’t much to the design and i proceeded to make the design more sophisticated:

Sketches – Second Stage

This is the final design for the joint. I printed a test, increased the margin to 1.5mm, and after 30min of print, i had a functional, interconnected joint!

The key for this design is the connection between the core of donut to one of the axles. The process of connected two taller object in air is called “Bridging”. Bridges are done a lot in 3D printing, and the key is to make sure you close the gap as close as possible before making a bridge. Here you can see the moment of bridging in my print:

Final Joint

Now i just needed to add some bones to these joints. for that i tried to first have an outline of the necessary angles the tail going to be at and design according to that. You’ll see that in the end i followed the joint outlines used in 3D rigging systems, but a more streamlined shape:

Bone Angle Study
General Shape
Convex design – not that good!


Concave design – This works better!
Sketch to Polygon
Initial Design
Final Design – Ready to Print

Now to reiterate the point of connecting to bed for printing interlocked objects, look at the footprint of the first layer of my design and how it grows and intertwines with the other parts without touching it:


Print Progression

And the final result:

A fully functional bone system with interlocked joints that prints in one 3D print already assembled

PComp : The Tail Saga – episode 2

The Sensor

The sensor was the main question here. What kind should i use?

Pulse Sensor

I was really leaning towards the small round ones that measure heartbeat using iR close to the skin, but they proved to be unreliable by anyone who tried them around iTP

UPDATE: apparently this sensor HAS to be from the original KickStarter manufacturer that designed it. Those are much better, though still not as good as ECG

I genuinely left the research up to the collective iTP community that tested various heart beat related projects and saw the ECGs are actually the most reliable ones of the bunch! ECGs measure the microcurrents that pass through the heart with each of it’s contraptions using one side of the body as the input, one for ground, and one for reference.

ECG Sensor Placement

The sensor’s breakout board almost does everything: it measures the beat and outputs it as an analog input to the arduino where you can measure it from 0-1023 and count the peaks to get the Beat Rate.

This is the result i got just by using the default plotter on the Arduino IDE. Similar results were achieved with a Processing sketch:

Next is detecting the BPM. Which would then enable us to put a standard threshold on it. The most basic way of doing that is to use an IF condition as a pseudo high-pass filter and record the timestamp, wait for the next one and compare it with the previous, get the time and use a simple formula to get the BPM.

BPM Math

After going through all of that, i was able to get a BPM with +-2 accuracy. The reason for the inaccuracy is that the curve can hit the threshold at any point in the curve depending on the clock frequency. The solution is to use a peak detection algorithm which is one of those questions with too many solutions! I wrote a simple 1D Time Series peak detection algorithm that used a 10 element array and pick the highest one. Though in the end i used a piece of code from another pulse detector that used the same analog input which yielded much more stable results.

by this point the logic of the code is done. Though one point is to be careful with EEG electrodes. People at 3M REALLY know how to make things stick! Took me 10 minutes to pull all three from my skin!




Pcomp : The Tail Saga – episode 1

The Background

Since i decided to continue my studies in New Media, which was right after i realized such a field exists in academia, I started writing goals and milestones on little pieces of paper and stick them on my wall. I started to do the same for my somewhat bright ideas as well. Sometimes they were an insight, a philosophy, a product, or just a thing that i really thought should exist.

These were “doable” ideas. Things i could see through each and every step till the end. My general neglect naturally held me from actually materializing most of them and one by one i saw them either be  done by someone else or go out of fashion. Ideas became too many and soon i took them off the wall and stored them in a stack and add to its thickness and leave the wall for goals and such. I brought the stack with me to iTP as a reliable source of task list to partially go through in my journey here.

[photo of the stack and tail card]

anyways, the tail was one of those.

I did develop ideas at iTP. Doable ones that i constantly discussed with people around iTP to get feedback. i chose the tail because that was the favorite of virtually everyone! And i also thought “well i talked about it everywhere, might as well just make it”.

The Idea

So the idea was simple: an animatronic tail that measures your heart beat rate and maybe your skin moisture, and starts shaking when it detects that you’re… excited. The mechanics are done by a simple micro-servo, attached to a spine that goes through the fluffy part of the tail that moves it more naturally.

It was simple and to the point. It had a message that i resonated with and thus i was able to articulate it  quickly and effectively to others.

It pointed out some of our animalistic and primitive tendencies that is overtly complicated by being inside a weird and even more complicated game of life we inevitably play. It’s not immediately obvious to people how to detect incredibly subtle signs we show with each thought and emotion. It wants to explore the simple idea of “what if, we showed our emotions and interest in each other as CLEARLY as animals do?”

So originally, the ideal way i thought this project can be implemented was to have all the people in a party or another social gathering to wear it and observe how the people react to it. But that would be super expensive because of mostly the sensors and motors… So i resort to making either one or two and document it that way for now.


PComp Midterm: Halloween “Simon Says” Drum

The Concept

So by this point i had several ideas floating in my head for PComp finals. For midterm, turned out we’re going with a Halloween theme and the only idea i thought related was the animotronic tail idea. Though my teammate didn’t like it and i thought i really wanted to experience with piezos and analog signals. I have half a mind of building an 8-bit drum at some point.

In the end i compromised and proposed that it has to be something that we can work on it seperately. The drum idea seemed to fit. Next was the Halloween layer which we added by creating a simple game with candies for rewards. This was something we could easily work on different parts seperately.

I also always had this design of subtle lighting around the “drum” circle. I like the dim and sharp light the EL wires give. For that i ordered a pack with assorted colors that comes with their own driver. Now what this driver does is that it gives out an AC current to the coil and the active fluorescent material inside the wires. Later i’ll tell you how it became problematic.

The Manufacturing

So i was tasked mainly with the electronics and programming side of things while my colleague built the built the drum circles and the wire around them, plus the box and servo mechanism.

Guitar Hero Piezos

I started by figuring out the measurement of impact with a Piezo sensor. You see, ideally, i wanted to build my MIDI drums on the way as well. So i wanted to be able to measure the force of impact as well as the confirmation of impact. And why Piezos? well, i opened up one of Guitar Hero video game drums to fix, and saw that all the impacts are measured with Piezos (and a failed solder was the issue with the drums). Guitar Hero was able to pick up the force of impact on the drums and play a louder sample if you stroke it harder.

Piezo Final Setup

So i bought a pack of fairly big (35mm Diameter) Piezo sensor discs and proceeded to solder two wires to the inside and outside (which i had a hard time to do when i was fixing the GuitarHero!) and the trick is to scratch both surfaces with a knife and use oil to get things hot and solder friendly.

Then i connected it to an Analog pin to see if can measure impact. And sure enough it did, tough it kept giving higher and higher values and hardly curved down. That’s when i realized Piezos need a lot of resistance (in my case 1 Mega Ohms!!) between the two discs in order to work. After that everything worked find and i was able to get very detailed reading of the impact force.  I made this LED indicator to show the measurement (Though their main use was to indicate impact for each piezo, which happens later)

So i added 3 more piezos and their individual LED to indicate the impact. And everything works beautifully. For now.

The Game

Finally it came for the code and game logic. The logic of the Simon says game goes like this:

  1. Game starts and plays a sound, lights a light and waits for you to repeat it.
  2. The process continues until you miss one and the game starts again.

So for my intents, i added these steps to the logic.

  1. The games only goes up for three levels.
  2. game begins with 4 parts and goes up to 7.
  3. each level is faster and therefore harder than the last.
  4. If you clear all levels, a servo activated box will open, granting you candies.
  5. if you tap wrong, the game goes back to the first level
  6. if you get it wrong, the game will shock you on touch! (explained in “The Shocker”)

okay so i started hand coding the game logic, but quickly resorted to using another Simon Says arduino code and modify it. i put LEDs for various functionalities until my partner delivered the necessary parts so i can implement them.

The last part of the code was to add a buzzer and play a sound with each drum hit or play. I adjusted the Buzzer volume with a resistor to not annoy everyone in the shop and removed it during midterm presentation. The interesting thing about the buzzer is that it’s the exact same sound generator used on the original Simon Says game. And each color has a classic tune to it:

Original Simon Says
  • E-note (blue, lower right);
  • C♯-note (yellow, lower left);
  • A-note (red, upper right).
  • E-note (green, upper left, an octave lower than blue);

So that was a nice piece of history/nostalgia behind it.


 The Shocker

Now for a bit of cheekiness! I thought following the Halloween theme it shouldn’t just be Treats… How about some Tricks?

So i had played with EL wires before and i knew the “Driver” is simply turning DC input into AC which could excite and light up the material inside the EL wire, much like a Neon light.

Also, our bodies are very vulnerable to AC current. We are insulated from DC to a good degree that you need a lot of voltage and current to even feel it on your fingers.  But even a small AC current with little voltage can give a very pronounced shock to the user!

The issue here was that i had a more advanced driver that had circuitry to switch between constant light and blinking light. It also resets when it’s not powered. So i couldn’t just power it off and on with a switch. I had to turn it on to the right “constant light” mode and then turn it off after it produced AC. That alone opened a big can of worms i did not really predict. If i could just switch the DC input, i could easily use a MOSFET for the task and use the same power source for the Arduino as well. But now i had to use a Relay to do the job.

In my hopeless attempt to maybe avoid using relays and measured the output of the AC driver to see if voltage doesn’t go to negative and it just a wave above 0 volts. Which it wasn’t..

Normal AC

So the 5 relay strategy initially worked. i could turn the EL lights around the drum discs off and on with 4 relays that had AC fed to them. I could also use only one AC driver in an always on mode. Finally i attached a different wire with a fifth relay to some aluminum layer over the discs to deliver the shock. They were right next to my Piezos and when it turned on, it messed with the inputs from the Piezos and gave wrong reading.


UPDATE: i now actually think the problem was the all the components were sharing the same ground, So maybe the issue is that AC and DC shouldn’t share the same ground…

No matter the cause, all my AC endeavors are out and replaced with a corresponding color of LED. The solution was to use a different driver or modify the existing one.

Bringing it All Together

Alrighty, So The last step was the easiest, as i used LEDs for output and only had to replace them with the proper inputs. Yinghua did a great job of fabricating both the drum circles, EL wires (that sadly wont be used) and the box mechanism.

The last step was to just add the candy and now we’re ready to play!!

Midterm Presentation


Pcomp: Serial to P5

Well this one was pretty straight forward. The ITP guide was very thorough and helpful. Loved actually how smooth it was to upload something from a physical device in front of me to the WWW and watching it interact with a sketch i made last week.

Here’s the sketch. Click around in the canvas:
Trippy Balls

There’s also older versions:
Sputnik Lover 
Spider Pig

Here’s the code with all the Serial Communication stuff in it. Though you need proper software in your system to work with it. My port is manually changed (it’s COM7 now on windows), and i ended up using the Node.js version of the serial software just because i though the suggested one was Mac only!

Sorry for the video weirdness! i was just very ecstatic about the thing working and chose whatever app that was open to film it.

Another step would be to add an input for “Adding/Removing Balls” and we’ll be good!


Self-Color Palettes

My Instagram Public Page : Sector Alpha

Okay so are these colors I chose here and actually didn’t go and choose a photo of you get the colors to come up with these. I actually went through some patterns on ColourLove website which is I used to do the exact same for my clients back at home when I wanted to show them color patterns for their new identity projects.

so I thought about why I came up with you and just clearly trying to do the evolution of approach to most things.

These aren’t actually common landscapes in Iran. But i actually have to look for them but I found them the most impacting when I when it comes to the images I want to remember when I look back to my country.

So from those I chose these colors. although you can obviously see there’s a specific Trend between the colors of the whole Earth and Sky tone the whole Miller warm and mellow cool colors are a repeating Trend in most of the patterns I use to describe myself

So this because this was the this was a project for myself I really try to make it personal so my for my first power and I use the Vado telegram coding patterns that you might have seen Coldplay use Thunder on one of their albums and the words MH and are basic human issues but I had to kind of change the colors to kind of match my home the force that we wouldn’t do what I’m working in the telegram code reading program but but at least at least they are mine.