Commit Graph

90 Commits

Author SHA1 Message Date
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
Scott Bezek
deee357036 Add testpoints for RX and TX
Updates #14
2022-03-14 17:35:03 -07:00
Scott Bezek
db3b3c256f Add alignment holes, update board outline - shorter slots
Fixes #7
2022-03-14 17:28:30 -07:00
Scott Bezek
fed7f36ce1
Update README.md 2022-03-13 17:14:47 -07:00
Scott Bezek
637057dd1f
Generate merged BOM (#15)
Also add more bom-only items to the schematic
2022-03-13 17:04:22 -07:00
Scott Bezek
5316810d83 Remove "service loop" silkscreen marks from screen pcb
Service loops weren't really feasible/helpful, so don't recommend them via the silkscreen. Fixes #10

Also added testpoints (or could be solder points) for all signals on the top side of the screen PCB. Fixes #11
2022-03-13 15:11:21 -07:00
Scott Bezek
aea7efc3d0 Add a bunch of part numbers to BOM 2022-03-13 12:50:26 -07:00
Scott Bezek
91498a1da0 More helpful tips in the README 2022-03-11 18:29:02 -08:00
Scott Bezek
8a7c3e3a61 Update README 2022-03-11 15:45:43 -08:00
Scott Bezek
48dcff506d
Update README.md 2022-03-11 10:01:21 -08:00
Scott Bezek
a79b2dfb3a
Update README.md 2022-03-11 08:00:12 -08:00
Scott Bezek
0a09f3a279
Update README.md 2022-03-10 19:39:41 -08:00
Scott Bezek
1a6c5ff090 Fix HX711 analog supply, fix 3.3v regulator
Fixes #8
Fixes #3
2022-03-10 19:18:51 -08:00
Scott Bezek
b47fcf7da4
Firmware updates - sensors, calibration, View support, etc (#9)
- Modify TLV493d library to expose frame counter in order to check for lockup, and implement auto-reset in tlv_sensor in case of lockup
 - Implement MT6701 SimpleFOC sensor
 - Make display optional
 - Add optional LED, strain, ALS support
 - Connect ALS to LED and display brightness
 - Hardcoded strain gauge thresholds and haptic feedback
2022-03-10 19:05:49 -08:00
Scott Bezek
9e2725f850 Add link to 15mm adapter 2022-02-23 16:19:27 -08:00
Scott Bezek
8148571e1f More CAD links 2022-02-18 16:55:37 -08:00
Scott Bezek
de2dc87b16 Add more motor CAD links 2022-02-18 16:34:09 -08:00
Scott Bezek
8c52505bae Add CAD readme 2022-02-18 16:05:55 -08:00