Welcome to Our Community

Some features disabled for guests. Register Today.

Change spindle pwm pin in GRBL-Mega1.1

Discussion in 'Control Software' started by dportero, Aug 4, 2021.

Tags:
  1. dportero

    dportero New
    Builder

    Joined:
    Aug 4, 2021
    Messages:
    2
    Likes Received:
    0
    I hope someone can help, as my weeks-long search has not yielded any answers looking at different forums and google searches.

    I have a laser that I am wanting to control with PWM using the GRBL-Mega fork. I am using a MKS Gen L board, so the default pin 8 for PWM spindle control is too high of a voltage, as it is running at 24V. My other problem is that pin 6 is also not working and therefore I need to switch to another PWM pin. I have Pin 11 free right now, but even if I switch the DDR and PORT to B and the PWM-Bit to 5, nothing happens on pin 11. I am assuming that it has something to do with the other lines above that make no sense to me.

    Does anyone have a good method or resource for changing the pins used in grbl? I would be forever indebted to you as this is a project for my wife and she is not happy that I cannot get it working.

    Thanks
     
  2. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    13,751
    Likes Received:
    4,070
    So pins cannot be swopped easily (hardware capabilities of the pins. Some are pwm capable, some are not). As for changing them, refer to the Grbl Github repo/issues/wiki

    :) tell her you need a BlackBox - https://docs.openbuilds.com/blackbox - it just works :)
    Or grab the pwm signal off the board, at the gate of the mosfet
     
  3. dportero

    dportero New
    Builder

    Joined:
    Aug 4, 2021
    Messages:
    2
    Likes Received:
    0
    So Pin 11 is still a PWM enabled pin, no worries there.

    How does one grab the pwm signal before the mosfet?
     
  4. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    13,751
    Likes Received:
    4,070
    Usually you'll find a resistor prior to the gate pin of the mosfet, the one end of the resistor going to the microcontroller, the other to the mosfet. This is a PWM signal at 5v
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice