Mad-mouse
Custom USB mouse based on RP2040 and PixArt PAW3327DB optical sensor.
Designed as a fully programmable mouse platform with RGB lighting, encoder, and extra buttons.
What’s on the board
- RP2040 microcontroller
- USB HID device (mouse)
- SPI master for sensor communication
- PAW3327DB optical sensor
- High-performance gaming-grade sensor
- Mounted with dedicated footprint and PCB cutout per datasheet
- User inputs:
- 2× main mouse buttons (L/R)
- 1× scroll wheel encoder with button
- 2× side functional buttons
- Lighting:
- 12× addressable RGB LEDs (WS2812)
- Connectivity:
- USB via Type-C (direct HID device)
Pinout (RP2040 ↔ PAW3327DB)
| RP2040 GPIO | PAW3327DB Signal | Notes |
|---|---|---|
| GPIO13 | SCLK | SPI clock |
| GPIO14 | ISS | Chip select |
| GPIO15 | MOSI | SPI data out |
| GPIO16 | MISO | SPI data in |
| GPIO17 | IRQ | Sensor interrupt |
Power & Form Factor
- Powered directly from USB Type-C
- Compact mouse-shaped PCB with cutout for PAW3327DB lens
- Integrated lighting and buttons on-board
Use Case
- Fully programmable USB mouse for PC
- Customizable firmware (via TinyUSB / Pico SDK)
- Can be extended with macros, DPI switching, lighting control
Quick Use
- Connect Mad-mouse to PC via USB-C.
- Flash firmware (UF2 bootloader on RP2040).
- Device enumerates as USB HID mouse.
- Test motion, buttons, scroll, and LED patterns.
Notes
- PAW3327DB requires precise mounting height and lens alignment (per datasheet).
- WS2812 LEDs need sufficient decoupling and stable 5 V supply.
- Encoder can be configured with RP2040 PIO/IRQ for accurate scroll detection.
Vitaly Kornilov
Stefan Wagner
Bitmerse LLP