Image2gcode engraving – how to improve it

New Home Forum Mostly Printed CNC – MPCNC Troubleshooting – MPCNC Image2gcode engraving – how to improve it

This topic contains 60 replies, has 7 voices, and was last updated by  Jason 1 year, 12 months ago.

Viewing 30 posts - 31 through 60 (of 61 total)
  • Author
    Posts
  • #21969

    Leo69
    Participant

    All I had was yellow paper to burn your image onto so it came out really light. I see artifacts on my image too though. I looked at some wood engravings that I’ve done in the past and no artifacts. Weird. I was running with an older version of my laser driver back then so maybe it’s related to that. Then again it is a fairly blurry image up close so you might try a different image to eliminate that possibility. If you don’t figure this out soon then I’ll hook up my old driver and see if it makes a difference.

    #21971

    Martin DB
    Participant

    Thanks Leo for your time to try it.

    Today I’ve tested with diagonal scanning, 1200 mm/min, default acceleration/jerk and it seems no artifacts!

    I’ll try other pictures this weekend.

    #21973

    Leo69
    Participant

    So true about Marlin. I would switch to Grbl if they fully ported it to the MEGA board/Ramps Combo . Grbl is nice but just not enough I/O, timers, etc..on the Uno board to support a multi-purpose machine and all of the add-ons. I know there are other options out there now but Marlin is so hackable and does it all, even if it isn’t perfect.

    I haven’t had time to really dig into the PID thing either but I should get some time off in the next few weeks so I want to get the board layout done and components ordered. Hopefully they’ll get here in time. No SSR is needed. The zero-cross detection is done by a few passive components and a dedicated interrupt on the Arduino firmware. The power modulation is handled by an opto-coupled TRIAC. All cheap components. The Vishay TCRT5000 sensor is used for the RPM sensing on the spindle and the rest is just an LCD and a few more passive components and connectors.

    I actually got excited to see a PID motor controller on ebay a few days ago . Had PWM input so it would’ve been easy to drive with an Arduino and optical RPM sensor for a closed loop system. Too bad it only supported DC motor spindles:(

    #21975

    Ryan
    Keymaster

    You’re my hero!

    #21976

    Leo69
    Participant

    That looks good. Glad to hear it.

    #21979

    Leo69
    Participant

    @jason , I wouldn’t mind taking a look at gcode from PEP5 with white space skipping enabled. I’m still on the fence about how I want to do it. I think Bryan had added it to i2gc as an experimental feature but in my opinion the quality of the image suffered with it turned on but to be fair, I only tested it once. It looks like the code would just ignore all white space so if you had white space in the middle of the image, say 50 pixels worth, a g1 move would be added to burn the next dark pixel. We’re using very high firmware accel settings for raster engraving so large moves are not a good idea in the middle of an image because the acceleration factor affects the speed over a larger distance and you get inconsistent results and dark patches.

    I’m guessing that the PEP5 skip white feature is only skipping white at the outer edges of the image to avoid this but I’m hoping you can confirm.

    #21981

    Leo69
    Participant

    @vicious1 I’m trying to resist the urge to buy all of the components until I understand it a bit better and can find a way to simplify it. For example, all of the components used for the zero-cross detection can probably be replaced by an optocoupler with a built-in zero cross circuit like the MOC3041. Makes it cheaper and easier to assemble.

    #21982

    Ryan
    Keymaster

    Optocoupler is always better right? This is where I don’t have any experience. I could cobble something together but I’m never sure when things need filters or some extra capacitors. At my last job I would put together a basic circuit, and a board layout and always have to leave room because the EE always seemed to add components for some reason. He never wanted to tell me what it was for. Either I was an idiot or he just wanted to look like he was needed….Kidding, I’m sure there is a reason.

    Could that really do it all? Everything about it looks fine, I have no idea about the speed it switches though That’s your department. So the diagram in figure 14 is everything and the arduino come in through pin1&2. Seriously a few resistors, capacitor, and a triac(?) that’s it for the 115v side? So should I have some stuff sent your way?

    #21988

    Leo69
    Participant

    Lol. I’m in the same boat as you as far as knowing exactly what’s needed. I have some components on the way so I’ll be able to get a few things until it’s right, or I burn the house down. I do have an oscilloscope so that’ll help with the testing. Should have an RC snubber circuit on the triac for an inductive load like a motor but I think I can avoid that by using an alternistor triac instead of the standard variety. I have about 6 good pages bookmarked and between them all I should be able to get the circuit sorted out. The software side will be much easier. I’m used to simple DC microcontroller circuits so this is a big learning curve. It’ll be fun.

    #21989

    Jason
    Participant

    @leo69 you can send me an image and I will run it thru pep5. Include you settings etc

    @vicious1 the ensure_smooth_moves is not in the current version of the MPCNC firmware… Unless I missed an update.

    #21999

    Leo69
    Participant

    @jason – I’m attaching a good test image for white space skipping. Please send PEP5 Gcode when you get a chance. Just use default settings for full power, 8-bit PWM (power 0 to 255) and white-space skipping enabled. I appreciate the help!

    #22036

    Jason
    Participant

    @leo69 here is the code.

    #22125

    Leo69
    Participant

    Not sure why but I keep getting a message saying the file can’t be downloaded.

    #22126

    Ryan
    Keymaster

    It’s because it is a .rar file. I can try to fix that but it will take some time.

    #22129

    Brian
    Participant

    How can I use image2gcode to engrave / carve an image into wood without a laser? I’m sure I’m missing something simple but repetier will not load the file I save from there.

    #22144

    Leo69
    Participant

    Oh OK. @jason please zip the file instead when you have a moment. Thanks

    #22145

    Leo69
    Participant

    @brian mage2gcode is only for laser engraving. Another user on the forum, Barry I think, did an awesome job with an image using Estlcam with wood cutting tool path. It looked very much like a dithered photograph when he was done. Maybe he’ll respond.

    #22148

    Barry
    Participant

    I used Estlcam for the engraving.

    #22161

    Jason
    Participant

    Here is the ZIP version @leo69

    #22205

    Jason
    Participant

    @vicious1 I notice you posted new firmware. The Marlin_RC8 is the one I should download and config? So if it solves my issue?

    #22208

    Ryan
    Keymaster

    It has the lcd refresh update in it so I think it is what you want. Let me know if it doesn’t. I still have not had a chance to put the laser on. I have been cutting parts for the other prototype still.

    #22215

    Jason
    Participant

    Once my replacement lasers come in I will definitely give it a good test. Got a back log of work lol

    #22684

    Leo69
    Participant

    Just a quick update. I haven’t had as much time to work on the I2GC revision but I’ve definitely given it some thought and know exactly how I need to implement white space skipping without losing quality. I’m also thinking of a “black/white” mode for images that have no grayscale, just black and white. I think we can just combine all of the black pixels in one single linear G1 move instead of doing one pixel at a time in this case and it should speed things up and greatly reduce file size. I’ll have to see how the acceleration values will affect something like this. I started with the rotary stuff and have a nice preview screen that shows how much the image will wrap around the stock diameter as well as displaying a % coverage. Should be helpful for the rotary engravers. If anybody would like to see any other features then let me know and I’ll see what I can do.

    #22687

    Ryan
    Keymaster

    Do you think you could link laser power to acceleration? I guess if it is an issue, you are thinking we might get darker beginning and ending shades?
    So have the program use m-commands to control accel per picture and ramps up the laser power at the same time. This would also let us mess with accel values without re-flashing and you would know exactly what values are being used.

    Or is that just nucking futz?

    #22688

    Leo69
    Participant

    That is a crazy suggestion but worth experimenting with. I think we’re currently using false, exaggerated accel values for grayscale engraving. We’re only moving about .18mm per line of gcode so we never ramp up to full speed anyway which forces us to jack the values up to compensate.

    Your suggestion makes sense for images that only have 2,3, or maybe 4 colors though. We could record the position where the color change starts and ends, figure out the linear distance, set accel proportionate to that distance, and do a single G1 move for the entire row of like colored pixels. Might have to play with the values but it could be a big time saver for some people.

    On a side note, I have all my components for the Dewalt PID project:) Can’t wait to get some time off of work. I have 5 of everything. Definitely expecting to see some magic smoke along the way so I’m preparing.

    #22689

    Ryan
    Keymaster

    Yeah full grey scale I couldn’t imagine any way to make it faster other than a color skip, but 2 color the acceleration ramping might be sweet for really large projects.

    I got dibs on a PID…I have cash sitting on the desk for you whenever it happens. If they work well and you need an investor….

    #22691

    Leo69
    Participant

    You’ll definitely get the first prototype to test. I just do it for fun but if you think it’s worthwhile then we can talk later on for sure.

    #22711

    Jason
    Participant

    One thing I was thinking would be a time saver feature is this. Say your image looks like this

    —————
    |Text |
    | |
    | Text |
    | |
    |Text |
    —————

    Normally it would make long passes across the entire diagonal width of the image. If the software could be made smart enough to look at blocks and engrave in sections. So for example it would engrave the bottom left “Text” then move to the middle section then finish up at the top. Removing all the unnecessary travel would make large engraving jobs way way faster.

    If its not possible to have it “sense” where it needs to engrave you could setup quadrants or sections and then it would engrave sections in order.

    Not sure if that makes any sense or not.

    #22713

    Jason
    Participant

    ok well it didnt format my example properly so attached is an image.

    2nd image is my idea of sections. It would engrave in the order as numbered.

    #22742

    Leo69
    Participant

    That’s an ambitious upgrade there. Separating the image into quadrants or even smaller chunks is doable but will take more time than I can commit at the moment. It’ll be next on my list after the white-skip and rotary upgrade but I’ll be focused on the router PID control first. I think I can have the software do it a few different ways and keep track of total movement for each iteration, then select the optimal route. I don’t commit much more than an hour or two on this stuff in a typical work week so it’ll be a while.

Viewing 30 posts - 31 through 60 (of 61 total)

You must be logged in to reply to this topic.