

Nrf52840 qfaa
Custom mouse using PMW3389 sensor and nRF52840 microcontroller
- Size
- 16 × 13.5 mm
- Copper layers
- 2
- Thickness
- 1.69 mm
- Parts
- 23
- Nets
- 44
- Pads
- 95
- Tracks, vias
- 218, 62
- Pours
- 8
- Routed
- Yes
- KiCad
- KiCad 9.0 (file 20241229)
- Created
- 2 Dec 2024
- Updated
- 30 Apr 2026
Overview
Nrf52840 qfaa is an open-source printed circuit board by cotty52, from the cotty52/Mouse repository on GitHub. It is a 2-layer board of 16 × 13.5 mm with 23 parts on 44 nets, routed with 218 tracks and 62 vias.
It is built around the NRF52840-QFAA-R. Its parts include 16 capacitors, 4 inductors, 2 crystals and 1 IC. It belongs with the nRF52 and nRF5x boards of this library.
Main components
1README
README.mdCustom Wireless Mouse
This project contains software and hardware designs for a custom wireless mouse. This is an initial prototype intended for me to learn about hardware design and embedded software development. I combined hardware and software files into one repository for easier management. As of 2026-04-21, the design supports basic mouse functionality, including movement, button presses, and scrolling, and is powered by a 3.7V Li-ion battery, rechargeable via USB-C.
File Structure
Mouse/
├── Documents/ # Datasheets, bootloader UF2, 3D models
├── Guide/
│ └── README.md # New machine setup guide
├── KiCad/ # PCB schematics and layout
└── Software/
├── PROJECT_GUIDE.md # Architecture, task tracking, module reference
└── ...Documentscontains datasheets, reference layouts, and documentation for the nRF Connect SDK and Zephyr project.Guidecontains the new machine setup guide (Guide/README.md) and dated snapshots of known-good board/config files.KiCadcontains the KiCad project files for the PCB design (schematics, PCB layout, Gerber files).Softwarecontains firmware source, board definitions, and configuration files. SeeSoftware/PROJECT_GUIDE.mdfor details.
Hardware Design
The hardware design is based on the nRF52840 because of its popularity/availability, built in Bluetooth, low power consumption, and integration with the nRF SDK for software development. The PCB was designed using KiCad and currently relies on a nRF52840 nice!nano microcontroller for higher level development in the early stages. The microcontroller includes a USB-C port for charging and firmware flashing, a charging protection circuit, and enough GPIO for this project. The design also includes a PMW3389 optical sensor for mouse movement, which is supported by the nRF SDK and Zephyr.
PCB Images
| Full | Front | Back |
|---|---|---|
Software Design
The software is developed using the nRF Connect SDK, which is based on the Zephyr RTOS. The nRF Connect VS Code extension is used for development, which provides a convenient interface for firmware development. The base structure is copied directly from the nRF Desktop sample project, which provides a good starting point for developing a Bluetooth mouse. The sample provides support for Bluetooth connectivity, mouse movement, button presses, and scrolling out of the box, with additional features available to be toggled on/off using the Kconfig GUI. The sample also provides sample mouse configurations as well as a PMW3360 driver, which is similar to the PMW3389. These files serve as a reference for the development of custom hardware and application files for the custom mouse.
Current Problems
As of 2026-04-27 there are a couple major issues. The primary issue is the nice!nano board itself. While it was a good microcontroller to get started with this project and to learn about the basics, it was sometimes difficult to work with. Even though there are SWD pads on the back of the board, I could not get it to work with my nRF52840-DK. I also could not get bluetooth to work on the nice!nano, which is why I switched to the nRF52840-dongle for the most recent development. The dongle is meant to be a receiver, but it has enough gpio to connect everything; and since it is a nordic product, development was much easier.
The second problem was with the pmw3389 sensor. I have not figured out why it was not working with my PCB, but I was able to get it working with a breakout board. A multimeter showed that the voltage at the VDD pin was not stable and would start below 1.9V, then rise to above 1.9V. This leads me to believe my step-down circuit is wrong; either I got the calculations for the resistors and capacitors wrong, or the buck converter was not soldered properly. I used a microscope and the connections looked good, but it is very small so it's possible there is a cold solder joint or something else I missed.
Future Improvements
The next step is to design the PCB without the nice!nano which will require using the nRF52840 SoC directly. This will involve further researching the nRF52840 for proper implementation as well as designing power management and charging circuits. I will also need to decide on whether to use an SoC with an included antenna or design one myself.
Becasue of the problems with the pmw3389, I will not use the TPS62821DLCR buck converter. I will probably use a linear step-down regulator instead, which will be less efficient but much simpler to implement.
On the software side, the next step is to develop custom application code for the mouse which will allow users to customize the behavior of the mouse, such as button mapping and sensitivity settings.
Parts
23| Qty | Value | Footprint | References |
|---|---|---|---|
| 5 | 100nF | CAPC0603X03L_C:CAPC0603X03L_C | C5, C6, C7, C8, C12 |
| 2 | 1.0µF | Passive:CAPC1005X04L | C13, C14 |
| 2 | 12pF | Capacitors$:CAPC0603X03L_C | C1, C2 |
| 2 | 12pF | CAPC0603X03L_C:CAPC0603X03L_C | C16, C17 |
| 1 | 1.0pF | Capacitors$:CAPC0603X03L_C | C3 |
| 1 | 1.2pF | Capacitors$:CAPC0603X03L_C | C4 |
| 1 | 100pF | Passive:CAPC0603X03L_C | C11 |
| 1 | 10µH | 0603:INDC1608X06L | L3 |
| 1 | 15nH | 0402:INDC1005X04L | L4 |
| 1 | 2.2nH | Passive:INDC0603X03L_C | L2 |
| 1 | 32.768kHz | pcblib:XTAL_2012 | X2 |
| 1 | 32MHz | Parts$:XTAL_2016_NT | X1 |
| 1 | 4.7nH | Inductors$:INDC0603X03L_C | L1 |
| 1 | 47nF | Capacitors$:CAPC0603X03L_C | C15 |
| 1 | N.C. | Parts$:CAPC0603X03L_C_NC | C10 |
| 1 | nRF52840-QFAA | Misc:QFN40P600X600X90-48N | U1 |
More from cotty52/Mouse
2- 2 layers50 × 73 mm

- 2 layers18.1 × 33.3 mm

Similar boards
- 4 layers55 × 20 mm

Substrate PocketMusic3
SubstrateElectronics/SoundStick
An eraser sized music player/walkie-talkie supporting Bluetooth and SD card playback.
66 parts1CERN-OHL-W-2.0 - 4 layers17.8 × 21 mm

Devboard
aethern1k4-stack/XIAO-recreation
A recreation of XIAO nrf 52840 board for educational purposes
71 parts - 4 layers21 × 17.8 mm

- 4 layers50 × 24 mm

Ghostbus
jayis1/hacker-devices
Full-cycle hardware designs for security research devices — each device is a subfolder with its own README, schematics, PCB layout, and software stack
18 parts2 - 4 layers180 × 120 mm

Device
jayis1/hardware-design-lab
Full-cycle hardware device designs — each device in its own subfolder with architecture, schematics, PCB layout, and software stack
21 parts - 2 layers65 × 56 mm

- 2 layers14 × 100 mm

Yunomi
google/mozc-devices
Circuit diagrams and firmware source code for Gboard DIY keyboards
23 parts3kApache-2.0 - 2 layers50.8 × 52.2 mm

Questions
How big is the Nrf52840 qfaa PCB?
It measures 16 × 13.5 mm and has 2 copper layers, 1.69 mm thick.
What parts does the Nrf52840 qfaa use?
23 parts, built around the NRF52840-QFAA-R. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
Where can I download the Nrf52840 qfaa KiCad files?
From the cotty52/Mouse repository on GitHub, at the commit this page was made from: the board is Documents/nrf-documents/nRF52840-QFAA Reference Layout 1_0/Altium Designer files/nrf52840_qfaa/nrf52840_qfaa.kicad_pcb and its schematic KiCad/Mouse_Project.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the Nrf52840 qfaa design in my own project?
Its repository states no licence, so its author keeps all rights: ask cotty52 before reusing the design.