Adaptive Hands-Free Computer Controller!
by lukeyboats in Design > 3D Design
7 Views, 0 Favorites, 0 Comments
Adaptive Hands-Free Computer Controller!
This is an open-source adaptive controller designed to give people with quadriplegia — and many other physical conditions — full, comfortable control of a computer without needing to use their hands.
At its core, it turns an Arduino into a USB keyboard and mouse that any computer recognizes instantly, with no special software or drivers required. Plug it in and it works.
The controller combines a sip-and-puff sensor, an IR proximity sensor, a joystick, a microswitch, and a push button into a single device that covers everything from everyday cursor control to media playback to web browsing. Two modes keep the controls organized and easy to switch between with a single long press — no complicated sequences to memorize.
The sip-and-puff sensor is the heart of the input system. A single sip left clicks. A double sip right clicks. This alone opens up most of what a person needs to do on a computer. The joystick handles smooth, accelerated cursor movement with a deadzone to prevent drift, and can be toggled into scroll mode for reading. The IR sensor triggers voice dictation for hands-free typing. The microswitch activates Siri for voice commands.
Everything fits inside a compact 3D printed enclosure. The total cost of components is low, the code is fully open, and every part of the design can be modified to suit different needs, setups, or physical abilities.
Whether you are building this for yourself, a family member, or a client — this guide will walk you through every step of the hardware, wiring, 3D printing, and software from scratch. No prior experience with Arduino or electronics is required.
Mode Overview
The controller has two modes. Hold the push button for 3 seconds to cycle to the next mode. The LED blinks to confirm the switch.
Mode 1 — Navigation (default) This is the everyday mode for computer control.
- Joystick → mouse movement (accelerated)
- Single sip → left click
- Double sip → right click
- Microswitch → Siri (Cmd + Space)
- IR sensor → voice dictation (double Right Command)
- Short button press → toggle joystick between mouse and scroll
Mode 2 — Media
- Sip → volume up
- Double Sip → volume down
- Microswitch → next track
- IR sensor → previous track
- Short button press → play / pause
Here is the link to the code and a video of me demonstrating the device
https://docs.google.com/document/d/1v29LtR65HkRgddCxA4Y3F9mBFrnDIoR1isq-gkDGHpM/edit?usp=sharing
Supplies
Electronics
Arduino Pro Micro (5V 16MHz ATmega32U4) The brain of the controller. Make sure you get the 5V version, not 3.3V.https://www.amazon.com/dp/B01MTU9GOB
Sip-and-Puff Sensor This is the exact type used in this build — a passive 2-wire pneumatic switch with a silicone tube. Search for "sip and puff switch assistive technology" — the specific sensor used here was sourced separately. A compatible DIY alternative is the MPXV7002DP pressure sensor breakout, but the passive mechanical switch is simpler for this project. https://www.amazon.com/dp/B07LDXR7FY (closest passive switch equivalent)
IR Proximity Sensor Module (TCRT5000) The reflective IR module with built-in potentiometer for sensitivity adjustment. https://www.amazon.com/dp/B00LZV1V10
KY-023 Analog Joystick Module Dual-axis joystick. You only use the X and Y axes — the click button is not used in this build. https://www.amazon.com/dp/B07V7X6LMP
Microswitch (SPDT with COM/NO/NC terminals) Any standard snap-action microswitch works. This listing includes a lever arm which makes it easier to press. https://www.amazon.com/dp/B07LDXR7FY
Tactile Push Button (12mm 4-pin) The main mode button. Comes with colored caps.https://www.amazon.com/dp/B01E38OS7K
Half-Size Breadboard (400 points) Fits inside the enclosure with room to spare.https://www.amazon.com/dp/B0CTZCM2Y3
Jumper Wire Kit (Male to Male, Male to Female, Female to Female) You'll need all three types.https://www.amazon.com/dp/B01EV70C78
LEDs + 220Ω Resistors Kit This combo pack includes both LEDs in multiple colors and the resistors you need.https://www.amazon.com/dp/B07YWNHZHS
Resistor assortment (includes 220Ω) If you already have LEDs and just need resistors.https://www.amazon.com/dp/B0F4P352BB
Micro-USB Cable To connect the Pro Micro to your computer. Any standard Micro-USB cable works — you likely already have one.
Note on the sip-and-puff sensor: The exact sensor used in this build is a specialty assistive technology component not commonly sold on Amazon. The best place to source one is Enabling Devices(enablingdevices.com) or AbleNet (ablenetinc.com). Search for "sip and puff switch" on either site. For a fully DIY approach, the MPXV7002DP differential pressure sensor on a breakout board is the most popular Arduino-compatible option and is available on Amazon.
Tools
Soldering Iron Kit Everything you need to get started — iron, stand, solder wire, tips, flux paste, and sponge all in one box. Used both for soldering electronics and for melting holes in the 3D printed enclosure.https://www.amazon.com/dp/B087767KNW
Flush Cutters (Wire Cutters) For trimming LED legs and component leads flush after soldering. The sharp flush cut is important so trimmed legs don't stick up and short against other components. https://www.amazon.com/dp/B07GYS3V3S
Mini Hot Glue Gun For securing the sip sensor tube, IR sensor module, and any other components that need to be held in place inside the enclosure without screws. https://www.amazon.com/dp/B07K791YRP
Velcro Strips (Hook and Loop) For attaching the wire cover panel to the enclosure so it can be removed and reattached easily. https://www.amazon.com/s?k=velcro+strips+adhesive
3D Printed Parts
- Main enclosure body — https://www.tinkercad.com/things/h2seCVqsZdy-powerful-robo?sharecode=YWH3fM9iw0BpUWsBoyqUY4BS0SWfRBcCEWU3wnOC53A
- Top lid (soldered onto the body) — https://www.tinkercad.com/things/ieJ2S13GMwo-surprising-jarv-jaiks?sharecode=cNyZ_8bAMW2hvGS4RLdzXES-3Co2h3NK5gtJtLG7nPM
- Wire cover panel (attached with velcro) — https://www.tinkercad.com/things/8oXzioTweOa-ingenious-elzing?sharecode=e9HMNJD-zSIZJz26DeED2hDByTNXMtAAbDoEYikjb18
Software
- Arduino IDE (free, download at arduino.cc)
3D Print the Enclosure
Print all three parts before starting assembly. Recommended settings:
- Material: PLA or PETG
- Layer height: 0.2mm
- Infill: 20% or higher
- Supports: enabled for the main body (it has overhangs for the sensor mounts)
- No supports needed for the lid or wire cover
Main body holds the breadboard, joystick, and all wiring inside. It has mounting holes and slots on the top face for the sip-and-puff sensor and the IR sensor.
Top lid is designed to be permanently attached to the top of the main body using solder. This is intentional — heat from the soldering iron slightly melts the plastic at the contact points, creating a strong mechanical bond without screws or glue.
Wire cover panel covers the wiring harness that exits the bottom of the enclosure. Attach it with velcro strips so it can be removed when you need to access the wiring. You can also use zip ties, adhesive clips, or any other cable management method you prefer.
Prepare the Enclosure
Before fitting any components, prepare the plastic enclosure for wiring and mounting.
Making solder holes in the plastic: The soldering iron is used not just for soldering electronics, but also to melt clean holes and channels into the 3D printed plastic wherever wires need to pass through.
- Heat your soldering iron to full temperature
- Touch the tip briefly and lightly to the plastic surface where you need a hole — do not push hard, let the heat do the work
- For a clean round hole, use a circular motion with the tip
- For a wire channel along a surface, drag the tip slowly in a straight line
- Work in a ventilated area — melting PLA produces fumes
- Let the plastic cool for 30 seconds before touching it
Recommended holes to make now:
- One hole in the top face for the sip-and-puff tube to pass through
- One rectangular slot for the IR sensor face to sit flush with the side wall
- One hole on the side or bottom for the USB cable to exit
- A channel along the inside base for routing wires flat against the floor of the enclosure
Attaching the lid: Once you have confirmed all components fit, attach the lid permanently:
- Heat the soldering iron
- Hold the lid in position on top of the body
- Touch the iron briefly at 4-6 points around the perimeter where the lid meets the body
- The plastic will fuse at each point — you do not need a continuous seam
- Let it cool completely before handling
Set Up the Arduino IDE
Download and install the Arduino IDE from arduino.cc/en/software
Upload the Code
Copy the full code below into a new Arduino IDE sketch and save it.
To upload:
- Plug the Pro Micro into your computer via Micro-USB
- Click Upload (the → arrow) in the Arduino IDE
- The moment you see "Uploading..." at the bottom, quickly double-tap the RESET button on the Pro Micro
- The upload will complete automatically
- On success both LEDs will blink twice, then LED 1 stays on
Wire the Breadboard
Place the Pro Micro on the breadboard. All components connect to the breadboard rows next to the Pro Micro's pins.
Power:
- Pro Micro VCC → breadboard + rail
- Pro Micro GND → breadboard − rail
Push Button — Pin 2:
- One leg → pin 2
- Opposite leg → GND rail
- Leave the other two legs unconnected
Sip Sensor — Pin 3:
- Blue wire → pin 3
- Red wire → GND rail
- No VCC needed — passive switch
Microswitch — Pin 4:
- COM terminal → pin 4
- NO terminal → GND rail
- NC terminal → leave unconnected
IR Sensor — Pin 5:
- Module OUT → pin 5
- Module VCC → + rail
- Module GND → − rail
Joystick — A0, A1:
- VRx → A0
- VRy → A1
- VCC → + rail
- GND → − rail
LED — Pin 8:
- Pin 8 → 220Ω resistor → LED anode (longer leg)
- LED cathode (shorter leg) → GND rail
Note on modes and LEDs: This build uses only one LED. Mode 1 (Navigation) lights it on. Mode 2 turns it off. The LED blinks to confirm mode switches and button presses regardless of mode.
Fit Components Into the Enclosure
- Place the breadboard inside the main enclosure body. It should sit flat on the floor. Use the breadboard's own adhesive backing or a small strip of double-sided tape to hold it in place.
- Route the sip-and-puff sensor tube through the hole you made in the top face. The sensor body sits inside the enclosure. Use hot glue around the base of the tube where it meets the plastic to hold it in position.
- Fit the IR sensor into its slot in the side wall. The sensor face should sit flush with or slightly proud of the outer surface so it can detect movement in front of it. Use hot glue on the inside to secure it.
- Feed wires through the appropriate holes you melted earlier. Use the soldering iron to widen any hole that is too tight — always better to make the hole slightly larger than to force a wire through and damage the insulation.
- For any wire that runs along the inside of the enclosure, melt a shallow channel into the plastic floor using the soldering iron tip dragged along the surface. Press the wire into the channel while the plastic is still soft. It will grip the wire as it cools.
- Once all components are seated and wires are routed, attach the lid using the solder-fuse method described in Step 2.
Attach the Wire Cover
- Stick one side of a velcro strip to the back of the wire cover panel
- Stick the other side to the enclosure body just below the wire exit point
- Press the cover over the wire bundle and attach it to the velcro
- To access wiring in future, simply pull the cover away — the velcro allows it to be removed and reattached cleanly
If you prefer a permanent solution, hot glue, zip tie anchors, or small plastic clips all work equally well.
Test Everything
Before using the controller in daily use, test each input:
- Plug in via USB — LED should blink twice, then stay on
- Move the joystick — the mouse cursor should move
- Sip once — after about 1 second the mouse should left click
- Sip twice quickly — the mouse should right click immediately
- Trigger the IR sensor — macOS dictation should activate
- Press the microswitch — Siri should activate
- Short press the button — LED blinks once, joystick now scrolls instead of moving cursor
- Short press again — back to mouse mode
- Hold button 3 seconds — LED turns off (Mode 2)
- Hold button again — LED Back on (Mode 1)
Tuning and Customisation
All tunable values are at the top of the code:
ConstantEffect
JOY_DEADZONE
Increase if cursor drifts when joystick is untouched
MOUSE_MAX_SPEED
Raise for faster cursor, lower for finer control
MOUSE_ACCEL_CURVE
1.0 = linear speed, 2.0 = slow near center fast at edges
HOLD_DURATION_MS
How long to hold button for mode switch (default 3000ms)
DOUBLE_SIP_WINDOW
Time allowed between two sips for right click (default 1000ms)
Changing the dictation shortcut: The IR sensor double-taps the Right Command key, which is the default macOS dictation shortcut. If you are using Windows, change the IR sensor block in the code to:
cpp
Adding a third LED for Mode 3: Wire a third LED with a 220Ω resistor to pin 16. Then in the code change:
cpp
Add:
cpp
And update the updateLEDs() and blinkAllLEDs() functions to include PIN_LED_3.
Troubleshooting
Mouse is drifting with no input: Increase JOY_DEADZONE from 100 to 150 or 200.
Upload fails with port error: Use the double-tap reset trick — click Upload, then immediately double-tap the RESET button on the Pro Micro the moment "Uploading..." appears.
Sip is not registering: Check that the blue wire is connected to pin 3 and the red wire is connected to GND. Run the diagnostic test sketch and confirm pin 3 reads 0 when you sip.
Nothing is responding except the joystick: Your GND bus is likely not connected. Check that a wire runs from the Pro Micro GND pin to the breadboard − rail, and that every component has a leg on that rail.
Dictation is not activating: Go to Apple menu → System Settings → Keyboard → Dictation and confirm dictation is turned on. The shortcut must be set to double-tap Right Command.
Siri is activating instead of dictation (or vice versa): The microswitch triggers Siri (Cmd + Space) and the IR sensor triggers dictation (double Right Command). If these are swapped, your microswitch and IR sensor wires may be connected to the wrong pins.