marcellodum / marlin-mingda-md-d301

Unofficial Marlin firmware for the Mingda MD D301 board used on the Rock 3, Rock 3 Pro, D2, and other printers
GNU General Public License v3.0
14 stars 9 forks source link

BL Touch #12

Open jackofalltraces opened 1 year ago

jackofalltraces commented 1 year ago

Hi!

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

Thanks!

Jack

spessoni commented 1 year ago

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.

https://github.com/marcellodum/marlin-mingda-md-d301/blob/5c3d12610912f4a53159b5613f9ad3efaec3ea36/Marlin/Configuration.h#L24-L55

spessoni commented 1 year ago

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

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 commented 1 year ago

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 commented 1 year ago

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

spessoni commented 1 year ago

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

bigjoncoop commented 1 year ago

@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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 week ago

@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!