What happens when a well trained and highly motivated engineering student gets snowed in at school? Well sometimes they decide to cut loose, throw caution to the wind, crack open a computer, and let the scientific juices flow.
In just this scenario, I was trapped by an ice storm yesterday and instead of doing the responsible thing, like studying the second law of thermodynamics, I chose to check off a bucket list item. Create a robot to draw pictures, write essays, and pretty much do whatever I want (with a writing utensil and paper of course.) Now, at any given moment I've probably got enough spare parts laying around to build a spaceship or change the balance of power in the world. A curse and a blessing tis' having a fully stocked workshop in my bedroom.
I started off by working with my bread and butter; CAD modeling. For the uninitiated, this is an acronym standing for Computer Aided Drafting. Drafting is the age old practice of engineers turning ideas into 2D, and now 3D, models that are used for manufacturing. Where ages past were limited to machining parts from 2D physical drawings, it is within the modern age's power to press "print" and breathe a 3D model into existence. First let me break down the design a bit.
3D model of the drawing attachment for my CNC Mill |
Ready to 3D Print! |
As you can see in the video, I basically designed each part and then put it in an assembly to model how everything would interact. Then I exported the models from my CAD software to something called a Slicer. This is a fancy way of telling a 3D printer how to do it's job. Imagine cutting out 2D sketches and stacking them on top of each other until you have a 3D item. That is the principle of 3D printing. Where you would cut each layer out, a 3D printer prints the layer out; hence the term "slicing."
After the 3D printer took over production of my physical system, I turned towards the much more complicated and foreign task: programming said robot to draw. Now before you get too far ahead of yourself, no, I'm not creating an AI Michelangelo that will create beautiful works of art that will shape the world for eons to come. Neither am I creating an actual artist whose years of training, love, and life experience bleed ink into the page. What I'm programming is a stone cold machine that upon the stimulation of 1's and 0's will take a picture, convert it to reasonable lines, and then trace it out. Indifferent to whether it's producing an image of the Virgin Mary or writing a purchase order for 12 nuclear warheads.
I decided to start with a fun group picture, but quickly realized it was so complicated that my computer literally could not process the code without crashing. So I turned towards a fun little picture of the Virgin Mary. After many painful hours of trial and error, here is the process I figured out.
First Attempt was fun group picture |
Fusion using 70% of my memory then crashing |
1. Acquire a sick picture
2. Upload to sketchy website that probably gives me virus'
3. Import the SVG (no idea what that means) file into Fusion 360 (CAD Package with some neat toys)
3.5 Wait about 5 years for the SVG to finish importing (seriously, it took sooooooooo long)
4. Tell the CAM (Computer Aided Manufacturing) software that I want the sketch traced
Creating toolpaths in Fusion 360's CAM |
5. Export the code
6. Import the code to my machine controller
Machine Controller has the GCODE |
7. Let er' rip baby.
Virgin Mary turned out pretty good! |
All said and done, I'm pretty dang proud of how the picture turned out. What a fascinating modern age we live in where someone with no artistic abilities can wrest from a few rolls of plastic, some time on a computer, and a bit of motors and odd/ends laying around a picture that appears hand drawn. In the future, the hardware is in serious need of upgrading because the pen was dragging and bending all over the place. I'd also like to attempt to draw something bigger or perhaps write a letter to someone.
John! This is great! Like your desk a lot, did you get that at Walmart??? {Sorry...}
ReplyDeleteHahaha picked it up from Isle #5 next to Carnot Cycle Engines and wheels rotating without slip.
Delete