Implementing LASER INTENSITY
Hi all !
I'm trying to implement laser intensity routine, i have a laser driver with a TTL input so,
i try to modify source from :
WRITE(LASER_PIN,(LASER_ON_HIGH ? newIntensity > 199 : newIntensity < 200));
I'm trying to implement laser intensity routine, i have a laser driver with a TTL input so,
i try to modify source from :
WRITE(LASER_PIN,(LASER_ON_HIGH ? newIntensity > 199 : newIntensity < 200));
to
analogWrite(LASER_PIN, newIntensity);
analogWrite(LASER_PIN, newIntensity);
But nothing change !
PWM 255 = ON
PWM <255 = OFF
i also try
m42 p44 s254 = ON
m42 p44 s254 = OFF
Any ideas ?
Here the simple code :
void LaserDriver::changeIntensity(uint8_t newIntensity)
{
if(EVENT_SET_LASER(newIntensity))
{
// Default implementation
#if LASER_PIN > -1
//WRITE(LASER_PIN,(LASER_ON_HIGH ? newIntensity > 199 : newIntensity < 200));
// set PWM wave to TTL laser-driver input
analogWrite(LASER_PIN, newIntensity);
}
}
Comments
i also try
m42 p44 s255 = ON
m42 p44 s254 = OFF
i think now the code is clean and correct write , right ?
2) ok , got it , i try one precoded library : https://github.com/chipaudette/ArduinoPolySix/tree/master/ArduinoLibraries/Timer5
and use for safety the pin 44 on timer5 (i think pin44 it will beh good and often free)
3) ok now i have all i need but the driver specs. So, i can controll frequency , duty cycle, wave form and so on.
Someone know wich values are good to use as "m3 s1" and what for "m3 255" ?
I mean, what kind of wave form, frequency etc... to use as good range ?
Thanks
when i get something good to show i'll do! Until now is a pretty "dirty working code"
after that you say :
"Just for completeless, best waveform is full power and use feedrate to control power, which is the default implementation."
and now start the problem, InkScape plugin , and other laser software support in most case "pwm" instead "feedrate" , so, i think is most important to have a firmware that can handle PWM than modifiy by hand (read python scripts) an "laser Gcode" file for work with FEEDRATE !
If u know some software that produce gcode with feedrate from a greyscale image, free fell to comment ! I give u a "virtual-beer"
So, thanks for all the hint, now if i find spare time i try to write a clean code and show you what i get for work with a TTL driver and use a PWM value [0..255] as input
Thanks !
was based on : J Tech Photonics Laser Tool http://jtechphotonics.com/?page_id=2012
i noticed same minor bug in gcode creation (some G0 instead G1 and some "F{value}" erroneus next to G1 code...
if i find the log i let you know
about the greyscale i used this : https://hackaday.io/project/4828-raster-2-laser-gcode-generator
the code is pretty easy to hack for feedrate and the result is pretty good but maybe need to increase the resolution up to 10pixel/mm, 10 still a bit far , 15/20 maybe will be better.
R = your
Same F command next to G1 line
dirty gcode :
Still some small difference with visualizzation and actual "print" but is a good and easy plugin
About the grayscale ?
Wich one you like more ?
What about this : https://hackaday.io/project/4828-raster-2-laser-gcode-generator ?
Also my delta printer say thank to you
The use of HAL in the firmware put this 10time ahead the classic marlin (y)
Really, we push it around 400mm/sec 10'000 accelleration (only for test purpose) and only Repetier can handle the math needed on a poor mega+ramps 1.4 (y)
here my fix :
- insert Fcommand before g1 g2 g3 mode
- insert G28 and Custom Z on header and footer (please remove)
this help me modify the speed from repetier host , if i use your code , every speed modify seems to have no success.
http://www.g2kweb.it/public/images/repetier.rar
in the maintime : Happy holidays !
- Peter
The script does not respect the object dimension...seems a dpi problem...2
Can you pls solve? Or you could remove "Install the latest version of Inkscape" from the web page...
http://forum.inkscapecommunity.com/index.php?topic=486.0
Yes, i can confirm that in 0.91 the plug-in work like a charm
I just need a simple PWM output pin to drive my laser.
https://forum.repetier.com/discussion/6363/laser-enable-pin-issue#latest