Skip to content

rthorntn/T-Knob

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

T-Knob fork

I'm going to try to demistify the https://lilygo.cc/products/t-knob, I'm interested in removing the top circular "I/O" PCB and its "stalk" so I can use the motor and encoder as a smart knob with software detents and limits like https://github.com/scottbez1/smartknob

Smartknob also uses ESP32, TMC6300 (motor driver) & MT6701 (magnetic angle encoder)...

I should say, I'm not a coder.

If you're interested please post in Discussions.

Tasks
- 1. : TBA
- 2. : TBA
- 1. : TBA

The main PCB: alt text

alt text

Other data is placed in the hardware folder

Arduino IDE v2.2.1
Module esp32-C6-MINI-1U
MotorDriverIC TMC6300
HallSensor MT6701

1. Folder structure:

├─3D_File : 3D model file;
├─examples : Some examples;
├─hardware: Schematic diagram of the board, chip data;

2. Examples

- ✅ 1_simple_drive : Let the electric motor up, using 6-step commutation drive motor;
- ✅ 2_encoder_mt6701 : Drive magnetic encoder, serial print read data;
- ✅ 3_mcpwm_ctrl : mcpwm controller drives the motor;
- ✅ 4_mcpwm_mt6701 : mcpwm controller is used to drive the motor and read the encoder data at the same time.
- ✅ 5_foc_openloop_velocity : foc open-loop speed control is used to drive the motor.
- ✅ 6_foc_openloop_angle : foc Angle control drive motor;
- ✅ 7_foc_closeloop_pos_and_speed : foc Angle control drive motor;
- ✅ 8_pid_and_lowpadd_filter : On the basis of 7, add pid control and low-pass filtering;
- ✅ T-MotorDriver-C6-firmware : The firmware generated by 8 compilation is used as a factory program;

3. Quick Start

  1. Install Arduino IDE
  2. Install the esp32 toolkit, open the Arduino IDE, click on File->Preferences, Then https://espressif.github.io/arduino-esp32/package_esp32_dev_index.json paste to the position of the diagram below, then click 🆗, waiting for the toolkit download is complete;

  1. Open a example using the Arduino IDE, and configure the Arduino as follows.Notice where the yellow boxes are.

❗ ❗ Note: If the board cannot find the ESP32C6, perform the step 2. ❗ ❗

  1. Finally click update ➡️ to download the program.

4. Pins

// MT6071
#define MAG_CS  7
#define MAG_CLK 14
#define MAG_DIO 15

// TMC6300
#define BLDC_DRV_FAULT_GPIO 2
#define UH_PIN 6
#define UL_PIN 5
#define VH_PIN 1
#define VL_PIN 3
#define WH_PIN 0
#define WL_PIN 4

// BOOT & LED
#define BTN_RELEASE_STATE 1  // HIGH is release state
#define BOARD_BOOT 9
#define BOARD_LED1 23
#define BOARD_LED2 22
#define BOARD_LED3 21
#define BOARD_LED4 20
#define BOARD_BUZZ 18

For more information, see the ./hardware directory.

Schematic : T-Embed-CC1101

CC1101 Schematic : CC1101

CC1101 Pins : CC1101 Pins

About

Make this thing useful for the masses

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 100.0%