Introduction: The 'Sup - a Mouse for Quadriplegics - Low Cost and Open Source
A friend and I recently worked on creating a device for a Quadriplegic they know to allow him to use his computer. After some research, we decided on a "Sip-n-puff" combined with a joystick to give Allen the ability to move the cursor around the screen a click things.
A Sip-n-puff is an input device that takes user input in the form of a "Sip" or a "Puff" (Imagine sipping through a straw, or blowing bubbles in your drink). Here, we combine it with a joystick to enable the user to move the cursor on-screen, and the Sip-n-puff is used for functions such as clicking and scrolling.
Sip-n-puff devices are nothing new, and joystick/sip-n-puff combos aren't too uncommon either- But to buy such a device will cost you around $500 to $1500! For Allen, who has no source of income, that's an impossible price. However, the device itself is actually very simple- In this 'ible, I'll show you how to build one for just under $50!
All the designs and code are open source, which means you can build one without paying me a dime! If you'd like just the finished device without the work, I'd be happy to make one for you- Details at the end of the Instructable.
Finally, since this is open source, you can find all the design files and code at the GitHub: https://github.com/Bobcatmodder/SipNPuff_Mouse
Step 1: Tools, Parts, and Materials
Here's everything you'll need to build the device. Before you order everything, read through the rest of the 'ible to make sure you're comfortable with the skillset you'll need to assemble it!
- Arduino Pro Micro (Specifically a Pro Micro, with a USB connector and the ATmega32u4)
- MPXV7002DP pressure sensor w/breakout board
- Joystick module
- Silicon food-grade tubing, 1/8 ID by 1/4 OD, about 6"
- 3D printed parts, <= 72 grams worth
- Wires (I used DuPont female-female wires, then cut off the ends)
- Soldering iron (This 30w iron on amazon works great)
- Hot glue gun (High temp)
- 3D printer (Or get stuff printed through a 3D printing service)
- Misc. tools like pliers, flat-head screwdriver, sandpaper, sharp small knife with thin blade, wire clippers
- Normal PLA filament (I used Hatchbox black PLA)
- Flexible filament such as TPU or NinjaFlex (My printer came with a small roll of green TPU. Alternatively, you could modify the mouthpiece part to accept a smaller diameter tubing, then get 2.5MM ID tubing to fit the sensor)
The total cost for parts is about $22, not including the 3D printer filament. Once you add the flexible arm and the long USB cable, it totals at about $49.
Note that the links here are mostly the cheapest price from China! These will take at least a month to get to you. If you want parts faster, you'll have to pay a little more for closer sources with faster shipping. Expect the total cost to up to around $75.
Step 2: 3D Print Things!
All the STL files can be found at https://github.com/Bobcatmodder/SipNPuff_Mouse/, you'll need all of them.
If you don't have a 3D printer, there are plenty of 3D printing services around that you could use. If you want to get an inexpensive printer that will work great (and don't mind some assembly), I'd recommend the Anet A8, a $150 Prusa i3 clone with a great online community.
Case and Frame:
- Print with supports "everywhere", at 0.1-0.2MM layer height. I used a "grid" support type, but "lines" may be easier to remove.
GoProClip and FacePlate:
- Print as normal, no supports, 0.1-0.2MM layer height
- To be printed in flexible filament
- Layer height 0.1
- Retraction OFF
- No supports
Step 3: Printing and Annealing the Mouthpiece
Before you go and print all your extra mouthpieces, it's a good idea to make sure that they shrink correctly when annealed.
If you want to be scientific, go ahead and print out AnnealingTestr.stl, and measure it before and after annealing to figure out the exact percentage it shrunk/grew and in which axis. Usually about a 5% shrinkage is expected in the X and Y axis', and about a 2% growth in the Z axis. With out Hatchbox black PLA and convection oven, we managed about 2% shrinkage on X and Y, and a 1% growth on the Z axis.
However, since this piece is really only designed to fit moderately well onto the joystick, you don't have to be very precise. Using our values for Hatchbox black PLA, here's the printing process for the mouthpiece:
- Resize X and Y to 103% size, leave Z as is (We're aiming for about a 2% size increase over the original dimensions, once annealed, so that it'll fit moderately easily on the joystick)
- Print with a brim, plus supports "touching buildplate".
- Infill at 100% (so water won't seep into it)
- Normal print speed, 0.1mm layer height
- (If you have a heated bed, set it at 50C)
- Hotend at 220C.
I haven't played much with these values, but that's what I used for my printer (A Prusa i3 clone, the Anet A8).
Once you've printed a piece or two, try annealing them and see if they fit.
The annealing process:
- Preheat your oven, preferably on a convection setting (if your oven does that), to somewhere close to 158F, or 70C. Some ovens won't go that low, if it's off by a little it doesn't matter that much.
- Wait for the oven to heat up, then put your piece(s) in, on something that will keep them from falling through.
- Set a timer for an hour, then leave it. Don't open the oven to check on it, as the cooling effect may mess with the annealing process.
- Once it's sat in there for an hour, turn the oven off, and leave the piece in there to cool down with the oven. A thermometer would work well for this, but you don't have to be super precise, just wait an hour or so.
- Once it's basically cooled down, take it out. It should now be stronger, and more importantly, able to withstand boiling water and a wash in the dishwasher.
Step 4: Post-processing 3D Prints
I like my 3D prints to be clean, but that often means lots of supports. If you printed the Frame and Case parts with infill as recommended, you have a bit of cleanup to do! Here a a few tips and tricks for removing them.
As you can see, I used a combination of a screwdriver, needle nose pliers, and my pocket knife to remove the supports. I chose "grid" supports cause they work better and tend to come out clean and in one piece, but they are harder to remove. You can knock some of them out with just a quick blow from the screwdriver, but be careful not to break the actual part- It can be easy to do on the Frame part.
The Case part prints with a large support wall in the back, which can be particularly difficult to remove. I find it works best to go around the edges with a small knife blade, then try to puncture it and lever it out sideways. It'll take some work, but patience pays off!
Once you're finished, you can discard the mangled support material, or save it if you're really into reuse...
Step 5: Test Fit
Now that everything is cleaned up, we should test fit the 3D printed parts.
The modules all assemble as shown, and should fit pretty tightly. If they don't, try printing Frame.stl at 101-102% size, and resizing Case.stl to fit.
The mouthpiece should be able to fit on with a small amount of force, but not come off too easily. This is a good time to make sure the silicon tubing fits onto the mouthpiece, and into the adapter. I found the best way to fit in in securely was to get the end in however you can, then twist the tubing while pushing it in, to get it to seat well on the bottom edge of the hole in the adapter.
Note: In the pics, I'm using a joystick module I already soldered wires to- However, the normal joystick module should fit fine.
Step 6: Prepare the Joystick
Before we can solder wires to the joystick, we'll need to get rid of the old pin headers. I found the best way was to clip off as much as possible, then heat up each pin with a soldering iron, and tap the PCB to get the pin to fall out.
Once you've removed the old pins, solder a length of wires (about 20CM long) to the joystick module. It helps to have unique colors for each pin, so you can easily identify which wire goes where later.
Step 7: Schematic
Now that we've got the 3D design out of the way, time for a schematic and wiring diagram!
The circuit is actually very simple, with no resistors or external components involved, just the 3 different modules wired up to each other. I've provided a schematic above, and I'll go over what goes where here too:
Pressure sensor breakout:
- "A" goes to A0 on the Arduino
- "5V" goes to VCC on the Arduino
- "GND" goes to one of the GND pins on the arduino
- "GND" goes to one of the GND pins on the Arduino
- "+5V" goes to the "RAW" pin on the Arduino
- "VRx" goes to A2 on the Arduino
- "VRy" goes to A1 on the Arduino
- "SW" goes to D2 on the Arduino (Technically, there should also be a 10K pullup resistor between it and GND. However, the current code doesn't use it, and it would be harder to use anyways, so...)
Step 8: Solder Everything Together
Now you're ready to assemble all the electronics!
Be sure to have the modules mounted as shown! You want the wires running through the frame, and through the top or bottom slots where the arduino attaches. The arduino will be loose, but the wires will run through the frame. Take a look at the pictures, they show what I mean.
Start by stripping and tinning the ends of all the wires from the Joystick, if you haven't already. Then, based of the schematic and pictures, wire it up as follows.
- GND to the GND (pin 23) on the Arduino
- +5V to the RAW pin on the Arduino (right next to the GND pin)
- VRx to A2 on the Arduino
- VRy to A1 on the Arduino
We'll leave the SW pin for now, since it solders to the top of the Arduino.
Moving on to the pressure sensor, you'll first want to identify which wires are which. Assuming you have the frame facing with the joystick pointed directly away from you, the wire order is as follows:
- Top wire: Analog out "A", to Arduino pin A0
- Middle wire: 5V, to Arduino pin VCC
- Bottom wire: GND, to GND, pin 4, on the top.
At this point, you can also wire up the SW pin from the joystick, to pin 2 on the Arduino, right next to the GND pin.
Be careful not to bend the wires around too much, since they will break off pretty easily.
Step 9: Upload Program and Test
Before we glue everything in place, let's make sure it works!
If you don't have the Arduino IDE, you'll need to download it from the official Arduino website, at Arduino.cc. It's free, though they'll prompt you to donate if you'd like.
Once you've downloaded and installed the IDE, download the SupSipNPuff_Final.ino file from the github page, then open it in the IDE.
To upload it to the Arduino, go under "Tools", "Board", and select "Arduino/Genuino Micro". Under the same menu, under "Port", select whatever is available, it should look something like "COM12 (Arduino/Genuino Micro)". If it doesn't show up, you might have to wait while your OS installs drivers, but it should do so automatically.
Click the upload button (The round blue arrow button at the top left), or press Ctrl/U (or equivalent) to upload the program. When the progress bar at the bottom disappears and it says "Done uploading", you're ready to test!
To test, first re-attach the mouthpiece and tubing (Attach the tubing to the uppermost port on the sensor, using the adapter piece), then hold it in front of your mouth and move the mouthpiece around. It should move the mouse onscreen. Try a hard puff or sip to left/right click, and soft sips/puffs to scroll up or down. You can also hold a hard sip or puff to hold the "mouse button" down. If you're having trouble, imagine the mouthpiece as a straw. Rather than blowing or inhaling through it, you're creating a pressure with your mouth, like you would with a straw.
If one or more of the Axis are reversed, it's a simple fix:
- Make sure you have the SipNPuffMouse file open in the IDE
- Scroll through the program till you find the line that says "Mouse.move(reading, -reading, 0);"
- The first "reading" value is the X (horizontal) movement, and the second "-reading" is the Y (vertical movement. Depending on which one is reversed, add or remove the minus sign in front of the "reading[x]" line to reverse the value.
- Re-upload the program, and test it!
(Note: Another easy way to find the line is to use Ctrl/F. I use this a lot when working with my code!)
Step 10: Hot Glue
Now, with your Sip-n-puff working, it's time to assemble the final product! You might be proud of how nice the wiring looks, but some people prefer all that to be covered up in boring plastic, so we'll oblige them.
Before that, we need to secure everything inside so that they won't come undone when things are plugged in.
- Put a generous amount of hot glue behind the Arduino Micro. We're gluing it to the bar that separates where the wires come out on top and bottom.
- If you can, slide the pressure sensor back a bit, put a blob of hot glue in it's mount, then slide it forward over the blob. Add some more on the sides to secure it as you see fit. Electronics are not harmed by hot glue, but be careful not to get it into the ports that come out of the pressure sensor, where we connect the tubing.
- Add a generous amount of hot glue on top of the wires that come out of the Joystick module. This probably isn't necessary, since we won't be moving them around anymore, but it's good in case it ever gets subjected to extreme vibration...
Now that all the parts are in place, slide the frame into the case. You'll need to detach the tubing first. Now, center the faceplate over the Joystick module, then add glue to the points where it contacts the Frame (Not the case, since you might want to slide it out later). Once that's set, you can slide the frame back out, and then add more hot glue along the sides of the frame where it contacts the faceplate, just to re-enforce it.
Lastly, but not least: On the side of the case that doesn't have the hole for the tubing and USB connector, sand the surface a little to roughen it, in the area you want to mount the mounting piece. Do the same to the bottom of the mounting piece, then smear it with glue and affix it firmly to the case. Once it's set, you can cut the excess off with a small knife to give it a more professional look. (Haha)
Step 11: Setup and Usage
Now that you're ready to use the device, here are a few tips for setup.
Allen's room has a large screen TV with an HDMI input that sits on the wall across his room from his bed. We set his laptop up on a dresser under the screen, and connected it up. If you set this up in a room, find something a little longer than 15ft. We thought it'd be enough, but it didn't have as much slack as I would have liked.
To hold the device, we bought this arm on Amazon, for $19.50. It's a 25" flexible arm designed for holding a webcam or GoPro, with a clamp that works great for clamping onto a tabletop or bed. It's got a GoPro style mount on it, which we designed our mounting piece to mount to securely.
When we brought it to Allen first, I was surprised at what actually needed changing. Device wise, he just wanted us to slow the cursor down a little, which I've since done. However, what he really wanted was some more voice control for his computer, to eliminate the use of the on-screen keyboard as much as possible. The sip-n-puff can be used in combination with some accessibility tools on the computer to maximize the effectiveness. A list of everything we did for his computer is below:
- Set up Cortana to respond at any time to "Hey Cortana".
- Installed an Onscreen keyboard, and added a shortcut on the desktop.
- Created a script with AutoHotKey to open the Window's 10 dictation tool (Win/H).
- Installed Firefox and both Adblock and AdBlockPlus. (Cortana still uses Edge, unfortunately, but you get what you get)
- Scaled GUI and icons and text to 125%
- Installed a plugin in Firefox to enable voice search with the click of a button (on sites like Google)
- Installed CCleaner to try to get his computer to run faster (Probably not necessary, but his laptop was a budget low end model, and is still pretty slow.I did manage to speed it up a bit.)
I think what he'll end up using most is Cortana's voice search feature, so perhaps most of the firefox features will go unused. He already had a google home and Alexa, however, so he should get used to Cortana pretty fast.
Another good thing to do is to print out the user manual (found at the GitHub, of course), and leave it with the device so that any nurses can know how to detach the mouthpiece, and remind the user how to use it, if needed.
One more thing: With all the crevices and crannies in the 3D printed part, it'll collect bacteria if not properly cared for. In the user manual, we recommend making extra mouthpieces and washing them at least once a week in a dishwasher, or sterilizing them in boiling water. This will help keep them clean!
Step 12: Finished!
Hopefully by now you've got a finished, working Sip-N-Puff mouse, and someone is able to use a computer!
If not, I'm always here to help and would love to hear about any problems or feedback you have.
Finally, if you've stumbled across this and would like one without having to build it, contact me! I'd be happy to make you one, probably for around $250. This is, of course, much more than the materials cost- But you're supporting me as a maker, what I do in bringing these Open Source projects to the maker community, and it still costs much less than most similar devices on the market today!
First Prize in the
We have a be nice policy.
Please be positive and constructive.