Welcome! Log In Create A New Profile

Advanced

What is the difference between these two lasers

Posted by Flashsolutions 
What is the difference between these two lasers
June 28, 2016 09:26PM
I have been looking at adding a laser to either my 3D printer or my MPCNC machine. Trying to keep the cost down, I have found two inexpensive china type lasers I am considering.

The first is [www.ebay.com]

The second is [www.ebay.com]

The first is a 2W laser with an external controller while the second is a 2.5W laser which seems not to have a controller, but both have TTL input.

I'm not sure if I need an additional driver with the second laser. The specs differ regarding TTL modulation.

I want to use this with a RAMPS 1.4 running Repetier software. I am aware of the TTL input voltage requirement and understand I should not use D9 directly as it outputs 12V (my supply voltage to the board).

What I don't quite understand is whether the power of the laser can be adjusted with either of these two lasers or is the power only adjusted via gcode commands. ie: if I connect the 12V to the laser via an adjustable power supply, can I control the laser power output?
VDX
Re: What is the difference between these two lasers
June 29, 2016 03:10AM
... the laser diodes should be the same - only with the second one the driver is inside the diode housing too.

With TTL you have to define the averaged power by the length of the pulses.

This could be with PWM, but better done with 'discrete' pulsing, where you have more control over the pulse rates and -lengths ...


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: What is the difference between these two lasers
June 29, 2016 09:54AM
Thank you Viktor.

I have a couple of concerns still. I would prefer to use Repetier software on a RAMPS 1.4 board. The output would come from D9, the fan control, which is 12V PWM, but I have no idea where I would have control over the pulse rates and lengths.

Maybe I would need to use Marlin controller software? Not familiar with it. I assume the controller is where the pulse rates and lengths are defined?

Because the board outputs 12volts that would damage the diode. I am wondering if I could put a second driver in place that feeds the internal driver of the above mentioned ebay diode. The driver link is here... [www.ebay.com] This would allow me to use the higher input voltage from D9 on the RAMPS board, but I don't know if feeding the Diode with two drivers will work.
Re: What is the difference between these two lasers
June 29, 2016 10:32AM
Quote
Flashsolutions
Thank you Viktor.

I have a couple of concerns still. I would prefer to use Repetier software on a RAMPS 1.4 board. The output would come from D9, the fan control, which is 12V PWM, but I have no idea where I would have control over the pulse rates and lengths.

Maybe I would need to use Marlin controller software? Not familiar with it. I assume the controller is where the pulse rates and lengths are defined?

Because the board outputs 12volts that would damage the diode. I am wondering if I could put a second driver in place that feeds the internal driver of the above mentioned ebay diode. The driver link is here... [www.ebay.com] This would allow me to use the higher input voltage from D9 on the RAMPS board, but I don't know if feeding the Diode with two drivers will work.

Hey, I am not Victor but here is my experiences (I am still learning):

Do you have any particular need for pulsing the diode? If you are just going to cut you will be running full power anyways. Then all you do is put 5V on the TTL pin and it stays on full. You can control this with: M42 P[PIN] S255 where PIN is the pin on the RAMPS you connect it to OR you connect it to the DIR pin on the stepper and have it send a retract signal whenever not to lase.


All above only holds true for Ramps with Repetier.
Best approach in parts depends on how you plan to generate the G-code.

The M42 approach have two significant downside; It goes auto high when powering on the RAMPS and it does not have some kind of priority in Repetier software so you need to put M400 before the M42 command. The M400 command makes the printer finish all moves before continuing.

I use Notepad++ to edit code made with Eagle and [pcbgcode.org] . In notepad++ you can make a replace like:

Line made by PCBcode:

G01 Z2.5400

Replace with:
M400 \n M42 S0 \n M400


The \n makes it go new line. PCBcode makes the G01 Z2.54 because it think you are milling the PCB.


I think it is better to use retract in that case you will call

G10 to turn off (this will make the DIR pin go back)

and

G11 to turn on (this will make the DIR pin go forward)

Or wise versa, I can't remember now which of the two gives 5V and which one does not.

With G11 and G10 you don't need to call M400 because it has priority.

I am still using the M42 when I use mine, but only because that is what I have working now. I want to start using the retract commands but one step at a time. smiling smiley
Re: What is the difference between these two lasers
June 29, 2016 10:40AM
Uh,

Some people use the STEP pin to control the TTL input because the STEP for the extruder auto scales with the velocity of the printer so if it is moving very fast it gives many step pulses and if moving slow it gives fewer.

Sounds nice when written here. Now getting the Gcode to call steps and have that translated proper into TTL pulses which scales to a power we want....

Maybe just put an arduino between the RAMPS and the laser control and put a dial control on that. Then have that arduino create the pulses and control the intensity manually with the dial control?

Lasers are difficult. My suggestion after not insignificant hours invested: Start small and simple. Then expand.
Re: What is the difference between these two lasers
June 29, 2016 10:59AM
@LarsK At the moment, I don't know what I will use it for. Maybe etching mostly. I like the idea of using the fan output because Repetier Host and Server as well as Octoprint all have a UI where I can change the fan speed on the fly without having to rewrite the GCODE. And too, this is just a hobby for me. Something more to learn. I have a 3D printer, and now I have the MPCNC machine, so adding a laser to it seemed like the next logical step. I am retired and on limited income, so I am trying to keep the costs down. If I had the cash to spend, I would go with the Jtech kit, but it is a tad more than I want to spend right now. So I have been shopping around, reading post after post in the forum and trying to teach myself as much as I can before investing more money in the hobby.

I have a pretty good idea how most of it comes together, but am still foggy on how discrete pulsing that @Viktor speaks of is achieved.

I see a lot of folks using Marlin firmware on the Arduino rather than Repetier. I have only used Repetier so I don't know if Marlin firmware has better options for lasers.

I don't want to blow out a diode on my first try, so I am trying to sort all this out before I buy any of the laser components.

The fan output on the Ramps controller puts out 12 volts as best I can tell. I have read that I can use a different pin such as the servo pin, so that is an option to consider.
Re: What is the difference between these two lasers
June 29, 2016 11:29AM
Found this post which addresses many of my same questions. [forums.reprap.org]

Think I read it earlier but did not look at the photos posted which are of the same diode I have been considering.

Still would like to know if inserting a second driver between D9 and driver of the laser will work.
VDX
Re: What is the difference between these two lasers
June 29, 2016 11:41AM
... you can reduce the 12V of the fan output to 5V with two resistors in serie as 'bridge' - e.g. a pair of 3k3 and 4k7: 4k7 to +12V and 3k3 to GND will result in roughly 5V in the middle.

I'm using the E-STEP output (STEP pin for the extruder driver) for the pulses and a small Arduino inbetween to set the pulse length by a trim-pot.

The program in the Arduino is pretty simple - when power on or reset, it reads the analoge input A0 to get the voltage from the trim-pot (0-5V) and sets a variable to a value of 1 to 400 ... this will give the pulse time in microseconds.

The pulse-input is set to an interrupt pin, so whenever a pulse is detected, the Arduino switches the laser on and waits the preset time (1 to 400 microseconds) before switching off again.

The main program is empty (void loop() {}) - only the pins are defined at startup and the interrupt-sequence for the pulsing time has some lines of code winking 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: What is the difference between these two lasers
June 29, 2016 11:52AM
@VDX Ahhh, very cool! Are you using two Arduino's? Seems like you could write that code and include it in the Repetier or Marlin build. But either way, that answers my question. I feel more comfortable placing an order now.
Re: What is the difference between these two lasers
June 29, 2016 12:06PM
Quote
Flashsolutions
Found this post which addresses many of my same questions. [forums.reprap.org]

Think I read it earlier but did not look at the photos posted which are of the same diode I have been considering.

Still would like to know if inserting a second driver between D9 and driver of the laser will work.

I am fairly sure, also as I understand that thread, that if you do it with Fan output you need to redefine the fan pin and use that instead of going through the MOSFET. The MOSFET only just complicated things. It is easy to change the pin in repetier pin.h.

For me VDX solution is really the right direction. This is because the speed of the laser is just as important as the intensity (TTL), and you can't control your printer speed exact because of acceleration, limitations on the 8 bit software, jerk-rates and so on. For this reason a big part of the Repetier (or Marlin) software is to control the extruder rate so it is proportional to the true speed of the printer. If you use the STEP pin then you get all that functionality directly onto your laser.

In VDX software he only calls the read on the potentiometer one time at boot. What you can do is instead of using a potentiometer (like VDX) , is that you take the pin for the fan on the RAMPS and put that to your in-between Arduino. Then you use the RAMPS fan output to control the scaling factor on VDX solution (the Arduino).

That way you get it all, you can control intensity with the FAN output in repetier software and at the same time your laser intensity is related to the speed of the printer.

START with a cheap laser you recover from a CD / DVD drive. Diodes dies so absurdly fast and it is so difficult to figure out what current etc they are receiving. Lasers are so unforgiving compared to 3d printing. One error and done :'(
Re: What is the difference between these two lasers
June 29, 2016 12:10PM
@LarsK, excellent ideas!
Re: What is the difference between these two lasers
June 29, 2016 01:06PM
I'd also add a switch on the second arduino to disable the fan-PWM input during boot up and as a second safety feature.
BTW, if you want to keep cost down and like to tinker with OP-Amps, you could generate the pulses with an NE555 as a "monostable switch"
Re: What is the difference between these two lasers
June 29, 2016 01:23PM
I've got an Arduino on order. Will give me some flexibility in programming. Can put a hardware safety switch to keep it off during power up.
Re: What is the difference between these two lasers
June 29, 2016 01:31PM
Take a look at the plugin for Inkscape for laser
see how it controls the laser and what g-code is produced to trigger laser.

I put a micro switch on the Z axis and below a certain depth ----- laser ON
otherwise ---- Laser OFF
then I went to using a pin on arduino to PWM laser.

Take a look at programs that do laser engraving and don't limit yourself
to one solution

PWM the laser the way to go.

See:

[www.shapeoko.com]

confused smiley

FWIW
I would select the laser with external supply
there is enough heat producing compnents in the LED Head
cool power supply separately!!!

confused smiley
VDX
Re: What is the difference between these two lasers
June 29, 2016 01:33PM
... yes, I'm using an external Arduino (or other controller) for driving my lasers, as the needed timing accuracy is a pretty hard task, I won't burden the motion controller with.

I'm using not only laser diodes, but CO2- and fiber lasers too, so I've built several different laser-controllers in similar ways with 'timing accuracies' and pulsing rates of up to 2 MHz.

The next drivers will be used for SLS, so timing is even more essential than with "simple" laser-engraving winking 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]
VDX
Re: What is the difference between these two lasers
June 29, 2016 01:38PM
... simple ON/OFF and PWM is good for laser-cutting and if you aren't moving too fast.

With higher acceleration and speeds the starts/ends of drawn lines will receive much more power than the fast areas, so it would burn the edges ...


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: What is the difference between these two lasers
July 14, 2016 11:11PM
Finally got an oscilloscope so I could look at the pulse rates on Marlin vs Repetier. Using the Fan output (D9) with the 3.3k resistor tied to the 4.7K and loading the Arduino Mega 2650 with both Marlin and Repetier using the configuration settings as close to each as I could figure, I observed different waveforms from each.

I set the fan output to 50% and recorded the waveform with each firmware.

Repetier had an output which was sort of ramped whereas Marlin was crisp with no decay, but at a higher frequency.

Connecting an LED to the output showed a brighter glow than at the same setting in Repetier.

Since I still don't have my Laser Diode, I just trying to experiment with a bench test. Don't know how this will behave under actual printer movements.

Thoughts?
Attachments:
open | download - RepetierWaveform.JPG (266 KB)
open | download - MarlinWaveform.JPG (244.7 KB)
VDX
Re: What is the difference between these two lasers
July 15, 2016 04:21AM
... 50% means the ON/OFF values have to be equal long - so with shorter ON times with Repetier you'll get lower averages power and your LED will shine 'weaker'.

The 'ramped' waveform could be, because your'e measuring in AC mode and the Repetier frequency is low enough to show the capacitive loading of the input - set it to DC, then both should be 'crisp' ...


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: What is the difference between these two lasers
July 17, 2016 06:35PM
@VDX, yes you are correct. The waveform cleaned up when I put the scope on DC. My bad.

Well, anyway, the Laser Diode finally arrived yesterday. I was so excited to actually start using it. But, after hours of playing with it, I have gotten nowhere.

First I tried the bridged resistors. That only produced a sawtooth waveshape when connected to the TTL input of the laser and no output.

Programmed a pin on the ramps board to supply the 5 volt logic directly. Again, no output.

After a while I figured out that if I left the TTL input open and not connected to anything and applied 12VDC to the laser, it would light up, but if I connect anything to the TTL input lead, it will not light up.

Connected a 5V supply directly to the TTL input, again no output.

Guess I made the wrong choice of the two laser diodes mentioned at the beginning of this thread. I purchased the one that did not have the external TTL board. It came with a 12V power supply and only a blue and white wire for the TTL input. The other choice of Diodes would have had an extra control board, no power supply included.

I don't know what else to try. It seems that if I connect anything to the TTL input, the laser will not fire.

Wondering if an opto isolator might work?

Has anyone had any experience with this type of Laser Diode? [www.ebay.com]
VDX
Re: What is the difference between these two lasers
July 17, 2016 07:10PM
... are you connecting only GND/+5V to TTL?

It's meant to power the module with GND/+12V and then with the (-)-TTL-Input connected to GND and (+)-TTL-Input open or set to +5V, it should light.

It's only OFF, when the (+)-TTL-Input is set to GND ...


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: What is the difference between these two lasers
July 17, 2016 07:23PM
I am connecting the 12VDC via the wall wart power supply that came with the unit. The Blue and White TTL input leads are what I am trying to control the laser with. As supplied, the 12 volt and TTL grounds are independent. I realize now that the other diode I was looking at uses an external laser driver whereas the one I ordered only has an internal driver board.

So it seems that anything that I connect to the TTL input effectively just grounds the input, turning it off.

I suspect that without one of the external driver boards, this diode won't work directly from a 5 volt source across the TTL input leads.

That makes me wonder if an opto isolator might work.
Re: What is the difference between these two lasers
July 17, 2016 08:27PM
Okay, I think I figured it out. The spec sheet says the Blue wire is + and the white wire is - for the TTL control. It must have been wired incorrectly inside the case of the diode because when I flipped the leads and made the blue wire ground and the white wire the plus lead, it works! How frustrating!
Sorry, only registered users may post in this forum.

Click here to login