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!

6 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.

1 Like

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?

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.