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

BL Touch #12

Open
jackofalltraces opened this issue Sep 11, 2022 · 10 comments
Open

BL Touch #12

jackofalltraces opened this issue Sep 11, 2022 · 10 comments

Comments

@jackofalltraces
Copy link

Hi!

Any chance you have a build or configuration.h that installs the BL Touch for the Mingda D2, D301 board?

Thanks!

Jack

@spessoni
Copy link

I am looking to add BL Touch to the Mingda D2 as well. The release D2-Default-v1.0.zip does not have this complied in. I think if you modify the Marlin configuration.h, and compile, it will work. It looks like configuration.h in the marlin folder already has BL-Touch enabled, we just need select D2.

If I can figure it out, I'll try to paste the compiled firmware.bin here, but it might be awhile.

//#define MINGDA_ROCK_3 // 230*230*260
#define MINGDA_ROCK_3_PRO // 320*320*400
//#define MINGDA_D2 // 230*230*260
//#define MINGDA_D3_PRO // 320*320*400
//#define MINGDA_D4_PRO // 420*420*400
#if EITHER(MINGDA_ROCK_3, MINGDA_D2)
#define X_BED_SIZE 230
#define Y_BED_SIZE 230
#define Z_MAX_POS 260
#elif EITHER(MINGDA_ROCK_3_PRO, MINGDA_D3_PRO)
#define X_BED_SIZE 320
#define Y_BED_SIZE 320
#define Z_MAX_POS 400
#elif ENABLED(MINGDA_D4_PRO)
#define X_BED_SIZE 420
#define Y_BED_SIZE 420
#define Z_MAX_POS 400
#else
#error "Select the printer model."
#endif
//#define D301_AUTO_LEVELING
#ifdef D301_AUTO_LEVELING
#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
#define BLTOUCH
#define Z_SAFE_HOMING
#define AUTO_BED_LEVELING_UBL
//#define AUTO_BED_LEVELING_BILINEAR
#endif

@spessoni
Copy link

I had some problems getting this to work, but think I solved them all.

  • TFT_LVGL_UI although looked nice, was too buggy and missing a bunch of advanced features. I set this to TFT_COLOR_UI and it works well, with more status and feedback.
  • DEFAULT_AXIS_STEPS_PER_UNIT for the D2 was set to { 80, 80, 800, 100 } and it kept trying to advance past the endstop. Setting this to { 79.25, 79.25, 800, 100 } solved the problem and matches the setting of the original Mingda firmware.
  • Homing the X and Y axis occasionally failed and would halt the printer. This was probably caused by EMI and noise from the push-button endstop. You can read more about it here. Putting a 100nf capacitor probably would fix this, but in previous versions of Marlin, filtering was always active. Enabling and setting ENDSTOP_NOISE_THRESHOLD 2 solved this problem.
  • I had issues with Unified Bed Leveling (UBL) and LVGL but worked well with Automatic Bed Leveling (ABL). I was more familiar how ABL worked, so I enabled that instead.

I'm attaching the Configuration.h and compiled firmware if you want to try it. I can try submitting a pull request if it will be merged.

firmware-D2-TFT_COLOR_UI-BLTouch-ABL.zip

@spessoni
Copy link

I ran into some problems with the hot end never reaching temperature. I discovered PID_MAX 125 and PID_FUNCTIONAL_RANGE 40. The default for PID_MAX in Marlin is BANG_MAX which is set to 255. I believe the default for PID_FUNCTIONAL_RANGE is 10. I changed PID_MAX to the BANG_MAX and set PID_FUNCTIONAL_RANGE to 20. This means the PID can use maximum current and the PID will kick-in when the hot end is 20 degrees away from the target temperature. This fixed the temperature issue. I also enabled the PID_AUTOTUNE_MENU and PID_EDIT_MENU which will show in the advanced settings menu.

I'm attaching the configuration.h and compiled firmware. I don't know if anyone is reading this anymore, Feel free to merge this into this project. I may work on getting the MD-D301 merged into Marlin as this project seems abandoned and would hopefully make new versions more available.

firmware-D2-TFT_COLOR_UI-BLTouch-ABL-update2.zip

@stringerppt
Copy link

I'm reading this and am about to try it 👍 Thanks!

@spessoni
Copy link

Thanks! Let me know if you run into any issues.

@bigjoncoop
Copy link

@spessoni
Thx for the config you posted. Maybe you can help me.

Last night I flashed the main build for the Mingda D2 in the releases section, then noticed that it wasn't configured properly for a BL-touch. Then without thinking I flashed my old firmware.bin file and broke the UI on the touch screen since the assets on the printer are for the new LVGL UI...!

I spent the next 5 hours trying to figure out how to Flash the legacy Mingda UI assets back on to the printer, but could not figure it out! I have the stock firmware source code but after compiling it in VScode I can't find where the UI assets are compiled to since there are no .bmp files created... where are they after the firmware is compiled?

I was able to find another custom build of the stock firmware online and in the source code it contained a TFT folder with .bmp files in it, that look like the correct legacy Mingda UI images but after flashing it to the printer half of the icons were still missing. I'm completely stumped on how all that works.

I'm assuming if I flash your compiled firmware you posted, I am still going to have the same issue correct? Well I guess I'll find out cuz I'm going to try here in a minute.

@stringerppt
Copy link

I owe an update on my experience. using the firmware posted here by @spessoni. What follows may be totally unique to me/my printer.

I also experienced a problem with the BL Touch. The printer kept not deploying the probe and slamming into the bed. I figured the firmware might require some within-GUI config so I persisted (for hours). Then the printer went dead. The fuse in the back hadn't blown. The fuse in the PSU hadn't blown. The switch was not burned. So I took a punt and ordered a genuine Meanwell PSU. I figured if the board wasn't dead I would find a way to reverse out the firmware.

However, on fitting the new and undoubtedly much better (much quieter!) PSU, everything works as expected and I have printed multiple good prints since on this new firmware by @spessoni

@spessoni
Copy link

spessoni commented Dec 7, 2022

Hi @bigjoncoop, I replied to your issue on the other ticket. My version doesn't use TFT_LVGL_UI so missing icons won't matter. It doesn't look as polished, but the LVGL has so many quirks and didn't work right. The TFT_COLOR_UI works well, and has a lot more features.

@stringerppt, thanks for the update! That sounds like it was a problem with the power supply. When they don't supply stable power, all sorts of weird stuff can happen. I'm still on the original Mingda power supply without any problems if that helps.

@crasholo
Copy link

Hi @spessoni. Is this version your latest "working" version? I'm using your configuration files, but my BLTouch + ABL isn't working (i've tested several sensors, so it might be something software related).
I've also tried connecting BLTouch differently, using -Z endstop connector or using dedicated z-probe connector.
On the z-probe connector, it seems to work, bltouch test, ABL generates mesh with G29, but ABL correction is not made while printing, so i can print fine only if i babystep each time while printing on several plate spots.
If i use -Z endstop connector, the printer does not home Z. There's no way it goes down on the plate to home Z.
I don't know if it's a configuration error (i've recompiled this firmware so many times, changing things as i read online) or if it's a bug of this specific marlin version.
I wanted to use the latest official marlin, but it seems it's lacking D301 board support.
So, right now, i have a Mingda D2, with BLTouch but unusable.
Thanks

@iflyos
Copy link

iflyos commented Apr 21, 2024

@spessoni I am still reading as well..I just decided to bring my Mingda D2 out of retirement and give it to my son. I wanted to install Marlin, and you provided a solution for me. Last time I complied Marlin, I used the Arduino IDE, so I am lost using VSC. (Klipper is so much easier, lol) Anyway, thanks for your time/help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants