makerbase-mks / MKS-DLC32

MKS DLC32 motherboard kit, which is an offline engraving master control kit developed for desktop engraving machines. The hardware is equipped with a 32-bit high-speed ESP32 module, integrated WIFI function, and directly drives a 3.5-inch touch color screen; it can realize fast engraving and WEB web pages. Control, mobile phone APP control and other functions.
https://www.aliexpress.com/item/1005003183498253.html?spm=a2g0o.store_pc_home.productList_8356958.pic_0
273 stars 109 forks source link

pen plotter attachment #277

Open kdaffy opened 2 years ago

kdaffy commented 2 years ago

Hi. How could I use the MKS-DLC32 to control a servo to use it as a pen plotter?

renebohne commented 1 year ago

I use FluidNC Firmware with the board and attached a servo to the z-axis. G0 Z0 and G0Z-5 are the g-codes for controlling the z-coordinates which control the servo... see: https://github.com/bdring/FluidNC/wiki/FluidNC-Motor-Setup#rc-servo

istinnstudio commented 1 year ago

@renebohne
Can you post more details on this, like a simple how to? config files? Is this the default FluidNC Firmware or a recompiled with modified code?

additional useful links on this: https://github.com/lavolpecheprogramma/grbl-1-1h-servo https://www.instructables.com/How-to-Control-a-Servo-Using-GRBL/

helLf1nGer commented 5 months ago

I used RC Servo 1501 MG. I connected to the LCD pwm pin (io25, 5v, gnd here is the schematics http://wiki.fluidnc.com/en/hardware/3rd-party/MKS_DLC32). The travel is dictated from my config from z-5 to z5. Here is my configuration for the motor (I need only 30°, so I mapped only from 1300 to 1700):

  z:
    steps_per_mm: 100
    max_rate_mm_per_min: 5000
    acceleration_mm_per_sec2: 100
    max_travel_mm: 5
    homing:
      cycle: 0
      mpos_mm: 0
      positive_direction: true

    motor0:
      rc_servo:
        pwm_hz: 50
        output_pin: gpio.25
        min_pulse_us: 1300
        max_pulse_us: 1700

    motor1:
      null_motor:
istinnstudio commented 5 months ago

thanks... useful info