Getting Started with KiCad

Designing a custom PCB for XIAO RP2040 and PixArt PMW3360 sensor.

Tags

kicad, eda, xiao rp2040, pixart pwm3360, pcb, microcontroller, sensor

Week 5

design a circuit

Getting Started with KiCad
Cover image for Getting Started with KiCad

Assignment

  • group assignment
    • use the test equipment in your lab to observe the operation of an embedded microcontroller
  • individual assignment
    • use an EDA tool to design an embedded microcontroller system using parts from the inventory, check its design rules for fabrication, and simulate its operation
    • extra credit
      • try another design workflow
      • design a case

Something useful for the final project

As previously mentioned in my first week's post, I'm planning to make a version of Memex by reimagining the modern web browser experience with low tech. One of the key components is the scrolling mechanism, which I'm imagining to use a trackball device to control the scrolling. After some googling on the optical sensor for the trackball (I've thought about purely mechanical solutions like a wheel or a ball, but this part of the class is about electronics so here we are), I found the PixArt PMW3360 sensor.

Diagram of a potential scrolling mechanism.
Diagram of a potential scrolling mechanism.

PixArt PMW3360

PixArt PMW3360 is an optical mouse sensor found in many mice and trackballs. Here's the datasheet for the PixArt PMW3360 sensor. On page 8, it seems that the sensor comes with a chip and a lens, but the customer will have to supply their own breakout PCB and base plate for the lens.

PixArt PMW3360 sensor exploded assembly view
PixArt PMW3360 sensor exploded assembly view

There are a few vendors that sell the sensor with their own breakout PCB, for example Joe's Sensors and Sundry on LECTRONZ.com. Although I'll probably opt for a bare sensor from AliExperess, in the spirite of the class, I do appreciate their open source effort in designing the breakout PCB. I also stumbled upon a few other open source PCD designs, such as this one by kbjunky, and this one by jfedor2 (specifically for the RP2040).

Joe's Sensors and Sundry PMW3360 sensor with custom PCB
Joe's Sensors and Sundry PMW3360 sensor with custom PCB
jfedor2's custom PCB for RP2040 & PMW3360
jfedor2's custom PCB for RP2040 & PMW3360

These open source designs saved me a lot of time reading the datasheet and understanding the sensor.

I also found a symbol and footprint for the sensor on SnapMagic created by trimenz. After eyeballing the footprint against the datasheet, the schematic is missing some pins for reason I don't know. So I'm not using it.

Symbol and footprint for the PixArt PMW3360 sensor on SnapMagic
Symbol and footprint for the PixArt PMW3360 sensor on SnapMagic

KiCad

Because of my limited experience (all of my experience is limited to Quentin's recitation), I decided to take a look at jfedor2's kicad project file.

jfedor2's kicad PCB file, which looks quite complicated
jfedor2's kicad PCB file, which looks quite complicated

The schematics has quite a some parts - flash, crystal, GPIO pins breakout, etc. I'm not sure exactly what they do yet. My plan is to modify this open source schematic to fit my XIAO RP2040 board.

jfedor2's kicad schematics file
jfedor2's kicad schematics file

TO BE ADDED.

References