various questions (wiring, mountung, control)
April 05, 2016 10:32PM
Hello, Prusa i3 owner here, just got a chinese 2w laser module w/ driver

As of now, I have it wired as as the layer fan (D9) and using M106 SXXX/ M107 to PWM it
Is this the best way? the driver has a TTL input which i did not connect. I saw a few post that mention high speed on/off to control power

Also, what Linux tools do i have? im using inkscape with a gcode plugin which does not look like it can do engraving with different power levels (grayscale)

* Is there any quick mount for the X carriage to change between laser and extruder quickly? (without screws removal)

* I tried LaserWeb but gcode is G1 X0.0 Y68.5 S41 which does not turn on the laser in marlin, i had updated machine definition with M106 but i still get this code format.

Edited 1 time(s). Last edit at 04/05/2016 10:34PM by luismanson.
Re: various questions (wiring, mountung, control)
April 06, 2016 05:41AM
I run the Turnkey Tyranny firmware (Marlin based) on my laser cutter.
With some mods it is no problem to do 8bit engravings at quite high speeds (in my case 6000mm/min).
But I thought most people GRBL on their diode laser machines?

You should check if your laser driver supports the "on-off" method for the PWM signal - it can't be too good for the electronics.
The TTL input does exactly the same, it turns on if there is a signal and off if there is none - big difference is that the electroncs stay powered and won't get the shock from switching on.
Question is if the TTL input is fast enough but it should.
Give Image2Gcode a chance, it should do what you want.
Otherwise you can still modify the firmware to accept the commands you need or use Notepad++ to replace the "Sxxx" with "\r\nM106 Sxxx\r\r"
Re: various questions (wiring, mountung, control)
April 06, 2016 06:22PM
Thanks Downunder35m, do you know where so I put 12v rail directly. but where do u wire TTL? (i think its rated 5v max)
the schematic in the marlin mod you use its for another module (laser fire and laser pwm) I only have TTL

will check FW later

Edited 1 time(s). Last edit at 04/06/2016 06:24PM by luismanson.
Re: various questions (wiring, mountung, control)
April 06, 2016 08:03PM
The firmware can be used for single and daul pin firing.
Either one pin provides the "on" signal and the other the PWM signal or
just one pin and just the PWM signal.
The TTL logic is slightly different from a real PWM control, it needs some time for the signal to rise and fall.
Around 5ns for this is a normal value.
Try the "FADE" example and instead of a LED you add the TTL input.
To be on the safe side with the unknown module put a 1k resistor is series with the TTL input.
Now when you upload the sketch your laser should change intensity from off to full and back just like the LED.
If that works than it should work in a similar way through the Marlin Firmware, if not you can still try to set the PWM frequency from the standard 8kHz down to 5kHz.
Re: various questions (wiring, mountung, control)
April 07, 2016 09:52PM
It would be nice to know what controller you have?

Thank you for giving us the details on laser diode and driver circuit
and your printer controller.

Megatronocs or a RAMPS?

A 2W diode laser probably needs a 4 - 5 amp supply
driver usually 9 - 18v
I would use a separate supply --- save your printer supply for printing

Driver is powered ON ( voltage supplied to driver)
there should be a trigger pin to start and stop diode laser.

there maybe a switch to select continous or pulsed operation

What is your intended use? Engraving, cutting or just fring your eyes?

[jtechphotonics.com]

will show how a real USA unit is set up.

confused smiley
Re: various questions (wiring, mountung, control)
April 07, 2016 10:03PM
Hello, this is the laser and driver module: [www.ebay.com]

Im using RAMPs with Marlin.
The item says:
Quote

TTL signal input 0~5V input.(0V OFF/5V ON)(TTL Modulation control the output beam OFF / ON )
(TTL Modulation: Make sure input TTL level PWM dightal signal)
Frequency for TTL control:0-20KHz;
Duty cycle:input 1%-100%;

Thanks cosmicray, i had found those modules, but since im from another country the "real way" is out of my budget

My first goal is to engrave. I did requested two protection googles, however i plan to box the printer, fring eyes is not in my ToDo list yet...at least until i can get all my doubts sorted out tongue sticking out smiley
Re: various questions (wiring, mountung, control)
April 07, 2016 10:14PM
When you only have a TTL input on the diode driver you can use for example one of the servo pins, which you dont use anyway.
Either reconfigure your firmware to use the servo pin, typically pin numbers in the range 4-7, as the fan pin and then use M106/107.
OR use directly M42 P5 S178 for use of pin 5. However in a program you need to use
M400
M42 P5 Ssss
because someone thought it was a good idea that M42 is performed asymchronpusly. M400 makes sure it happens at the expected time.
VDX
Re: various questions (wiring, mountung, control)
April 08, 2016 02:23AM
... I'm using the STEP pin of the extruder for generating synchrone pulsing, as it's automatically calculated to meet the correct position and moving speed ...


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: various questions (wiring, mountung, control)
April 08, 2016 09:31AM
Thanks falwty99, thats the info i needed.


VDX, that looks interesting, can you elaborate on this setup? I guess wiring is simple, 12V directly, TTL to step. but what settings do you use in firmware (marlin?) and in g-code generator tool
VDX
Re: various questions (wiring, mountung, control)
April 08, 2016 11:40AM
... I'm using Pronterface and Marlin4Due for developing a paste-dispensing application, but it's the same for laser-engraving too.

The main change in Marlin4Due was to set the "smallest E-step range" to 0 ... it was set to 5, so when starting a line or single pulses, only every 5th E-step produced a pulse.

The G-code is nearly the same - e.g. "G0 X0 Y0 F6000" and "G1 X11.1 Y22.2 E15 F3000" will create a line with 15 droplets from X/Y 0/0 to 11.1/22.2
... while "G0 X11.1 Y22.2 F6000" and "G1 E15 F1000" will create a 'blob' with 15 droplets on the same position.

But I had to change the 'printing behaviour' for E-moves without X/Y-moves in Pronterface, as normally pure E-moves in G-code won't be extruded/printed ...


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: various questions (wiring, mountung, control)
April 08, 2016 11:48AM
thanks =)
Re: various questions (wiring, mountung, control)
April 10, 2016 07:04PM
well...to be honest. i dont get it. I guess the electronics of this laser works diferently.
I have +12v from D9. (for this example, lets assume its ON)

now, TTL from driver are: white + / blue -
when i plug them in D5 laser goes ON. there is no way to turn it off, but this can be a marlin think, because i use a servo. while i do have only one. it might be playing with those pins

Now...D42 works, on/off control. but it ignores D9 power level...I guess its taking 12v directly and D9 mosfet works on ground??


YUP, im officlially confused on how to use this laser:
(confirmed D9 is switched at ground)

1- i wan to (try to) keep marlin
2- i need to control its power, but i cant do PWM, only (fast?) ON/OFF
3- i do not want to change firmwares to print and engrave

Edited 2 time(s). Last edit at 04/10/2016 07:10PM by luismanson.
Re: various questions (wiring, mountung, control)
April 11, 2016 12:55AM
What Marlin are you using?
Standard? Turnkey Tyranny? Something else?
The TTL input should work with 5V but not 12V - can be wrong though.
If you power the laser it should be off, give 5V on the TTL input and the laser goes on.
There might be a jumper for this.
Usualy approach would be to power the laser with the machine and to have the laser TTL connected to the PWM output.
Re: various questions (wiring, mountung, control)
April 11, 2016 03:23AM
If you with D42 mean pin 42 (and not M42 command) the PWM capable pins are pins 2-13 and 44-46 according to [www.arduino.cc]
so one of those pins should be fine. Perhaps best to avoid the servo pins if you use a servo but I am not sure there.
Other pins will just be ON or OFF, so if you used D42 then it should be on or off.
D44 is in AUX-2 [www.geeetech.com] , try that.

Regarding D5 - you didn't happen to plug it into the +5V? There are three pins +5V, D5 and GND.

Edited 2 time(s). Last edit at 04/11/2016 05:30AM by falwty99.
Re: various questions (wiring, mountung, control)
April 11, 2016 06:49PM
well..laser on/off no PWM ¬¬ <=254 off / 255 = on, full power.
I guess i need some way (firmware?) to turn it on/off a few times per seccond
Re: various questions (wiring, mountung, control)
April 11, 2016 07:38PM
ok... who knows D44 does NOT work...however D6 does, but the laser start ON at power on
Re: various questions (wiring, mountung, control)
April 12, 2016 12:45AM
Have that too, always surprises me...
Re: various questions (wiring, mountung, control)
April 12, 2016 01:27PM
Perhaps this may help

Marlin Firmware modification for Laser Control

Looks like Pins 42, 44 used for laser trigger

[dreammakercnc.blogspot.com]


JTech RAMPS1.4 Laser Upgrade

this uses fan control D9 hooked to trigger

[jtechphotonics.com]


confused smiley
Re: various questions (wiring, mountung, control)
April 12, 2016 01:51PM
Thanks Ray, i think i will use D9 for 12v, and D6 for PWM t the TTL, that way a have two control forms *security

I still have to figure how and why D6 is at 255 on startup^(laser at full power on arduino start, WTF is going on with D44, Arduino doc says its PWM, and then a software election
Re: various questions (wiring, mountung, control)
April 12, 2016 02:26PM
I think the laser goes on during the short run of the bootloader.'
It will go on during download of new firmware as well.
Re: various questions (wiring, mountung, control)
April 12, 2016 04:20PM
You have to look at the software you will be using to do laser engraving
and what commands it uses to control the laser
Some let you choose laser control command others are fixed.
Some treat laser as just another splndle.

I have also seen where laser is turned ON / OFF to set power
others set laser output.

I have little experience with 3D printer to laser engraver
I am using Shapeoko 2 driven by GRBL with laser in place of spindle.


confused smiley

Quote
luismanson
Thanks Ray, i think i will use D9 for 12v, and D6 for PWM t the TTL, that way a have two control forms *security

I still have to figure how and why D6 is at 255 on startup^(laser at full power on arduino start, WTF is going on with D44, Arduino doc says its PWM, and then a software election
Re: various questions (wiring, mountung, control)
April 12, 2016 04:28PM
what software can I look into? i saw laserweb and some inkscape plugins
Re: various questions (wiring, mountung, control)
April 13, 2016 02:52AM
It turns out that the servo functions use timer 5 and PWM for pins 44-46 are also
controlled by timer 5. So pins 44-46 can not be used for PWM when also using servo.
Without servos is should be fine with pin 44-46.

After a bit of googling it turns out that during reset all Mega's pins go to high-impedance state,
thus a floating voltage can be seen from the pin. Obviously interpreted as "high" by the laser driver.
Easiest solution is to connect a small pull-down resistor to the TTL positive pin.
I will do that myself, good that this question came up.

Edited 1 time(s). Last edit at 04/13/2016 03:19AM by falwty99.
Re: various questions (wiring, mountung, control)
April 13, 2016 09:04AM
falwty99, thanks for the explanation, case closed on that one, I did a test about the seccond issie, my solution was to also define that pin as a servo, laser is OFF at startup. Since i still have ground via D9, i do not know, if there is a small pulse on arduino startup, I'll conect 12v directly to be sure and in any case go with your solution resistor between signal and ground. should it be 1 or 10K?
Re: various questions (wiring, mountung, control)
April 13, 2016 05:41PM
Like 5k-10k

Edited 1 time(s). Last edit at 04/13/2016 05:41PM by falwty99.
Re: various questions (wiring, mountung, control)
October 31, 2016 04:54PM
Quote
cozmicray
Perhaps this may help

Marlin Firmware modification for Laser Control

Looks like Pins 42, 44 used for laser trigger

[dreammakercnc.blogspot.com]

May I know how is the wiring done for this 2 pins between RAMPS and the Laser TTL board? Is there any wiring diagram? Thanks a lot.
Sorry, only registered users may post in this forum.

Click here to login