Fab2016

Sibu's FabAcademy 2016 Documentation Home

Computer-Aided Design

Last week I thought about the project and just scribbled something on the paper, some rough sketch, trying to explain the process. I also made some guesses about how to make the machine and what could be the merits and demerits. This week we are supposed to take our project one step further. I have to explore the Computer-Aided Design (CAD) softwares and make a design of the machine I'm trying to make.

Before I start designing the machine, I wanted to make sure about the following.

'First Light'.

So I wanted to know how fast this technique will remove material from the PCB (it can remove for sure, I had experienced this on several occasions when accidentally made short-circuits and sparks). So I decided to test it, with a little water on an used PCB. The lab power supply was used for power. I went ahead and kept the maximum voltage (30v) at a limit of 1A. I kept the voltage that high because if I had kept low voltage the distance between the electrodes would have to be too short and that will be very-very difficult (our hands are not stable like machine). The ground was connected to the copper, the positive terminal (actually the polarity is not important) is connected to a broken blade of the Vinyl cutter.

trial-1

The process



Note:-

I recorded the video in my phone and used the tool handbrake. This tool is like a frontend to the ffmpeg and other libraries like Libav, x264, x265 etc. Everything is GUI based, this is really useful if you want to crop videos. You can set cropping, transcoding options, audio/video formats and quality, codecs etc.

The result.


trial-1 result
The result of the process shown in the video, notice that the copper has been removed by the sparks. If you watch carefully there is a discoloration too as a result of electrolysis.

So, now I'm confident that the technique will work. As a result of the process the copper from the board has been removed. The tool is also getting eroded. All that is left to do is to

3D-CAD

Antimony


I tried antimony to design a rough shape of the stepper motor from the CD/DVD drive. You can see the video of my design process, because a picture is worth a thousand words and this video is made up of about 85 of them(pictures)!
I made this video by taking many screenshots and combining them using ffmpeg. I used escrotum to capture the screen, I made a keyboard shortcut such that when I press PrtScn button a command escrotum ~/Pictures/%Y-%m-%d-%T.png will be executed, and that will save a screen shot to the ~/Pictures directory. You can also do this with default screenshot programs like for example 'Spectacle' for KDE-Plasma Desktop Environment I use. After that I used ffmpeg to combine these images to a short movie.
          ffmpeg -framerate 2 -i %03d.png -c:v libx264 -r 10 -pix_fmt yuv420p test.mp4
        

I had renamed all image files as 001.png, 002.png 003.png..... using the batch rename properties of KDE (just select all files you want to rename and select rename).
-framerate 2 tells that two images per second or in other words each image will get 1/2 a second.
-i %03d.png tells that the files are named as 001.png, 002.png 003.png.....
-c:v libx264 tells to use the x264 video codec
-r 10 will give a final video stream with 10 frames per second, 10 fps is fine as we don't have any fast moving action, its all static images.



Antimony files for the above design.

As you can see, I can change few numbers like the diameter of the motor, shaft-length and I get a new motor. I had to do this because I'm not sure that all the motors I will be getting will be of the same dimensions, but in general, shape of the motors are all the same. Antimony is really good at this, it's a parametric CAD. If you want to make a correction to any dimension or sometimes the shape, most probably you can do that with just changing a few numbers. Tools like Rhino3D cannot do this, you have to redesign the entire model from scratch.
This parametric design feature will be very useful, especially when you want to fine-tune dimensions of your design. One scenario where this will be useful is when you want to design a press-fit construction for cutting in a laser cutter or CNC mill. The benefit is that you can just adjust a few parameters depending on what cutting tool you are using or whats the beam width of the laser. You can fine tune the design by changing the parameters till you get a very tight fit.
There are few draw-backs to Antimony. One important thing is that its not stable enough, at least with my installation. It crashes sometimes when I move the object too much, so at times I lose my unsaved progress and will have to start-over. At times it is really stable too. Another demerit is that the rendering is not really that good or fast enough. I wish the software uses GPU for rendering (I don't know if it already does, but if yes it looks like the implementation is not efficient). Third major problem I faced is the lack of tools, it doesn't have the huge set of functions/tools that major CAD softwares comes with, but the idea is to create everything with simple 'building blocks'. For this reason I'll have to use something like SolidWorks or AutoCad for more complicated design.

Now I need to design the rest of the machine. I cannot do this unless I procure all the raw material I can gather. Once I have them, I'll design a machine that will make the best use of the parts I collected.

2D-CAD

I wanted to make a 2D sketch/design of a possible press-fit construction set for the next module, but I also want this to be a part of my final project or at least something that will be useful in future.

I made this design in OpenSCAD.

                module copy_mirror_adj(vec=[1,1,0])
                {
                  children();
                  mirror([1,0,0])mirror(vec) children();
                }

                l = 65;
                h = 20;

                beam_width= .25;
                thick = 3.2;
                number_of_slots_base = 3;
                number_of_slots_wall = 2;


                num_slots_base = number_of_slots_base * 2;
                num_slots_wall_side = number_of_slots_wall * 2;
                base_slot_width = l / ( num_slots_base + 1);
                fit_base_slot_width = base_slot_width + beam_width;
                wall_slot_width = h / ( num_slots_wall_side + 1);
                fit_wall_slot_width = wall_slot_width + beam_width;
                slot_depth = thick;
                wall_length = l;
                wall_height = h;

                //base
                translate([-l/2,-l/2,0])
                union(){
                  for ( i = [ 0: 2: num_slots_base ] )
                  {
                      translate ( [ 0, l, 0 ] )
                      translate ( [ (i+.5) * base_slot_width , slot_depth/2, 0 ] )
                      square ( size = [ base_slot_width, slot_depth ], center = true );

                      translate ( [ 0, -slot_depth, 0 ] )
                      translate ( [ (i+.5) * base_slot_width , slot_depth/2, 0 ] )
                      square ( size = [ base_slot_width, slot_depth ], center = true );
                  }

                  for ( i = [ 0: 2: num_slots_base ] )
                  {
                      translate ( [ l, 0, 0 ] )
                      translate ( [ slot_depth/2, (i+.5) * base_slot_width, 0 ] )
                      square( size = [ slot_depth, base_slot_width ], center = true );
                      translate ( [ -slot_depth, 0, 0 ] )
                      translate ( [ slot_depth/2, (i+.5) * base_slot_width, 0 ] )
                      square (size = [ slot_depth, base_slot_width ], center = true );
                  }

                  square ( size = [l, l], center = false );
                }
                //wallls

                copy_mirror_adj()
                copy_mirror_adj()
                copy_mirror_adj() //these copy_mirror modules rotates and duplicates one wall into four.
                translate([-l/2,-l/2,0])
                union(){
                  for ( i = [ 1: 2: num_slots_base ] )
                  {
                      translate ( [ 0, l + 1 + thick, 0 ] )
                      translate ( [ (i+.5) * base_slot_width, slot_depth/2, 0 ] )
                      square ( size = [ fit_base_slot_width, slot_depth ], center = true );
                  }

                  translate ( [ 0, l+1+2*thick, 0 ] )
                  square ( size = [wall_length, wall_height], center =false );

                  for ( i = [ 1: 2: num_slots_wall_side ] )
                      translate ( [ l, l+1+2*thick, 0 ] )
                      translate ( [ slot_depth/2, (i+.5)*wall_slot_width, 0 ] )
                      square( size = [ slot_depth, fit_wall_slot_width], center = true );

                  for ( i = [ 0: 2: num_slots_wall_side ] )
                      translate ( [ -slot_depth, l+1+2*thick, 0 ] )
                      translate ( [ slot_depth/2, (i+.5)*wall_slot_width, 0 ] )
                      square (size = [ slot_depth, wall_slot_width ], center = true );
                }
        
Download the above code.

What kind of a design is this, you may ask. Well this is what you make in OpenSCAD, and you get this.

openscad result
OpenSCAD rendering of the above script.
Let me explain what this is,
This is a script to make a square-box (top open), press-fit construction kit. This is parametric, means you can change the appropriate values at the beginning of the script to change the properties of the box. You can alter the following.

Again, pictures are worth thousand words!. So, lets watch a video.



Okay, OpenSCAD is a script based parametric 3D-CAD tool. It's a script based tool, which means you will program your model, using various primitives like, points, line, circle, rectangle, polygon, curves, cylinder , cubes etc. Then can do various mathematical and logical operations on these primitives and get your final design.
I played with a few other tools for getting this design done. I tried the following, and I abandoned them for some reason.

Antimony


Well this was the first tool I tried. I could get somewhere with it. But Antimony tries to render the script live, so when I make some mistake, sometimes the software crashes and I will loose all the progress. This was frustrating, also the scripting language is Python something I'm not that familiar with. Another problem I came across is the limitation on the number of primitives and operations. And finally I didn't have the command over the entire script, when I try to make some mathematical relations between some object/parameters etc., I get some weired errors, and was frustrating.

Rhino-Blocks


I followed this very informative tutorial on using blocks by Saverio Silli. It was helpful. And I could do something with the blocks. But I didn't like to have my design scattered across multiple 'block files', but having individual files for individual parts (like nuts, bolts, motors etc) in a big design is convenient. But fro something simple as what I'm trying to do, multiple files are not very attractive. Also for any change I have to manually edit the blocks, I cannot just enter a few numbers like I did with OpenSCAD. And finally Rhino is not free, (90-day Evaluation) and not available for Linux (Wine can be used to run Rhino in Linux, but may not give the best performance or stability).

Grasshopper


Grasshopper is a plugin or a frontend to Rhino. It uses the Rhino as a back-end for rendering etc. Basically it's like Antimony, a lot more powerful it seems, with a lot of new primitives, and operations. But time was running out and I found it too difficult/confusing to do something very simple like a rectangle. Again, it uses Rhino3D and I have to switch OS for using it. I didn't like leaving my customized Linux Desktop Environment, so goodbye to Rhino3D and Grasshopper3D.

More designs could be found in the coming modules. For example a few more designs with Antimony and OpenSCAD can be seen in next module. Similarly a few more designs using Rhino can be seen at 3D Scanning and Printing page. For example

Klein-Bottle by sibu on Sketchfab

OpenSCAD resources