Skip to the content
PCBKitNew board
2 layers49.5 × 49.5 mmPixArt, the printed circuit board in 3D

PAJ7025R2 for 6dof tracking: code (Arduino, Windows) and PCB (KiCad).

Size
49.5 × 49.5 mm
Copper layers
2
Thickness
1.6 mm
Parts
4
Nets
19
Pads
32
Tracks, vias
48, 5
Pours
1
Routed
Yes
KiCad
KiCad 4
Created
13 May 2019
Updated
14 Sep 2021

Overview

PixArt is an open-source printed circuit board by trzy, from the trzy/PixArt repository on GitHub. It is a 2-layer board of 49.5 × 49.5 mm with 4 parts on 19 nets, routed with 48 tracks and 5 vias.

Its parts include 2 capacitors, 1 IC and 1 connector.

README

README.md

PixArt PAJ7025R2 6dof Tracking Demo with Arduino and Windows

Copyright 2017-2019 Bart Trzynadlowski

Overview

The PixArt PAJ7025R2 is an infrared camera with integrated DSP capable of tracking multiple IR light sources at high frame rates. Its predecessor was used in Nintendo's Wii Remote controller. Johnny Chung Lee, Oliver Kreylos, and Franklin Ta have each demonstrated how to use the Wii sensor for fun 6dof tracking applications.

In 2017, I got the idea to use the sensor in conjunction with Microsoft HoloLens for 6dof tracking of a tennis racket. I only got as far as fabricating a test PCB to mount the chip before I shelved it. Two years later, feeling bad that I had never done anything with the boards, I built a PC interface using Arduino and wrote a simple program to track and render an IR target in real-time.

Board connections

This repository includes:

  • Arduino code for the Adafruit Feather nRF52 Bluefruit LE (nRF52832) board
  • Windows code for pose estimation (OpenCV 4.0.1) and visualization (SDL2 and OpenGL)
  • PCB schematics and Gerbers files sent to PCB Unlimited for fabrication
  • Photographs of the assembled hardware, including a simple 9V battery-powered target with four 875 nm IR LEDs (TSHA4400) by Vishay Semiconductors.

The Arduino reads out the detection report for each frame and sends it to the Windows program, which runs OpenCV's perspective-n-point (PnP) solver to estimate the 6dof pose of a target with known dimensions.

A PAJ7025R3 part with a wider field of view exists. To my knowledge, it is the exact same IC but with a different lens, meaning a simple modification of the camera intrinsics in code/win32/src/include/pixart/camera_parameters.hpp would be the only change needed to support it.

Build Instructions

Arduino

The Arduino code is located in code/arduino/pa_driver. The other Arduino programs are simple tests. Follow the instructions from Adafruit for installing the BSP and loading the code onto the board.

Connections between the PixArt PCB and the Arduino board are listed in the table below.

PixArt PCBnRF52832
J1 (VDDMA)+3.3v (recommend pin nearest GND)
J2 (G9/CSB)A0
J3 (G10/SCK)SCK
J4 (G11/MISO)MISO
J5 (G12/MOSI)MOSI
J6 (GND)GND

Board connections

Windows

The Windows program located in code/win32 depends on:

Newer versions of Boost and OpenCV are untested but should work.

A Makefile for GCC on Windows is included. Edit the Search Paths section as needed. I used MSYS2 to install GCC and SDL2 via pacman. OpenCV and Boost were installed manually. Once ready simply run Make from the code/win32 directory in an MSYS2 shell or Windows Command Prompt:

text
make

Visual Studio users will unfortunately have to manually create a project. I will happily accept a pull request for Visual Studio or CMake.

Usage

In code/win32 run:

text
bin/object_visualizer.exe

Two windows will appear (probably atop each other), one showing the raw objects detected by the sensor and the other showing a visualization of a ping pong paddle in 3D. This assumes that an identical IR target to mine is being used. The target is defined in code/win32/src/apps/object_visualizer/perspective_window.cpp. If there is an error opening the COM port, make sure the USB drivers were installed. These should come bundled with the Arduino IDE but can also be obtained directly (instructions here).

To test without any hardware, some recorded data is provided in code/win32/recordings. For example, try:

text
bin/object_visualizer.exe --replay-from=recordings/paddle0.bin

To learn about command line options, run:

text
bin/object_visualizer.exe --help

Parts

4
QtyValueFootprintReferences
10.1uFCapacitors_THT:C_Disc_D3.8mm_W2.6mm_P2.50mmC2
110uFCapacitors_THT:CP_Radial_D10.0mm_P2.50mmC1
1PAJ7025PixArt:PAJ7025U1
1PIN HEADERMolex:Molex_KK-6410-06_06x2.54mm_StraightJ1

Questions

How big is the PixArt PCB?

It measures 49.5 × 49.5 mm and has 2 copper layers, 1.6 mm thick.

What parts does the PixArt use?

4 parts. 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 PixArt KiCad files?

From the trzy/PixArt repository on GitHub, at the commit this page was made from: the board is pcb/PixArt.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the PixArt design in my own project?

Its repository states no licence, so its author keeps all rights: ask trzy before reusing the design.

Similar boards

  • 2 layers18.5 × 26 mm24g2usb rp2350zero, the printed circuit board in 3D

    24g2usb rp2350zero

    joypad-ai/joypad-os

    Universal controller firmware for building adapters, dongles, and custom controllers.

    4 parts1.7kApache-2.0
  • 2 layers116 × 33 mm966595-1 and 963356-1, the printed circuit board in 3D

    966595-1 and 963356-1

    rusefi/rusefi

    rusefi - GPL internal combustion engine control unit

    4 parts1.2k
  • 2 layers19 × 18 mmDaughter board, the printed circuit board in 3D

    Daughter board

    hackclub/OnBoard

    💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

    4 parts915
  • 2 layers24.8 × 24.8 mmNrf24 breakout, the printed circuit board in 3D

    Nrf24 breakout

    tardate/LittleArduinoProjects

    a collection of "Little Electronic & Arduino Projects", most involving electronics or an Arduino in one way or another!

    4 parts803MIT
  • 2 layers26 × 20 mmCap chain, the printed circuit board in 3D

    Cap chain

    drandyhaas/KiCadRoutingTools

    A set of Python/Rust tools to aid routing in KiCad

    4 parts744MIT
  • 2 layers34.7 × 20 mmXG Station Power MSI, the printed circuit board in 3D

    XG Station Power MSI

    osy/XG_Mobile_Station

    Open source eGPU dock for ROG Ally and ROG Flow

    4 parts712CC-BY-4.0
  • 2 layers20.3 × 24.5 mmJack power input, the printed circuit board in 3D

    Jack power input

    Luos-io/luos_engine

    Open-source and real-time orchestrator for cyber-physical-systems, to easily design, test and deploy embedded applications and digital twins.

    4 parts546MIT