This project features a compact, custom-built USB HID (Human Interface Device) that enables tactile interaction with digital media through a rotary encoder. By bypassing traditional on-screen controls, this device provides dedicated physical inputs for volume adjustment, playback, and track skipping.
![]() |
![]() |
|---|
To successfully build this project, ensure you have the following components:
- Microcontroller: OSOYOO R3 UNO (ATmega328P + ATmega16U2).
- Input: 1x Rotary Encoder with a clickable dial.
- Capacitors: A total of 100nF is required for bootloading. (e.g., three 30nF and one 10nF capacitors in parallel).
- Wiring: Jumper wires and a breadboard.
- Enclosure: 3D printed case and knob (see 3D Printing).
Standard Arduino Uno R3 boards do not natively support USB HID functions. This project uses HoodLoader2 firmware to reprogram the ATmega16U2 chip.
Install these libraries via the Arduino IDE Library Manager:
- OneButton (by Matthias Hertel): Handles clicking logic.
- Adafruit Rotary Encoder Library: Manages encoder rotation.
Reprogramming requires separating the microcontrollers into independently programmable units.
- Suggest Method: Use the Installation Sketch method for a standalone Arduino Uno.
- Wiki Reference: Follow the full Hardware Installation Guide on the HoodLoader2 wiki.
- Stability: Ensure the 100nF capacitor is used. Capacitance values below 100nF will cause flashing failures.
Once the firmware is flashed, connect the encoder to the 16U2's serial interface data ports.
- Pins: The encoder requires 3 data pins (CLK, DT, SW) plus VCC and GND.
The enclosure consists of three parts matching the provided .stl files:
- Models:
- Slicing: Use software like Ultimaker Cura or PrusaSlicer.
- Print Reliability: Add a brim to ensure the case does not detach.
- Tolerances: The top part includes an extrusion to fit the base snugly.
Once connected, the device follows this logic:
| Input Action | Resulting Function |
|---|---|
| Rotate Clockwise | Volume Up |
| Rotate Counter-Clockwise | Volume Down |
| Single Click | Play / Pause Toggle |
| Double Click | Skip Forward (Next Song) |
| Triple Click | Skip Backward (Previous Song) |

