My laser engraver from 0 knowledge to 32.461% .... probably

Discussions and file drops for Auggie
BobbyW
Old Timer
Posts: 115
Joined: Sun Sep 08, 2019 12:27 pm

Re: My laser engraver from 0 knowledge to 32.461% .... probably

Post by BobbyW »

Hi
First new Auggie test .
Way better when you see what you doing.
And of course the sugar dont missing.
Thanks
Bobby
Attachments
apelisin 2.jpg
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4334
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: My laser engraver from 0 knowledge to 32.461% .... probably

Post by ArtF »

>>but still get the message,  get current com invalid , after each

  This message should be a warning internal to the debug log, I have lowered its priority
so it wont display on screen. It was simply a debugging log for me to let me know a
command was being injected to an empty command queue.

  Mainly a script thing, but is really a minor warning for me during development. IT may be
ignored.


Art
gburk
Old Timer
Posts: 324
Joined: Sun Nov 25, 2018 3:57 pm

Re: My laser engraver from 0 knowledge to 32.461% .... probably

Post by gburk »

Art

How about the buffer underrun message.. i seem to get these mostly when using the freeaxis 5 - 8

Gary
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4334
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: My laser engraver from 0 knowledge to 32.461% .... probably

Post by ArtF »

Gary:

Ill look into that as well, but I suspect its related to when I added the second planner. It basically means the
buffer for motion has run out in the axis 4-8 section. It may be motion has simply ended on that planner as the primary
one continues to have motion left. This is a little used area in Auggie as few use more than 4 axis, thus its little
debugged or tested. Auggie seems pretty solid now in most areas that have been used and debugged, but I know
thousands of potential bugs exist. Mach had over 100 thousand users reporting bugs so it was much tighter in the
end than Auggie will likely ever be. Always be careful ..its code is truly a beast that takes taming, even I dont know
what it may do in every situation.. Every time I go in there it scares the hell out of me. lol :)

Art
gburk
Old Timer
Posts: 324
Joined: Sun Nov 25, 2018 3:57 pm

Re: My laser engraver from 0 knowledge to 32.461% .... probably

Post by gburk »

Art

I can relate to that, hell if i look at code i worked on 2 months ago it looks foreign to me now and almost like staring over to figure out what the heck was i thinking...

I have been testing the 5-8 axis's trying to use for tool change. over kill i know..

I won't knock mach3 from a lot of reading and video's, seems like quite a few users  have gone back to mach3, from mach4.

Thanks Gary
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4334
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: My laser engraver from 0 knowledge to 32.461% .... probably

Post by ArtF »

yeah, for a program not updated in 14 years, Mach3 certainly has staying power..

Art
User avatar
Mooselake
Old Timer
Posts: 500
Joined: Sun Dec 26, 2010 12:21 pm
Location: Mooselake Manor

Re: My laser engraver from 0 knowledge to 32.461% .... probably

Post by Mooselake »

And they're still designing new hardware for Mach3!  I have a grbl based Sainsmart 3018 mini-router, a simple inexpensive (many would say cheap, my uptown Pro model was only $200US on sale) machine with a 300 x 180mm cutting area.  Sainsmart also has a proprietary (pretty sure they source it from somebody else) USB controller  model (formerly the MX3, now the "Genmitsu CNC Router 3018-PROVer Mach3 Kit") that only works with Mach3 (not 4) and DruefelCNC, no other drivers for the card available.

Unfortunately it's bitten a lot of new 3018 users who were expecting the simpler grbl/gcode streamer interface and not the much more complex Mach3 setup, nor the current $195US price for Mach3.  Sainsmart has a nice side business selling replacement grbl controllers for the machine, since it uses different connectors and wiring than the rest of the much-copied 3018s the usual ones won't work without a lot of extra work.

Kirk
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4334
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: My laser engraver from 0 knowledge to 32.461% .... probably

Post by ArtF »

Amazing.. :)

Art
BobbyW
Old Timer
Posts: 115
Joined: Sun Sep 08, 2019 12:27 pm

Re: My laser engraver from 0 knowledge to 32.461% .... probably

Post by BobbyW »

Hi .
A short question about scripting.
I want to write a code who translate from
linear PWM grayscale pulse to linear dither grayscale pulse.
I dont know how to explain what is in my mind.
Basicaly i start to write a code who measure the length pulse
" assuming we use a standard PWM like 1 or 5KHz" know'ed before
to don't do unnecesary math of what frequency are.
So , instead to only decrease PWM period on 30% gray , decrease
frequency as well , pulse by pulse . I assume that will result in automatic
image dither+grayscale "at least that happen in my mind" .
My photo and GCODE experience was totaly 0 until to start here and build my laser
so my knowledge about image conversion are still limited.
I didn't test yet , i just found some dsPIC controllers on my garage
and i will use one to test what is in my mind.
I ask if can be done via script because if is working i will create a script for that
but now i'm way more comfortable coding pure C in microcontrollers.
Anyone know , changing the compiler will reset you skill close to 0  :D :D :D.
I never write something for windows so... i remain on what i know for sure .
The ideea come from old test when with 260Hz i get amazing result on " low gray " areas
but the problem is the speed , need to running low speed like A5 photo 1.6h to dont
get bad result at the small black edges. So in that way i assume the high black will
be at max fixed frequency and low gray at minimum fixed frequency limits.
In relation with speed travel the result will be in interrupted micro lines
that can not be done via normal dither . I mean can be in software but mechanic error and
laser delay will never do that.


Thanks
Bobby
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4334
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: My laser engraver from 0 knowledge to 32.461% .... probably

Post by ArtF »

Hi Bobby:

  Wont work no most lasers. The PWM is more like a way to get an analogue voltage for the controller. Most co2's
will work fine at a wide range of pwm base frequencies. In any event, time is the problem. Most lasers will not react
faster than 1-2ms in difference of power. You cant script anything to do with the grey conversions, Augie is too busy
on that stuff to change anything. You can change th PWM base frequency by script..  but generally your better
off with whatever the spec is..

  TO play with effects, Id more recommend going with multiple pass techniques for things like dithering patterns..

Art
BobbyW
Old Timer
Posts: 115
Joined: Sun Sep 08, 2019 12:27 pm

Re: My laser engraver from 0 knowledge to 32.461% .... probably

Post by BobbyW »

ArtF wrote: Hi Bobby:

  Wont work no most lasers. The PWM is more like a way to get an analogue voltage for the controller. Most co2's
will work fine at a wide range of pwm base frequencies. In any event, time is the problem. Most lasers will not react
faster than 1-2ms in difference of power.
Art
Hi Art
I resume all facts until now and i suppose i jump in a error  without thinking is a error.
So , let me explain.
First off all if you remember i has a hard time with my very low impedance source and residual voltage input at 1.2v or something.
Well i fix that and starting to develop different interfaces i end from high end PWM to DAc converters to banaly MCP or LM324 OP.
Work good so fare but when i develop all that stuf i do it blind in FR without even have a banal osciloscope. Back home i have everything i need.
So i start measuring everything and i found the issue.
Here we talk of 3 different solutions to control the analog laser input.
1: My solution was to made the PWM between 0-800mv and find the laser trigger point by linear contrast in auggie.
Not bad but the resolution is limited by any type of photo in different ways.I put below a paper to explain my old solution.

2: Is you solution. To reformat the signal with atmega help . Well not bad at all but after i made my own to testing i run in one
issue when i look closely with magnifier what happen on polywood. So i found a saw mark on the end of black parts and whyte parts
(at least that was very visible). So thinking why , i change my microcontroler to one with PLL and FRC up to 120MHz.
Was totaly wrong , that marks still exist and after some time i realize , doesn't matter how fast my processor is
he will always wait to measure the input signal to be able to give the out 50% signal or any division.
Is true it is some improvements , but when X go from 0 to 100 (as example) the delay will be in left side
and when the X will return the error will be in right side , at the end the little error will be *2.
I try it , and also i try to made a linear OP divider . The result is way better but not as i expect.
I put below a printsc from that.

3: That is last one and i think is the best solution to have on any type of laser a full resolution between
black and white and also simple to be adjustable.
What i think is (as example ref). If the laser start to leave a mark on polywood from 300mv input and up to 700mv on max black
basicaly we need to have a 400mv PWM with +300mv offset . In that way the laser will be prepared to start burning
and the PWM will be in full black white resolution.
I put a printscr below on what i thing is the best way. Now i try to find a good OP with good adjustable offset
So fare i found the https://www.analog.com/media/en/technical-documentation/data-sheets/AD8220.pdf
but i still search.
I hope will help and my english ahh is hard

Thanks
Bobby
Attachments
pwm divider technique.jpg
PWM offset.jpg
PWM analog divider.jpg
Old technique.jpg
BobbyW
Old Timer
Posts: 115
Joined: Sun Sep 08, 2019 12:27 pm

Re: My laser engraver from 0 knowledge to 32.461% .... probably

Post by BobbyW »

Hi.
Well can not sleep until to finish my idea .
I made fast with one Op LM358 was close to me.
I have some single supply rail to rail OP but can't find when i need it.
The PWM don't reach more than 2.45V but to engrave i need no more
than 700mv.
That is the vid with my old technique with linear contrast in AUGS.
https://youtu.be/k26aoKRzsGE
And this one with what i think is better result and at least standard for most
of wood materials.
https://youtu.be/vpEETVXhbrQ
The wave is not perfect , can see some ripple but i will move one to
AD8220 have built in reference offset.
That's for now , more test commin'
The first photo engraved like that , and very small size. Before was impossible to go
below 140mm W
Thanks
Bobby
Attachments
offset interface.jpg
first offset test.jpg
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4334
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: My laser engraver from 0 knowledge to 32.461% .... probably

Post by ArtF »

Bobby:

  Your English is far better than my version of your native tongue.

I think I see what your speaking of. Your laser seems unusual in that its very
tight on control. All of mine are really end controlled by average voltage, but
its not close to your sensitivity. Your schematics seem to show a very close
tolerance to the voltage swing of the pwm. Synrads dont tend to be that
sensitive. They have a max of 20Khx and simply average the voltage
from a 1ms pwm to a range of perhaps 500 steps internally. It looks
from your circuitry that the power range you seek is very tight..and probably
specific to that laser.
  I congratulate you though on your solution and experience, you really
tracked it well, I think you have tighter control than most.

  I like your solution, the ability to test the actual range output was clever...

Good work.

Art



BobbyW
Old Timer
Posts: 115
Joined: Sun Sep 08, 2019 12:27 pm

Re: My laser engraver from 0 knowledge to 32.461% .... probably

Post by BobbyW »

ArtF wrote: Bobby:

Your English is far better than my version of your native tongue.

I think you have tighter control than most.

Art

Hi Art.
Thanks for the kind words . Usual people correct me in not a nice way , but
i say to all " if they realy want , can correct me in my native language"
I'm Romanian , i speak very good Ru and Fr language , in my time english wasn't on
school . I run in it in my faculty , of course technical english , but still .
About my laser control , well i think is the source issue. Is very tight on small power
rise fast , and after decrease until 4.2V = 20mA. I dont use more than 10mA but
the control look like 30% logarithmic increase and after keep some linear shape.
Hard to tell without measure device on laser power.
I finish my interface , i solve that little noise on voltage offset (i was stupid , no any decoupling cap
and no small low pass to first AO input. I was tired. Is solved all .
Now i run in my OLD issue . I don't get what's going on , i just dont understand .
I made a small switch between normal power for cutting and power with offset for engrave .
I change all stats with one single signal from OC 1 of Pokeys.
Well i write the code for button switch , i create the button , the variable are in system and are called
when i press the button but NO way to get the output ON on any OC.

Code: Select all

 
Variable GravareButton calls with current:1.0000 
 thread 33 started.
 thread 33 stopped.
 Variable GravareButton calls with current:0.0000 
 thread 34 started.
 thread 34 stopped.
 Variable AirButton calls with current:1.0000 
 thread 35 started.
 thread 35 stopped.
 Variable AirButton calls with current:0.0000 
 thread 36 started.
 thread 36 stopped.
I mean working in midi script , also first time i create that function , was perfectly normal.
Work without issue .
I turn off the laser and Auggie and i go to sleep . After i wake up , i say to edit the name of button
was "EMPTY" and to change the color. I do it without start the laser. After i save the screen and i start laser
nothing work anymore.

Code: Select all

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//Toggle the output of the button for engrave
global	GravareButton = function()
{
  if (Gravare.GetState() == 1)
  {
    Pokeys1.SetOC(1, 1);//set putere gravare
    yield();
  }
  else
  {
    Pokeys1.SetOC(1, 0);//set putere taiere
    yield();
  }
return;
};
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
And declared here " don't know if the order matter " some compiler do.

Code: Select all

global Gravare=Button("Engrave_BUT_66");
And check below in while loop.

Code: Select all

global	TheWatch = function()
{
while(1)
  { 
    LedButton();
    AirButton(); 
    GravareButton();   
    Safety();
    yield();
  }
return;
};
And the button is pic below.
I dont get it why doing that . If i turn on the OC1 in midi script and i press
button the OC 1 will turn off. Maybe that help.For me is mistery.
I remember , i run is same problem when i try to made the button for compressor .
Finaly got it working and after never stop.
Also what is mean " ID number " Any button created start with -1 .
Thanks for now.
Bobby
Attachments
Button.jpg
BobbyW
Old Timer
Posts: 115
Joined: Sun Sep 08, 2019 12:27 pm

Re: My laser engraver from 0 knowledge to 32.461% .... probably

Post by BobbyW »

Hi
Well i think i found the issue.
I dont know if that's true but now working.
Becoming tired , i didn't pay to much attention and i become frustrated
in one point . Simple things made you crazy .I assume exist some order to
create that. I saw later after i delete everything and start over , soon you create
a button , will be assigned a variable for that. And that corespond to the ID of button.
My mistake, i was think i need to create my "own" variable , otherwise
the function don't make sense.

Code: Select all

global Gravare=Button("Engrave_BUT_66");
I modify that after i create , to be easy to find after.
I delete again , to start over  :D :D.
Now the big question . " how i can delete a variable from system "
even i comment the function , that remain in system.
I just comment right now , but seems that wont dissapear
after. And was some restarts , even on OP system. I put pic below.

Thanks
Bobby

Attachments
Delete variable.jpg
Post Reply