SensorLib 0.5.0
Multi-platform sensor driver library for Arduino, PlatformIO, and ESP-IDF
Loading...
Searching...
No Matches
SensorPawA350.hpp File Reference

@license MIT License More...

Include dependency graph for SensorPawA350.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  SensorPawA350
 PAW-A350 Optical Finger Navigation Sensor Driver. More...
 
struct  SensorPawA350::MotionData
 Motion Delta Data. More...
 

Detailed Description

@license MIT License

Copyright (c) 2026 lewis he

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Author
Lewis He (lewis.nosp@m.he@o.nosp@m.utloo.nosp@m.k.co.nosp@m.m)
Date
2026-04-11

PAW-A350 Optical Finger Navigation (OFN) Sensor Driver

Overview

The PAW-A350 is an optical finger navigation sensor from PixArt Imaging. It provides motion detection and finger tracking capabilities through an I2C interface. The sensor measures surface motion by comparing successive images of the fingerprint and calculating the displacement.

Features

  • I2C interface (slave address 0x33)
  • Count per inch (CPI) resolution: 125, 250, 500, 750, 1000, 1250
  • 8-bit two's complement motion delta output (-128 to +127)
  • Multiple power management states: Run, Rest1, Rest2, Rest3
  • Configurable LED drive current and shutter control
  • Motion interrupt support

Register

Address Register Name Description
0x00 PRODUCT_ID Unique chip identification (default: 0x88)
0x01 REVISION_ID IC revision number
0x02 EVENT Event status register (motion, reset, FPD)
0x03 Delta_X X movement delta (8-bit signed)
0x04 Delta_Y Y movement delta (8-bit signed)
0x11 Rest1_Period Rest1 frame period
0x13 Run_Downshift Run to Rest1 downshift time
0x15 Rest1_Downshift Rest1 to Rest2 downshift time
0x16 Rest2_Period Rest2 frame period
0x17 Rest2_Downshift Rest2 to Rest3 downshift time
0x18 Rest3_Period Rest3 frame period
0x1A LED_CTRL LED control and drive current
0x3A SOFT_RESET Software reset (write 0x5A)
0x3B Shutter_Max_Hi Shutter max open time (upper byte)
0x3C Shutter_Max_Lo Shutter max open time (lower byte)
0x62 CPI_SEL Count per inch resolution setting
0x74 MOTION_CTRL Motion interrupt threshold control
0x7A FPD_FLAG Finger presence detect flag

Management Features

The sensor supports 4 power states to reduce power consumption:

  1. Run State - Full operation, highest power consumption
  2. Rest1 State - Reduced frame rate after Run_Downshift time
  3. Rest2 State - Further reduced frame rate after Rest1_Downshift time
  4. Rest3 State - Lowest frame rate, minimal power

Downshift timing formulas:

  • Run_Downshift: RD[7:0] x 8 x 8ms (default: 256ms)
  • Rest1_Period: (R1R[7:0] + 1) x 10ms (default: 20ms)
  • Rest1_Downshift: R1D[7:0] x 16 x Rest1_Period (default: 9.92s)
  • Rest2_Period: (R2R[7:0] + 1) x 10ms (default: 100ms)
  • Rest2_Downshift: R2D[7:0] x 128 x Rest2_Period (default: 10min)
  • Rest3_Period: (R3R[7:0] + 1) x 10ms (default: 500ms)

Definition in file SensorPawA350.hpp.