zondag 10 april 2011

Volume control: breath sensor

The most difficult part will probably be to translate breath pressure into some sort of volume control. I found some interesting ways of doing so using:
I would like to test all these possibilities and see which one works best but will start with using a barometric pressure sensor. I agree this is not the most budget friendly option but as I already ordered the BMP085 sensor and I don't have any thermistors at the moment.. Using this sensor has as a consequence that we should use the 3.3V version of Arduino as the maximum supply voltage is 3.6V (http://www.bosch-sensortec.com/content/language1/downloads/BST-BMP085-DS000-05.pdf).

My biggest concern was that the humidity of your breath could affect the electronics. This is why I chose for creating a zone of underpressure instead of overpressure using a venturi-like construction. For this, I planned to use a T-joint for aquarium air pumps.
One side of the long part is connected to a tube to blow air through. The short part ends in a photo film container. The connection was made as airtight as possible. Another hole was made in the plastic container for the pressure sensor wiring.

Instructions on how to wire the sensor can be found on http://interactive-matter.eu/2009/12/arduino-barometric-pressure-sensor-bmp085/. The code to read barometric pressure values can be copied from http://mitat.tuu.fi/?p=78 (on line 56, you have to change "int ut=bmp085_read_ut();" to "long ut=bmp085_read_ut();" as originally posted by Scott at Sparkfun).

To convert a decrease in pressure into an increase in volume, a maximum barometric pressure reading (obtained after some repeated measurements) was subtracted from the pressure readings. This resulted in values larger or equal to zero. Because of the noise (+-20 Pascal), a threshold was defined so that the result always equals zero when not blowing through the tube. The averages of ten consecutive measurements were visualized using the serial monitor:
Volume values of zero were not included in calculating the average volume and when the last few readings equaled zero, the outcome should be zero as well. I'll be working on a better algorithm after I included the sampler to have a better idea of pressure/volume ratio's.

A first disadvantage soon became clear. A much bigger underpressure was created when breathing in. Also, strange results were obtained when blowing hard through the tube. I guess this is a result of turbulent air flow because of the imperfect construction of the metal T-joint. Using a plastic version might give better results..

Geen opmerkingen:

Een reactie posten