DIY Left Hand Trackball With Adafruit ANO Encoder

by khôiv3 in Circuits > Arduino

119 Views, 2 Favorites, 0 Comments

DIY Left Hand Trackball With Adafruit ANO Encoder

Left hand trackball with Adafruit ANO Encoder

This project originates from the process of using Google Sheets and other applications. I tried using it in MS Excel but it was not effective. Therefore, it might be useful for you to use them in common applications.

Supplies

Parts

  1. 1 x QT Py RP2040 Adafruit
  2. 1 x ANO Directional Navigation and Scroll Wheel Rotary Encoder Adafruit
  3. 1 x Adafruit ANO Rotary Navigation Encoder to I2C Stemma QT Adapter Adafruit
  4. 1 x Trackball Breakout Pimoroni
  5. 2 x STEMMA QT / Qwiic JST SH 4-pin Cable - 100mm Long(or 50mm) Adafruit

Hardware

  1. M2.5 Socket Head Screws Amazon
  2. 4 × 4mm
  3. 4 × 5mm
  4. 4 × 6mm
  5. 4 x 3M Bumpon Adhesive Rubber Cushions(8mm) Amazon
  6. 12 x M2.5 Heat-Set Inserts Amazon

Tools

  1. 3D Printer, PLA filament (For print the mouse's case)
  2. Soldering Station (For install heat-set inserts)
  3. Ginelson Mini Router (For cut heat-set inserts off) Amazon

3D Printing & Assembly

IMG_0203.jpeg

You can download .stp from Step folder on my github

Once you have completed the 3D printing, install the heat-set Inserts into the designated positions.

Note: In this design, the wall on the Trackball side is quite thin, so you need to shorten the heat-set before assembly it.

image

Then connect each parts as below diagram

image

Software

Catboard1.png

First thing is to get the Adafruit QT Py RP2040 working in the Arduino IDE. You can follow this guide if you never done this before.

Once the board is working properly you can open the Arduino sketch located here and install the required libraries in your environment.

In order for the sketch to compile you will also need to change the USB stack to from Arduino to TinyUSB. You can read more on how to do that here.

image

Once the board flashed successfully you can unplug, open the serial console and plug it back in.

Functions

  1. The functions on seesaw ANO module include:
  2. Moving up, down, left, or right using the navigation buttons.
  3. Selecting an option with the middle button.
  4. Scrolling vertically or horizontally using the encoder(Switching between modes by holding the middle button for about 1 second).
  5. The same thing with Pimoroni trackball breakout module:
  6. Moving mouse pointer.
  7. Scrolling vertically or horizontally(Switching between modes by press trackball for about 1 second)

Youtube


FAQs

  1. The "TinyUSB_Mouse_and_Keyboard.h" library might not be available in the Arduino IDE. You can download it from here
  2. The "pimoroniTrackball.h" library can be downloaded from here
  3. The default address of the Seesaw is 0x49, and the Pimoroni Trackball Breakout is 0x0A. If your board is not configured this way or you are not using a STEMMA QT Cable, you can check the I2C port using the following steps:
  4. Install the "Adafruit_TestBed.h" library in your environment.
  5. Open the I2C_scan.ino example from this library.
  6. Upload the code to your board.
  7. After uploading, open the Serial Monitor to check the address of each board.
  8. You can check the events from each board using the original code provided here.
  9. The first time you compile the sketch, if the Arduino terminal displays something like the following issue, please check if your Arduino USB Stack is set to "Adafruit TinyUSB".
#include <HID.h>
^~~~~~~
compilation terminated. exit status 1 Compilation error: exit status 1
  1. You can refer to this project if you encounter other issues.