Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Oled Display Curent #56

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,17 @@
# BIGTREETECH-S42B-V1.0
The closed-loop drive is to feedback the rotation angle of the stepping motor to the control panel, compare the distance that needs to be rotated with the distance of the actual rotation, calculate the error value, and then compensate, so as to prevent the problem of multi-step and lost step. The closed-loop drive can completely overcome the lost step of the open-loop stepping motor, and can also significantly improve the performance of the motor at high speed
# TrueStep
Closed loop stepper motor driver firmware for the BTT S42B-V1.0 board.

**NOTE: This is still a work in progress so use with caution!**

This project was forked from the BIGTREETECH-S42B-V1.0 repo. Since I started to make some large modifications to the original work I decided to rename the project.

## Features
- New UART [interface](SerialInterface.md)
- Reduced packet overheads
- Sequence counter to detect missing packets
- CRC checksum
- New OLED Menu
- Simpler navigation
- Adjustment of PID gains

To ease configuration and to access more advanced features you can use [TrueStepTerminal](utils/TrueStepTerminal).
Binary file removed Serial data transfer protocol.pdf
Binary file not shown.
39 changes: 39 additions & 0 deletions SerialInterface.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Serial Protocol
Below is a brief description of the serial interface protocol used by TrueStep.

## Packet Format
The serial packet consists of the following parts:
[PREAMBLE] [LENGTH] [MESSAGE_ID] [PAYLOAD] [CHECKSUM]

[PREAMBLE]
Start byte which is 0xFE

[LENGTH]
Byte which holds the packet length and a packet sequence number.
The lower 4 bits are the length of the payload. So maximum payload size is 15 bytes.
The upper 4 bits is a sequence number which is increased with each packet and rolls over after 15. The idea is to be able to detect missing packets.


[MESSAGE_ID]
Number which identify the message content. The id's are defined in messages.h

[PAYLOAD]
The message data

[CHECKSUM]
Single CRC8 checksum byte calculated over the LENGTH, MESSAGE_ID and PAYLOAD bytes.
The checksum seed is 0xFF.


## Messages
Below are some of the messages that has already been defined in messages.h

### Parameter Reading
Use message ID value SERIAL_MSG_GETPARAM (Message ID 2).
First byte of the payload contains the parameter ID.
The response message depends on the requested parameter. For example when reading the PID P term gain the response would be of type SERIAL_MSG_PARAM_KP.

### Parameter Writing
Use message ID value SERIAL_MSG_SETPARAM (Message ID 3).
First byte of the payload contains the parameter ID, the next two bytes are the value to set the parameter.

Binary file removed SerialPort Assistant.zip
Binary file not shown.
Binary file added TrueStepTerminal.zip
Binary file not shown.
Loading