![Home Home](images/me.jpg)
Wildcard Week
individual assignment
Design and produce something with a digital fabrication process (incorporating computer-aided design and manufacturing) not covered in another assignment, documenting the requirements that your assignment meets, and including everything necessary to reproduce it.
some ideas
CNC by the sea, by the wonderful Oscar, Edu i Josep.
In Photoshop I created a document that was 700x700mm, the size of the CNC area, then drew what I wanted to draw, exported to PNG.
You can do that anywhere, just make sure you know it’s 700 by 700 mm and the DPI (pixel density).
I went to Mods, right-click > programs > open server programs > machines > G-code > mill 2d png
In the read png module, click select png file, pick your png file and make sure you have the same DPI as your image (if you have a different one then it will scale up or down your image).
Go to the mill raster 2d module, use these settings:
That should be it here.
Note //
The Z is set to the table, so Z0 makes the screwdriver touch the table. If you put 10mm cut depth, it’s gonna generate a file with Z-10… not good. The sand is a layer of 20mm so we want something that says Z10 (or anywhere between Z0 and Z20). To automatically generate the right value put a negative cut depth.
Use these settings:
I have cut depth at 5mm because when I made the file we hadn’t figure out the best height. Now it’s 10mm.
Finally go back to mill raster 2D and click calculate. It should think for a bit and automatically download the G-code file.
Open the G-code file in your favorite text editor (Atom, Sublime Text, whatever).
We have the right feedrate/speed, the right units, the right Z. Good.
I just delete any lines that seem useless, although I’m sure it would work with them. You should be able to upload the code straight away without any problem.
Note //
You can check out what all the letters (G, M, S, etc.) mean on this Marlin page. You can see there is a line that says S1234, which means that S controls the Spindle Speed (like we set in mods).
There’s a lot of lines at the top you can get rid of. Keep or add:
At the end you can delete the M05 and M30 which respectively means switch the spindle / laser off and delete the SD file, useless.
What I have after deleting stuff.
Head to this link to access the CNC controller page.
Download this JSON file, go to Settings > Workspace, at the bottom right click on Import, and select the JSON file.
Note //
This is not essential but it just configures the workspace to only show the essential windows.
On the left click Connection, select /dev/ttyUSB0 in the Port dropdown.
Click on the Open button. The console should appear, that’s where you can test some commands to make sure it works, but first let’s set up the webcam.
Click on the cog and enter http://91.126.132.4:8080/?action=stream in the Connect an IP camera. The stream should show.
Ok, now we are connected and we can see the CNC via the webcam. Let’s try some commands and see if it works.
In the console type in G0 Z30 to bring it up. You can’t really see if it works as the camera is above. Now enter G28 XY to go to Home coordinates, should notice if it moves this time.
If the console commands work then you’re ready to send your file. Click on the Upload G-code, select your file. The lines should appear under. Press play.
Weeeeeee!