Skip to content

SebastianBraun01/TFT-Firmware

Repository files navigation

BigTreeTech TFT Touchscreen

GitHub GitHub contributors GitHub Release Date Build Status

Important information related to BigTreeTech's TFT touchscreen 3D printer controllers

Table of Contents

Connect the TFT to the Mainboard

Do the following, to be able to use the touchmode of your screen.

  1. Connect the 5pin serial cable according to the manual of your mainboard.
  2. Define a serial port in Marlin, to activate the port used by the TFT.
  3. Make sure the same BAUDRATE is defined in Marlin and the firmware of your TFT (config.ini)

Do the following, to be able to use the Marlin emulation mode of your screen.

A: In case your TFT does not have an EXP connector at all (TFT28 v1 for example), you can not use the Marlin emulator mode.

B: In case your mainboard provides EXP1 and EXP2, you have to connect 2 ribbon cables connecting EXP1 and EXP2 of the mainboard to EXP1 and EXP2 of the TFT. In the Marlin firmware of your mainboard, make sure that ONLY the "REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER" is activated in Configuration.h and that all other controllers (especially the "CR10_STOCKDISPLAY") are Deactivated.

C: In case you have an "E3" mainboard which provides a single EXP connector, you have to connect 1 ribbon cable connecting EXP of the mainboard to EXP3 of the TFT. In case your TFT does not provide an EXP3 connector but only two 10pin connectors (TFT24 v1.1 for example) you will need a "Y-split" cable with one 10pin connector on one side (for the mainboard) and two 10pin connectors on the other side (for the TFT). In the Marlin firmware of your mainboard, make sure that ONLY the "CR10_STOCKDISPLAY" is activated in Configuration.h and that all other controllers (especially the "REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER") are Deactivated.

Menus

Status Screen DISABLED Status Screen ENABLED
status screen 0 Unified Material Main Screen
In config.ini define: General Settings
Enable Status Screen
# Select the Main Screen flavour
# Options: [Enable: 1, Disable: 0]
status_screen: 0
In config.ini define: General Settings
Enable Status Screen
# Select the Main Screen flavour
# Options: [Enable: 1, Disable: 0]
status_screen: 1

Themes

Unified Menu Theme Hybrid Red Material Theme by AntoszHUN The Round Miracle Theme by Acenotass
Unified Material Main Screen Hybrid Red Menu Material Mainscreen Round Miracle Main Screen
Use firmware, icons, and fonts from the Copy to SD Card root directory to update - Unified Menu Material theme folder Use firmware, icons, and fonts from the Copy to SD Card root directory to update - Hybrid Red Material theme folder Use firmware, icons, and fonts from the Copy to SD Card root directory to update - The Round Miracle theme folder

Update TFT Firmware

The TFT firmware update is done in three steps described below and includes up to four elements:

ELEMENTS:

element1: The firmware binary (BIGTREE_TFT*_V*.*.*.bin). Example: BIGTREE_TFT35_V3.0.26.1.bin:

  • BIGTREE_TFT_35: model
  • V3.0: hardware version
  • 26.1: software version

element2: Fonts and Icons (TFT* folder): Example: TFT35, which includes:

  • TFT*/font: fonts
  • TFT*/bmp: icons

element3: The config.ini file

element4: One or several language file(s) (optionally)

STEPS:

step1: Copy your self compiled firmware or the BIGTREE_TFT*_V*...bin, plus the TFT*` folder and the config.ini to the root of a blank SD card that is <8GB and formatted as FAT32:

Firmware

Optionally, copy one or several language.ini file(s) from Copy to SD Card root directory to update/Language Packs folder onto the SD card. Doing so will allow you to switch between English and the uploaded language(s), using the corresponding Language function of the TFT. We recommend to upload the minimum amount of languages, to keep the memory usage low. The language.ini file can be edited to change the text shown on the TFT.

Language Pack

step2: Place SD card with the BIGTREE_TFT*_V*.*.*.bin, theTFT* folder and the config.ini into the TFT's SD card reader and reset your TFT (or optionally - power cycle your printer) to start the update process.

⚠️ Failing to update your icons & fonts will result in missing icons and/or unreadable text ⚠️

Update Process shown on TFT Screen

A successful update looks like this on the screen:

Screenshot 2020-09-26 at 22 10 04

... and the name of the elements on the SD card changes to this:

After Update

In case one or several parts of the update failed, an error will be shown. Follow the information on the screen to update the missing or outdated elements.

Screenshot 2020-10-23 at 14 37 36

⚠️ Errors during the update can not be ignored and must be solved before using the TFT ⚠️

After the update is done and the files are renamed, it is possible to reuse them again. To do so, change the name of the element(s) to the pre-update name and start the update process again.

step3: Remove the SD card from the TFT and restart the printer.

Configuration

The Firmware can be modified by changing the config.ini file from: Copy to SD Card root directory to update using a simple text editor (make sure to use UTF encoding).

Once saved, the config.ini can be uploaded without the need to upload the firmware or the TFT folder again, as long as the firmware and the config.ini are from the same version.

Editing configuration (config.ini) file

To edit the config.ini file follow the instruction here: Detailed Instructions here

Updating Firmware Configuration

To update the Firmware configuration:

  1. Edit the settings in config.ini.

  2. Copy the config.ini file to the root of the SD card. (The SD card capacity should be less than or equal to 8GB and formatted as FAT32)

  3. Insert the SD card into the TFT's SD card slot and restart the printer or press the reset buttion of the TFT.

  4. The TFT will update and store the configuration from config.ini file.

  5. Make sure to remove the SD card from the TFT and restart the printer.

  6. On the TFT click on Menu - Settings - Feature and navigate to the last page. Click on

    "Reset default settings ..."

  7. Restart the printer to finish the update of the config.ini

Customization

Bootscreen and Icons

See Customization guides for detailed information.

Firmware

View full instructions
  1. Setup Visual Studio Code with PlatformIO instructions
  2. Click on the PlatformIO icon (①) and then click on Open Project (②):
  3. Find the BIGTREETECH firmware source directory , then click Open:
  4. After opening the project, edit platformio.ini and change the default_envs to one that matches your TFT model and version:
    ;BIGTREE_TFT35_V1_0
    ;BIGTREE_TFT35_V1_1
    ;BIGTREE_TFT35_V1_2
    ;BIGTREE_TFT35_V2_0
    ;BIGTREE_TFT35_V3_0
    ;BIGTREE_TFT35_E3_V3_0
    ;BIGTREE_TFT28_V1_0
    ;BIGTREE_TFT28_V3_0
    ;BIGTREE_TFT24_V1_1
    ;MKS_32_V1_4
    ;MKS_32_V1_4_NOBL
    ;MKS_28_V1_0
    

    [platformio] src_dir = TFT boards_dir = buildroot/boards default_envs = BIGTREE_TFT35_V3_0

  5. Click the check mark (✓) at the bottom of VSCode or press Ctrl+Alt+B (Windows) / Ctrl+Option+B (macOS) to compile.

  6. A BIGTREE_TFT*_V*.*.*.bin file will be generated in the hidden .pio\build\BIGTREE_TFT*_V*_* folder. Follow the update process outlined in the About TFT Firmware section above to update your TFT to the latest version.

Troubleshooting

To reset the TFT's touch screen calibration, create a blank file named reset.txt and place in root folder of the sd card. Insert the SD card into the TFT's SD card reader and power cycle your printer to start the reset process.

Version History

See BIGTREETECH-TouchScreenFirmware/releases for a complete version history.

Appendix

Setup of BTT TFT35 E3 V3.0 with MKS SGEN_L Mainboards

The following mainboards are covered by this document.

MKS GEN_L v1.0, MKS SGEN (LPC1769), MKS SGEN_L v1.0 (LPC1768) and MKS SGEN_L v2.0 (LPC1769)

Connections

The TFT35 E3 V3.0 has 3 cables to connect to the mainboard. Two 10 pin ribbon cables and one 5 pin serial cable. The 2 ribbon cables connect to the EXP1 and the EXP2 connections on both the TFT35 E3 V3.0 and the MKS mainboards.

The RS232 cable is connected to the RS232 connection on the touchscreen, with the other end connecting to the AUX1 connection on the mainboard. The RS232 cable has 5 wires. One end has a single 5 wire connector that goes to the RS232 connector on the touchscreen, and the other end has two connectors, one has 4 wires, and the second one has one wire. That single wire is for the Reset and is not used on these MKS mainboards. The 4-pin connector plugs into the AUX1 connection. It must connect to the top row of pins when looking at the socket with the notch facing away from the mainboard and must be also plugged in with the 5v+ wire connected to the first pin in the upper left corner of the socket. The RESET wire is not connected to anything.

Serial

NOTE: On the MKS mainboards there is an issue that involves at least the MKS GEN_L, MKS SGEN, and MKS SGEN_L models. The EXP1 and EXP2 connections have the socket shell installed wrong way around. The notch that indexes the cable should be facing towards the mainboard. If you get a blank screen on the TFT35 E3 V3.0 touchscreen after connecting the two EXP cables and turning the printer on, turn printer off and disconnect the 10 pin cables from either the touch screen or the mainboard and using small diagonal cutters trim the tab down to be as close to flush as you can get on both cables (and only on one end) and plug them back in with the trimmed tab now facing the mainboard.

EXP

The second workaround for this issue is to carefully pry the two shells surrounding the pins on the mainboard upwards until they clear the pins. Do NOT use a metal tool for this, use a sturdy plastic or whalebone prying tool. Turn the shell 180 degrees and align the pins with the holes in the shells and push the shells back on with your thumb. Do not push the shell back on with something that could cause damage if it were to slip. Once the shells are installed you can use the stock (unaltered) cables as they are.

Firmware

Edit the configuration.h file and enable the line that says: #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER Rebuild and deploy the Marlin firmware to your 3D Printer.

Show more statistics at the end of the print

Statistics as filament length, filament weight and filament cost can be embedded into the gCode. These statistics will be presented after the print is finished in the new infobox area as a scrolling text. You can click that infobox and a popup will present you the printed filename (limited to the first 25 characters), the time needed for the print, the filament length used, the filament weight and its cost.

The statistic data in the gCode must have the following format (a good practice would be to include this at the beginning of the gCode):

M118 P0 filament_data L:{12.3456}m L: represents the length in meters M118 P0 filemant_data W:{1.23456}g W: represents the weight in grams M118 P0 filament_data C:{0.1234} C: represents the cost without a unit

The values of every filament data can be in a brackets, parentheses, apostrophes, etc. or without them, measurement units can be there or not. So M118 P0 filament_data L:(12.3456)m, M118 P0 filament_data L:12.3456meters, M118 P0 filament_data L:[12.3456] and so on are all valid formats.

The inclusion of the filament data into the gCode can be automated. In Cura all you have to do is to insert the following into the Start G-Code: M118 P0 filament_data L:{filament_amount}m M118 P0 filament_data W:{filament_weight}g M118 P0 filament_data C:{filament_cost}

In case the gCode file has been generated using the BTT 3D Plug-In Suit, the data is automatically added.

In case filament data is not present in the gCode, the filament length data is calculated during print. Length is calculated regardless of using the TFT USB, TFT SD or the onboard SD. Calculations are done in both absolute or relative extrusion mode. Filament data takes into account the flow rate also but with a caveat. It has to be the same flow rate during the entire time of the printing, because the end result is calculated based on the flow rate at the time the print has finished. If flow rate changes during the print the results will not be accurate anymore.

About

Meine Einstellungen für den TFT-Touchscreen für meinen Ender5 3D Drucker.

Topics

Resources

License

Stars

Watchers

Forks

Languages