MPCNC BTT TouchScreenFirmware for TFT35 2.0

Continuing the discussion from MPCNC Build Complete (until my next good idea):

Some weeks ago I started working on the BTT baseline TouchScreenFirmware-Vx.x.26 in order to introduce some modification finalized to MPCNC application.
Thanks to @blomsd for his advices in the post I have created a new baseline with the following target:

  1. Possibility to define CNC_MENU in Configuration.h in order to configure the SW for CNC purposes
  2. Introduced new language and icons tags for CNC specific menu items (no impact on 3D printer tags)
  3. Added some specific bitmaps (from BlomsD / MPCNC-TFT35-V2.0)
  4. Introduced a new menu spindle.c in order to add spindle start/stop control
  5. Removed Bed and Extruder Heating menu items from Mainpage.c
  6. Forced configuration in order to remove persistent Bed/Extruder temperature indication on all the pages
  7. Modified the Home menu in order to support G28 XY and G28 Z and Zero axes
  8. Possibility to define CNC_LASER in configuration.h in order to introduce menu for laser management (laser.c)

next step will be the printing.c file in order to supply only CNC related information.

Below you can find some images/videos:

My Enclosure for SKR 1.3 and TFT35

Main Menu

Main Menu with Laser Management

Home Menu

Spindle Menu

Laser Menu

TFT35 Home Menu (Home XY)
TFT35 Home Menu (Home Z - Zero 0)
TFT35 Home Spindle (Spindle ON/OFF)

You can find the modified FW at Github link, you are welcome to test, contribute with your own modifications ad suggest improvements.

Thank you!

7 Likes

I have no idea what you said, but i like it. Could you make a video showing the menu functions, and would this work on the tft24?

I have edited the message adding some picture and video just to show what Iā€™m talking about.
I think it can be done for TFT24 modifying platformio.ini and recompiling, the line should be:
default_envs = BIGTREE_TFT24_V1_1

G

1 Like

FWIW, I donā€™t think that was meant as a criticism of you. Just some self deprecating humor, and a compliment. Thanks for clarifying it though.

@jeffeb3 I wasā€™n feeling upset for @blainesgarage clarification request, moreover I understood that my previous message was not easy to understand without pictures.
Iā€™m sorry if my previous message was felt by you as if I was upset for the critics but probably, due to my poor english, my communication was too direct and could be misunderstood.

Thank you all for clarifying, I hope to get some new ideas from the community in order to improve my design.

G

2 Likes

You did nothing wrong. What i meant was that you did something that I really like and wanted for my display, but is a bit out of my comfort zone at this point to attempt it without fear of making a total mess of things. Thank you.

1 Like

This is awesome. I have the skr 1.4 and the tft 2.4 so this is a really nice modification. Where do you stand on the further mods you were going to try.

Thank you!

In this moment I have done a little step modifying the screen with live informations during gcode execution eliminating the informations not CNC relevant, now I would like to enlarge some icons in order to fill the empty space but it seems an hard step form meā€¦

OK Cool. So far I have resized the icons for the tft24, as they need to be 70x70 and a couple other sizes, but it worked. I like that main screen as it has more useful info.
Thanks for the hard work. I like it.

2 Likes

Hi Scott,
If you want, you can share the tft24 resized icons in Github repository.
Thank you for testing my BTT TFT fw, Iā€™m really happy to get your feedback to improve.

Oh Gabriele, I thought this was just the dogs dangliesā€¦until i got it working (I didnā€™t realise I had to recompile it, I thought one of the existing .bin files would be what I wantedā€¦and then I had to find the configuration.h to enable the laser menu) but I am disappointed because the laser menu controls the fan output whereas I PWM the laser using M3 and M5 with Sxxx levels as per ā€˜properā€™ milling! All my software generates power settings from M3 Sxxx ā€¦poo!

By the wayā€¦the persistant extruder and bed temp values are still shown on the screen on mineā€¦your writeup suggested you had managed to remove them?

1 Like

Hello Mike,
unfortunately my mainly technical english doesnā€™t allow me to fully understand your slangā€¦ anyway I try to answer to you:

  • The laser control function by fan output is a porting of @blomsd baseline that I used as starting point of my development, I donā€™t have a laser in this moment so I kept the concept as it was.

  • I use M3 and M5 without Sxxx levels to manage the spindle start/stop see Spindle.c source as a reference

  • I have duplicated the fan management menu for the laser see laser.c and make it working modifying the support function (parseACK.c, interfaceCmd.c) probably changing in laser.c laserCmd[] = FAN_CMD; to the command you want you can arrive to something working for your setup.

  • Today I have updated in the Github repository the Printing.c file with the one that doesnā€™t show nozzle and bed temp values. I have just removed icons and values, in the future I will resize the remaining icons to fill all the space If Iā€™ll understand how to do.

If you are fully convinced that we are not talking about ā€œdog dangliesā€ :rofl: feel free to help modifying the SW to manage laser with M3 M5 commands and share your progresses

Hi Gabriele, thanks for your reply, I have indeed made a start on converting the Laser control page from using the Fan commands to using M3 Sxxx to specify laser on powersā€¦and it works! I mangled the existing laser.c with spindle.c to arrrive at something that displays a page with 7 icons for selecting different power settings and a return icon, but I am stuck on the label and icons.


In the snapshot is my laser.c showing the ICON_LASER_12, 25,50,75 and the LABEL_LASER_12,25,50,75ā€¦all these identifiers are undefined (and therefore white in the workspace and I do not know where to look to define them (or how to at this stage)ā€¦I was hoping to find entries in a search for LABEL_LASER_2 but no joy. I have added the icons to the TFT35 folder and made entries in icon_list.inc, as you can see.
If I set all the ICON_LASER_ to 2 and all the LABEL_LASER_ to 2 it compiles and I get this -

Soā€¦any idea where I declare my icons and labels?

I will d/l your latest firmware, is there a best way for me to share my efforts with you and others if they are interested?

Hi Mike,
Iā€™m glad you are working to customize the TFT35 FW to mange laser, I try to explain what I have discovered by reverse engineering BTT FW.

To add a label you must proceed in this way:

  1. Modify Language.inc to include all the new labels
  2. Modify each language_??.h file to associate the label to itā€™s translation

For the laser control wouldnā€™t be better a page with + and - to control more precisely the laser power or it is enough to have some preset levels? if you share your laser.c file I can try to understand how to integrate it in the fan.c style menu.

Iā€™m not a github poweruser but probably the best way to share your progresses is to create a branch of my repository managed by you doing a new pull request.

Hi Gabriele, As if by magicā€¦I start up Visual Studio today and the ICON_LASER_12 et.al. are working. I am guessing because I had made entries in the icon_list_inc file for my new icons after a restart it ā€˜registeredā€™ my changes. I will now try and do as you suggest for the LABELSā€¦

I am not sure an INC and DEC is really necessary for the laserā€¦having more than the 2%, a 100% and a 0% would really be all you need during the setup phase of an operation, all the analogue settings are taken care of during the actual lasing job, I just wanted to fill up the Laser page with pretty icons.

My version of Laser.c is not pretty! I am sure I broke every rule in the programmers handbook bar oneā€¦it works! Let me get the labels working and I will post it up somewhereā€¦I will look into opening a pull requestā€¦this is new to me.

All doneā€¦I have uploaded my version to your github as a pull requestā€¦take a look and let me know what you think!

Hi Mike,
can you share the link to your github repository, Iā€™m not a github expert and I havenā€™t seen your mods.

G

Ermmmā€¦I donā€™t have a github repositoryā€¦ I uploaded my mods to your page via a pull requestā€¦or did I misunderstand your earlier message?

Anyhow I have been busy today tooā€¦ fixed a bug in the printing.c which crashed because it sent a M221 which the controller didnā€™t like and changed a couple of icons,anyhowā€¦total progress so far is uploaded here - https://www.udrop.com/97a/LowRider_TFT35_My_Version.rar

Got a wish list for my next post!

So as I see itā€¦the main thing that needs addressing now is in the printing menu, when you load up a jobyou are presented with a screen with 4 option icons (the smaller Icons are info only) the ā€˜Moreā€™ icon is superfluous and could be replaced with the only function within the ā€˜moreā€™ menu that is of any use to a machinistā€¦the ā€˜speedā€™ functionā€¦labelled Percentage, now I have removed the flow rate function within the Percentage all that is left is speed of the axesā€™, which is useful.
I have been at it most of the day but cannot see how to replace the ā€˜Moreā€™ function with the ā€˜Percentageā€™ function (and get it to compile)ā€¦any pointers would be most welcome at this point!

OKā€¦ so I have got as far as I can with this I think. current firmware.zip (1.9 MB) . I am currently playing with using this BTT TFT35 to control a plain vanilla Nano based 2 axis controller on a laser engraver.