Lilypad Temperature Sensing Scarf, progress report
2010-Nov-14, Sunday 10:41 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Science Week has just passed. I wanted to do something Arduino related, and remembered the Breathe Project. I'm not a biology person at all, but loved the idea of investigating breathing. Something we do all the time, most of the time completely unaware, until one day it's very cold, or we're told about breathing exercises as a way to relax. Then we start to get an inkling of how important an act it is. So, shamelessly, I decided to make one of my own.
Construction:
It's not finished yet, turns out investigating breath is more complicated than I anticipated, I keep adjusting the programming, and until I'm happy it won't end up in my scarf. The basic idea is simple. A temperature sensor, hooked up to a Lilypad microcontroller to anaylse the data, and some LEDs for output. I tackled the temperature sensor data already. All I had to do was make up the circuit. I settled on an insert I could put in, and take out of my scarf as needed. It's just as well it's going to be on the inside, it's not pretty.
This is the outmost view, the one with the LEDs that will shine through the covering scarf.

You can see the mess of conductive thread traces couched with embroidery threads that are colour-coded. There are five LEDs, three on one connection, two on another. The idea is to eventually have the three LEDs light up when I breathe out, and the two as I breathe in.
This is the inside of the insert. It folds in half lengthwise, basically to keep the conductive threads insulated from my face.

You can see the Lilypad Simple Board on the left, and the temperature sensor near the middle. You can see how the LEDs were secured, through two-holed buttons, and then having their legs curled.
This is the back view, the one closest to my face.

What you see here is a tiny teeny Polymer Lithium Ion battery. It gets hidden away inside the felt pouch, safe from contact with anything.
Batteries:
A brief word about these batteries if you will allow me. I feel guilty using coin-cell batteries, as they aren't rechargeable. AA and AAA are too bulky for this kind of project. So these small, rechargeable batteries are ideal. However. They require special equipment.

The red board on the left is the LiPoly charger. You plug the battery into one of the clips, and hook the board up to electricity through the mini-usb port, or wall barrel plug.
The circular board on the right is the Lilypad LiPower board. Basically if you're using this kind of battery in a Lilypad project you can't just hook it up like a coin-cell battery. You need this board to translate the battery into a language the Lilypad understands.
"But wait", I hear you say, "you're not using one of those!" No, I'm not, let's take a closer look.

The new Lilypad Simple Board has a lovely feature, you can plug these batteries directly into it. It even has an on-off switch for convenience.
Also, those JST connectors, all seem to be different sizes from different manufacturers. It's best to get all your stuff from the one place. And you'll find out, they're a Dickens to get out once you've pushed them into a receptor. If you look closely you'll see one of my clips on the red board above is broken. That happened trying to get it out with pliers. The best way I've found to shimmy them out is by holding the board next to your body, the clip and connector you're trying to separate away from you. Place a hand on either side, and with your thumbnails, one on each side just behind the battery connector lip, wiggle and push away from you. It's a pain. But at least you know it's securely attached to your project.
Video:
This is what I've got so far. The microcontroller uses the sensor when switched on, for five seconds, to calculate an ambient temperature. It also keeps track of the previous reading. If the temperature is higher than ambient, and higher than previous, it is assumed to be a warm exhale, and three LEDs light up. If the temperature is higher than ambient, but lower than previous, it is assumed to be an inhale, and two LEDs light up. I'm testing this to see how it fits, but the cycle period is faster than my natural breathing. I'm looking to fine-tune it.
Here you can see as I touch the temperature sensor with my finger, and it warms up, the three LEDs light up. When I take my finger away and it cools down, the two LEDs light up.
I'll post more when it's finished.
*edit* Code here.
Construction:
It's not finished yet, turns out investigating breath is more complicated than I anticipated, I keep adjusting the programming, and until I'm happy it won't end up in my scarf. The basic idea is simple. A temperature sensor, hooked up to a Lilypad microcontroller to anaylse the data, and some LEDs for output. I tackled the temperature sensor data already. All I had to do was make up the circuit. I settled on an insert I could put in, and take out of my scarf as needed. It's just as well it's going to be on the inside, it's not pretty.
This is the outmost view, the one with the LEDs that will shine through the covering scarf.

You can see the mess of conductive thread traces couched with embroidery threads that are colour-coded. There are five LEDs, three on one connection, two on another. The idea is to eventually have the three LEDs light up when I breathe out, and the two as I breathe in.
This is the inside of the insert. It folds in half lengthwise, basically to keep the conductive threads insulated from my face.

You can see the Lilypad Simple Board on the left, and the temperature sensor near the middle. You can see how the LEDs were secured, through two-holed buttons, and then having their legs curled.
This is the back view, the one closest to my face.

What you see here is a tiny teeny Polymer Lithium Ion battery. It gets hidden away inside the felt pouch, safe from contact with anything.
Batteries:
A brief word about these batteries if you will allow me. I feel guilty using coin-cell batteries, as they aren't rechargeable. AA and AAA are too bulky for this kind of project. So these small, rechargeable batteries are ideal. However. They require special equipment.

The red board on the left is the LiPoly charger. You plug the battery into one of the clips, and hook the board up to electricity through the mini-usb port, or wall barrel plug.
The circular board on the right is the Lilypad LiPower board. Basically if you're using this kind of battery in a Lilypad project you can't just hook it up like a coin-cell battery. You need this board to translate the battery into a language the Lilypad understands.
"But wait", I hear you say, "you're not using one of those!" No, I'm not, let's take a closer look.

The new Lilypad Simple Board has a lovely feature, you can plug these batteries directly into it. It even has an on-off switch for convenience.
Also, those JST connectors, all seem to be different sizes from different manufacturers. It's best to get all your stuff from the one place. And you'll find out, they're a Dickens to get out once you've pushed them into a receptor. If you look closely you'll see one of my clips on the red board above is broken. That happened trying to get it out with pliers. The best way I've found to shimmy them out is by holding the board next to your body, the clip and connector you're trying to separate away from you. Place a hand on either side, and with your thumbnails, one on each side just behind the battery connector lip, wiggle and push away from you. It's a pain. But at least you know it's securely attached to your project.
Video:
This is what I've got so far. The microcontroller uses the sensor when switched on, for five seconds, to calculate an ambient temperature. It also keeps track of the previous reading. If the temperature is higher than ambient, and higher than previous, it is assumed to be a warm exhale, and three LEDs light up. If the temperature is higher than ambient, but lower than previous, it is assumed to be an inhale, and two LEDs light up. I'm testing this to see how it fits, but the cycle period is faster than my natural breathing. I'm looking to fine-tune it.
Here you can see as I touch the temperature sensor with my finger, and it warms up, the three LEDs light up. When I take my finger away and it cools down, the two LEDs light up.
I'll post more when it's finished.
*edit* Code here.
no subject
Date: 2010-11-15 01:34 am (UTC)When I read temperature-sensitive breathing scarf, I imagined a scarf full of LEDs, that would turn redder with heat and bluer with cold. :o That would be tons more complicated though. I think this is pretty awesome already :D
no subject
Date: 2010-11-15 09:07 am (UTC)