Final Project – Sharing an Umbrella: A Story on Generosity

Partners: 

Ines, Haitian, Sheryl, Carol

Materials: 

  • Bluetooth (HC05) (2)
  • Arduino (2)
  • Distance Sensor (1)
  • Umbrella
  • Earmuffs
  • 12V Battery
  • 9V Battery

Tools:  

  • Soldering Iron
  • Wire Cutters/Strippers

Equipment:

  • Wire
  • Solder
  • Duct Tape
  • Fabric
  • Threat and needle and fabric
  • Newspaper

Brainstorming:

Carol had the idea of incorporating an umbrella into our final project. After almost two days of brainstorming to get a feasible idea we all enjoyed we came up with this performance work. None of us have ever made a project strictly to be performed and it gave us a little more room to be creative and artistic so we went for it!

The Concept: 

The performance idea we had in mind looks a little like this:

It’s a cold and rainy day. Person A stands in the foreground waiting for a taxi, uncovered as the rain hits their shivering body, pressing their earmuffs close to their head as it is the only part of their body they can force warmth onto. We can hear the sound of pouring rain. Person B comes up in the background – one of the fortunate few who bears an umbrella. It’s dark, their shape is only a vague silhouette. We see them approach Person A. It seems as though they will walk pass the less fortunate one but instead their pace slows. The umbrella is placed to cover both individuals and in strange celebration lights on the umbrella are ignited to brighten the gloomy night and the sounds of birds chirping emerge.

Application to the Requirements: 

The requirements of this project are to create an interaction with a micro-controller between two Arduinos and for this to somehow be visualized. On top of the earmuffs we chose to place a distance sensor (we initially had the idea of using a moisture sensor as well but the time constriction did not allow this). By being placed directly on top of the earmuffs, over one’s head, the distance sensor would sense the umbrella as it is moved over the individuals head. This would trigger two things. The most simple would be the lights on the umbrella would turn on. A little more complicated is our desire to include sound. We want this interaction to change the already existing sound of raindrops falling to raindrops hitting an umbrella. A subtle but beautiful nod to the act of sharing an umbrella.

Separating the Work: 

In order to play towards everyone’s strengths, we formed teams. Haitian and I, Sheryl and Carol. While Carol and Sheryl worked on the code, Haitian and I got to the design. We first sketched out ideas. Once we had solidified the interaction with everyone, Haitian and I got to making the lights on the umbrella.

The Code: 

The code we needed to create for the project to work with bluetooth was a code that went from Arduino to processing, the processing code, and then from processing to Arduino. The first code would be uploaded to the Arduino in the earmuffs and the second to the Arduino in the umbrella.

The Umbrella: 

We wanted to make the lights on the umbrella wireless so the option of LED strips were ruled out. Using christmas lights was also ruled out because we weren’t sure how the wire would look once we stripped it and if we could even find the correct voltage. So, we decided to stick to LED lights. We chose bright white LED lights. There are 8 ends to the umbrella and we put an LED on each tip. We had to use a 12V battery, transistor, and the Arduino. Because we didn’t want to connect each LED to an input and have too many wires going through the umbrella, we wanted to connect each LED to each other and then to the Arduino. We quickly found out that this would not work because the voltage wasn’t strong enough. We decided to use a 12V battery but then also needed a transistor. Everything worked on the breadboard (image below). So we got to transferring it to the umbrella.

Once on the umbrella we realized that because the LEDs were in a series, there was progressively less light shining through each one. So, we had to re-evaluate. With the help of Nick, I used LED wizard to input the source voltage, diode forward voltage, mA, and #s of LEDs to figure out what the problem was and what the array should be. Turns out, somewhere along the way we miscalculated the diode forward voltage. Instead of having 2 series of 4 LEDs, we should have either 4 series of 2 LEDs with resistors, or 2 series 3 and 1 series of 2 with respective resistors. (screenshots below)。Instead of risking problems that could occur with this, we chose to simply make each LED go to its own output because the umbrella is relatively strong to hold  the wires. We spent some time fixing this and the circuit worked. We just used 8 individual LEDs that connected all to their own resistor then to each other and then ground. The positive simply went to each individual input on the Arduino. To check the circuit, Sheryl prototyped a code and everything worked.

 (LEDs in a series not lighting up properly) 

(black is ground, blue is input)

All that is left with the umbrella is to connect the bluetooth to the Arduino. For this we only have to connect it to ground, power, and two inputs (RX and TX) on the Arduino. We simply soldered everything from the Bluetooth’s leads to wire to the Arduino. We used a protective case around the bluetooth’s leads to make sure that we didn’t damage the device by soldering directly to it.

Cleaning up the Umbrella 

I hot glued every end of the LED to the ends of the umbrella to secure them. I also wrapped the wires around the rods in the umbrella and secured in various spots with duct tape. This made sure none of the wire was visible from the outside because they were disguised inside the umbrella rods. It also secured everything so that there were no free flowing wires. I taped down the Arduino  with duct tape. Because the battery is extremely heavy I taped it to the handle to make sure it didn’t break/weigh down the umbrella.

Moving on to the Earmuffs 

The breadboard for the earmuffs was pretty simple. We had to transfer both bluetooth and a distance sensor to earmuffs. Here is the initial sketch we had planned:

 

(we ended up getting rid of the moisture sensor and using Arduino not Beatle)

First, we wanted to make sure everything works with the Arduino and later think of transferring everything to a smaller Arduino. The earmuffs we purchased were pocketed with a knit fabric on the ear so if needed we can hide the Arduino in with the stuffing. The distance sensor would be placed on top of the headband for the earmuffs to eventually detect the umbrella. We planned to place the bluetooth next to the Arduino to minimize wiring. It works exactly the same as the one on the umbrella. The Bluetooth works the same on the earmuffs as it did on the umbrella. There are two inputs (RX and TX) that need to connect to the Arduino along with Power and Ground.

Progress stalled by problems with coding/distance sensor 

Before we could transfer anything onto the earmuffs we had to make sure the Arduino on the umbrella and the one we were going to put on the earmuffs are communicating with each other. Unfortunately, the distance sensor wasn’t sensing anything. The value it read was stuck at 255. It took a while to alter the code and see what was wrong. Carol ended up writing a new code that worked but the distance sensor was still extremely unreliable. A fellow ended up telling us that the reason why this was happening is that the distance sensor reads a value even when nothing is in front of it. We needed to consider this when writing the code.

Fixed! Now to the Earmuffs…

Haitian and I worked on putting the circuit onto the earmuffs. We put the Arduino in one of the ears along with the bluetooth. We then placed the distance sensor on the top of the headband and used wire along the headband to go down to the ear where the Arduino was located. The project looked like this at this stage:

To make it wirelessly powered we used a 9V battery which we just soldered to a power and ground we had going from the Arduino. The wires went underneath and across the headband not to interfere with the wiring that was on top of the headband. This battery is just placed in the other ear pocket!

Note: The items that are placed in the earmuff pockets do not touch the user because they are on the outside not near the ear!

To make everything cleaner, we wanted to place a fabric over the wiring on the headband. Everything on the earmuffs ear looked pretty neat so we left that alone. With more time, we would have moved to a smaller Arduino such as the Beatle or Lilypad. We encountered some difficulty soldering to the distance sensor and the bluetooth because of the tiny leads but after several tries we were eventually successful. Haitian wanted to secure the distance sensor onto the earmuffs before covering it. To make a protective wing she placed crumpled up newspaper underneath of where the leads were and then covered it with two fabrics that were then sewed together.

Testing out the interaction! 

We tried out the interaction several times before getting to the performance work. We encountered some problems, needing to change trig and echo to each have their own inputs instead of sharing one. We also needed to change the 9V battery which could have been the root cause for why the distance sensor wasn’t working. The soldering on the bluetooth kept on disconnecting so Haitian and I had to re-solder it back together several times. Eventually we were able to get through these minor problems and adjusted the code to finally make everything work. Sheryl adjusted the code to make the lights twinkle as well.

The Whole Shebang: 

We performed the piece in one of the IMA rooms with the projector on to set the scene of a rainy day. All lights were off and the blinds closed to emphasize the lights on the umbrella and the spotlight on person B. I edited the video on iMovie into black and white and doubled up the sound. Here is the whole thing put together 🙂 (play in 1080p)!!

Touch Project

Created by Jeffrey Kung and Pearl Basinski
Project: Touch Project
Materials: T-shirt, belt, lilypad arduino, wire, velcro, conductive thread, buzzer, 10K resistor
Instructor: Antonius Wadijara — Talking Fabrics
Goal: Create a t-shirt for flag football that alerts the wearer when the flag is pulled

Inspiration:

Jeffrey plays flag football. Flag football is a non-contact version of football. Pulling the ‘flag,’ a strip of vinyl attached to a cloth belt, functions as a tackle in flag football. Because pulling the flag functions as a tackle in the game, players who have had their flag pulled are essentially immobilized, they cannot continue running with the ball. Howeve

r, many flag football players continue running after their flag has been pulled. The flag is not a part of their body, so they are not conscious of it being pulled off. We set about trying to solve this problem.

We had worked on this project before, but in making the project, we ran into some issues in the construction where the only way to move forward would be to start over. So we decided to start over, this time with a new design.

Process:

We built off of our earlier version of the project to try to make a cleaner and more effective version of the project. This time, we decided to put the whole circuit on the belt, rather than the t-shirt. We cut a strip of fabric from a bed sheet and sewed it together to make a belt. The buzzer was loud enough to be heard, even from a waist level. After re-evaluating our circuit, we realised we had been using the wrong resistor for the first prototype, so this time, we used one that switched out. In order to ensure there weren’t any accidental connections made when sewing with the conductive thread, we tried to use wires as much as we could. If a few wires would go to the same endpoint, they could become branches on another wire that would be going in the same direction. This cleaned up our circuit a bit.

After couching everything on, we still continued to have issues making our circuit work. At one point, we lost control of the buzzer and it would continuously sound as long as it was connected to power. The noise was very agitating and made us frantic to do whatever we could to try to get it to work properly. This caused a lot of short-circuiting, and possibly even a small fire. This was even more distressing. A fellow who seemed both annoyed by the sound and concerned by our smoking project came over to help us. He noticed that we had two exposed wires coming out of the battery. It is part of the battery’s design to have two exposed wires next to each other, one to power and one to ground. He warned us of the danger of this battery exploding, especially if we were short-circuiting the battery basically at the power source with these two exposed wires.

We replaced one of the exposed wires with a longer, plastic coated one and re-connected the circuit. There were still some issues getting the buzzer to sound when the flag was taken off, this time, it would not sound. Checking the circuit, we couldn’t find any issues, except perhaps with the actual switch. Maybe on the underside of the velcro, the two squares of conductive fabric were touching in some way. When we tried to separate the two squares away from each other, the whole device worked as we had intended it to, which was a huge relief.

Improvements:

The short-circuiting experience really affected us and it’s not something that we would want to experience again, or subject anyone to enduring. After we succeeded in getting the belt to work as intended to, Jeffery said he wouldn’t feel comfortable actually using the belt because he worried it would explode while playing. We didn’t feel comfortable leaving the belt connected to a power source overnight for the same reason. The first thing that I would like to do to improve this project is figuring out a better or safer way to power the device.

After then, my second improvement would be to add at least one more flag to the belt that would have the same functionality when more flags were attached to the belt and if one or more had been removed.

Lastly, I would like to try to make the circuitry take up less space on the belt.

Arduino on Fabric

Created by Jeffrey Kung and Pearl Basinski
Project: Arduino on Fabric
Materials: T-shirt, belt, lilypad arduino, wire, velcro, conductive thread, buzzer, 1K resistor
Instructor: Antonius Wadijara — Talking Fabrics
Goal: Create a t-shirt for flag football that alerts the wearer when the flag is pulled

Inspiration:

Jeffrey plays flag football. Flag football is a non-contact version of football. Pulling the ‘flag,’ a strip of vinyl attached to a cloth belt, functions as a tackle in flag football. Because pulling the flag functions as a tackle in the game, players who have had their flag pulled are essentially immobilized, they cannot continue running with the ball. However, many flag football players continue running after their flag has been pulled. The flag is not a part of their body, so they are not conscious of it being pulled off. We set about trying to solve this problem.

Process:

We decided that we would create a t-shirt that alerted the player that their flag has been pulled with a loud buzzing sound. The flag would be the switch turning the buzzer on and off. We decided the best way to accomplish this would be to make the flag, which attaches to the belt, would disrupt a circuit powering and controlling the buzzer.

After drafting a circuit and testing it out on a breadboard, we decided it was time to start putting this all on fabric.

Below is the code to turn on the buzzer:

const int pinBuzzer = 13;

const int pinSwitch = 7;

 

void setup ()

{

 // put your setup code here, to run once:

  Serial.begin (9600);

  pinMode (pinBuzzer, OUTPUT);

  pinMode (pinSwitch, INPUT);

}

 

void loop ()

{

 // put your main code here, to run repeatedly:

 int botao;

 botao = digitalRead (pinSwitch);

 Serial.println (botao);

 if (botao == 1)

 {

  digitalWrite (pinBuzzer, 0); //Switch pressed, buzzer off

 }

 else

 {

  digitalWrite (pinBuzzer, 1); //If the switch isn’t pressed, buzzer on.

 }

 delay (10);

}

Because this was an arduino on fabric project, we decided to use the Lilypad Arduino and conductive thread. The main circuitry was placed between the shoulderblades of a T-shirt. The buzzer was sewn to the left shoulder, as this would be closest to the ear. Near the where the hips would be, we placed the switch. The switch was made of velcro and conductive thread. The piece of velcro sewn to the shirt had two squares of conductive thread sewn onto it. The squares were not connected. When the other piece of velcro, with conductive thread sewn all along the connecting surface, is placed on top of the piece of velcro with two squares, the circuit is complete. The two squares are connected by the conductive thread on the top piece of velcro.

After attaching all of these components to the shirt, we tested out the circuit to see if it worked. It did not. A lot of debugging ensued, checking and rechecking our connections, making sure everything went where it belonged. We had many instances of short circuiting, most likely due to the amount of conductive thread that we used and the way we tied the thread in the back. After doing our best to make sure all the components would be as good as the could, we continued to run into problems. We got to a point where the buzzer would go off, but we weren’t able to control it with the switch. We tried to figure out this problem, completing the circuit with a wire, rather than relying on the switch we had made. We were somewhat successful with this, but also suspected we were using the wrong resistor. We decided to really know what the problem was, we would probably have to re-do everything with wired connections rather than conductive thread.

 

 

Improvements:

As mentioned in the paragraph above, to really assess the problem, we would need to create a new version with wires. We should also check the resistor. It may also be good place the different components on the belt. Originally, we put the buzzer (and therefore the rest of the circuit) on the shirt to ensure the user would be able to hear it when activated. The buzzer is so loud and irritating, we believe placing it on the belt would be just as effective.

Talking Fabrics: Pillow Talk pt 2

Partner: Paschal

Tools: Adobe Illustrator, Singer Embroidery Machine (+embroidering software), Fabric, Singer Sewing Machine, Fabric, 2 small squares of Conductive Fabric, Velostat, MP3 Shield, Arduino

Goal: Make a pillowcase that plays a lullaby when patient lays their head on the pillow & track the patient’s sleep patterns (restless vs peaceful).

Target Demo: Sleep study doctors


Procedure:

  1. Make the pillow:
  • I picked a beautiful, patterned fabric from the material room
  • I traced my dorm pillow cased and cut the fabric, with a few inches of excess fabric (to make sewing easier later)
  • Using Illustrator & Singer Embroider Machine, I embroidered goodnight in Chinese, wanan.
  • I then sewed the two pieces of fabric together, with a 1.5 inch in-seam, on the sewing machine
  • I then turned the pillowcase inside out and sewed a piece of conductive fabric onto the front side of the pillow case under the wanan
  • I then hot glued a larger piece of Velostat onto the other piece of conductive fabric and sewed the Velostat/Conductive Fabric piece around the first piece of conductive fabric that was already sewed onto the inside of the pillow case

 

2. Get Arduino (Physically) Set Up

  • The Arduino itself is incapable of playing music so we had to incorporate two things: an MP3 shield and  a speaker
  • I soldered the MP3 shield and the Arduino together, which was much harder than I thought — it took many attempts to get a relatively clean solder 

3. Get Arduino (Code-Wise) Set Up

  • Paschal coded the Arduino in a way that it played music for the first 30 minutes of the patient’s sleep cycle — he had to download a special mp3  from the internet library to do that
  • We originally wanted the pillow to email the sleep study doctor the patient’s sleep stats, but our Arduino couldn’t — instead we recorded the patient’s sleep and the doctor could print the report

4. Put It All Together

  • Finally we had all of our pieces together. We connected one wire to one piece of the conductive fabric and the other to the other piece of conductive fabric — this part acts as the switch
  • Voila — when you press your head onto the wanton (where the conductive fabric pressure sensor switch is) music plays and the arduino records the length of time you slept!                   

Idea Hat Project

In this project, I and Tyler plan to improve our “Big Idea” project. We want to actually put it on an actual hat with a smaller Arduino and a lighter power source. In that case, we first think of a beetle Arduino which has a same size as a coin. However, the thought is not practical because the power source needed for the beetle Arduino is far too heavy and big to be put on a hat.

Under the help of Nick, we use a small piece of H-bridge and a small device called ATTiny to constitute our own version of “Arduino”. It can hold our code like a real Arduino board but much smaller and convenient. Also, the battery it needs is a small one of 3.7V. The H-bridge can change the power for LED to 5V. We solder wires onto the little device so the main part of the circuit is completed. We use tape to bind them onto the hat’s fabric so that we can confirm the positions of different parts of the circuit.

The next step is to sew those parts onto the hat. Tyler uses some conductive threads to connect the circuit, and I use normal threads to fix the heavy battery and wires. The hat is done!

 

Touch Project: The Thinking Cap

The task we were given with the Touch Project was evident in the project’s name itself: construct an object that tells a story through touch. From our introduction to the Arduino, Ellen and I had constructed a “lightbulb” (felt and LED) and a conductive fabric push button that were both connected to an Arduino. When the button was pressed once, the LED “would start to blink, and when the button was pressed again, the LED would turn off. Our initial idea was to have the entire circuit be on a hat that one could wear as a kind of literal “thinking cap” that could signal to other people when they were engrossed in deep thought, but we realized we needed to prototype this circuit first before moving onto the larger hat project. Even as we were making the project, we knew that we wanted to pursue it further, so when the Touch Project was assigned, we enthusiastically got to work on bringing making our prototype into our initial vision.

The first challenge was deciding how we wanted to make our hat so that it could be both wearable and able to hold our circuitry as well as our felt lightbulb. I immediately thought of the idea of a cone shaped “dunce cap” model, because it would produce a relatively large hat that also is made up of one continuous plane that would be able to hold a circuit. We also decided that using the same lightbulb from our prototype would be smart because it came out so well the first time.

Finding a material that was both malleable enough to be formed into the cone shape of our cap. After some searching, I end up finding a large amount of red felt that was both stiff and workable. I used the lid of one of the trash cans in the IMA Studio to trace a half circle out of felt and then cut it out, so that when you joined the two flat sides together it formed the shape of a cone. We also recognized that our first push button was somewhat crude, because we ran into problems while attempting to sew together two irregular “thought bubble” shaped pieces of fabric. To circumvent this, I attempted to laser cut two pieces of white fabric that we could use as a button. After creating an Illustrator file wth the proper parameters,  I attached my white fabric to a piece of cardboard using some sprayable adhesive and began laser cutting with Dave. While I was extremely happy with how my shapes turned out in the laser cutting machine, I soon realized that the fabric I chose to laser cut with was not strong enough as it began to fray at the ends and come apart. I decided that this fabric wouldn’t work and instead chose to work with a thicker white fabric that Ben had used on his Sight Project and generously lent to me. After cutting the switch out of new, more durable fabric, Ellen and were ready to move onto our biggest challenge: figuring out how to get both an Arduino and a power supply onto our fabric hat.

We knew that the regular Arduino would be too bulky and heavy and would cause our hat to either  collapse or fall off of its wearer’s head, so we looked for smaller options. We initially thought that the Beetle was going to work perfectly for us, since it’s so small and could be easily couched onto the hat. But then we realized that the Beetle needed a 5V battery to power it, and the large cylindrical rechargeable 5V batteries stored in the equipment room also seemed too large and bulky to be sewn onto our hat. We weren’t sure what to do, so we asked Nick if he had any ideas, and unsurprisingly, he was full of them. He introduced us to a little device called the ATTiny, which is a small microchip that can act as an Arduino. It is both smaller than the Beetle Arduino and only requires a 3.7V battery, which is much smaller than the 5V rechargeable and much easier to couch onto fabric. The only slight challenge was that the ATTiny that Nick offered was actually his own personal chip that he needed for a project, so we couldn’t solder directly onto it. Therefore, Nick suggested we use a perfboard that we could then solder wires to without doing anything too permanent to his ATTiny. After a fair bit of soldering and re-soldering, we had a miniature Arduino that we could easily upload our code to.

The code that we used was nearly identical to the code we used on our Introduction Project, and we only had to make a few changes because it already worked so seamlessly. A more detailed description of our code can be found here: (http://ima.nyu.sh/documentation/2017/11/15/introduction-to-arduino-project/)

The only changes we had to make were to modify the code to work for our new smaller Arduino, which just meant changing our pin numbers on the code to match the pins on the ATTiny.

After solidifying our code, we set up our circuit and ran it on a breadboard to ensure that everything would work. We were pleased to see that the circuit worked! We then moved onto getting the circuit onto our hat.

It was a bit of a challenge laying everything out on our hat as a flat surface while still feeling confident that it would all be positioned correctly once we made the hat 3D. We used tape to hold everything down and laid out our wires so that we could see how the would all connect, laying down conductive thread where we planned to use it rather than wire, in an effort to decrease weight and increase the flexibility of our hat. After everything was positioned correctly, we got to work couching wires and making stitches with conductive thread, which we connected to the wires by creating loops at the end of each connection. Couching the battery itself took quite sometime, but after several hours of sewing, we were ready to sew the cap together.

After sewing the cap together, we were overjoyed to see that the circuit worked! While the pushbutton itself was at times a little fidgety, and would cause the light to turn off and on rapidly, we were beyond pleased that we were able to get such a complicated circuit onto such a delicate three dimensional soft surface. We made sure that one loop of wire could easily be disconnected from the conductive thread so that our battery wasn’t constantly powering the circuit. In the end, I personally gained an incredible amount of experience with overcoming unexpected problems, soldering like a fiend, and using conductive thread very carefully. Now people can put our hat on and use it whenever they need to let people know they’re on the brink of a great idea!

 

 

[Touch Project] “Anti-Kidnapping Messenger”–by Cheryl and Haitian

How did we come up with the idea?

The idea for our touch project originates from Cheryl’s recent dream when she was kidnapped. She told me about her despair, and how she wished she could send out a secret message to inform others and seek help. Indeed, when you are kidnapped there is little you can do, but it is always helpful to at least communicate to the outside environment for potential resources and assistance. How then, can we send out messages without calling to the kidnapper’s attention? Cheryl and I arrived at the decision to make an”Anti-Kidnapping Messenger” that we can carry as a secret communicative tool under emergency situations where we need help.

What is the mechanism?

The message we are going to send out is a Morse code with different compositions of dashes and dots. One specific location of the fabric will be touch sensitive. There will be three situations in our interaction with the fabric:

If we give the location a light tap, the system will write a dot;

If we give it a strong and long tap, the system will write a dash;

If we give it a strong tap for more than 6 seconds, the system will start a new line of codes.

What materials do we need?

For the circuit:

  1. touch sensor
  2. beetle microcontroller+wire connector
  3. conductive thread
  4. resistor
  5. solder wire

For the fabric:

  1. thread (blue, dark red, white)
  2. fabric (blue, dark red, white)
  3. tools: needle, pins, ruler, marker, scissor

How we made it?

After discussion, Cheryl would work on the coding and prototype while I would work on the circuit and fabric sewing.

For the circuit:

For the circuit part, I was thinking of using a piece of fabric with harder texture. I will separate the fabric into three parts, one for placing the touch sensor, one for placing the beetle micro controller, one for folding backward in to separate the conductive threads from touching each other. (see draft below)

 

After Cheryl successfully tested out the prototyped circuit on the breadboard, I began to sew attach the touch sensor and the beetle onto the white thick fabric. It was not until I secured the beetle that I realized the digitalWrite pins and the ground pin were at opposite sides, so I had to sew the conductive thread around the beetle to reach the other side, other wise the input section will overlap with the positive-end connection part and create a short-circuit.

This becomes especially difficult when we were also thinking about adding a vibrator to visualize the output aside from showing on the computer screen. There is no way I could add the vibration sub-circuit without creating a short circuit by overlapping, which means I had to use wire, which will increase the thickness of the fabric. A second challenge was that there was no shorter connection wire to the vibrator, and the bigger connector requires using wire.

A third issue that I thought about is, the use of vibrator would deviate from our original idea that the accessory should look and behave “normal”, that is to say, should not be able to call attention from anyone else except the user. The vibration created an opposite effect. After communicating with each other, we both decided that we would not use the vibrator.

Below is a finished circuit.

  1. The positive end connects to one end of the touch sensor
  2. The other end of the touch sensor connects to the resistor and then to the ground
  3. The third thread connects the touch sensor to digitalWrite Pin 9 for INPUT.

I soldered both ends of the touch sensor with wire, so that the ends can be separated farther away to prevent short circuit. For the back side, I used both nail polish and mask tape to locate the ends of conductive thread intact from each other, also for the prevention of short circuit.

Because this time we are connecting the circuit to the computer directly, we didn’t add a separate battery for power source. I still made a small pocket and glued it to the back side of the third part. This is where battery, if connected to the circuit, can be put.

 

For the Fabric:

The entire product consists of three main layers in a sandwich style structure: two main fabrics (front and back) covering the circuit fabric.

For the front fabric, I was thinking of making a flower design, that is suitable for functioning as head band, wrist band, attached accessory and brooch. Apparently reflecting on the thinking process, the targeting subject I am making the messenger for is intuitively and subconsciously the female sex. I started searching online and find a tutorial on youtube below:

I followed the tutorial and made two fabric flowers. The blue fabric is really thick so the center of the flower looks a bit fuzzy; the dark-red fabric, however, has a really soft texture and worked out well. In order to hide the fuzzy center, I glued the dark-red flower onto the blue one. The steps are below:

Attaching the flowers to the bigger piece of the front fabric, I designed a partially hollowed pattern. The pattern would represent leaves and stalks when placed against the blue background.

For the back fabric, I cut a hole so that the connecting socket can be exposed for connection to the computer. the battery pocket get exposed as well to make it easier for potential replacement of batteries.

Encountering problems 1.0 :

The biggest problem I faced when trying to put the three pieces together is that I left too little edge for the front fabric that I could not make a trim at all. The first solution I thought of is to attach a transparent piece of organza as the fake surface and trim the organza piece with the backward piece with a running stitch. But when I sewed them together, the surface looked rough and that extra layer gave the fabric a chaotic and complex impression.

After debating with myself, I decided to abandon the organza and still sew the two bigger pieces directly. The outcome was not satisfying neither, since the edges looked very loose and scattered.

A third decision I made finally was to abandon the hollowed pattern and cover it with another deeper-colored piece of fabric. Frustratingly, this meant that I needed to re-design the pattern on the new cover. I thought that making another flower to echo the upper one might be a good idea. I originally tried making blue and dark-red in tandem with each other, but because of the difference in their hardness, I was not able to make them into a flower shape. I returned to the single colored flower eventually, but did the stamen differently by folding the red fabric into entangled and overlapped shapes.

 

In order to let the user sense the location of the sensor, I sewed a white flower pattern close by the flower. which gives the plain fabric a more rough texture at the specific place.

Encountering problems 2.0 :

I was thinking of a variety of ways to use the product. One of the most conspicuous functions is having the product as a waist band. I attached one end of the fabric with one part of the velcro, and decided to attach the other part to an extended strip at the bottom. I have already connected the long strip fabric to the bottom end of the product, only to discover that I had connected the wrong side. I had to cut off the original stitches connecting the velcro and the fabric, and do a running stitch at the back side (only running stitch can prevent the back side of the stitch from visibility on the other side.

Finishing the product:

I did a few more running stitches to trim the upper and bottom end of the product. I also sewed two pieces of wire in loops at both ends before I trimmed the entire edges.

I sewed a button on top of the strip so that the product can be more fixated when folded.

Multiple Usages:

  1. A wrist band: connecting the two parts of the velcro together around your wrist
  2. A hung decoration: hanging the accessory to the wall with the thread-circle.
  3. A portable accessory: fold the long strip in half, attach the thread circle to the button on the long strip
  4. A head band: Attaching two hard/soft branches to the wire loops

Function 1

[function1]

[function 2]

[function 3]

Below is a video demonstration of the Anti-Kidnapping Messenger (on Google Drive):

https://drive.google.com/a/nyu.edu/file/d/1WxYCe1Gt80RF1F1qXXA7CsU0dlkeph1h/view?usp=sharing

What I learned & What I could improve:

  1. Calculate and note down the size of the fabric; never take the measurements for granted and think that adjustments can be made later
  2. think thoroughly before making every stitch, especially when attaching other functional material components to the fabric; do as much prototyping
  3. Think more thoroughly about how to hide the stitches before even starting the fabric-making. Sometimes the way to hide the stitches potentially determine the order of the sewing of different materials
  4. This came out in class: I should not only consider female as my target user perhaps; thinking wider in terms of application of the code that goes beyond the condition of SLS/kidnapping may give the product more communicative potential; thinking in terms of how to make each part of the sandwich flexible to design change and how the connection/sewing can be done systematically can boost the market application of the prototypical model.

Overall, I felt sort of wild in this pretty stressful experience. I am glad it turned out nice and functional! Cheryl’s code helped a lot, the sensitiveness her code gave to the entire circuit is what makes it possible for me to improvise with more layers and textures!

const unsigned long TIMEOUT = 10000000ul;
const int presspin = 9;
unsigned long duration = 0;

void setup()
{
 Serial.begin(9600);
 pinMode(presspin, INPUT);
}

void loop()
{
 duration = pulseIn(presspin, HIGH, TIMEOUT);

 if(duration > 0){
    // Serial.println(duration);
 }

   if(duration > 5000 && duration < 200000){
     Serial.print(".");
     //Serial.print(duration);
     }else if(duration > 200000 && duration < 600000){
       Serial.print("-");
       //Serial.print(duration);
       }else if (duration > 600000){
         Serial.print("n");
         //Serial.print(duration);
         }
}

“touch” project by Carol

In this project, I want to visualize the level of friendship. I made a glove. When the user shakes hand with others, there will be a flower on the screen. If the user holds hand gently in order not to offend a stranger, the dynamic flower is blue and small. As the user holds hand tighter and tighter, the flower will gradually become red and bigger.

First I wrote the processing code to make a dynamic flower:

public class P{//创建点的类

private float r;//半径
private float angle;//和原点连线与x轴所成的角度
private float spd;//速度
private float wt;//画线的宽度
private color c;
P(){
r=0;
angle=0;
spd=1;
wt=1;
c=color(0,0,0);
}
public void setp(float a,float b){//设置点
r=a;angle=b;
}
public void setr(float a){//设置点
r=a;
}
public void setspd(float c){//设置点
spd=c;
}
public void setwt(float d){//设置点
wt=d;
}
public float getx(){//获取点的x
return r*cos(angle);
}
public float gety(){//获取点的y
return r*sin(angle);
}
public float getwt(){//获取点的宽度
return wt;
}
}
int pnum = 400;//点的数量
P pstart[] = new P[pnum];
P pend[] = new P[pnum];
float r = 10;//圆的半径

void setup(){
size(1000,1000);
//frameRate(100);
for(int i=0;i<pnum;i++){
float angle = random(100);
pstart[i]=new P();
pend[i]=new P();
pstart[i].setp(r,angle);//随机生成圆上的点
pend[i].setp(r,angle);//随机生成圆上的点
pend[i].setspd(random(10));//随机生成圆上的点的速度
pend[i].setwt(random(5));//随机生成圆上的点的宽度
pend[i].c=color(random(255),random(255),random(255));
}
}

void draw(){
background(255);
stroke(#123456);
translate(width/2, height/2);
for(int i=0;i<pnum;i++){
strokeWeight(pend[i].wt);
stroke(pend[i].c);
line(pstart[i].getx(),pstart[i].gety(),pend[i].getx(),pend[i].gety());
if(pend[i].r<10 ||pend[i].r>=400)pend[i].spd=-pend[i].spd;//触碰边界返回
pend[i].setr(pend[i].r+pend[i].spd);//修改半径
}
}

 

And then I use Arduino to send the pressure sensor value to the processing, and use that value to control the color value and line length.

const int pressurePin = 0;
int pressureState = 0;
int mapped_value = 0;
void setup() {
// put your setup code here, to run once:
pinMode(pressurePin, INPUT);
Serial.begin(9600);
}

void loop() {
// put your main code here, to run repeatedly:
pressureState = analogRead(pressurePin);
Serial.write(pressureState);
mapped_value = int(map(pressureState,0,1023,0,2000));
// Serial.print(F(“pressureState: “));
// Serial.print(pressureState);
// Serial.print(F(” mapped_value: “));
// Serial.println(mapped_value);
}

But the value is very very unstable because I forgot to connect it to the ground. Also I found that I cannot serial.print in arduino anymore because it will distract the value sending.

So the blue wire should go to ground and I solder another green wire before the resistance to the Pin A0; the value is much more stable.

IMG_0084

I use the laser cut to cut the two pieces of hand and made them into one glove. But it turned out to be small and unwearable. But because I sew the glove too late and cannot use laser cut so I did not remake it. And then I paste the value sensor and arduino to the glove

IMG_0086

 

The gloves still need a lot progress. I can use beetle to make it wearable. And I can use Bluetooth to get rid of the wire. Also I choose this fabric because it is good for projecting and I actually want to project the dynamic flower on the glove instead of my computer.

import processing.sound.*;

// import serial library
import processing.serial.*;

// set up a serial port instance
Serial myPort;

int pressureValue;
int mapped_value_line;
int mapped_value_red;
int mapped_value_scale;
public class P{//创建点的类

  private float r;//半径
  private float angle;//和原点连线与x轴所成的角度
  private float spd;//速度
  private float wt;//画线的宽度
  private color c;
  P(){
    r=0;
    angle=0;
    spd=1;
    wt=1;
    c=color(0,0,0);
  }
  public void setp(float a,float b){//设置点
    r=a;angle=b;
  }
  public void setr(float a){//设置点
    r=a;
  }
  public void setspd(float c){//设置点
    spd=c;
  }
  public void setwt(float d){//设置点
    wt=d;
  }
  public float getx(){//获取点的x
    return r*cos(angle);
  }
  public float gety(){//获取点的y
    return r*sin(angle);
  }
  public float getwt(){//获取点的宽度
    return wt;
  }
}
int pnum = 400;//点的数量
P pstart[] = new P[pnum];
P pend[] = new P[pnum];
float r = 10;//圆的半径

void setup(){
  size(2000,1000);
  //frameRate(100);
  for(int i=0;i<pnum;i++){
    float angle = random(100);
    pstart[i]=new P();
    pend[i]=new P();
    pstart[i].setp(r,angle);//随机生成圆上的点
    pend[i].setp(r,angle);//随机生成圆上的点
    pend[i].setspd(random(10));//随机生成圆上的点的速度
    pend[i].setwt(random(5));//随机生成圆上的点的宽度
    pend[i].c=color(random(255),random(255),random(255));
  }
   println(Serial.list());


  int lastPortIndex = Serial.list().length - 1;
  print("connecting to " + lastPortIndex);
  // get last port name
  String lastPortName = Serial.list()[lastPortIndex];
  // initialize myPort with last port name and standard speed
  myPort = new Serial(this, lastPortName, 9600);
}

void draw(){
  frameRate(7);  
  
  while(myPort.available()>0){
     pressureValue = myPort.read();
     //mapped_value_line = int(map(pressureValue,400,1023,0,2000));
     //mapped_value_sound = int(map(pressureValue,400,1023,0,100));
     //mapped_value_red = int(map(pressureValue,0,255,0,255));
     mapped_value_red = pressureValue;
     //mapped_value_scale = int(map(pressureValue,0,255,1,2));
  }
  
  background(255);
  stroke(#123456);
  translate(width/2, height/2);
  scale(pressureValue * 0.01,pressureValue * 0.01);
  for(int i=0;i<pnum;i++){
    strokeWeight(pend[i].wt);
    //stroke(pend[i].c);
    stroke(mapped_value_red,0,255-mapped_value_red);
    println(mapped_value_red);
    line(pstart[i].getx(),pstart[i].gety(),pend[i].getx(),pend[i].gety());
    if(pend[i].r<10 ||pend[i].r>=400)pend[i].spd=-pend[i].spd;//触碰边界返回
    pend[i].setr(pend[i].r+pend[i].spd);//修改半径
  }
}

The Pillow Project Part 2

Alanna and I decided to keep working on our pillow project which we were doing last week.

However, this time we changed our main targeted users from people in a relationship (romantic relationship or child-parent relationship) to patients and kids/parents. Our redesigned pillow has several additional features like periodic email updates which include different information about the pillow’s user like for how long they have been using it and if they are using it or not st the time the updates were sent.

This project may be implemented in homes to keep track of little babies sleep habits. Since the sensor which we used is made of fabrics, this means that it can be easily embedded in other fabrics other than a pillow for example bed sheets. A use of a smart fabric like this may help parents to keep track of their kids’ sleep pattern especially when they have babysitters and can’t spend much time with their kids. The parents will be able to know when their kids are asleep and for how long. Similarly, this project can be implemented in hospitals to monitor patients sleep pattern by using similar mechanisms.

In addition, a music playing feature was added in order to comfort a user. Research shows that people are like to fall asleep and can even beat insomnia when soft music is playing in a background.

The Fabrics design

The same design processes like in the previous project were used with few modifications. An embroidery machine was used to decorate the pillow by embroidering a “Good night” in Chinese.

The embroidered “Good night” message in Chinese

A larger complete version of the pillow

Also, the size was made bigger in order to make it look like an actual pillow and not just a prototype.

Programming

An MP3 Shield was added since the Arduino doesn’t have an ability to play mp3.

In addition, the SFEMP3Shield library was also added and the “FilePlayer” example, which can be obtained by going to “File” > “Examples” > “SFEMP3Shield” > “Examples” > “FilePlayer” was modified to suit our need by adding conditions.

The final product

Drawbacks

The analysis which is given by the pillow maybe misleading at some point. The program of the pillow didn’t include other uses of the pillow like seating on it, playing with it, which are still recorded by the sensor as a sleeping activity. In addition, it is not likely that a pillow will be sleeping on the pillow all the time. They may not slip away from the pillow during the sleeping time and hence the reported sleeping time will be less than the actual sleeping time.

Our initial idea was to include the automatic emailing features but it was too late when we realized that the Arduino where we soldiered the MP3 shield does not support accessing the internet. Instead, we just decided to print on the Arduino console the updates which were supposed to be emailed.

Details  of music playing at the beginning

Showing if the pillow is in use or not and for how long

Generally, I was very excited working on this project in such a way that I would like to keep exploring more about it during my free time and see how far I can take it.

/*This program is intended to be regulate patients sleeping patterns at hospital. Apart from doing that it also gives them comfort. The example file included #include <SdFatUtil.h> which cause a
  failure compilation. When we eliminated it, the error disappeared but still the Audio played so not sure how this works.*/

//send updates to a doctor every hour to tell if the patient is asleep of not. For demonstration purpose the emails will be sent after every minute.
//This project maybe used at hospitals and also for baby sitting. It helps you to have a live update of the patient or your baby. You can set the time interval when you want
//to be updated.


#include <SPI.h>
#include <SdFat.h>

#include <SFEMP3Shield.h>

SdFat sd;
SFEMP3Shield MP3player;
int buttonState = 0;
const int buttonPin = A5;
int sleepingtime = 0;
int count = 0; //to limit the number of times the music play in a day
int minutes = 0;
String statusPatient = " ";
int duration = 0;
int notifytime = 60; //set to receive notification after every one minute. This can be set to any number depending on user's preferences.

void setup() {

  Serial.begin(9600);
  pinMode(buttonPin, INPUT);
  //start the shield
  sd.begin(SD_SEL, SPI_HALF_SPEED);

}

//do something else now
void loop() {

  buttonState = digitalRead(buttonPin);

    if (buttonState == HIGH) {
    sleepingtime = sleepingtime + 1;

    statusPatient = "Patient is still asleep";

    if (count == 0) { //this limit the music to playing only once in a day. It can be reset by restarting the arduino to mark a new circle.

      int t = 0;
      int beAsleep = 30; //sleep after 30 seconds. It can be made to any number of seconds.

      MP3player.begin(); //initialize shield
      MP3player.playTrack(1); //start playing track 1

      while (t < beAsleep) {
        Serial.println("Goodnight music has been playing for these seconds:");
        Serial.println(t);
        t++;
        delay(1000);
        sleepingtime = sleepingtime + 1;

      } //end while loop. this loop gives time for the music to play but also count it has playing for how long

      MP3player.stopTrack(); //when it is time to sleep stop music
      Serial.println("Music stopped playing");

      count = count + 1; //increment at the end of the loop to avoid replaying the music if the person is still asleep.

    }//end if function
  }

  else {
    Serial.println("There is no one on bed at the moment!");
    statusPatient = "The patient is awake at the moment.";
  }

  minutes = sleepingtime / 60; //change seconds to minutes.


  Serial.println(statusPatient);
  Serial.println("Have been sleeping for this number of minutes today: ");
  Serial.println(minutes);

  duration = duration + 1;

  /*if duration>notifytime{ //send a notification after a certain time interval
    sendemail(sleepingtime, statusPatient);
    }*/

  delay(1000);

}

/*void sendmail(int sleepingtime, string statusPatient){
  //this function sends automatic updates to the user. it includes information like for how long the pillow user has been using the pillow. an if a person who is using the pillow
  //is using it at that particular moment or not.

  }*/

Every Time We (Almost) Touch

You have a special someone in mind. You may have had mutual feelings for each other for years, or maybe their feelings are in question. Either way, there is an undeniable reaction when you are in close proximity to them. Feeling another person doesn’t always have to be by putting skin to skin, and in this project, we intended to replicate the physiological response that accompanies feeling affection towards another person. In other words, we tried to duplicate the feeling of “catching the feels.”

To accomplish this task, we first began by brainstorming. We’ve all been in situations where someone who means something is close to you, and a wave of emotions becomes unavoidable. We decided to focus on the feeling of butterflies/heart racing for this project. To do that, we used an ultrasonic motion sensor, a transistor, a small motor, and an arduino. We soon realized that this project was not drastically different from our last project, the fading light heart whose brightness depended on the pressure applied. Both projects were similar in the sense that they depended on human input in order to show a response. 

With a similar setup to our previous project, we first were under the impression that we would need to plug in our shirt in order to get enough power to make a forceful vibration. We eventually discovered that we only needed a battery to power the motor.

Here is the final wiring of everything on our project. The motion sensor has two blue wires that go from echo and trig, to digital pins 5 and 6. VCC from the motion sensor goes to power, and ground goes to ground. Only the last pin on our transistor is connected to ground. To move this prototype to the next step, we decided to use a perforated board to solder our connections. Before doing so, we thought drawing detailed diagrams of where our connections were. Here are two of those diagrams!

I first began with the image on the left, that included everything in our circuit. Simplifying all the connections really helped us get a clearer image of what was happening, and how we needed to solder things to the perf board. The second diagram was just the connections to the perf board, so we could concentrate on exactly where things would go once there. The third picture is of our semi-final perf board, without the connections that went off of the perf board. Our mistake here, was not fully thinking through how this would sit on the shirt. We only realized this once we began thinking about how to incorporate the wiring onto the shirt. We wanted our sensor to be where the heart of the user would be, so that it would sense when someone was getting “close to their heart.” We also wanted our motor to be near the heart, so that the user could feel the direct implication of the location of another person. Putting the arduino, the sensor, the perf board, and the motor all in one location was a struggle. We soon realized that our motor’s direction did not work with how we soldered it onto the perf board, and if we were to work further on this project, we would have soldered the sensor to the wires to the perf board, instead of the sensor directly to the perf board. To make sure everything stayed in the right location, we put a series of pockets on the inside of the shirt to house everything.

Here is our final shirt, vibrating when it senses something closer than three inches from the heart. We also laser-cut a heart decal to go on the front of the shirt. We originally intended on making a more thought-out video, but because of both of us coming down with some sickness, we did not have the time.

 



//  http://www.arduino.cc/en/Tutorial/Ping


// this constant won't change. It's the pin number of the sensor's output:
const int pingPin = 5;
const int echPin = 6;
const int vibePin = 9;
int buttonState = 0;


void setup() {
  // initialize serial communication:
  pinMode(pingPin, OUTPUT);
  pinMode(echPin, INPUT);
  Serial.begin(9600);
}

void loop() {
  // establish variables for duration of the ping, and the distance result
  // in inches and centimeters:
  long duration, inches, cm;

  // The PING is triggered by a HIGH pulse of 2 or more microseconds.
  // Give a short LOW pulse beforehand to ensure a clean HIGH pulse:
//  pinMode(pingPin, OUTPUT);
  digitalWrite(pingPin, LOW);
  delayMicroseconds(2);
  digitalWrite(pingPin, HIGH);
  delayMicroseconds(5);
  digitalWrite(pingPin, LOW);

  // The same pin is used to read the signal from the PING))): a HIGH pulse
  // whose duration is the time (in microseconds) from the sending of the ping
  // to the reception of its echo off of an object.
//  pinMode(pingPin, INPUT);
  duration = pulseIn(echPin, HIGH);

  // convert the time into a distance
  inches = microsecondsToInches(duration);
  cm = microsecondsToCentimeters(duration);

  Serial.print(inches);
  Serial.print("in, ");
  Serial.print(cm);
  Serial.print("cm");
  Serial.println();

  delay(100);

  if (inches <= 3)
  {
    buttonState = HIGH;
  }
  
  else
  {
    buttonState = LOW;
  }
  
  digitalWrite(vibePin, buttonState);
  Serial.println(buttonState);
}

long microsecondsToInches(long microseconds) {
  // According to Parallax's datasheet for the PING))), there are 73.746
  // microseconds per inch (i.e. sound travels at 1130 feet per second).
  // This gives the distance travelled by the ping, outbound and return,
  // so we divide by 2 to get the distance of the obstacle.
  return microseconds / 74 / 2;
}

long microsecondsToCentimeters(long microseconds) {
  // The speed of sound is 340 m/s or 29 microseconds per centimeter.
  // The ping travels out and back, so to find the distance of the object we
  // take half of the distance travelled.
  return microseconds / 29 / 2;
}