Arduino Controlled Sip-and-Puff

Build your own Arduino Controlled Sip-and-Puff switch.

Favorited Favorite 1

Sip-and-Puff (SNP) controllers are nothing new - you've probably seen one in action yourself. SNPs are often seen on electric wheelchairs and allow individuals who can't use their hands to control their wheelchairs (or whatever else) by either "sipping" (inhaling) or "puffing" (exhaling) into a straw. Depending on how hard the individual inhales or exhales, it makes the wheelchair respond differently. It's a pretty amazing technology that has changed the lives of millions of people for the better.


An illustration of the Arduino Controlled Sip-and-Puff.

If you are counting on a sip-and-puff switch for something like controlling a wheelchair, it is probably in your best interest to have a professionally built one that can be perfectly calibrated. But what if you want to build an SNP controller for something else? SNP controllers can run upwards of $400 and if you want to, say, build an SNP controlled joystick for a video game or some other use, buying an actual SNP might be cost prohibitive.


The schematic for the Arduino SNP. Click on the image for a larger version.

That is where this next project comes in. Check out the Arduino Controlled Sip-and-Puff. Using an Arduino, some pressure/vacuum switches, tubing, and some clever programming, this SparkFun customer made a DIY SNP controller that can be integrated into thousands of projects. This is an amazing project with some very useful real-world applications. It is always great to see SparkFun parts used in a way that can truly benefit society - it warms our nerdy little hearts.


Comments 25 comments

  • Alex34 / about 14 years ago / 1

    Hello,
    I have quite a bit of experience with a sensor called the MPXH6250AC6U http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=MPXH6250AC6U-ND
    This little sensor is extremely accurate and is designed for automobile MAP sensor applications. It comes in a 8SSOP package that is easily hand solderable. The sensor is absolute, which means that the bottom end of the scale is complete vacuum and the top end of the scale is about 36PSI (absolute). Keeping in mind that atmospheric pressure is actually about 14.7PSI, the sensor reads about 1.6v at atmospheric pressures. They are also very cheap (about $10).
    From my experience with them, I have found that we have a better ability to create vacuum than pressure, so you will likely not see huge upward voltage swings. I would recommend using 10 bit ADCs to achieve enough resolution for smooth operation as you will not be using a lot of the scale of the device.
    Using a sensor vs. switch opens up a range of possibilities including speed control by amount of pressure/vacuum.
    Another requirement is clean air supply, so look into getting a small inline filter so not to take in saliva.
    A neat idea that you could achieve with a couple pots and some transistors would be making an adjustable switch that has high and low set points. I have found that once I got into microcontrollers, I would spend half a day trying to program what I could have built with discreets in 10 minutes.
    If you have any questions, feel free to email me at alex@campbelperformance.com.

  • CHaskins / about 14 years ago / 1

    http://www.allelectronics.com/make-a-store/item/TDR-120/PRESSURE-TRANSDUCER/1.html

  • MarkWoodworth / about 14 years ago / 1

    We did something similar in a middle school introduction-to-programming class I gave last year. We made a puff-only Morse decoder using the Arduino, with output to an LCD. The details are here.
    The Freescale sensor was easy to use, and will show some change on vacuum, so a sip-and-puff version could be made with just software changes.

  • DigiC / about 14 years ago / 1

    could this be used for those in electric wheelchairs to send Morse code to someone or something digital for communication or advance wheelchair control?

    • Eric-Montreal / about 14 years ago / 1

      Once the device properly decodes the sips/puffs into characters, what you do with the decoded data is up to you, as long as you can send the digitalized data to the device you want to control.
      The simplest is a LCD display, possibly dual so that the person can see what he/she writes and the second one is facing the other person, but it could also be used on a slightly modified speakerphone to make calls either to a person who can read full morse or just a few prearranged codes or equipped with a decoder such as this one. It could also trigger prerecorded messages or synthetic voice a bit like the DECtalk used by Stephen Hawking until 2009.
      Advanced wheelchair control would depend on it's ability to communicate with external devices (RS232 port or similar).
      An easy use would be to add an infrared LED / learning photodiode to control anything with an infrared remote (TV, motorized bed, sound system, etc...).
      Full computer keyboard/mouse control is also possible using this simple AVR stick. If the person is able to have even limited head movement, a 6DOF board could be added as a better mouse.
      Possibilities are truly endless, and this is a field of activity that's a perfect match for open source devices and platforms such as the Arduino as it fulfills specific needs not addressed by the industry, and at a cost that, unlike anything medical, people can afford.

  • Eric-Montreal / about 14 years ago / 1

    This is definitely very low tech, expensive, bulky and not very comfortable for the user.
    As others have mentioned, a pressure sensor would allow far better control and lower cost.
    The device could be further enhanced by using a barometric sensor chip instead such as BMP085 (backorder, but the breakout is not). This chip is fully digital, with fast response (300 samples/second), temperature compensation and it's very small (5x5mm). It's sensitivity to extremely low pressure changes would allow it to be placed in front of the mouth just like a regular headset microphone instead of using this ugly and uncomfortable tube. Some digital filtering would be needed to cancel out breathing and wind, but with a low 300Hz sampling frequency, any micro-controller would have time to do it.
    To prevent problems with moisture, the design could be enhanced by adding a heater made with a simple resistor on the backside of the sensor PCB and proper sensor orientation.
    Since the output is proportional, control systems such as hard/soft sip/puff used for wheelchair control would be easy. Self adaptive calibration would be possible.
    An Arduino might seem like overkill, but it opens lots of possibilities and makes software development much faster, at least for prototyping, to be later replaced with a low cost bare Atmega328.
    Among possibilities would be the ability to use sips/puffs as long/short "beeps" to interpret Morse code with extensions for other keys / canned sentences either to send as keyboard & mouse input using the USB port and a little resident software or for communication using a simple LCD / sound signal.
    The whole design could be inserted in a modified telephony headset that would be much better (and look less medical) than the products currently sold such as this
    I don't know someone who could use it, but this is the kind of project that would interest me if done as open hardware/GPL.

    • I use the BMP085 in my product line.
      1. Good for "sip," but not for "puff," since it reads +9000M to just -500M above sea level. A little puff (-500 meters worth, which is tiny), but not much. It's more of a vacuum sensor than a pressure sensor.
      2. You'd need a tube. If you sucked in its general direction, even from fairly close, you'd get no decent signal. If you blew, you'd get a lot of turbulent noise.
      3. At its lowest resolution, the fast you can sample the BMP085 is 222 samples/sec max.
      4. Heating the chip is a bad idea. Better to keep the moisture out with a convuluted path and/or filter material.
      My two cents.

      • Eric-Montreal / about 14 years ago / 1

        Regarding speed, I used the typical 3ms value, so you're correct, the minimum speed is 222 conversions/second, unless the EOC signal is used to get better sampling rate, if the software is designed to take advantage of it. However, those frequencies being much higher than the signal we're trying to decode, it should not be a problem.
        Regarding the asymmetric nature of the sensor (more available range for sip than puff and a much higher signal for puff than sip), at sea level (1013hPa), the puff range is 87hpa, and since the rms noise for fast conversion is 0.06hPa, that means a significant 1450 counts (roughly 10 bits) range that should be more than enough to extract a significant value from the turbulence induced noise. If sips are 5% of puffs, that would still be over 70 counts, so I'm pretty sure we can extract a significant value from it.
        A strong puff can be way more than 87hpa, and sensitivity can be reduced as you mention by a convoluted path and pop filter, or even a closed port membrane design but then, unwanted sensitivity to vibrations could be a problem and it needs to be tuned for a compromise with sip detection.
        A way to somewhat equalize the response would be to place the sensor a bit lower than between the lips, since sip is omnidirectional and puff is strongly directional, that would somewhat bring the two in a better matched range. User should be able to easily learn how to control it.
        Regarding the heater, the idea is to heat it slightly because when ambient humidity is close to 100%, breathing, even if carefully filtered is sure to cause condensation. I'd like to know why you dislike it. OTOH, the whole thing being digital, it's much less sensitive to humidity than an analog circuit.
        In facts, the biggest challenge with a tubeless design is wind cancelation, as, if the device is used outdoor for wheelchair control, any false trigger would be a safety issue. If this problem can't be solved appropriately, the device must be shaped to allow the mouthpiece to be used at a small distance indoors for comfort, and only with closed lips outdoor or for commands that involve safety.
        Unless an actual test device is built and tested, it's all speculations but if it was easy, there would be no challenge ;-)

  • R_Phoenix / about 14 years ago / 1

    I've been using the ADMX Honeywell pressure sensor with the Arduino Pro for some time now - very accurate.
    http://www.mouser.com/Search/ProductDetail.aspx?R=ASDXAVX001PGAA5virtualkey67810000virtualkey785-ASDXAVX001PGAA5
    Also, just to mention that you could make the chair go faster the harder you blow into the tube as the speed could be directly proportional to the pressure. Assuming they are useing a pressure sensor and not a pressure switch.

  • Ben121 / about 14 years ago / 1

    This:
    http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MPXV7007DP&webpageId=M98716&nodeId=01126990368716&fromPage=tax
    is a far superior Analog sensor for this application (I've used it).
    (Nice addition to pressure sensors - y'know for those slow Chinese NewYear Holiday thursdays :)
    It runs into the analog inputs, and provides for digital calibration, gestures, or what-you-haves.
    If I were in a wheelchair, I'd want a double pipe so I could put my tongue over one side or the other - to steer.
    Can I just say that posting a Schematic of an Arduino - with 2 dry switches attached as if this were a fully developed circuit give me the impression of false sophistication. This is 2% poor original design combined with 98% overkill COTS Arduino design. (Which, ever may it be said, has pins which don't line up, reset buttons and status LEDS where they are covered, relies on a discontinued RS-232 port, and has become a defacto standard in large part by exploiting the ignorance of newbies.)
    (But hey, I'm upset that USB ports aren't visibly polarized, but I do believe in a difference between appropriate design, and carp; this is well-intentioned carp.)

    • Ookseer / about 14 years ago / 1

      Thanks for sharing your thoughts.
      Now could you possibly share your improved designs? I'm not trying to snark, I'm passionately interested in an improved design. I have two sisters with movement disabilities who need all the assistive technology they can get, and frankly there's not much out there.
      I think this design, as basic as it is, is starting point and gives me and my sisters all sorts of ideas of how I can help them.

      • Ben121 / about 14 years ago / 1

        So get two of the freescale sensors above, and connect the output to Analog-in (Arduino has 6)
        These will provide a value in the midrange (~1000)? when nothing is happening.
        Sipps will record negative values, and puffs with record positive excursions.
        Make a pipe with left and right sides so one can blow into either side (like a 2 note harmonica) Use the tongue to block one side or the other (if possible).
        This is sufficient to drive a wheelchair forward and back, while steering.
        Nothing could make me happier than seeing this work well.

  • Larius / about 14 years ago / 1

    Without using expensive pressure sensors, I think this could be achieved with an infrared distance sensor aimed at a stretched piece of balloon rubber. Both sip and puff could be realized with a single sensor. If the rubber part is visible, it could even provide the user visual feedback. The drawback is that it would probably be non-linear, with sensitivity decreasing at both ends.

  • Azayles / about 14 years ago / 1

    I wonder if something like this
    http://www.electro-tech-online.com/attachments/electronic-projects-design-ideas-reviews/32090d1249174802-differential-pressure-sensor-absolute-pressure-sensor-mpx2010dp.jpg
    can be used as a sip n puff sensor? Gotta be cheaper?
    Perhaps something Sparkfun could start stocking? :P

  • Azayles / about 14 years ago * / 1

    I wonder if something like this
    http://www.electro-tech-online.com/attachments/electronic-projects-design-ideas-reviews/32090d1249174802-differential-pressure-sensor-absolute-pressure-sensor-mpx2010dp.jpg
    can be used as a sip n puff sensor? Gotta be cheaper?
    Edit: dammit, this post didn't show up until I posted again :(

  • mbrown9412 / about 14 years ago / 1

    That's a really great project - focuses on something people don't normally do, and help somebody!
    I can't help but think of Pearce from Community whenever I see one of these.

  • Condew / about 14 years ago / 1

    So now a real blowhard can control the world.

  • "Depending on how hard the individual inhales or exhales, it makes the wheelchair respond differently."
    Does this mean that it is possible to use this to determine how much pressure is being sipped? Hmmm...I think I have an idea!

    • dRudRu / about 14 years ago * / 1

      Actually, no. This line of pressure switches is set to open or close upon a certain pressure, so it's basically a pressure driven normally open switch. "Depending on how hard the individual inhales or exhales, it makes the wheelchair respond differently." may mean that the switch is held open longer, thus providing a different input than just a quick sip or puff.
      If you really wanted to add true variability, you could use something like this Differential Pressure Sensor from Sensirion:
      http://www.sensirion.com/en/04_differential_pressure_sensors/02_sdp1000-differential-pressure-sensors.htm

      • Ben121 / about 14 years ago / 1

        There are of course "pressure" sensors - even single units which record +/- pressures in the human range (Freescale);
        However, sipping and puffing seems to appear to dynamic actions in which air volume is moving. This can be converted through a fixed orifice into a pressure (most likely), or one can use a volume sensor (more expensive).
        In any case, the preferred interface to Arduino would be the Freescale or similar sensors.

      • CF / about 14 years ago / 1

        I thought that was what was in the picture. It never occurred to me they were a simple switch. (This IS SparkFun you know!)

      • mbrown9412 / about 14 years ago / 1

        Oh.

    • CF / about 14 years ago / 1

      That's a great idea. The harder you sip or puff, the faster you do something.
      Why two sensors? is one for pressure and the other for vacuum?

  • Digisynth / about 14 years ago / 1

    I like it.

Related Posts

Recent Posts

Halloween Hacking

SparkFun Spooktacular

Tags


All Tags