Configure MKS-DLC32 for pen plotter hbot

Hi all. I received all the remaining parts from China during the last 3 days. This morning I had a chance to mount all the pieces and also to modify and 3D print the new actuator plate.

Here you can see some pics

The structure looks pretty sturdy and stable. I am able to print at 3000mm/min without evident noise on the patterns.

My config.yaml for fluidnc is:

board: MKS-DLC32 V2.1
name: PenPlotter_A0
meta: (Jun 2023) by SerFabio89

stepping:
  engine: I2S_STATIC
  idle_ms: 255
  pulse_us: 2
  dir_delay_us: 1
  disable_delay_us: 0

uart1:
  txd_pin: gpio.18
  rxd_pin: gpio.23
  rts_pin: NO_PIN
  cts_pin: NO_PIN
  baud: 115200
  mode: 8N1

axes:
  shared_stepper_reset_pin: NO_PIN
  shared_stepper_disable_pin: I2SO.0

  x:
    steps_per_mm: 100.000
    max_rate_mm_per_min: 7500.000
    acceleration_mm_per_sec2: 500.000
    max_travel_mm: 850.000
    soft_limits: true

    homing:
      cycle: 2
      allow_single_axis: true
      positive_direction: false
      mpos_mm: 0.000
      feed_mm_per_min: 1500.000
      seek_mm_per_min: 1500.000
      settle_ms: 500
      seek_scaler: 1.100
      feed_scaler: 1.100

    motor0:
      limit_neg_pin: gpio.36
      hard_limits: false
      pulloff_mm: 5.000
      tmc_2209:
        uart_num: 1
        addr: 0
        r_sense_ohms: 0.110
        run_amps: 1.000
        hold_amps: 0.300
        microsteps: 16
        stallguard: 55
        stallguard_debug: true
        toff_disable: 0
        toff_stealthchop: 5
        toff_coolstep: 3
        run_mode: CoolStep
        homing_mode: StallGuard
        use_enable: true
        step_pin: I2SO.1
        direction_pin: I2SO.2

  y:
    steps_per_mm: 100.000
    max_rate_mm_per_min: 7500.000
    acceleration_mm_per_sec2: 500.000
    max_travel_mm: 1150.000
    soft_limits: true

    homing:
      cycle: 2
      allow_single_axis: true
      positive_direction: false
      mpos_mm: 0.000
      feed_mm_per_min: 1000.000
      seek_mm_per_min: 1000.000
      settle_ms: 500
      seek_scaler: 1.100
      feed_scaler: 1.100

    motor0:
      limit_neg_pin: gpio.35
      hard_limits: false
      pulloff_mm: 5.000
      tmc_2209:
        uart_num: 1
        addr: 1
        r_sense_ohms: 0.110
        run_amps: 1.000
        hold_amps: 0.300
        microsteps: 16
        stallguard: 55
        stallguard_debug: true
        toff_disable: 0
        toff_stealthchop: 5
        toff_coolstep: 3
        run_mode: CoolStep
        homing_mode: StallGuard
        use_enable: true
        step_pin: I2SO.5
        direction_pin: I2SO.6

    motor1:
      limit_neg_pin: gpio.34
      hard_limits: false
      pulloff_mm: 5.000
      tmc_2209:
        uart_num: 1
        addr: 2
        r_sense_ohms: 0.110
        run_amps: 1.000
        hold_amps: 0.300
        microsteps: 16
        stallguard: 55
        stallguard_debug: true
        toff_disable: 0
        toff_stealthchop: 5
        toff_coolstep: 3
        run_mode: CoolStep
        homing_mode: StallGuard
        use_enable: true
        step_pin: I2SO.3
        direction_pin: I2SO.4:low

  z:
    steps_per_mm: 25.000
    max_rate_mm_per_min: 2000.000
    acceleration_mm_per_sec2: 100.000
    max_travel_mm: 10.000
    soft_limits: true

    homing:
      cycle: 1
      allow_single_axis: true
      positive_direction: true
      mpos_mm: 10.000

    motor0:
      rc_servo:
        pwm_hz: 50
        output_pin: gpio.22
        min_pulse_us: 1600
        max_pulse_us: 2500
        timer_ms: 60

i2so:
  bck_pin: gpio.16
  data_pin: gpio.21
  ws_pin: gpio.17

spi:
  miso_pin: gpio.12
  mosi_pin: gpio.13
  sck_pin: gpio.14

sdcard:
  cs_pin: gpio.15
  card_detect_pin: gpio.39

control:
  safety_door_pin: NO_PIN
  reset_pin: NO_PIN
  feed_hold_pin: NO_PIN
  cycle_start_pin: NO_PIN
  macro0_pin: gpio.27:low:pu
  macro1_pin: gpio.33:low:pu
  macro2_pin: NO_PIN
  macro3_pin: NO_PIN

macros:
  startup: $HZ
  macro0: $H
  macro1: $HZ
  macro2: $X
  macro3:

start:
  must_home: false

Have fun guys!

4 Likes

Cool

Hi Ser Fabio,
I think I have bought the same machine and have the same issues. I am also using FluidNC and have the same stepper drivers but I am having issues with the pen lift and the motor speeds. I see that you ended up heavily modifying your machine from stock, did you ever end up with a functioning config file for the original setup? Have only just started playing around and this thread was the first thing I found.
Best,
Aidan

AAargghhh!!

I messed up manually setting a new config file for the fluidNC. I added too many strange characters, so now I’m not able to delete the file, and its taking up space and I’m not able to upload a new file. I’ve tried reflashing the board, but the web installer is not able to reach boot mode. I have the MKS DLC32 v2.1. I’ve tried shorting GPIO0 and GND, which someone said is enabling boot. I used the .bat-based installer and fluidterm, but it only updated the firmware, it didn’t reflash. Sorry for this mess - I think the main culprit is the stupid file name: <sisteconfig.yaml>\ I’m not able to delete it, neither from terminal nor the webUI folder tool. What can I do?

Hello Aidan,

I ended up with the huge change and sequent configuration. It was too time consuming to make it work with the original hardware and the performances were anyway not satisfying… I’m sorry but I don’t have any config to share apart from the one already in the thread :confused:

Hi man! Long time no see. I would proceed with the usb cable and try to flash from scratch using the utilities in the laster FluidNC build on Github. I recently updated to 3.7.1 and it seems to work. Did you tried it already?

1 Like

Hi there! Yeah I did, but the old settings and files where still there. I find it difficult to understanding what is happening under the hood. There’s something about the fluidnc that is a little opaque to me…

Edit: I asked in the fluidNC Discord, and Bart himself reached out. A little embarassing… he told me to use install-fs.bat. A very obvious solution, when he points it out!!

1 Like

Hello everyone,

I’m delighted to come across this topic because I’m struggling with a similar thing. My programming skills are quite basic.

I’ve already designed a plotter using a CNC shield. This is my third attempt at creating a plotter, and I’m satisfied at 80% (compared to 0% for the first and second attempts and 20% for the third). I would like to (once again) design another CNC.

Main modifications:

Larger size
More robust
Extreme usage (extended working hours)
Dual use: plotter and CNC laser
Standalone operation (without a PC)

In terms of design, I’m still working on it using Fusion 360. The current result:

I’m also stuck on the choice of the laser module; I’m still undecided.

My big problem is also the control board. I would like to switch to an MKS DLC32, but I don’t know if it’s possible to easily control both the plotter servo and the laser since this board is designed only for the laser.

I’m trying to follow your discussion, which is very interesting.

Hello Esloch. I would say that the MKS DLC32 is more than capable for you purposes. It can handle 3 independent steppers (silently) and also some servos plus the laser too. I would give it a shot

1 Like

Excellent… but I would truly appreciate understanding the procedure to achieve this.

Reassure me: is it possible to operate both the laser and the servo with a single configuration?

I would prefer not to have to redo the wiring for each change—just to be able to relocate the module.

Can I have a wiring diagram to connect a servo and a Laser module… and also the necessary files to install on the board and on the screen

THANKS

Yes you can have them all controlled with a single configuration and this single board. I don’t have a laser to test it btw

1 Like

Hello Ser Fabio,
I am building a very similar open plotter to your system but of course not this much huge like a beast as you said (by the way: my respect sir).
I was wondering did you completely give up on running h-boat configuration with this board? And also if you are doing Cartesian configuration why do you need two separate y motor drivers, aren’t they both work simultaneously?

1 Like

Thanks mate!
Yeah, I completely gave up cause with hbot it is not possible (afaik) to use the sensorless homing of tmc2209, and I really wanted to have it.
I am using cartesian and I decided to use double Y steppers cause it was easier, more reliable and cheaper to precisely control the movement on the Y axis. The machine is big with a single motor it is not possible to avoid and bending on the Y. I also use two separate drivers that home independently so always reach an accurate horizontal alignment. If you are careful enough btw you can use a single driver with two steppers in parallel (but I recommend not to).

How big is your machine?

Bests,
F

That’s great reason for opting 2 y drivers thanks indeed . My setup is half size of your plotter. It’s A1 size, but I’m having difficulty running servo for the pen lifter without using fluidnc, because fluidnc disables the tft screen that came with my mks dlc32 :sweat_smile: and I want to have that working. Sensorless homing is not priority for me . Any advise would be highly appreciated for running that digital servo as pen lifter :pray:t2:

this is a very bad problem :confused: … for me :confused:

OK, I’ll leave the screen behind…no big deal… :cry:

I would not worry about the display. The web interface is much more usable and complete

2 Likes

This website says it is possible to use a small screen with FluidNC. This allows you to display important information, such as the IP address of the board, and the current position of the X, Y, and Z axes. Interesting, no !!??

1 Like

Hi Ser Fabio.
I complete,y gave up on hbot as well , Cartesian all the way , no more tft screen when the web interface is more than enough. Now i appreciate sensorless homing more. Basically I will do exactly same as your setup with two separate y drivers and servo pen lifter . Can you please help by providing the wiring diagram of your setup mate :pray:t2:?

1 Like

It would be great. BUT I was in need for a lot of free GPIOs to handle drivers, servo, etc… The display occupies too much lines :confused: