Today I’ve had my first success with communicating between two Xbees. Mostly thanks to this simple but clear tutorial. After installing the XCTU software with Thijs a few months back I had forgotten quite a lot of his private class “introduction to Xbee”. From his instructions I ordered 7 Xbee antenna’s and one Xbee explorer USB. My goal is to make an Xbee network without using Arduinos with the Xbees. This apparently is possible. But before getting to that point I had to make an Xbee “hello world” to grasp the concept and get the basics right.
In this picture you see the a light sensor attached to an Arduino and Xbee antenna. The Arduino prints the measurements to the serial port. Through the TX and RX pin the Arduino is connected to the Xbee antenna. This sends data to the other Xbee antenna that acts as a receiver. The data is printed in red in the XCTU terminal on the right.
On to the next step: running the Xbee on a battery and programming the Xbee pins to read and send the wind sensor data. To be continued…
Last week I visited the nice people of Sense OS. They offer a very powerful platform for working with sensor data: CommonSense. I talked to them about hosting my breathing_time performance on their system.They are enthusiastic about the project and want to take on the challenges that they’re up against.
The idea is that I make an account especially for breathing_time that will include the 5 wind sensors. The main challenges are: synchronisation of the different data streams and the real time aspect. As for synchronisation all the participants will have to install Network Time Protocol (NTP) software. This will ensure that all the computers use exactly the right time.
The data will be near real time. Every device will send an array with 5 data points every 500 milliseconds. And every second it’ll retrieve the 10 most recent data points for visualisation. We will use threads to make sure that hiccups in the connection or the network won’t disturb the flow of data. A local time stamp will be used to ensure every device always has the most recent data.
This sounds like a sound strategy the ensure flow through and speed. We’ll have to test of course to see how quick the data is send.
It’s been very nice talking to experts in this field. I feel the server side aspect of the performance is in safe hands with them.
Yesterday we managed to get the first wind sensor working. Together with Richard I connected the sensor to the RBBB board, calibrated it and read some wind/breath data from the serial port into Processing. It works surprisingly well:
I have already noticed that the distance from the sensor to the nostrils is critical. I’ll have to experiment. Richard had a nice idea. I should use the tubes to direct the air from the nostrils straight to the sensor for the most accurate result. I will give it a try. It will make the wearable more scary but that doesn’t have to be a problem :)
Today I did a little test using analogue input for my LED. I build my third RBBB today and wanted to take the LED output a little further. For my breathing device it will have to respond to the analogue input of breathing. So I emulated that with a light sensor. Covering the sensor less or more changed the brightness of the LED. For a start it was fine, but with breathing the LED will have to go from no light to very much light to give proper feedback on the respiration pattern.
I’ve made some progress with the breathing_time hardware. Together with
Richard (I was his ‘lovely assistant’) we soldered all the parts on a
compact board. It will be much easier and more wearable to work with.
During the TIK launch event I was fortunate to meet Christian Pointer. He’s an electronic engineer, programmer and hacker from Graz, Austria. He was very kind to help me with improving the stretch sensor. With the few parts I had with me he managed to increase the output range from the sensor to the Arduino dramaticly. Making it much easier for me to work the data and use it in different applications. The only thing I have to do is replace the two pot meters with ones’ of more suitable value and replace the simple opamp with a rail2rail one (TLV274 for example).
My first attempt at building a breath measuring belt using the Merlin
stretch sensor. I used this tutorial:
http://itp.nyu.edu/physcomp/sensors/Reports/StretchSensor When I breath in
and out you don’t see much changes in values. Not more then 20 which is kind
of hard to work with.
First sketch of new electrodes for e-Pressed. Galvanic Skin Response sensor electrodes made less obtrusive, hopefully.
Buttons, temperature and humidity sensor
On the photograph you can see the 5 volt circuit. It houses two sensors and two buttons. At the workshop last Saturday I put together button circuit, if you press the white one it means it smells good, the brown one indicates it smells bad. This is of course just a functional setup, purely for testing hardware and code. Later I’ll make soft buttons which will be integrated in the vest. We also made the humidity sensor (the kinky copper plate, we ran out of circuit board.) It will take some time to calculate the actual humidity from the output and before I can use it with the ozone sensor. A period of extensive callibration is due anyway.
I worked on the code which I completed today. The Arduino now collects data from all sensors (except the gas sensors which somehow have stopped working at the moment) and outputs an ‘e’ when no buttons was pressed, a ‘+’ when the smells good button was pressed and a ‘-’ when the bad button was pressed. It works in a two minute loop which is broken when a button is pressed, then data is immediately collected and send.
As for the sending part, I’m still working on the Bluetooth connection between the Arduino and the phone.
It was four weeks since the last workshop. Despite of the time span I didn’t have a lot of time to spend on the project but I was content with the research I’d done and was keen to show my findings to Anna Maria Cornelia. I also hoped to get at least one gas sensor working.
As I had to wait before I could talk to her I started with Paul to work on the sensors. But first I had to reduce the voltage level for the NO2 and CO sensors to work. It took me an hour and a half to put it together (with help from Paul and Meg), hmm, electronics isn’t really my thing I fear. I find it very hard to translate a scheme (even a simple one) into a circuit. But it’s very nice to have help close at hand, maybe I’ll learn some day…
Then it was time for me to talk to Anna Maria. I showed her the experiments and she was very exited about them and said they offered me a good springboard to continue. She said the parameters: colour, length, applied pressure and pressure duration are very usable for visualization.
The research will follow tree lines. Working with a roll of paper and ink plotted in lines and stains. A humidity meter which they have in museums is a good starting point. I also want to look into punching creating a relief, much like Braille. I could work on paper but also materials like latex rubber that can have a changing relief. This way you can feel the pollution, which is also nice at night. A matrix printer springs to mind to achieve this effect. The nice thing of working with paper is that you have a tangible result at the end of the day. Like an air quality receipt. Still I also want to send life data to internet and I’ll have to think about relation between these two.
Anna Maria suggested that I might use a screen to visualize digitally created flocks and maybe incorporate a watch so you only have to wear on thing around your wrist. She also suggested that it might be nice to somehow keep the functionality I’d used in the experiments working with smell to determine air quality. I could send a marker when I notice something about the air quality so I can later see them side by side to see if my intuitions were right.
She wants me to make five (!) different prototypes by September that translate the manual experiments into something mechanical and digital.
Back with Paul I managed to get the CO sensor working. That is, it outputs a voltage which varies when I breath or blow on it. The NO2 works exactly the same so it shouldn’t be to difficult to build. Now I have to find out what a certain voltage level means. But I will have to make a start in sending the data to a server. The next two months will be very busy…