Project Overview

TL;DR

  • DIY mouth-operated USB HID mouse for appr. 10$ in materials.
  • Built from hand-solderable, easy-to-source components and 3D-printed parts.
  • Custom PCB with an open-source firmware.
  • Includes a 3D-printed sip/puff pressure sensor.
  • Appears as a standard USB HID mouse can be calibrated via serial terminal.
  • Complete hardware files, firmware, BOM, and assembly instructions are available below.

Introduction

It has been a while since I published my design for a mouth-operated mouse in 2015 (3D Printed Mouth-Operated Mouse). Even after more than 10 years, it remains one of the designs that continues to receive a surprising amount of attention on Thingiverse. That made me think it might be worth revisiting the concept.

A lot has changed since then. Affordable PCB manufacturing has become widely available, electronic components are much easier to source, and 3D printing has evolved significantly, making it more accessible than ever. The DIY assistive technology ecosystem has also grown, with projects such as:

to name just a few.

Even so, I think there is still room for an updated version of my original design. My goals for this revision were:

  • Maintain the low cost, or reduce it even further.
  • Use components that are easy to source.
  • Optimize the design for production in small batches (5-10 units), for example in makerspaces.

Disclaimer

The design focuses on cost-effectiveness. However, it is not intended for mass production. All components have been chosen to be easily sourced in most locations. It does not use any parts that require specialized soldering equipment. The goal was to provide a product that can be assembled by a person with intermediate skills, for example in a makerspace, using a basic soldering iron and simple magnification, along with widely available consumables such as super glue and access to a 3D printer capable of printing PLA.

I hope this design is helpful or sparks some creative ideas! It’s not a ready-to-go product, though, so it does take a bit of skill to make and may not work perfectly on the first try. Have fun experimenting, and feel free to adapt it for your own projects. If you have any problems, I’m happy to help as long as I have the time, but if I’m busy, you’re on your own.

Design

The old design relied on off-the-shelf parts. Most of these were available from AliExpress-style shops, along with a pressure sensor salvaged from an e-cigarette. While this approach worked for some time, most of those parts are no longer available and have been difficult to source for quite a while.

Old Design

This time, I wanted to avoid those dependencies. The new design uses a custom double-sided PCB that can be ordered from your preferred PCB manufacturer. It exclusively uses components that can be soldered by hand with basic SMD soldering skills. There are no extremely fine-pitch parts or QFN packages. The BOM has also been optimized to keep both the total component count and the number of different component types as low as possible.

New PCB

One thing the design does not use is an off-the-shelf pressure sensor. I found that pressure sensors suitable for a project like this are either relatively expensive compared to the overall project cost or difficult to source. I recently wrote an article about how to build a pressure sensor using strain gauges and 3D printing. Developing that sensor was a prerequisite for this project, as I wanted a solution that was inexpensive and easy to source.

New Sensor

In addition to the pressure sensor and the assembled PCB, you’ll need a few 3D-printed parts, some hardware such as screws, and a length of silicone tubing.

Cost

The design mainly focuses on cost-effectiveness. To support that claim, I’d like to take a closer look at the actual cost breakdown.

The costs were calculated based on the components required to build 10 units. I did not cut corners on critical parts such as the joystick and generally chose components from well-known manufacturers. Most prices are based on listings from LCSC and AliExpress, so there is still some potential to reduce the overall cost further.

The calculation does not include taxes, shipping, customs fees, or assembly consumables such as solder, flux, adhesive tape, and similar materials.

The main takeaway is that the material cost of a single device is around 7 EUR (7.35 EUR). Even when accounting for the fact that many components must be purchased in larger quantities than required for a batch of 10 units, the effective cost remains below 10 EUR per device (9.88 EUR).

PCB

Item Remarks Quantity Order Quantity Order Cost Cost per Unit
PCB Lead-free 1 10 5.41 € 0.54 €
Capacitor 10 µF 5 100 7.35 € 0.37 €
Capacitor 100 nF 12 150 4.55 € 0.36 €
Capacitor 20 pF 2 50 1.10 € 0.04 €
Resistor 15 kΩ 7 100 0.30 € 0.02 €
Resistor 75 kΩ 3 100 0.31 € 0.01 €
Resistor 5.1 kΩ 3 100 0.30 € 0.01 €
Resistor 348 Ω 2 100 0.24 € 0.00 €
Resistor 51 Ω 2 100 0.30 € 0.01 €
Pushbutton 1 10 0.50 € 0.05 €
Joystick 1 10 10.69 € 1.07 €
Microcontroller 1 10 5.97 € 0.60 €
Voltage Regulator 2 30 14.95 € 1.00 €
Protection Diode 1 10 0.40 € 0.04 €
HX717 1 10 4.64 € 0.46 €
USB connector 1 10 3.06 € 0,31 €
Crystal 1 10 0.89 € 0.09 €
Total 4.98 €

Case

Item Remarks Quantity Order Quantity Order Cost Cost per Unit
Case 32.53 g PLA 32.53 g 1000 g 16.90 € 0.55 €
Screw M3×20 M3×20 5 50 5.59 € 0.56 €
Nut M3 5 50 4.49 € 0.45 €
1/4" Nut 1 10 2.49 € 0.25 €
Total 1.81 €

Sensor

Item Remarks Quantity Order Quantity Order Cost Cost per Unit
Sensor Body 1.45 g PLA 1.45 g 1000 g 16.90 € 0.02 €
Screw M2×5 2 50 0.73 € 0.03 €
Silicone Hose 160 mm 5000 mm 4.97 € 0.16 €
Wire 3 × 10 cm 300 mm 10000 mm 1.15 € 0.03 €
Strain Gauges BF350 2 10 1.59 € 0.32 €
Total 0.57 €

Assembly

To build the device, you will need the following parts:

  • Electronics
    • Assembled PCB
    • Assembled pressure sensor
  • 3D-Printed Parts
    • Case bottom
    • Case front cover
    • Spacer
    • Mouthpiece mount
    • Mouthpiece
    • Mounting nut cover
  • Hardware
    • 5× M3×20 screws (e.g. DIN 7985)
    • 5× M3 hex nuts (DIN 934)
    • 1× 1/4"-20 nut
    • 2× M2×5 countersunk screws (or self-tapping screws)
  • Silicone hose (4mm OD / 2mm ID)

Assembly overview

PCB

All files required to manufacture and assemble the PCB are available in the Releases section of the hardware repository.

To order the PCB, Gerber files are provided. For assembly, an interactive Bill of Materials (BOM) is also included.

Not every listed component needs to be populated. Components marked DNP (Do Not Populate) should be omitted. These parts are normally hidden in the interactive BOM.

New Sensor

Pressure Sensor

The pressure sensor is covered in a separate article. Please refer to:

3D Printed Pressure Sensor

Pressure sensor

UPDATE 09.08.2026: Alternative Pressure Sensor

There is a second option for the sensor. If you don’t want to build the DIY sensor, there is a commercial drop-in replacement. The XGZP160010S from CFSensor can be connected mostly in the same way as the DIY sensor.

Pressure sensor

To make mounting easier, a carrier PCB is provided here: https://codeberg.org/embedded-ideas/ahid_hw_cf_sensor_single/releases

Pressure sensor

There is an additional model for the back of the case that allows you to mount the assembled board. The connections to the board are as follows:

Pressure sensor

Remove R13 and R14 and connect the positive signal line from the sensor board to either the lower pad of R13 or the upper pad of R14. If you want, you can also bridge those pads, as they are connected anyway.

Pressure sensor

The sensor can be screwed to the case using two M3x6 mm screws and two M3 nuts.

Pressure sensor

Device Assembly

⚠️ Before starting assembly, make sure the firmware has been flashed onto the PCB.

New Sensor

  1. Insert the 1/4"-20 nut into the corresponding cutout in the case and secure it using the mounting nut cover.
  2. Insert an M3 nut into each of the four corner slots of the case.
  3. Connect the pressure sensor to the PCB using the solder pad connections.
  4. Mount the sensor inside the case using the two M2 screws. Make sure it is installed in the correct orientation.
  5. Carefully place the PCB into the case. Ensure that the sensor wires are routed underneath the PCB without being pinched. There should be a small gap between the PCB and the wires.
  6. Install the mouthpiece mount onto the joystick.
  7. Fit the front cover, making sure it is correctly oriented. The cover includes a cutout that aligns with the pressure sensor.
  8. Insert the remaining M3 nut into the slot of the mouthpiece.
  9. Slide the mouthpiece onto the mouthpiece mount.
  10. Install and tighten the M3 screw to secure the mouthpiece.
  11. Finally, connect the pressure sensor to the mouthpiece using the silicone hose.

Firmware

I have been trying to publish a new version of the original mouth-operated mouse for several years now. During that time, I actually completed two new hardware designs. The reason I never published them was that I couldn’t find the time to write the software the way I wanted.

This time, I wrote the software in a way that I believe is a step in the right direction. It’s now structured to be extendable and maintainable. It isn’t just a simple Arduino sketch, but it also isn’t quite what I ultimately want it to be. It’s fully usable, but it’s still a work in progress.

The goal is to create a fairly universal firmware that can implement more than just mouse functionality. The firmware should be configurable through profiles to adapt to specific tasks, and it should also be adaptable to different hardware devices.

Since implementing mouse functionality alone isn’t particularly challenging, the current firmware is more than sufficient for this project. However, I expect that future devices may make use of much more of its potential.

Currently, the inputs are mapped as follows:

  • Joystick movement controls the mouse cursor. When scroll mode is enabled, joystick movement scrolls the page instead.
  • Pressing the joystick toggles between “cursor mode” and “scroll mode”".
  • Pressure sensor inputs emulate the mouse buttons:
    • Sip = Left mouse button
    • Puff = Right mouse button

Flashing the Firmware

There are two ways to get the firmware onto the microcontroller. You can use the debug port and a wlink compatible debuger/programmer. For most people it will be easier to just use the integrated USB bootloader. When pressing the pushbutton on the board while powering up the device, it will enter the bootloader. You can then use e.g. a tool like wchisp to upload the firmware. I also provide a web-based version for flashing the firmware:

Firmware Flash Tool

Calibration

Before using the device, perform an initial calibration of the joystick and the pressure sensor. Calibration is done through a serial terminal. You can use a terminal program such as PuTTY or Minicom. If you prefer not to install any software, you can use my web-based terminal instead:

Serial Terminal

The cal command provides several subcommands for calibration. First, list all available inputs that can be calibrated:

cal list

> cal list
0: Joystick x-Axis
1: Joystick y-Axis
2: Pressure Sensor
>

To calibrate an input, use the cal start command followed by the input number. The calibration process will guide you through the required steps. If you are not satisfied with the result, simply do not confirm the calibration. The previous calibration will be restored automatically.

cal start

> cal start 0
Please don't operate Joystick x-Axis and leave it in the idle position!
Measuring baseline
Operate Left and leave idle afterwards.
Operate Right and leave idle afterwards.
Please test calibration:        0
Operate both functions (Left and Right) to keep the calibration.
Restoring previous calibration.
Done.
>

Repeat this process for all inputs. Once all channels have been calibrated, the device is ready for use.

Finally, store the calibration in persistent memory. If you skip this step, the calibration will be lost after the device is power-cycled.

cal write

> cal write
Calibration stored successfully!
>

Project files

The project is split into two repositories on Codeberg. One repository contains the hardware design along with the 3D models. The software is maintained as a separate project because it may be reused for other devices in the future. It is not intended to be used exclusively for the Mouth Operated Mouse II.

Hardware (Board and 3D-Models)

AHID Software