Welcome! Log In Create A New Profile

Advanced

Use laser with Marlin (Delta 3D printer)

Posted by raspdroid 
Use laser with Marlin (Delta 3D printer)
January 19, 2020 07:48PM
Hello,

I have a Trigorilla ATMega2560 board in a 3d printer with Marlin, I have printed this part in order to use a laser with pwm.

Arduino code is here

The laser has 3 pins, VCC (12V), GND and PWM, VCC and GND are connected to the 12V power supply output but where I can connect the PWM pin?


Best regards

Edited 1 time(s). Last edit at 01/19/2020 07:50PM by raspdroid.
Re: Use laser with Marlin (Delta 3D printer)
January 19, 2020 09:16PM
what voltage does the PWM pin on the laser expect? 5v or higher?

Also what exact controller? (picture please)

Is it this one?

And what other hardware are you using..

for eg if it needs 5v PWM you could use one of D4, D5, D6, D11, D12 on the servo pins. If your not already using them. (and this is the correct board)

on a mega2560 based board the PWM pins are D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13 Just find one that your not using that you can get to.

Edited 1 time(s). Last edit at 01/19/2020 09:32PM by Dust.
Re: Use laser with Marlin (Delta 3D printer)
January 19, 2020 09:28PM
Yes is that board

[chitoraspberrypi.blogspot.com]
ATMEGA256016AU

Pins D42, D43, D14, D3 and all servos are not used.

The laser is this

Edited 3 time(s). Last edit at 01/19/2020 09:47PM by raspdroid.
Re: Use laser with Marlin (Delta 3D printer)
January 19, 2020 09:53PM
Arduino pin 12 if not used and is pwm pin [camo.githubusercontent.com]

In this firmware is #define PS_ON_PIN 12

other pwm pins that are not used are:
#define SERVO0_PIN 11
#define SERVO1_PIN 6
#define SERVO2_PIN 5
#define SERVO3_PIN 4
Re: Use laser with Marlin (Delta 3D printer)
January 19, 2020 10:11PM
laser says its is a TTL/PWM so should be 5v. so use any free PWM pin.


Then it comes down to what the gcode expects... some laser software uses fan on/fan off commands. In which case you need to change the firmware so that the "fan" is on the pin you want to use.
Some use M42 command in which case you need to set the pin in software somewhere.
VDX
Re: Use laser with Marlin (Delta 3D printer)
January 20, 2020 03:40AM
... I'm using the step-pulses of the extruder (and my laser-drivers can set the pulse-length for effective power) -- so it's as easy as "G0 Xxx Yyy" for moving without laser and "G1 Xxx Yyy Eee Fff" with laser.

When defining "1 step per mm" for the extruder, then the "ee"-value will generate an exact pulse-chain - e.g. "G0 X0 Y0" followed by "G1 X20 Y0 E200 F1000" will result in a laserengraved line from XY=0;0 to 20;0 with a pulse every 0,1mm, regardles, how fast the movement (F-value) is cool smiley


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Re: Use laser with Marlin (Delta 3D printer)
January 20, 2020 08:43AM
Thanks for the replies,

I have try with "M280 P0" The servo0 pin but not works to me, the laser is always on.


@VDX I'm using Raster 2 Laser GCode generator, Inkscape plugin, I need put the command in "Laser ON Command" and if I select Gray Scale the plugin generate this:

; Generated with:
; "Raster 2 Laser Gcode generator"
; by 305 Engineering for Lasersaur
;
;
;
G21; Set units to millimeters
G90; Use absolute coordinates
G92; Coordinate Offset
G0 X0.0 Y0.0
M280 P0  S3
G1 X68.6 Y0.0 F500
M280 P0 S0
G0 X68.6 Y0.1
M280 P0  S3
G1 X0.0 Y0.1 F500
M280 P0 S0
G0 X0.0 Y0.2
M280 P0  S3
G1 X68.6 Y0.2 F500
M280 P0 S0
G0 X68.6 Y0.3
M280 P0  S3
G1 X0.0 Y0.3 F500
M280 P0 S0
G0 X0.0 Y0.4
M280 P0  S3
G1 X68.6 Y0.4 F500
M280 P0 S0


I think that is not possible to add the Enn in G line

Edited 1 time(s). Last edit at 01/20/2020 08:47AM by raspdroid.
VDX
Re: Use laser with Marlin (Delta 3D printer)
January 20, 2020 09:03AM
... I'm using Marlin4Due or Marlin2.0 as firmware -- and a Pronterface-variant on the PC ...


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Re: Use laser with Marlin (Delta 3D printer)
January 20, 2020 09:14AM
get it working at all first...

Some TRIGORILLA servo0 is pin 5
#if MB(TRIGORILLA_14_11)
#define SERVO0_PIN 5
#define SERVO1_PIN 4
#define SERVO2_PIN 11
#define SERVO3_PIN 6
#endif

vs
#define SERVO0_PIN 11
#define SERVO1_PIN 6
#define SERVO2_PIN 5
#define SERVO3_PIN 4

so try P2
try sending M280 P2 S255 etc
Re: Use laser with Marlin (Delta 3D printer)
January 20, 2020 12:12PM
Not works to me.

Then I tried to solder the wire to the led in the FAN_PIN_0 and now works perfect. And not is necessary to set the P.


Thank you and regards

Edited 1 time(s). Last edit at 01/20/2020 12:14PM by raspdroid.
ALF
Re: Use laser with Marlin (Delta 3D printer)
February 28, 2020 09:15AM
Hello
I'm sorry to ask a slightly stupid question ( i begin) about setting up a laser on a 3D printer
I work with a TEVO TARANTULA PRO whith motherboard MKS GEN L (ATMEGA2560)
in the "configuration.adv.h" there are lines of code that speak of the laser line 2636 (see attached file)
Would anyone be kind enough to help me for modify MARLIN

THANKS
Attachments:
open | download - Configuration_adv.h (121.7 KB)
Sorry, only registered users may post in this forum.

Click here to login