Tuesday, April 24, 2007

Final Summary

While this isn't the end of these kinds of projects for me, this is the end of this specific iteration. This project was a combination of two classes I was taking this semester: Networked Objects and Wearable Technology, at ITP. The point of the project was to create a proof of concept that a system could be set up between a remote place (i.e. a server) and some kind of wearable application, using a cellphone as the persistant gateway to the internet.


What, Why, How
I augmented a garment, in this case a dress, with conductive fibers, designed to heat up and turn thermochromic ink (i.e., Hypercolor), from one color to another. The participant would wear the garment, which would dynamically reflect the current number of people who have come by his/her site for that day. By comparing the previous day's numbers against the daily average, one of two icons are 'turned on' via resistive heating, displaying whether or not there has been a dip or rise in daily visitors.

I wrote a java app that communicates with the dress via bluetooth, which pings a php script responsible for reporting the server's number of hits for the week. The user is required to fire up the app on their cellphone, which initiates the datascraping and transmission process.

Here's a diagram that illustrates this interaction:


Hardware/Software
The hardware in this project is minimal, with most of the work being done in the software.

Here's a list of parts I'm using:

Arduino
BlueSMiRF
2 Darlington transistors (TIP120)
2 - 1k resistors
3 - 9v Batteries
Conductive thread (which takes the place of wires in my circuit)
Thermochromic ink, mixed with regular screening ink.

And here's a list of what I coded in:

PHP for datascraping
Arduino code for chip
J2ME

Circuit Schematic


Each conductive thread has its own power supply, since I am shorting out a battery in order to get enough heat generated to cause color change in the ink. I'm PWMing transistors, which switch the threads on and off. All of the components in the circuit share a common ground, but for the threads running through the thermochromic ink icons, when and if they receive power is controlled by turning the gate that goes to ground, on and off, in the transistor.

Set-backs
There are many issues that came up during this project, that are discused in more detail in the blog entries below this one, but these are some of the major ones:

- Conductive thread is fairly tricky to work with. Voltage is lost very rapidly down a length of thread, and you have to be sure to insulate everything in your circuit, since the fiber acts as a live, unshielded wire, when it has power running through it! Fabric glue, hot glue, and/or interfacing (which has glue on its backside; you adhere it to your garment by ironing it on) all work well for insulating soft circuits.

- Related to the voltage/current dropping along the conductive threads, it was hard to get the ink to change color enough without using a 9V battery, and even then, it wasn't as noticeable as it could have been.

- The ink doesn't change as much on my dress, and I had it changing on a test swatch of fabric earlier. This was due to not only a lack of current, from power being lost down the thread; it was also from a poor mixture of screen inks. You have to experiment, in order to get the right combination of thermo/regular screen ink. Also, it works better to have the ink painted over the thread that is responsible for heating it up, versus just having it stitched on top.

- Power supply is the biggest bear of a problem, considering this is a wearable. Having three 9V batteries tethered close to your body isn't the most ideal set up.

- Related to power supply, using Bluetooth is VERY power consuming. The batteries were being drained fairly quickly because of it. I don't have an exact battery lifetime expectancy figured out yet, because I haven't had the garment running long enough to completely drain a battery out. I will post later what I find, in terms of exact numbers.

What worked well
- Darlington transistors to switch the threads on and off works wonderfully, and most importantly, simply. I started out using MOSFET chips, but found that the transistors did the job well enough.

- Using the phone as a constant access point for the internet was a lot less complicated than I had anticipated. It's a great, convenient way to send and retrieve data between the net and your device.

- Using fabric interfacing to create battery holders was a fast, strong, and easy way to get the job done. You just have to iron them in place, leaving a pocket to slip the battery into.

Thursday, April 19, 2007

got working:
- used hot glue to insulate board and bare threads. also used interfacing over components and their thread, to insulate from other components.

set-backs:
- i am getting a voltage reading of around 3v off my thread, but i can't even light up an LED with it.
- bootloader has stopped working in arduino.
- php script gets all screwy when i take less than 6 readings

to-do:
- get test swatch to turn to clear.
- paint ink onto dress. cure it!!
- complete insulation
- add in other batteries

in the next iteration, the project will include these upgrades/features:

*php*
- eventually, get maxValue based on average hits from php (this value should be dynamic)
- if it is earlier than the 6th, the days will get all screwed up! build functionality that lets php know what to do if it's before the 6th.

*python*
- look at python... can detect which tower your phone is connected to!

*java*
- connects to network via cellphone
- make into a background app (like aim, etc)

*arduino*
- look for 'disconnected' over serial port. open up 2 terminal windows and monitor ports
- does temperature checking
- reset lastPing, so it doesn't go over 4 hours

*dress*
- silkscreened designs
- more threads

*web*
- set up a web page where people can enter data in.
- find different things to monitor. maybe make a set of clothing items for different means (to raise awareness for different kinds of issues)
- fun applications??? music related?

Monday, April 16, 2007

quick update!

got working:
- actually get data going back n forth between bluetooth in circuit and laptop bluetooth
- having trouble parsing multiple data sets
- debugged my arduino + processing code.

set-back:
- i tried to upload my program to the arduino, but it kept telling me the programmer wasn't responding, even though all my settings were right. it was because i had my blueSMiRF powered up. once i unplugged it, the program uploaded normally.

to-do:
- if device's BT connection is dropped, device should be set to 'disconnected'. status = disconnected



UPCOMING (after thurs)
- put software on cellphone for portability

Sunday, April 15, 2007

Update!

- Mixed my inks together: Black thermochromic + regular screen inks (hot pink, electric blue, and bright orange). I'm using Versatex water-based screen inks, as my 'regular' screen ink.

Be warned of this though: The black thermo ink is not as opaque as you might think. The orange mixed in turned it into chocolate pudding brown, the red into a kind of dark purple, and the blue made it almost slightly greenish. It's ok though; it's still muted enough to not be too ugly or noticeable. When heated, it should turn from it's cold murky color to bright red/blue/orange when heated.

Current set-backs:

- I planned on using abc no rio to silkscreen, but they are only available tues/weds/thurs for 2.5hrs each day :(.

- mouser.com will not ship lithium batteries via air, only by ground. Even though they let you pick that shipping option at checkout, and don't tell you ANYWHERE that that is their policy. After I had placed my order with them, they emailed me later informing me of this policy, and that my shipment would not arrive until Wednesday or Thursday (which is much too late). They wouldn't even cancel my order for me as a courtesy. I'm obviously not too happy with them.

- I tried putting my Bekaert VN 14 1/90 thread into my sewing machine. It frays very easily!!! So i might have to hand-sew my circuitry. The thread will need to be double or tripled up as well, so that the connection is strong (both physically and electrically).

In other news (i.e. GOOD news), I tested using my Bekaert BK 50/1 thread, which has very low resistance, in place of the hard wires in my circuit. It conducts electricity wonderfully! It totally works, as though i was using my usual 22 gage wire! Everything lit up as expected. As with the VN 14 thread, it needs to be doubled up in order to have a strong physical and electrical connection. When I used only one-ply of the thread, the LED on the other end softly flickered. This thread frays very easily as well, so it will definitely need to be hand-sewn into my garment.

I still have to do a lot. This is the order in which it'll be done:
- make php script work
- cell-phone app (processing mobile?)
- hook up arduino code
- test circuit with data coming from 'net
- print dress
- sew in circuit!
- insulate everything

Thursday, April 12, 2007

I switched from using mosfet drivers to a simple darlington transistor (TIP120) for each thread. This will suit my purpose well enough. I set up my test circuit, and it's all working wonderfully!


Transistor Array
Originally uploaded by 0x000000.
The LEDs will be replaced with conductive threads running through thermochromic ink in my garment.

Saturday, April 7, 2007

Received my silk screen and conductive thread today!

I'm going to be working on setting up a circuit using a mosfet driver and looking at j2me stuff for developing a java app for my cellphone. The application I eventually write will be responsible for retreiving data off the net for me, with the help of php.

Wednesday, April 4, 2007

Talked to Tom and found out how to use a MOSFET driver. I was advised that a MOSFET is the way to go for sending current down threads. I will still be shorting out a battery, but the MOSFET will allow me to control when and which threads get power sent through them via the arduino (or any microcontroller, for that matter). I am going to try to track down a smaller version of the arduino, which is being developed here at itp. It is much more conducive to being sewn into a wearable application than the mini or full-sized arduino, because of its smaller dimensions, including thickness.

Today I'm going to get in touch with a couple people to figure out how to connect to the internet via my cellphone.

current steps outline:
- get cellphone to connect to net and return data to arduino
- build working mosfet circuit with basic on/off code
- try creating a bus.. see how long battery drains when you have multiple threads attached
- see how long battery drains with just one thread attached.
- build circuit with working arduino code, doing data scrape.
- create design for dress
- stitch threads into dress
- screen on design
- stitch in circuitry!
- figure out power source

Much thanks to Marcelo, who has been advising me along the way, particularly with giving me the idea to use MOSFETs in the first place.