QT Py Media Knob using rotary encoder & neopixel ring

Overview

QTPy-Knob

QT Py USB Media Knob using rotary encoder & neopixel ring

The QTPy-Knob features:

  • Media knob for volume up/down/mute with "qtpy-knob.py" CircuitPython program
  • Stylish design reminiscent of Griffin Powermate
  • Recessed USB-C connector to for safety
  • No screws needed for assembly
  • Only 3 wires needed to solder (none if you want to forgo LED lighting)
  • Reprogrammable for any USB macro key action via CircuitPython

A small video about it: https://www.youtube.com/watch?v=pt7JgoSlgOg

This is an attempt to make a minimal and easy-to-build version of similar, previous projects like:

Components

Parts needed:

Software

Software installation consists of:

  • Install CircuitPython on the QT Py
  • Install required CircuitPython libraries to QT Py
  • Copy qtpy_knob.py to QT Py

The CircuitPython installation step is described here: https://learn.adafruit.com/welcome-to-circuitpython/installing-circuitpython

The last two steps can be accomplished with the below

git clone https://github.com/todbot/qtpy-knob
cd qtpy-knob
pip3 install circup
circup install -r requirements.txt
cp qtpy_knob.py /Volumes/CIRCUITPY/code.py

Variations

There are a few variations of the code provided:

  • qtpy_knob_scroller.py -- performs scrolling instead of volume knob
  • qtpy_knob_simple.py -- no neopixel stuff, just encoder and USB sending
  • qtpy_knob_midi_cc.py -- sends MIDI CC instead of keyboard/mouse

Assembly

Steps:

  1. Plug rotary encoder to bottom of QT Py. If your encoder has metal on the bottom, add a bit of tape (Kapton, Scotch, electrical) in between the QT Py and the encoder. If your encoder has mounting tabs, cut them off. Solder the five pins.

  1. Print out the enclosure on your 3d printer. Standard 0.2mm at 20% infill is fine. The STL files are:
  • qtpyknob-base.stl -- Base that houses the QT Py & rotary encoder
  • qtpyknob-basecap.stl -- Cap that goes on the bottom of the base
  • qtpyknob-knob.stl -- Knob that you turn
  • qtpyknob-diffuser.stl -- Light diffuser that goes between base & knob, should be printed with translucent or clear plastic. Or you can leave it out. Or you can approxiate it with a disk cut out clear plastic like a CD case

Use the rotary encoder's washer & screw to hold QTPy+encoder assembly

  1. Solder three wires to the Neopixel ring, insert the ring into the enclosure and solder the wires to the 3V, Gnd, and MI pins of the QT Py. Use a bit of hot glue to secure the Neopixel ring if it doesn't snap in.

  1. Snap the bottom cap on and the knob top on and you're done with physical assembly!

Wiring diagram

Assembly animation

Useful links

Resources that helped me out on this:

You might also like...
PyTorch Implementation of VAENAR-TTS: Variational Auto-Encoder based Non-AutoRegressive Text-to-Speech Synthesis.
PyTorch Implementation of VAENAR-TTS: Variational Auto-Encoder based Non-AutoRegressive Text-to-Speech Synthesis.

VAENAR-TTS - PyTorch Implementation PyTorch Implementation of VAENAR-TTS: Variational Auto-Encoder based Non-AutoRegressive Text-to-Speech Synthesis.

[ICCV 2021] Encoder-decoder with Multi-level Attention for 3D Human Shape and Pose Estimation
[ICCV 2021] Encoder-decoder with Multi-level Attention for 3D Human Shape and Pose Estimation

MAED: Encoder-decoder with Multi-level Attention for 3D Human Shape and Pose Estimation Getting Started Our codes are implemented and tested with pyth

DeepLabv3+:Encoder-Decoder with Atrous Separable Convolution语义分割模型在tensorflow2当中的实现

DeepLabv3+:Encoder-Decoder with Atrous Separable Convolution语义分割模型在tensorflow2当中的实现 目录 性能情况 Performance 所需环境 Environment 注意事项 Attention 文件下载 Download

Code for the paper
Code for the paper "Adversarial Generator-Encoder Networks"

This repository contains code for the paper "Adversarial Generator-Encoder Networks" (AAAI'18) by Dmitry Ulyanov, Andrea Vedaldi, Victor Lempitsky. Pr

PyTorch implementation of SQN based on CloserLook3D's encoder

SQN_pytorch This repo is an implementation of Semantic Query Network (SQN) using CloserLook3D's encoder in Pytorch. For TensorFlow implementation, che

Trans-Encoder: Unsupervised sentence-pair modelling through self- and mutual-distillations

Trans-Encoder: Unsupervised sentence-pair modelling through self- and mutual-distillations Code repo for paper Trans-Encoder: Unsupervised sentence-pa

Torch-ngp - A pytorch implementation of the hash encoder proposed in instant-ngp
Torch-ngp - A pytorch implementation of the hash encoder proposed in instant-ngp

HashGrid Encoder (WIP) A pytorch implementation of the HashGrid Encoder from ins

This repository contains the data and code for the paper
This repository contains the data and code for the paper "Diverse Text Generation via Variational Encoder-Decoder Models with Gaussian Process Priors" (SPNLP@ACL2022)

GP-VAE This repository provides datasets and code for preprocessing, training and testing models for the paper: Diverse Text Generation via Variationa

A crossplatform menu bar application using mpv as DLNA Media Renderer.
A crossplatform menu bar application using mpv as DLNA Media Renderer.

Macast Chinese README A menu bar application using mpv as DLNA Media Renderer. Install MacOS || Windows || Debian Download link: Macast release latest

Comments
  • Renaming to avoid

    Renaming to avoid "-" and use "_".

    Thank you for this piece of code and great idea.

    Just a suggestion to avoid "-" into python file name and user "_" instead.

    This permit to never rename the original file from the project and have a code.py like this:

    import qtpy_knob_simple
    #import qtpy_knob_scroller
    #import qtpy_knob
    

    PS: I have both QT-Py and Seeduino XIAO in the same form factor... my QT-Py is more precious because it has reset button, Stemma-QT pin, RGB. So I wanted to rename the pin for XIAO use... but there is no need, your code works out of the box on the same physical pin with the same code. Only the through hole seems smaller on the XIAO so it does not fit perfectly flush. Did I mention it does also kind of work without soldering!!!

    opened by dglaude 5
  • minor issues around encoder fit

    minor issues around encoder fit

    Noticed a couple of things when using the specified Bourns PEC11-4215F-S24 encoder:

    1. The diffuser ring is too thick for the lock nut to fasten. It's 2 mm thick, and there's exactly 2 mm of thread left on the encoder.
    2. The D-shaft cutout in the top is too deep to allow the encoder shaft switch to trigger.

    Otherwise, it's a fantastic project and very easy to make. Yes, I used a Seeeduino XIAO, too

    Workarounds

    I made the central part of the diffuser thinner so the lock nut would fasten. Excuse the OpenSCAD, it's all I know:

    bbox = [ 49.988811, 49.994404, 2.000000 ];
    minima = [ -25.000000, -24.997202, 2.700000 ];
    
    difference() {
        translate([-bbox.x/2, -bbox.y/2, 0])translate(-minima)import("qtpyknob-diffuser.stl");
        translate([0,0,0.8])cylinder(d=bbox.x/2, h=bbox.z);
    }
    

    For the D-shaft cutout, a blob of Blu Tack of just the right size mostly fixes the issue.

    opened by scruss 4
Owner
Tod E. Kurt
multi geek, runs @thingm, maker of blink(1) USB LED & BlinkM, co-founder @CrashSpaceLA hackerspace. http://blink1.thingm.com
Tod E. Kurt
Implementation of Rotary Embeddings, from the Roformer paper, in Pytorch

Rotary Embeddings - Pytorch A standalone library for adding rotary embeddings to transformers in Pytorch, following its success as relative positional

Phil Wang 110 Dec 30, 2022
The DL Streamer Pipeline Zoo is a catalog of optimized media and media analytics pipelines.

The DL Streamer Pipeline Zoo is a catalog of optimized media and media analytics pipelines. It includes tools for downloading pipelines and their dependencies and tools for measuring their performace.

null 8 Dec 4, 2022
An implementation of a sequence to sequence neural network using an encoder-decoder

Keras implementation of a sequence to sequence model for time series prediction using an encoder-decoder architecture. I created this post to share a

Luke Tonin 195 Dec 17, 2022
Understanding and Improving Encoder Layer Fusion in Sequence-to-Sequence Learning (ICLR 2021)

Understanding and Improving Encoder Layer Fusion in Sequence-to-Sequence Learning (ICLR 2021) Citation Please cite as: @inproceedings{liu2020understan

Sunbow Liu 22 Nov 25, 2022
Official PyTorch implementation for Generic Attention-model Explainability for Interpreting Bi-Modal and Encoder-Decoder Transformers, a novel method to visualize any Transformer-based network. Including examples for DETR, VQA.

PyTorch Implementation of Generic Attention-model Explainability for Interpreting Bi-Modal and Encoder-Decoder Transformers 1 Using Colab Please notic

Hila Chefer 489 Jan 7, 2023
《LXMERT: Learning Cross-Modality Encoder Representations from Transformers》(EMNLP 2020)

The Most Important Thing. Our code is developed based on: LXMERT: Learning Cross-Modality Encoder Representations from Transformers

null 53 Dec 16, 2022
Official implementation for Likelihood Regret: An Out-of-Distribution Detection Score For Variational Auto-encoder at NeurIPS 2020

Likelihood-Regret Official implementation of Likelihood Regret: An Out-of-Distribution Detection Score For Variational Auto-encoder at NeurIPS 2020. T

Xavier 33 Oct 12, 2022
Official Implementation for "ReStyle: A Residual-Based StyleGAN Encoder via Iterative Refinement" https://arxiv.org/abs/2104.02699

ReStyle: A Residual-Based StyleGAN Encoder via Iterative Refinement Recently, the power of unconditional image synthesis has significantly advanced th

null 967 Jan 4, 2023
Implementation of Vision Transformer, a simple way to achieve SOTA in vision classification with only a single transformer encoder, in Pytorch

Implementation of Vision Transformer, a simple way to achieve SOTA in vision classification with only a single transformer encoder, in Pytorch

Phil Wang 12.6k Jan 9, 2023
A Joint Video and Image Encoder for End-to-End Retrieval

Frozen️ in Time ❄️ ️️️️ ⏳ A Joint Video and Image Encoder for End-to-End Retrieval project page | arXiv | webvid-data Repository containing the code,

null 225 Dec 25, 2022