Welcome to Our Community

Some features disabled for guests. Register Today.

Grbl question

Discussion in 'Control Software' started by wvu_kuiken, Oct 12, 2017.

  1. wvu_kuiken

    Builder

    Joined:
    Mar 18, 2017
    Messages:
    4
    Likes Received:
    0
    I'm wiring an enclosed control box and would like an indicator when i plug my usb in to my arduino and connect to the grbl firmware. I'd like to run a 24v led powered off of a relay from the arduino. Is there a code that I can use in the Grbl config that sets a pin high (send 5v to the relay) once connected to the grbl through grbl panel? I'm now seeing that you can set start up commands through $n in grbl. Is this a route that I can take? If so, can anyone help with the syntax I would use if I'd like to use pin 1 or pin 11 since I won't be using PWM control on the spindle?

    Thanks.
     
  2. phil from seattle

    phil from seattle Journeyman
    Builder

    Joined:
    Mar 17, 2017
    Messages:
    66
    Likes Received:
    16
    Why 24V? With a dropping resistor, you could just run the led off the arduino 5V or one of the output pins.

    Or you could run a 5V relay off the Arduino 5V to switch 24V to the led. Though, that pulls a lot more power. Add in a reversed diode to prevent kickback if you do it that way.

    I understand you want the led to indicate the grbl connection but won't you have ample indication via your PC? I'd just use the Arduino power approach.

    Anyway, there are 3 possible outputs - spindle, mist, flood. you could configure any of those for that purpose. There are M commands for them though spindle has some specific issues iirc. Mist or flood is simpler - M7 - mist and M8 - flood. Mist needs to be config'd in config.h and rebuilt. Pretty easy to do though.
     

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