| .github | ||
| .vscode | ||
| cad | ||
| doc/img | ||
| electronics | ||
| firmware | ||
| scripts | ||
| util | ||
| __init__.py | ||
| .gitignore | ||
| LICENSE.txt | ||
| README.md | ||
SmartKnob
SmartKnob is an open-source input device with software-configurable endstops and virtual detents.
A brushless gimbal motor is paired with a magnetic encoder to provide closed-loop torque feedback control, making it possible to dynamically create and adjust the feel of detents and endstops.
Hardware
Designs
SmartKnob View
Premium SmartKnob experience. Under active development.
Not recommended for general use yet (mechanical and electrical revisions are planned).
Requires advanced soldering experience to build - reflow and/or small-pitch surface-mount soldering are required, and assembly is quite time-consuming and delicate.
Features:
- Powered by ESP32-PICO-V3-02 (Lilygo TMicro32 Plus module)
- 240x240 round LCD, protected by 39.5mm watch glass on rotor
- PCB flexure and strain gauges used for press detection (haptic feedback provided via the motor)
- 8 side-firing RGB LEDs (SK6812-SIDE-A) illuminate ring around the knob
- USB C (2.0) connector for 5V power and serial data/programming (CH340)
- VEML7700 ambient light sensor for automatic backlight & LED intensity adjustment
- Versatile back plate for mounting - use either 4x screws, or 2x 3M medium Command strips for mounting
- Front cover snaps on for easy access
Demo video
3D CAD
Latest Fusion 360 Model: https://a360.co/3BzkU0n
Base PCB
Note: use white soldermask, for reflecting light from RGB LED ring around the knob.
Screen PCB
SmartKnob Handheld
An exploration of a small handheld form-factor. Under active development.
SmartKnob Mini
Planned for the future.
Component Info
Magnetic encoders
MT6701 (MagnTek)
Excellent sensor at a reasonable price - highly recommended. Less noisy than TLV493D, and more responsive (control loop is more stable) using SSI.
- Lots of IO options - SSI, I2C, and ABZ - should offer good response latency
- SSI includes CRC to validate data
- No power-down or low-power options - may not be ideal for battery-powered devices
- Not available from US distributors (Mouser, Digi-Key)
TLV493D (Infineon)
A mediocre choice. Easy to prototype with using Adafruit's QWIIC breakout board.
In my testing, it is a little noisy, requiring filtering/smoothing that can slow responsiveness, hurting control loop stability. Or, with less filtering, the noise can easily be "amplified" by the derivative component in the PID motor torque controller, causing audible (and tactile) humming/buzzing.
There is also apparently a known silicon issue that causes the internal ADC to sometimes completely lock up, requiring a full reset and re-configuration. See section 5.6 in the User Manual
In the Master Controlled Mode (MCM) or the Fast Mode (FM) the ADC conversion may hang up. A hang up can
be detected by:
- Frame Counter (FRM) counter stucks and does not increment anymore.
In my experience testing 4 different Adafruit breakout boards, 2 of them (50%) regularly exhibit this lockup behavior within a minute or two of use. It is possible to detect and auto-reset (and there is code in the project to do so), but it is slow and may cause undesirable jumps/delays if the sensor locks up often.
AS5600 (AMS)
A mediocre choice. Cheap breakout boards are readily available.
In my testing, it's fairly noisy (anecdotally, noisier than the TLV493d), requiring filtering/smoothing that can slow responsiveness, hurting control loop stability. Additionally, it saturates at a lower magnetic field strength than other sensors I tested, requiring a significant air gap (8-10mm) when used with a strong neodymium diametric magnet like Radial Magnets 8995.
Motor drivers
TMC6300-LA
This is a relatively new IC and it's a perfect match! There generally aren't any other drivers (with integrated fets) that meet the requirements for the low-voltage and low-current motors used in this project (DRV8316 might work, but has not been tested).
Highlights:
- 2-11V DC motor supply input
- Up to 1.2A RMS
- Tiny (3x3mm QFN)
Motors
32mm Rotor, Hollow Shaft, Diametric magnet
- 32mm rotor
- 15mm overall height (including magnet), 12.75mm height w/o magnet, 9mm rotor height
- low/zero cogging - excellent for completely smooth input
- 5.9mm hollow shaft
- built-in diametric magnet for encoder
- Proven option
This is overall the easiest motor to get started with. Low cogging and a built-in diametric magnet are great!
~17mm Rotor
- Not tested yet
- Stepped 17.3mm and 16.3mm diameter rotor
- 11.2mm total height, 8.6mm rotor height
- moderate cogging - not ideal for completely smooth input
- Rotor has threaded hole on the side that should be usable for keying a cap
- Very little shaft accessible on bottom - may be tricky to mount a diametric magnet to it. Maybe could replace screw with something else?
Firmware
TODO
Acknowledgements
This project was greatly inspired by Jesse Schoch's video "haptic textures and virtual detents" and the corresponding discussion in the SimpleFOC community.
License
This project is licensed under Apache v2 (see LICENSE.txt).
Copyright 2022 Scott Bezek
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.





