loading

I made this instructable because I couldn't find software for engraving images with G-code controlled laser. I tried inkscape with extenstions, but this isn't what I expected. I want to engrave photos like attached one, make PCBs etc. So I wrote app in Matlab, which I use commonly on my university. I call it imGcode I want you to give it a try. It is standalone executable, with all libraries attached, so you will only need to install one file and it should work.

You will need laser with grbl or other Gcode controlled laser. It have to have laser PWM controlled by S code.

App is here:

https://drive.google.com/folderview?id=0B3VyJZzWwjj5VERtdnhVZXkxOGM&usp=sharing

Step 1: ImGcode

App is quite simple. It'll ask you for image (most file formats should work, if something fails convert it with MS Paint to bmp). Image can be bw or rgb. Then It'll ask for output file in .nc format. after that dialog-box will appear. It have some basic settings:

Origin offset is point where lower left corner of image will be according to machines' coordinate system.

Pixelsize is size of one pixel of image You can set it as you like, but I think that the best value is 0.1mm or 0.2mm.

Feedrate is speed of laser head in mm/min.

Image horizontal size is output size of engraved image in mm.

Output bitdepth is parameter for calculating steps of PWM. 3 will result 8 colors, 2->4 colors, 1->2 colors meaning only B/W. You shouldn't exceed 8bits, but I suggest to use maximum 4 bits.

App will show you black and white image with reduced bitdepth and after calculation dialog box, that operation was successful.

For better results use some graphic program that will allow you to change image to B/W, make higher contrast and set brightens to appropriate level.

Step 2: Additional Info

imGcode is quite slow when working as standalone, so please be patient. Also it have to install quite big Matlab runtime, which is free to use.

If you have inverted Y axis in opposite direction to my droving in previous step, it will work, but image will be upside down and origin offset will show upper left corner.

Maximal and minimal powers are 255 and 0, others are evenly distributed between max and min. Number of steps is defined by bitdepth 4->16,3->8, 2->4, 1->2 only max and min.

Let me know if any bug appears or you need any changes.

<p>Hi, I installed it on my windows 10 desktop and everything went well but when I tried to run the program I got the splash screen and it closed and the another window popped up and immediately closed. So fast I could not see what it was, but it looked like the main window.</p>
<p>You may try using lasergrbl.com instead of my software. It seems to be good equivalent.</p>
<p>You did not look far enough for image to gcode software to laser engrave photos.</p><p><a href="https://www.instructables.com/id/Shapeoko-2-Arduino-UNO-R3-grbl-9g-8bit-Raster-Phot/" rel="nofollow">https://www.instructables.com/id/Shapeoko-2-Arduino...</a></p><p>Photo engraving examples done with a varied intensity controlled 445nm laser diode.</p><p><a href="http://www.picengrave.com/Gallery.htm" rel="nofollow">http://www.picengrave.com/Gallery.htm</a></p>
<p>I can assure you they do not work on all systems.</p><p>I thank the op for giving us the use of this, it works for me though I am having problems getting small details in faces, any tips for preparing the image first. thanks</p>
You should edit photo first in Lightroom or other developing software. Make it W/B, change contrast to maximum possible, also try using highest values for whites and lowest for blacks, reduce colors to number closest to one you want to achieve (MS paint can save bmps with reduced colors).
<p>Thankyou for that.</p><p>With a lot of files I get the message.</p><p>MAP must be a mx3array</p><p>Error in -&gt; img2gcode02.m at line 12</p><p>Can anyone please explain this.</p><p>thanks</p>
That is some issue with file format. Color map is not recognizable by program. Maybe it shouldn't be BW. I lost code and I don't remember exactly what was there... Try saving it in different format.
<p>It is too expensive for me. I would have to work longer to earn $40 than I coded my application.</p>
<p>Hi. Do you have version for 32bit cpu?</p><p>This doesn't run on my laptop</p>
<p>I'll see what I can do. </p>
<p>I'm sorry, I can't find code anywhere, I think it's on my old PC in myparents' house. Unfortunetly it might be corrupted, because I had very unplesant virus on that pc. I'll let you know as soon as I visit my parents.</p>
<p>hola,en windows no me deja abrir el progama</p>
<p>Very nice! Thanks for sharing. I have been looking for an inexpensive way to experiment with this capability.</p>

About This Instructable

6,093views

38favorites

License:

More by Vidmo:Arduino ATtiny Fan or Any DC Motor  PWM Speed Controller Programming Arduino Due and MKR1000 With Atmel Studio ASF Turn Arduino's serial converter into AVRISP mkII clone  
Add instructable to: