Commit Graph

107 Commits

Author SHA1 Message Date
Scott Bezek
4eb988399c
Update README.md
link to quick video playback control demo video
2024-01-22 00:05:19 -08:00
Grigorii Merkushev
8700af8a24
Fine tuning for esp32s3 (#143)
- exposed strain SCK and DO
- use 12 bit PWM (instead of 16 bit) for screen brightness on s3
- added option to use uart serial for s3
- bump nanopb/Nanopb @ 0.4.7
- fixed SPI bus alias and DMA channel for s3

---------

Co-authored-by: Scott Bezek <scottbez1@gmail.com>
2023-11-13 22:42:44 -08:00
Scott Bezek
370b8ca92b BOM - Replace discontinued C2922480 with C15850
Fixes #139 - thanks @lorhof1 and @Wilgelmy
2023-10-28 15:50:58 -07:00
Scott Bezek
6d946c49e5 Handle RequestState messages; update python example 2023-10-28 15:42:28 -07:00
VIPQualityPost
dafc5ca1e2
peg sfoc version (#141)
nanofoc simpleFOC version peg at 2.3.0

Fixes #140
2023-10-18 10:54:03 -07:00
Scott Bezek
406dbb08ec Minor README updates 2023-09-10 17:50:10 -07:00
Scott Bezek
2eddc13528 Add a bunch of proto documentation 2023-09-10 17:25:23 -07:00
Scott Bezek
590ba8850c
Demo improvements (#135)
- LED hue config
- press state reporting
- custom display modes for timeline demo
2023-09-10 15:44:00 -07:00
Scott Bezek
3cff3533d7
Update README.md 2023-07-29 15:50:09 -07:00
Scott Bezek
1e2b1983c2 Fix GitHub Actions path filters w/ globs 2023-07-09 17:40:41 -07:00
Scott Bezek
d1495a8334 Strain calibration 2023-07-09 17:25:18 -07:00
Scott Bezek
1d2458b28a
Web Serial library and demo (#125)
- reworked smartknobjs into separate smartknobjs-node and
smartknobjs-webserial packages
- configured CI to build and deploy webserial example to
https://scottbez1.github.io/smartknob/
2023-06-20 00:13:25 -07:00
Scott Bezek
948297fa82
Implement persistent configuration/calibration storage using FFAT (#124)
Reintroduces persistent configuration from #122, but using FFAT instead
of SPIFFS, since SPIFFS had bad performance impacts on the motor control
loop.
2023-06-19 13:13:08 -07:00
Scott Bezek
0ebbcc8c23 Revert "SPIFFS persistent storage for motor calibration (#122)"
Seems to be causing weird behavior/performance with the motor control loop, particularly noticeable with fine detents. Reverting for now until I have a chance to investigate further.

This reverts commit 1d73af17cc.
2023-06-17 10:54:55 -07:00
Anders Einar Hilden
231b75eca9
Add more info on printed parts to README.md (#123)
Co-authored-by: Scott Bezek <scottbez1@gmail.com>
2023-06-17 10:49:36 -07:00
Scott Bezek
d64cc55432 Add missing partition file and update GH actions to run nanofoc build 2023-06-16 09:21:13 -07:00
Scott Bezek
1d73af17cc
SPIFFS persistent storage for motor calibration (#122)
- New Configuration class for managing persistent configuration
- New proto messages for serialized configuration, with flexibility for
expansion
- Load persistent configuration at startup, if available, use for
default motor calibration
- Save motor calibration to persistent configuration file
2023-06-14 22:43:20 -07:00
Scott Bezek
2afc38f7f9
Updated config schema, improved demo (#121)
- Breaking proto updates
- added position nonce to config, and added ability to specify a
sub_position via config as well => more flexibility to control position
via config
- added version as first field of serial protocol messages, so future
breaking proto updates can easily be detected and ignored
- Fixed up web-based demo of a mock video editor/timeline jog/playback
controller
- Fixed config/state flow so that mode changes correctly maintain
playback position
  - Demo: https://www.youtube.com/watch?v=J9192DfZplk
2023-06-13 22:45:49 -07:00
Scott Bezek
08146e292d Add some basic bounds checking during calibration 2023-06-13 22:29:40 -07:00
Baku 麦
3fdd9fa601
Use TFT_eSprite.drawNumber for the current position (#118)
I would suggest using `drawNumber` instead of drawString to align each
digit of the number to the same width and erase the jittering effect
when the current position is changed.
2023-06-13 22:03:57 -07:00
Scott Bezek
9903ac63e6
NanoFOC/ESP32-S3 support (#117)
- New PlatformIO env (`nanofoc`) for the NanoFOC hardware
  - Huge thanks to @lgc00 for the initial NanoFOC configuration and prototyping!
  - Uses `HWCDC` rather than `UartStream` as the serial `Stream` interface (ESP32-S3 specific change)
  - Support for MAQ430 magnetic encoder sensor
  - Motor-specific PID tuning constants moved to separate header files

---------

Co-authored-by: lgc00 <lgcasd1+1@gmail.com>
2023-05-29 17:17:55 -07:00
Scott Bezek
4a1d2bee77
Update README.md
Link to new firmware/software guide, other cleanup/updates.
2023-02-10 23:44:14 -08:00
Scott Bezek
acfc85f72b
Python software example (#106)
Add protobuf/cobs/crc32 framework code and a really basic python example
2023-02-04 12:34:12 -08:00
Scott Bezek
9431ed3971
New detent configurations (magnetic and biased-to-center) and demo React app (#105)
Breaking change to protobuf messages to support new detent configurations - adds more flexibility compared to existing config parameters (e.g. min/max position rather than just number of positions).

New magnetic detent mode allows for config to specify up to 5 nearest detent positions (with smooth scrolling in between them); the intent is a higher-level controller (e.g. connected demo app, see below) to dynamically update that list as the position changes, in order to support an unlimited number of magnetic detents.

---

React demo app implements a mock video editor timeline, with the ability to interact with it via the SmartKnob connected over USB serial. (Currently uses a node backend to stream config/state to the frontend via websockets, but it would probably be possible to do everything on the frontend with webserial in the future?).

The 3 demo input modes are:
- Scroll: quickly smooth-scroll through the timeline, with magnetic detents at clip boundaries. Scroll speed is determined by zoom level (currently only controllable by mouse scroll wheel)
- Frames: small detents (1.5 degrees) to move frame-by-frame through video
- Speed/playback: "spring-loaded" speed control, biased to return to center (paused), with detents at powers of 2: 1x, 2x, 4x playback

Currently the frontend app has some bugs, particularly with the current playback position when switching modes and zooming, but planning to merge anyway to get the other breaking changes into master along with the initial demo framework.
2023-01-16 13:58:03 -08:00
Scott Bezek
340eed936d
Use 2512 SMD resistors in place of strain gauges (#104)
As suggested in https://github.com/scottbez1/smartknob/issues/24#issuecomment-1073540944 and inspired by https://github.com/IvDm/Z-probe-on-smd-resistors-2512, this adds 4x 330 ohm 2512 SMD resistors to the back to act as strain gauges, rather than requiring discrete strain gauges to be glued and wired up.

Also applies a few changes I accidentally had pending locally:
- Custom footprints for the 2 3.3v LDO options to clarify the pinout options
![image](https://user-images.githubusercontent.com/414890/204078474-8327e8ed-78b5-4fe3-a91d-9c20fe54fcbc.png)
- some BOM note updates

Fixes #24
Closes #33
2022-11-27 10:07:35 -08:00
Scott Bezek
e3a5152390 LCSC part numbers and notes for M1.6/M2 hardware 2022-11-12 17:59:04 -08:00
CrosseyeJack
cfde66128c
Quick lowercase hack to help Windows users (#103)
Windows upper cases the vendor and product id, so the filter will fail.
So LOWERCASE ALL THE THINGS!

Co-authored-by: Crosseye Jack <dan@crosseyejack.com>
2022-10-26 22:17:51 -07:00
Scott Bezek
ae28d523e0
Protobuf serial protocol (#101)
- Firmware
  - Refactor all code to use a log interface rather than `Serial` directly
  - Moved platformio.ini to root, so you can load the entire repo in VS Code and still use platformio
  - Reduced graphic buffer bit depth to 8 bits (short on RAM :( )
  - Implemented threadsafe log interface in interface_task (using a queue for posting log message)
  - Created serial protocol interface and 2 implementations - plaintext (default) and protobuf (selected by sending a NULL byte)
  - Protobuf protocol is roughly the same architecture as Splitflap's:
    - PacketSerial (cobs) framing with NULL delimiters
    - CRC32 checksums for packets
    - nanopb generated code for encoding/decoding (generated firmware code is checked in, since it should change less frequently and this reduces burden to build the project from scratch)
- Software
  - Typescript example host-side code:
    - smartknobjs-proto
      - Autogenerated types/encoding/decoding protobuf code (using protobufjs)
    - smartknobjs
      - Helper library for interfacing the with smartknob via serial/protobuf. Implements basic outgoing queue (with retries and ACK checking) and message callback for responding to messages from the SmartKnob
    - example
      - Basic demo CLI app that uses smartknobjs to connect to the smartknob, send a haptic config, and print state changes and log messages to the console
2022-10-22 17:27:35 -07:00
Scott Bezek
aec9799e10 Fix placeholder replacement for kikit gerber exports 2022-10-10 22:22:09 -07:00
Scott Bezek
7189eaf751 Add alternative MT6701 LCSC/JLC part number 2022-10-10 22:17:32 -07:00
Scott Bezek
04475a8810 Add BOM entries and note for new LDO
Also clean up PCB:
- Make LDOs mirror each other on board
- Custom footprints with silkscreen "in" "gnd" "out" labels
2022-10-10 21:11:22 -07:00
James
935a2d2119
Adding second footprint for 3V3 voltage regulator (#98)
The voltage regulator that was originally used isn't available at the moment. To provide more options, a second footprint was added to the PCB for an alternative regulator that has a different pinout. Important to note that only one regulator should be used.

Also, adjusted .gitignore for Mac files and KiCad auto-generated backups.
2022-10-10 20:26:51 -07:00
Scott Bezek
8a5d58f25b
Add discord invite link to README 2022-10-10 13:49:46 -07:00
Scott Bezek
8241473226 Remove old PIO target from CI 2022-10-05 22:33:43 -07:00
Scott Bezek
b286cfabe1 Firmware cleanup 2022-10-04 22:21:51 -07:00
Scott Bezek
3bee19df93
Migrate to KiCad 6 (#96)
- Updated view_base and view_screen KiCad projects to v6 files
  - Updated footprints to v6 versions
  - Fixed all DRC errors and most warnings
- Updated CI
  - Run on Ubuntu 22.04 runner
  - Updated KiBot and KiKit versions
  - Use KiBot for 3d rendering now instead of custom scripts
  - Switched to using KiCad text variables for replacement rather than raw text find&replace
- Misc design updates
  - Exposed bottom-side thermal pad underneath TMC6300 to make it easier to possibly hand-solder
  - Separated GND and GNDA nets, replaced connection with a net-tie, and updated corresponding copper fills around HX711
2022-10-02 21:40:10 -07:00
Scott Bezek
710fbcdc67 Motor is available from SparkFun 2022-09-26 22:01:11 -07:00
Scott Bezek
72808f8af3
Update readme - link to new wiki, new video, etc 2022-06-26 11:25:00 -07:00
Scott Bezek
604f21dcb6 Fix compilation error if SK_ALS=0 but PIN_SDA and PIN_SCL are set 2022-05-27 18:57:07 -07:00
Christoph Gysin
0b38eac75d
Add link to issue #16 (#68) 2022-05-04 06:44:32 -07:00
Scott Bezek
e35319af6d Increase motor task stack
Avoid accidental stack overflows from small stack.

Updates #37
Updates #50
2022-04-07 10:20:24 -07:00
Scott Bezek
21031d13af
Add PlatformIO Github Actions workflow (#55)
And add badges for both electronics and pio actions to README

Updates #49
2022-04-06 22:07:48 -07:00
Scott Bezek
45fd9f4e3e Cleanup old pio envs, fix some compilation issues with compile flags
Removed some legacy platformio envs that are not actively being maintained. But also fixed some bugs with different build flags that caused compilation issues.

Fixes #49
2022-04-06 21:53:41 -07:00
Scott Bezek
5c2a10428a
Update kikit to 1.0.4
To fix breaking change from transitive dependency `click`. More info: https://github.com/yaqwsx/KiKit/releases/tag/v1.0.4
2022-03-31 12:44:07 -07:00
Scott Bezek
a30e94cf4b
Update README.md
Some updates and clarifications on the motor situation and current project status
2022-03-31 12:33:29 -07:00
Scott Bezek
59420c6da9
Update readme - motors are no longer available :( 2022-03-24 09:56:15 -07:00
Scott Bezek
3616cee8b8 Move C10 slightly so that paste/stencil matches v0.2 2022-03-16 11:21:22 -07:00
Scott Bezek
1f7bf8a92a Extract release version number from tag, if applicable 2022-03-14 21:59:03 -07:00
Scott Bezek
916854c611 Fix LCD footprint lib path and hide LCD 3d model by default in kicad 3d rendering 2022-03-14 18:06:52 -07:00
Scott Bezek
3cfbd3501d
Update README.md
Add notes about artifacts being auto-generated and untested. Also add link to potential other motor listing. Updates #16
2022-03-14 18:01:54 -07:00