Skip to the content
PCBKitNew board
2 layers9 × 9 mmDpoint, the printed circuit board in 3D

Open-source digital stylus using camera tracking and inertial measurements

Size
9 × 9 mm
Copper layers
2
Thickness
1.6 mm
Parts
6
Nets
4
Pads
11
Tracks, vias
14, 0
Routed
Yes
KiCad
KiCad 7 (file 20221018)
Created
13 May 2023
Updated
27 Nov 2023

Overview

Dpoint is an open-source printed circuit board by Jcparkyn, from the Jcparkyn/dpoint repository on GitHub, published under the MIT licence. It is a 2-layer board of 9 × 9 mm with 6 parts on 4 nets, routed with 14 tracks and 0 vias.

It is built around the HSFPAR003A. Its parts include 4 connectors, 1 capacitor and 1 IC.

Main components

1

README

README.md

D-POINT: Digital Pen with Optical-Inertial Tracking

D-POINT is an open-source digital stylus that uses camera tracking and inertial measurements to achieve 6DoF (six degrees of freedom) inputs, with low latency, pressure sensitivity, and sub-millimetre accuracy. The stylus can be used on any flat surface, and works with consumer-grade webcams.

This project was part of my undergraduate thesis for electrical engineering. I've open-sourced the code and design files in the hopes that they might be useful to somebody, but it's not intended to be a "plug and play" DIY project. If you want to try building it anyway, follow the setup guide.

Design

This is a very brief overview of how the system works. For all the details, plus literature review and lots of evaluation, read the full thesis (note: I haven't published this online yet).

Block diagram showing how the system works

Hardware

The main body of the stylus was 3D printed as two halves, shown below. The stylus contains a force sensor, a Li-ion battery which charges over USB-C, and an Arduino-based development board for logic and Bluetooth. Eight printed ArUco markers are glued to the back of the stylus, for visual pose estimation.

CAD drawing showing the hardware design of the stylus

Visual pose estimation (VPE)

The VPE process involves the four main steps:

  1. Marker detection: First, we use OpenCV to detect the corners of each visible ArUco marker on the stylus.
  2. Rolling shutter correction: We use a simple 2D motion model to estimate and correct for the effects of rolling shutter on the observed corner locations.
  3. Perspective-n-Point (PnP): From these corner positions, we use a PnP algorithm to estimate the pose of the stylus relative to the camera. When possible, we use the pose from the previous frame as a starting point to refine with virtual visual servoing (VVS), otherwise we fall back to SQPnP.
  4. Coordinate conversion: Using the calibrated pose of the stylus and the drawing surface relative to the camera, we calculate the position and orientation of the stylus tip relative to the drawing surface.

Inertial fusion

We use an Extended Kalman Filter (EKF) to fuse the VPE estimates with the inertial data from the accelerometer and gyroscope, and refine the estimates in real-time using the Rauch-Tung-Striebel (RTS) algorithm. To account for time delay from the camera frames, we use a negative-time measurement update algorithm. The EKF is implemented using NumPy and Numba.

Using inertial measurements allows us to dramatically reduce latency compared to a camera-only implementation, while also improving accuracy and report rate for fast movements.

Parts

6
QtyValueFootprintReferences
4Conn_01x01_SocketConnector_Wire:SolderWire-0.5sqmm_1x01_D0.9mm_OD2.1mmJ1, J2, J3, J4
10.1uCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC1
1HSFPAR003AFootprints:Alps_HSFPAR003AU1

Questions

How big is the Dpoint PCB?

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

What parts does the Dpoint use?

6 parts, built around the HSFPAR003A. 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 Dpoint KiCad files?

From the Jcparkyn/dpoint repository on GitHub, at the commit this page was made from: the board is electronics/dpoint.kicad_pcb and its schematic electronics/dpoint.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Dpoint design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).

Similar boards

  • 2 layers18.5 × 11.1 mmSwitch, the printed circuit board in 3D

    Switch

    byrantech/laptop

    anyon_e, a highly integrated, high end, open source laptop. Attempt the impossible.

    6 parts4.3kMIT
  • 2 layers14.6 × 33 mmBrain board SD Card 1, the printed circuit board in 3D

    Brain board SD Card 1

    rusefi/rusefi

    rusefi - GPL internal combustion engine control unit

    6 parts1.2k
  • 2 layers51.5 × 16.6 mmMicroswitchXY Endstop, the printed circuit board in 3D

    MicroswitchXY Endstop

    VoronDesign/Voron-Hardware

    Cool Hardware designed by the Voron Design group

    6 parts1.1kGPL-3.0
  • 2 layers21.9 × 76.7 mmAmiga External, the printed circuit board in 3D

    Amiga External

    hoglet67/RGBtoHDMI

    Bare-metal Raspberry Pi project that provides pixel-perfect sampling of Retro Computer RGB/YUV video and conversion to HDMI

    6 parts1kGPL-3.0
  • 2 layers88.9 × 50.8 mmBusinesscard, the printed circuit board in 3D

    Businesscard

    hackclub/OnBoard

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

    6 parts915
  • 2 layers20.3 × 15.2 mmL0 RGB led, the printed circuit board in 3D

    L0 RGB led

    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.

    6 parts546MIT
  • 2 layers9 × 3.6 mmOpticalEncoder, the printed circuit board in 3D

    OpticalEncoder

    adamb314/ServoProject

    Getting the most out of your hobby servo

    6 parts545
  • 2 layers35.1 × 92.1 mmMicroSD Express Sniffer, the printed circuit board in 3D

    MicroSD Express Sniffer

    NVNTLabs/switch2-SDEX2M2

    Micro SD Express to M.2 NVME Adapter for Nintendo Switch 2

    6 parts542GPL-3.0