Welcome to Laser Pointer Forums - discuss green laser pointers, blue laser pointers, and all types of lasers

LPF Donation via Stripe | LPF Donation - Other Methods

Links below open in new window

ArcticMyst Security by Avery

Find the correct TTL range frequency

Joined
Dec 9, 2015
Messages
8
Points
0
Hi all !
Anyone can help me driving a laser ?

I need to know my range (0..255) to do greyscale engraving with 0,5W 405nm laser.

Now i can drive DutyCycle , frequency and so on so... how to find a good range keeping feedrate fixed ? Any idea ?

This is the main discussion : (comment #5 and after )
Implementing LASER INTENSITY - Repetier-Firmware Discussions on Repetier-Forum


This is the cheap laser with uncommented driver :
Freeshipping! 500 mw blu viola laser testa, 405nm diy parti di macchine laser diodo laser tubo del laser ventola di raffreddamento in 1 pz/lotto Lunghezza d'onda: 405nm m, laser blu viola Potenza ottica: 500 mw   Tensione: 5.0-5.5 v (sida Apparecchia

the driver is slighty different but i post a picture asap.

Thanks
 





Joined
Dec 9, 2015
Messages
8
Points
0
here the driver, no sku no name on it :/

20151209_184644.jpg
 
Last edited:

diachi

0
Joined
Feb 22, 2008
Messages
9,700
Points
113
Holy jeez, giant picture! Any chance you can shrink it down some?

Looks like a delta engraver from that picture, I could be wrong, nice if it is!

Would driving it with a 5V PWM signal work? That driver/diode should quite happily be able to modulate at a few kHz.
 
Joined
Dec 9, 2015
Messages
8
Points
0
here a pic link : http://www.g2kweb.it/public/20151209_184644.jpg

Yes is my delta used as engraaver :D

The problem is :

i use repetier firmware, at the moment only support ON/OFF mode, so no PWM :(
Repetier forum say to use a software who use FEEDRATE instead PWM to generate the gcode, i'm a newby and i can't find any software who do this.

I modify an extension for inkscape to do that, but, if i can i prefer have a firmware that can handle PWM istead "play with script and gcode post productions"

So, now i'm writing a custom routine to handle PWM in input and generate a "Wave" to TTL input, in Repetier firmware.


I can control WAVE FORM, FREQUENCY and so on , but i dont' know with value can be good.

Here a range of frequence available in two mode:

Normal
prescaler = 1 ---> PWM frequency is 31000 Hz
prescaler = 2 ---> PWM frequency is 4000 Hz
prescaler = 3 ---> PWM frequency is 490 Hz (default value)
prescaler = 4 ---> PWM frequency is 120 Hz
prescaler = 5 ---> PWM frequency is 30 Hz
prescaler = 6 ---> PWM frequency is <20 Hz

FastPwm
prescaler = 1 ---> PWM frequency is 62000 Hz
prescaler = 2 ---> PWM frequency is 7800 Hz
prescaler = 3 ---> PWM frequency is 980 Hz (default value)
prescaler = 4 ---> PWM frequency is 250 Hz
prescaler = 5 ---> PWM frequency is 60 Hz
prescaler = 6 ---> PWM frequency is <20 Hz

first of all i need to know what would be a good prescaler to start so, "few Khz" oriented me in Prescaler 1 to 2 , inside this now i need to regulate a custom wave form for give best result from PWM 1 to PWM 255.


Maybe i can set Frequency fixed for example at 31 Khz and modulate only the duty cicle like a normal PWM square line :
pwm1.gif



What u think ? I'm moving in a right direction ?

Thanks
 
Last edited:

diachi

0
Joined
Feb 22, 2008
Messages
9,700
Points
113
I'd start at 31KHz and if you have issues (Say for some reason that driver won't modulate that fast, I imagine it will, but you won't know until you try it!) then move down to a lower frequency like 7.8KHz or 4KHz if you have issues, which should still be plenty fast.

Then yes, as you say, adjust the pulse width of your square wave as required based on darkness of your input image. 255 values (8 bit) should be plenty to get a nice grey scale. :)

This thread over on PL may have some more answers than I can provide - this engraver is also using 8 bit grey scale as you plan to. CNC Laser Engraving 8bit Shades of Grey 445nm

The results from that one are damn good!

attachment.php
 
Last edited:
Joined
Apr 2, 2009
Messages
10,662
Points
113
Not sure if this is helpful --
all analog drivers are also TTL- BUT TTL drivers (not analog)work as all on or all off- 1-2-3-4 or 5 vdc will turn the laser OFF and there will be no diff between any of them-
no power to the wires is 'on'. An Analog driver needs SOME dc volts to make it work-higher=brighter max is 5vdc-
 
Joined
Dec 9, 2015
Messages
8
Points
0
Yes i know :/
The problem are :
- Arduino mega standard frequency is around 490hz. Too poor :(
- My china driver support only TTL and not accept Voltage under 5V so is not "pure pwm compilant"

So i need to produce manually a Wave with a specific dutycycle range and fixed frequemcy.

So all that mess to take a PWM signal in input and produce another really close one :D
 

Benm

0
Joined
Aug 16, 2007
Messages
7,896
Points
113
Try 31 kHz first indeed. It is likely to work, the TTL input is often intended for application in projectors which typically run 30 kHz at the low end. There are some drivers that only take 10 kHz by specification, though they are likely to work on faster signals.

Also you don't HAVE to rely on the PWM, you can do the modulation hardcoded in your uC provided it doesn't have to do much else when the laser is on.
 
Joined
Dec 9, 2015
Messages
8
Points
0
Sorry i don't understand the second sentence.

For sure i need to modify the frequency something around 30Mhz.

Now, i can modulate ALL the parameter :
1) user a tick interval and switch on and off laser manually with digital value
2) "" "" "" and write a classic analogwrite with variable wave form (like the normal PWM output 0 to 100%)
3) use a fix wave form and modulate the frequency and keep the output to 1
4) ... dunno

i hope tonight to have a time to try all the comment above.
until then THANKS ALL !
 

Benm

0
Joined
Aug 16, 2007
Messages
7,896
Points
113
It depends on how your machine actually works. Perhaps you don't even need PWM to do the job at all.

If you wanted to, for example, burn a picture onto wood, you might simply move the laser from pixel to pixel, stopping at each position and turning it on for some time. Turn it on longer to get a darker pixel. For drawing bitmap images that would probably be fine.

If you want it to work more like a plotter, drawing lines, you could put on the laser at full power and move the material faster when you want less burning.

I'm not entirely sure how this works in your engraving application, but either solution could do away with any PWM stuff on many materials.
 
Joined
Dec 9, 2015
Messages
8
Points
0
Benm yes what you say is "have a gcode based on feedrate" repetier have a M3 compatible gcode so:
M3 S255 turn on the laser
M5 or M3 S0 turn off the laser

the problem is that most most application who i find work with varianble S value and fixed feedrate for example :

M3 S0 is "white"
M3 S200 is "gray"
Me S255 is "black"

since now the repetier use a filter for M3 S value so... S 0-199 = laser off S 200-255 laser on

And so, when u put a gcode based on S value for a grayscale picture you get a BlackWhite Picture, this is what we wanna fix so :

1) keeo searcing for a program that make gcode based on feedrate (you know one ?)
2) modifiy the firmware to modulate feedrate or laser power when receive a M3 S[value] command.

for the 2# no problem, we have a lot of information, so i need only to know and learn more about laser frequency , pwm and stuff like that,
for the #1 we hare lost !
So, if u know some software/plugin for make "feedrate gcode" starting from greyscale image free fell to comment please :D

Thanks again !
 
Joined
Dec 9, 2015
Messages
8
Points
0
Speaking about "on off" plugin we are now fix some bug but this is a pretty good one for "line image"

Repetier G-Code Plugin for Inskscape - Repetier Software

after fix some bug the result is pretty good :

source: http://www.g2kweb.it/public/images/6.JPG
6.JPG


now i'm looking for a greyscale plugin or application who work whit feedrate, any hint ?

better if is crossplatform application or some sort of plugin for... inkscape , photoshop and other image software.

Right now i'm try to hack this : https://hackaday.io/project/4828-raster-2-laser-gcode-generator for inkscape but if u know something better please help us ( is xmas time ) :D
 

Benm

0
Joined
Aug 16, 2007
Messages
7,896
Points
113
I'm affraid i cannot help you with such a plugin. I can design something like this running from, say an arduino or PIC microcontroller, but i'm not sure how the rest of it would work.

You could have a serial interface that just says 'write a line at 50% power, 1 cm left, 0.2mm up' and have the arduino figure the rest of that out. After doing that task it could signal over serial "done" and you'd need to send the next instruction etc.

It seems like g-code actually works like this, at least to some degree.

Another option would be to dig into history and find something intended to drive an ink plotter. These work essentially in the same way, where a thin/grey line is simply made by moving the paper relatively fast to the pen.

If you have software that can plot your design on a RS232 based plotter, chances are that you can use that with an arduino controlled laser engraver. It will obviously be a slow plotter, but i imagine that could be compensated for - if need be to trick the plotter program you're drawing on an A0 sized piece of paper while your actual workpiece is A8 or so ;)
 
Joined
Dec 9, 2015
Messages
8
Points
0
Good hint ! Thanks... plotter ! Yes... is more like a plotter than wood engraver... i dig it !
 




Top