Welcome! Log In Create A New Profile

Advanced

Help needed for SLS printer

Posted by rada0620 
Help needed for SLS printer
May 01, 2016 02:47PM
Hi guys

I am building a SLS printer. I am using Ramps 1.4 and Marlin 1.1.0 RC5. I configured Marlin to work with my machines specifics.
For turning on and off the laser diode I planed to use the extruder 0 's direction pin, when the extruder would extrude the direction pin gives 5V when not it retract and gives 0V. It is working while printing the layers but when changing layer it doesn't want to work. I tried diferent things:
  • With Slic3r I tried Retract when layer chang
  • Tried adding costom gcode lines befor and after layer change

    But nothing works.
    Last I found M42 command to turn on/off pins. For this to work I had to comment out a line in Marlin because it is a sensitive pin which shoudn't be turned on/off from gcode. Now from manual command I can turn this pin on/off with this M42 P28 S0/S255 line, but not from generated gcode.

    Hope somebody can help me with this problem.
    Thanks guys

    Edited 1 time(s). Last edit at 05/01/2016 02:48PM by rada0620.
Re: Help needed for SLS printer
May 02, 2016 02:04PM
What is the problem with switching layers? Is it leaving the laser turned on as it changes position? And I presume, you want the laser off while it is changing layers???
Re: Help needed for SLS printer
May 03, 2016 04:30AM
As you say, I give the command to the pin but it don't turn off on layer change, it works on manual command but not from gcode. If you need more information I can give more details about the machine and my changes of Marlin.
Thanks
Re: Help needed for SLS printer
May 04, 2016 10:52PM
Extruder direction pin might not be the best choice. Do you want to be able to set variable power? Probably the laser should be connected to one of the pins usually reserved for fans. I don't know if PWM can work to tune a variable laser, but that would also be an option by using a fan pin.


|
| Lead Developer of Marlin Firmware
| Help support my work at Patreon and Elsewhere.
|
Re: Help needed for SLS printer
May 05, 2016 05:28AM
I didn't planed to connect the laser directly to the direction pin, my idea is to connect it to a transistor's base leg. I upload the circuit I use. It works on printing but not on layer change the laser don't turn off. I find it strange a command works from manual command but not from gcode. Maybe there are some more lines in Marlin what I didn't find and it disables the M42 command. Please help me find a way to make it work.
Thanks
Attachments:
open | download - circuit.jpg (408.2 KB)
Re: Help needed for SLS printer
May 05, 2016 01:11PM
M42 is protected. You aren't allowed to modify certain pins with this command, if Marlin is using them. Specifically, the current version of Marlin will not allow you to use M42 with the following pins – See "pins.h" …

#define SENSITIVE_PINS { 0, 1, \
    X_STEP_PIN, X_DIR_PIN, X_ENABLE_PIN, X_MIN_PIN, X_MAX_PIN, \
    Y_STEP_PIN, Y_DIR_PIN, Y_ENABLE_PIN, Y_MIN_PIN, Y_MAX_PIN, \
    Z_STEP_PIN, Z_DIR_PIN, Z_ENABLE_PIN, Z_MIN_PIN, Z_MAX_PIN, Z_MIN_PROBE_PIN, \
    PS_ON_PIN, HEATER_BED_PIN, FAN_PIN, CONTROLLERFAN_PIN, \
    EXTRUDER_0_AUTO_FAN_PIN, EXTRUDER_1_AUTO_FAN_PIN, EXTRUDER_2_AUTO_FAN_PIN, EXTRUDER_3_AUTO_FAN_PIN, \
    _E0_PINS _E1_PINS _E2_PINS _E3_PINS \
    analogInputToDigitalPin(TEMP_BED_PIN) \
  }

This is checked in gcode_M42 with:

for (uint8_t i = 0; i < COUNT(sensitive_pins); i++)
      if (pin_number == sensitive_pins) return;

It should probably be modified to print a message, but currently it will just return and fail silently.


|
| Lead Developer of Marlin Firmware
| Help support my work at Patreon and Elsewhere.
|
Re: Help needed for SLS printer
May 06, 2016 02:55AM
Ok thanks for the help. I will try the fan connectors. Can you suggest a page with good instructions on how to connect and program it?
Thanks
Sorry, only registered users may post in this forum.

Click here to login