Comments (18)
In the next version of LaserGRBL i will add an option to set set resolution as steps between each line and not as lines per millimeter.
It becomes slightly more complex for the end user (who needs to know some more information about his hardware) but certainly produces more accurate results with fewer artifacts
from lasergrbl.
@arkypita I think that we can balancing between easy to use and precision. We can allow user to input float number instead of int number (with default int number). It's little bit more complex for user but it can resolve user issues with some guide.
I'm planning to write a wiki page to help user guess minimum resolution of there machine.
from lasergrbl.
New version: https://github.com/arkypita/LaserGRBL/releases/tag/v2.6.1
from lasergrbl.
@arkypita V2.6.2 works great. I'll post some pictures shortly. My inkscape plugin is becoming more and more redundant as this code evolves. Great work.
from lasergrbl.
@arkypita I have been playing around with an inkscape plugin and some time ago I added a resolution optimisation option where you simply enter the steps per mm of the stepper motor as entered in GRBL. The resolution is then adjusted to make sure each X and Y movement are a whole number of steps. I use the following formula.
Resolution = 11 pixels/lines
StepsPermm = 160 ; 100 steps per mm as set in GRBL
newresolution = StepsPermm / round( (StepsPermm/Resolution) ,0)
newresolution = 160 / round( (160/11) ,0 )
newresolution = 160 / round ( 14.545454545455 , 0 )
newresolution = 160 / 15
newresolution = 10.666666666667
So with a new resolution of 10.666666667 lines per milimeter, you will get a perfect 15 steps between each pixel.
Hope you can use this formula.
from lasergrbl.
I'm thinking to get the resolution from arduino by reading $100, $101 parameters and store them in LaserGRBL (so that they can be used without having to re-read each time from device).
Then provide the choice between a range of resolutions that can be managed by hardware, as multiples of the minimum pitch.
from lasergrbl.
Implemented and solved in v2.6.0
from lasergrbl.
@dungjk if you want to write i wiki for image resolution, with instructions and sample images, i will put your job here: http://lasergrbl.com/usage/raster-image-import/setting-reliable-resolution/
from lasergrbl.
@arkypita The resolution helper doesn't seem to have the desired effect. If I have steps per mm at 80 and the desired resolution at 11 lines per mm, the computed resolution is still 11. However 11 is 7.27 steps. If you drop it back to 7 steps per line, the resolution should be 11.4286.
from lasergrbl.
You are right @mayhem2408 I did not use the formula you suggested, and I was wrong to write the algorithm. Now it should be correct.
Keep in mind that respect to your formula I have to consider min/max values and errors (divide by zero etc) so the function is a little more complex.
ACTUAL CODE:
private void Compute(object sender, EventArgs e)
{
try
{
decimal newRes = UDHardware.Value / Math.Round((UDHardware.Value / UDDesired.Value), 0);
if (newRes > UDComputed.Maximum)
UDComputed.Value = MaxRes();
else if (newRes < UDComputed.Minimum)
UDComputed.Value = MinRes();
else
UDComputed.Value = newRes;
}
catch (Exception ex)
{
Logger.LogMessage("ResolutionHelper", "Ex with data [{0}]HW [{1}]DV", UDHardware.Value, UDDesired.Value);
Logger.LogException("ResolutionHelper", ex);
}
}
private decimal MaxRes()
{
decimal maxRes = UDHardware.Value / Math.Ceiling(UDHardware.Value / UDComputed.Maximum);
return Math.Min(UDComputed.Maximum, maxRes);
}
private decimal MinRes()
{
decimal minRes = UDHardware.Value / Math.Floor(UDHardware.Value / UDComputed.Minimum);
return Math.Max(UDComputed.Minimum, minRes);
}
from lasergrbl.
Awesome. 2.6.1 works OK, but can you also increase the steps to mm limit from 100 to maybe 200. I have 5 machines and 2 of them are above your maximum of 100.
- Mini CD Rom bases 2 Axis @0.5W with 53.3333 Steps per mm.
- DIY 2 Axis @ 3.5W with 80 Steps per mm.
- DIY 2 Axis CoreXY @ 5W with 100 Steps per mm.
- Stepcraft 2 with DIY Laser @ 5W running 133.3333 Steps per mm.
- K40 CO2 Laser with 160 Steps per mm.
from lasergrbl.
Of course I can, I did not think there was HW with such high resolutions :-)
from lasergrbl.
@arkypita Awesome. Thanks. As far as high resolution goes, My Stepcraft machine has a resolution of 133.3333 steps per mm and the stepper drivers are only 1/2 step microstepping. If I set them to 1/16, it would be 1066.66666 steps per mm. But that's just overkill and GRBL can only handle 30,000 steps per second which would limit my feed to about F1800. Seems pointless having that high a resolution and sacrificing so much speed.
from lasergrbl.
Hello,
May I ask how to setup quality to 30 lines / mm - I have last LaserGRBL and my setup is limiting me only to 20 lines / mm ....
I have UV laser diode and real track is about 0.03 / 0.04 mm on my PCB UV printer ..
Thank you in advance,
Emil
from lasergrbl.
@emilvv
It is easy for me to remove the limit of 20 line but LaserGRBL was not designed for engraving PCB and for very small output size, so the limit of 20 is not the only one... for example another limit is the needs of integer value of engraving size (and others hardcoded limits)
I know that there are a lot of people using LaserGRBL for PCB's but to made LaserGRBL good for this task is it necessary a big code rethink that i cannot make now
from lasergrbl.
Hello,
Thank you for your answer !
Is it possible to use another g-code generator with step about 0.04 / mm and then to upload it to lasergrbl and execute it ?? It is in case that hardware is supporting this resolution ...
Regards,
Emil
from lasergrbl.
Is it possible to use another g-code generator with step about 0.04 / mm and then to upload it to lasergrbl and execute it ??
Yes, lasergrbl is basically a G-Code streamer and its main use is to load and send a gcode text file to your controller (usually an arduino with grbl firmware) so you can use it with any gcode file generated by other application (if they respect gcode standards!).
The raster import/vectorization is a secondary feature for who needs a simple way to engrave a picture and does not claim to be able of compete with "precision" task like engraving technical drawings, pdb & co that require a very fine control of generated gcode.
In my opinion starting from a vector information such essentially is the design of electric tracks, transform it into a raster jpg image, and then re-transform it into lines and paths with a vectorization operation can certainly not produce reliable results in terms of precision of lines and holes.
The better solution is to have some software than can generate gcode from the original file format of your electronic cad but I don't know if exists
from lasergrbl.
Hello,
Because UV PCB printing is 'filling' PCBs tracks areas .... it is raster engraving ...
Row by row ....and it is much faster than vector ... engraving ..
Example video .. https://www.youtube.com/watch?v=l4BX2r0ZkjI
Thank you for your answer ..
Emil
from lasergrbl.
Related Issues (20)
- beep on frame!
- Raspberry Pico - GRBL V1.1 running in laser mode - Support for LaserGRBL to access usb-com port from raspberry pico HOT 1
- Ooops Something went wrong
- grblhal + teensy 4.1 HOT 7
- LaserGRBL version 6.1.0 and 6.2.0 Cannot connect. HOT 1
- Images are being squashed HOT 3
- Cant use max power on my laser module HOT 3
- Version for the old NEJE MASTER
- lasergbrl download win 11 professional
- My first go as well.
- Marlin "G"s in Code are missing
- Error on start up of GRBL
- Same problem here. Any updates on a solution/workaround? HOT 1
- Problem connecting the printer
- I have no idea what's happening HOT 2
- [v6.2.2] M3 Bad number format
- translation error
- desconectando assim que inicia o corte HOT 2
- running the project again again pause auto hold or idle come issus HOT 2
- Exception in 6.9.9 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lasergrbl.