Jump to content

Control Ultimaker 2 LEDs Via GCode?


scottd

Recommended Posts

Posted · Control Ultimaker 2 LEDs Via GCode?

Hi Everyone,

Long time lurker here. I am just curious if anyone knows how to control the LED lights on the Ultimaker 2 using GCode. I currently have my UM2 machines controlled with Octoprint and I would like to be able to send GCode commands to control the PWM of the LEDs during a USB print.

Thank you very much.

Scott

  • Link to post
    Share on other sites

    Posted · Control Ultimaker 2 LEDs Via GCode?

    Using LED J15: Control it in G Code with M42 P13 SXXX where XXX is a value between 0 and 255.  Use M42 P13 S0 to turn the leds off.

    But I may be wrong.

     

    Actually LED_PIN is 13 on the UMO board and pin 8 (PH5) for the UM2...

    ...but never mind - the LED_PIN is the default for the M42 command.

    You can omit the pin number and everything between

    "M42 S0" and "M42 S255"

    should work with every Marlin version out there...

  • Link to post
    Share on other sites

    Posted (edited) · Control Ultimaker 2 LEDs Via GCode?

    Hey Labern,

    Thanks for the info.  I am using Octoprint to send G Code commands to my printer and unfortunately, the M42 command on Pin 13 seems to be killing the connection to the printer.

    I sent M42 P13 S0 to the printer and the LED turned off, so I thought I was good, but I just realized the connection has been killed and would need to be reconnected.  Any other commands I sent to the printer (i.e. M105), would get no response after that.

    Is there a way to confirm that the LEDs are using Aux Pin 13?

    Thanks again!

    --Scott

    Edited by Guest
    Spelling
  • Link to post
    Share on other sites

    Posted (edited) · Control Ultimaker 2 LEDs Via GCode?

    Actually LED_PIN is 13 on the UMO board and pin 8 (PH5) for the UM2...

    ...but never mind - the LED_PIN is the default for the M42 command.

    You can omit the pin number and everything between

    "M42 S0" and "M42 S255"

    should work with every Marlin version out there...

     

    Excellent.  I think my issue may be with Octoprint sending the commands.  If I send M42 S0 it will lock up the connection.  The LEDs do turn go off every time the connection breaks though.  

    Very strange behavior.

    Thank you,

    --Scott

    Edited by Guest
  • Link to post
    Share on other sites

    Posted · Control Ultimaker 2 LEDs Via GCode?

    Can anyone confirm the M42 command works with the Ultimaker 2? If so, I will take a look at Octoprint as being the culprit of the behavior.

    Thanks guys!

    --Scott

  • Link to post
    Share on other sites

    Posted · Control Ultimaker 2 LEDs Via GCode?

    It works. I use it on my umo+ (same board)

  • Link to post
    Share on other sites

    Posted · Control Ultimaker 2 LEDs Via GCode?

    Thank you very much for the confirmation. I have opened an issue with OctoPrint to see what could be going on here. Thanks again everyone.

    --Scott

  • Link to post
    Share on other sites

    Posted · Control Ultimaker 2 LEDs Via GCode?

    It works. I use it on my umo+ (same board)

     

    Which application are you using to send the G Code to your machine?

    I just tried using Printrun to send the M42 S0 command and it failed and locked up the connection the same as it did with OctoPrint.

    Any thoughts on what could be going on here? Maybe there is a difference between the UMO+ board and the UM2 board?

    Can anyone test on an UM2?

    Thank you,

    --Scott

  • Link to post
    Share on other sites

    Posted (edited) · Control Ultimaker 2 LEDs Via GCode?

    Which application are you using to send the G Code to your machine?

     

    I use it on my auto0.g file on my umo+ it makes the lights to go on when the printer it's power on.

    The M42 it's described on the Marlin for Ultimaker 2

    https://github.com/Ultimaker/Ultimaker2Marlin/blob/master/README.md

    Edited by Guest
  • Link to post
    Share on other sites

    Posted · Control Ultimaker 2 LEDs Via GCode?

     

    Using LED J15: Control it in G Code with M42 P13 SXXX where XXX is a value between 0 and 255.  Use M42 P13 S0 to turn the leds off.

    But I may be wrong.

     

    Actually LED_PIN is 13 on the UMO board and pin 8 (PH5) for the UM2...

    ...but never mind - the LED_PIN is the default for the M42 command.

    You can omit the pin number and everything between

    "M42 S0" and "M42 S255"

    should work with every Marlin version out there...

     

    I just happened to be reading a post on using and UM2 for laser engraving so was a cut n paste from that article. But glad you corrected the mistake.

  • Link to post
    Share on other sites

    Posted · Control Ultimaker 2 LEDs Via GCode?

    Has anyone been able to confirm that this M42 command works on the UM2? Both of my UM2 machines crash when I send this command either through a terminal or running off the SD card. Very strange, right?

  • Link to post
    Share on other sites

    Posted · Control Ultimaker 2 LEDs Via GCode?

    A little additional info about the SD card testing... I put the M42 S0 command at the beginning of one of my prints and when I ran it from the SD card it crashed the printers. This is happening on all 3 UM2s that I tested it on.

    Any help would be appreciated!

    Thank you,

    --Scott

  • Link to post
    Share on other sites

    Posted · Control Ultimaker 2 LEDs Via GCode?

    Has anyone been able to confirm that this M42 command works on the UM2?

     

    I found some time today and made a short test.

    I can confirm that this command does not work properly. Your printers hardware is ok and Octoprint too, i'm pretty sure that you found a bug in the Marlin firmware. Honour to whom honour is due. :)

    I will take a closer look at it in the next days and fix it for the tinker firmware. Which firmware version are you using?

    • Like 1
    Link to post
    Share on other sites

    Posted · Control Ultimaker 2 LEDs Via GCode?

    WOW! That is good that it was not just me, I thought I was crazy for a moment. :) I am using firmware version 15.04.02 on all of my machines. I believe this is the latest.

    Please let me know if you need anything else. Thanks!

    --Scott

  • Link to post
    Share on other sites

    Posted (edited) · Control Ultimaker 2 LEDs Via GCode?

    Ok, it was i simple fix. The M42 command works like intended now.

    Here is the updated release of the tinker firmware. You can install it with Cura 15.04 (Machine -> Install custom firmware...)

    I also made a pull request for the standard firmware, but there was no activity for months -

    so this may take some more time...

    Edited by Guest
    • Like 2
    Link to post
    Share on other sites

    Posted · Control Ultimaker 2 LEDs Via GCode?

    Thank you so much for taking a look at that!

    I will install the tinker firmware once my printing queue frees up a bit.

    Thanks again! Hope to see this in an official release soon.

    --Scott

  • Link to post
    Share on other sites

    Posted (edited) · Control Ultimaker 2 LEDs Via GCode?

    @scottd

    listen to me ...

    ... one time you install "Tinker" firmware ... you never go back to the "official" :D:D:D

    Guglielmo

    P.S.: I hope ... maybe one day ... "Tinker" firmware becomes the "official" one ;)

    Edited by Guest
  • Link to post
    Share on other sites

    Posted · Control Ultimaker 2 LEDs Via GCode?

    @scottd

    listen to me ...

    ... one time you install "Tinker" firmware ... you never go back to the "official" :D:D:D

    Guglielmo

    P.S.: I hope ... maybe one day ... "Tinker" firmware becomes the "official" one ;)

     

    Installing Tinker now! :)

  • Link to post
    Share on other sites

    Posted · Control Ultimaker 2 LEDs Via GCode?

    Oh no! I installed the Tinker Firmware and when I use OctoPrint, my nozzle will shut off as soon as it gets to temperature on every print. Is there a place where I can log this issue for this Firmware?

    Thanks,

    --Scott

  • Link to post
    Share on other sites

    Posted · Control Ultimaker 2 LEDs Via GCode?

    Oh no!  I installed the Tinker Firmware and when I use OctoPrint, my nozzle will shut off as soon as it gets to temperature on every print.  Is there a place where I can log this issue for this Firmware?

     

    Assuming that everything else is the same as before (esp. the gcode file), this indeed should not happen.

    Best would be to report a new issue on the GitHub page. You can attach additional files there. Though you would need to create an account first (it's free).

  • Link to post
    Share on other sites

    Posted · Control Ultimaker 2 LEDs Via GCode?

    Oh no!  I installed the Tinker Firmware and when I use OctoPrint, my nozzle will shut off as soon as it gets to temperature on every print.

     

    Hi Scott,

    I don't use OctoPrint (... I still believe that USB printing is NOT reliable, but it is just my personal opinion), but, as also tinkergnome said, this should not happen so ... please follow thinkergnome instructions and open ad issue on GitHub ...

    ... and you help all the community to have a better firmware :)

    Guglielmo

  • Link to post
    Share on other sites

    Posted · Control Ultimaker 2 LEDs Via GCode?

    My Tinker Firmware is now installed and functioning correctly! This is outstanding firmware with great support. I am not sure I will be able to switch back. :D

    --Scott

  • Link to post
    Share on other sites

    Posted · Control Ultimaker 2 LEDs Via GCode?

    So what was the problem with octoprint?

  • Link to post
    Share on other sites

    Posted · Control Ultimaker 2 LEDs Via GCode?

    So what was the problem with octoprint?

     

    Actually it's a firmware bug...

    I think the heater timeout prohibits USB printing at the moment. The (temporary) solution was to disable the timeout in the preferences.

    Who has programmed this nonsense? ... ... ... oh ... :):):)

    • Like 2
    Link to post
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
    • Our picks

      • UltiMaker Cura 5.7 stable released
        Cura 5.7 is here and it brings a handy new workflow improvement when using Thingiverse and Cura together, as well as additional capabilities for Method series printers, and a powerful way of sharing print settings using new printer-agnostic project files! Read on to find out about all of these improvements and more. 
         
          • Like
        • 16 replies
      • S-Line Firmware 8.3.0 was released Nov. 20th on the "Latest" firmware branch.
        (Sorry, was out of office when this released)

        This update is for...
        All UltiMaker S series  
        New features
         
        Temperature status. During print preparation, the temperatures of the print cores and build plate will be shown on the display. This gives a better indication of the progress and remaining wait time. Save log files in paused state. It is now possible to save the printer's log files to USB if the currently active print job is paused. Previously, the Dump logs to USB option was only enabled if the printer was in idle state. Confirm print removal via Digital Factory. If the printer is connected to the Digital Factory, it is now possible to confirm the removal of a previous print job via the Digital Factory interface. This is useful in situations where the build plate is clear, but the operator forgot to select Confirm removal on the printer’s display. Visit this page for more information about this feature.
          • Like
        • 0 replies
    ×
    ×
    • Create New...