Do you have the CAD Files for the Airbrush holder I would love to make some changes to suit the parts I have if you have them as a fusion 360 format that would be great. Thanks for the fab project looks very exciting. ! All the best Mike
About Airbrush CNC and Control with Marlin
To ask or discuse about this specific thing
So as Tom asked for, here it is, an example gcode file with lots of comments trying to explain most of the commands. This file has been made as the "Image to 3Draster" method desribes.
Please use this file just for study and for modifying it so it fits your machine and hardware / software setup. I uploaded a video of exactly this file being "printed".
Please remember, if you pretend to use this file or a modifyed version of it, DO IT ON YOUR OWN RISK. The file has been created for my machine.
The side feed style airbrush is the key for this thing. I have searched a little the net and i can find the exact model i bought and i think many other with apparently the same shape.
This is the one i bought:
I'm sure there are quite more, including chinesse WW stores ones.
Please if you find yours is compatible tell us about it!
So it took just a few minutes for Tom Forest to find the opensource way!
We can say bye to private software to print our images with our airbrushes thanks to TOM!
He suggested dmap2gcode as an appropiate software to achieve the goal of creating a 3d raster (XYZ) from an image. I've been taking a look to it and it really does!
You can also use G-Code-Reaper to visualize the generated gcode and many other things as scale, rotate, change origin...
All parameters in this "dmap2gcode" are relevant for our purpose. I´ve made some tests looking for the best way of using it and i found at least 2...
1.- Use a white image with the size of your bed. You can use this white image as the background of what you want to print. So if your coords origin is as in my printer in the bottom left and you choose this option in the gmap2gcode soft, you can put a little image in the center of your "background-bed" image and it will be printed in the middle of your bed. If you choose this option you will need to un-check the option "Cut Top Surface" or the raster will be over all the background image. So, with it un-checked, the raster will only be created over the working zone. This way you can put various images or shapes over your background and the raster will pass over them but not over the "white space".
2.- Use the image you want to print. The problem here is that the gcode generated will have it origin in the bottom-left of the image, and maybe you don't want to print it in the bottom-left corner of your bed. I started using this option with an "offset command" in the gcode becouse it allows me to check "Cut Top Surface" but the Z doesn't move to 0 or upper each time the raster turns to start a new line. If you play a little with it maybe you find a way to solve this. It's kind of a problem becouse of the innecessary quick close-open movement for the "extruder". It's a very sort movement, but you have to tune up your extruder params as acceleration or jerk to allow this movements without loosing steps. To use dmap2gcode this way and don't print in the bot-left corner of bed I modifyed the "g92 E0" command to "G92 x-10 y-10 E0" to print at 10mm in x and y from bot-left corner.
One thing is the resolution of the picture, other the resolution of the raster and another the resolution of the gcode. Pffff OMG!
Trying to achive the same results than with my previous method, i used the same Airgelina's photo and also the same params for the raster, feed1800mm/m, 1mm stepover, toolDiam1mm, cutdepth-1.2mm.
So i targeted over the gcode resolution... The mechanical part of the "thing" allows it to have many possible "grey shadows", one per step in the range of movement of the needle, (about 1.5mm x Esteps_per_mm), wich would be achieved moving the stepper to the right position (G1 E0.06, G1 E0.72, G1 E1.45).
With a stepover of 1mm, it would be fine if there were an E position in gcode every mm of the raster line, so we could consider we have a 1mm2 resolution image. And this is where im now, trying different "tolerance" settings. The most of the problems come with the high contrast parts of the image, like a little black point in the middle of a white area. I think i can "smooth" the result by increasing "tool diameter" of course at the cost of loosing detail, as probably that black point.
Preparing the final gcode:
First of all, I recommend to use GcodeReaper to overwatch the gcode looks correct
Once you generate the gcode in dmap2gcode, (it takes some seconds) you will need to clean it and mix it with your start and end gcode. I found that for my Marlin Firmware and my repetier host soft I need every line to have the G1 command or it won't be read by the machine!
So as I explained someotherwhere, you will need to make some "replacements" in the generated code to make it fit your machine needs. You can use a text editor to make the whole changes to the text or use gcodereaper to make some of them. A fine sintax for a gcode line should look like this:
G1 X0.5000 Y131.5000 Z10.0000 E0.3000 F1800.0000
G1 X5.5000 Y131.5000 Z10.0000 E0.3000 F1800.0000
in the second line the only change is the Xcoord, so the rest of the info is not needed, it could just be:
So put your attention in the raster part of the generated code, make the necesary cleanup and replacements, and be sure to not have any Z value (positive or negative) in it.
Insert it between your start and end gcode, replace the starting raster point and choose your desired shooting distance (Z height), i use 10mm now.
Maybe one day we have a driver for windows and mac ;)
As i probably said before, you can use this "thing" in many ways. But probably the most interesting one is airbrushing images in a "raster" way. When this is achieved in a decent quality for B/N images, we can try to make a kind of CMYK photo.
Please let's try to find together a free-open-source method to airbrush it all!!!
Would this be a possible path?¿? http://linuxcnc.org/docs/2.5/html/gui/image-to-gcode.html