#Week 15 / Mechanical Design, Machine Design

Assignment and learning outcomes.

What is this week assignment?

Group assignment Mechanical Design (part 1 of 2)- Design a machine (mechanism + actuation + automation), build the mechanical parts and operate it manually, document the group project. As an individual assignment- Document your individual contribution.

Group assignment Mechanical Design (part 2 of 2)- Actuate and automate your machine, document the group project. Individual assignment- Document your individual contribution.

Leraning outcomes

  • Work and communicate effectively in a team and independently
  • Design, plan and build a system
  • Analyse and solve technical problems
  • Recognise opportunities for improvements in the design
  • Introduction

    For Mechanical Design and Machine Design weeks, we decided to make a camera control machine. With this machine, we can adjust focus(for macro cameras) of the camera, and also shot videos in motion with other moving objects. The main problem that our macro camera is have manual focus mechanism. With this mechanism is very hard to get the right focus. We what to solve this problem by making automated camera control machine. Before starting this group project, first of all, we need to make a plane. We make tasks for each of as and divided them. Hear is dashboard

  • Miqayel Aramyan - need to design and cut parts for the machine by using computer-controlled machining and computer-aided design techniques.
  • Babken Chugaszyan-need to design, manufacture and program the electronics part of the project by using electronics design, production, and embedded programming techniques.
  • Mariam Nahapetyan- need to design and print all parts for our machine using computer-aided design and 3D printing techniques.

  • This all task are made to increase the effectiveness of the process, but everything we have done as a group by helping each other and solving problems together, we have done quite much everything together.

    Computer-Aided Design

    Introduction to 2D modeling

    For the machine, I need to design legs for the rail of the machine. For this purpose, I used Vcarve Pro which very easy to use for simple applications also you can generate g code for ShopBot directly from softer by choosing parameters for the toolpath. I have drow simple 2D sketch for legs in rectangular forms with the hole in the middle. I drow 2 rectangular legs with different heights(because of different highs at ends of rail). After drawing I generated the toolpath and start cutting.

    Process

    To start drawing in Vcarve Pro first you need Click on "Create a new file " after opening the program to create a new file. After opening the file save it somewhere and after that we can start drawing. The first thing that you need to do before the actual drawing is to navigate to "File Operations" and click to "Job setup", here you need to set up your material dimensions


  • Width and Height you can adjust in "Job Size(X & Y)"
  • Thickness in "Material (Z)" and also choose initial Z zero position (on the bottom or on the top)
  • X and Y 0 position are very important to choose the right because if you choose wrong position spindle can go the wrong way and damage something (look at machine XYZ position in manual on ShopBot).
  • After setting up dimensions of material now we need to drow 2D sketch for legs, for that, I used these tools


  • -Draw Rectangle (In "Create Vectors" section)
  • -Create Line / Polyline (In "Create Vectors" section)-Press the 'Space Bar' to finish the current line and start a new one. Right mouse click to finish line and exit form.
  • -Interactive Vector Trim (In "Edit Objects" section)-To trim overlapping vectors click on sections of vectors you want to delete. To delete closed non-overlapping vectors hold down the Shift key when clicking. /sh1.jpg /sh1.jpgg the pivot point directly in the 2D View, or set its position using the options below.
  • /sh1.jpg> /sh1.jpglick on an angled corner to change corner into the circular fillet. /sh1.jpg

    you can find all these tools on the left side on the sidebar. After sketching 2D model of our legs, we need to generate toolpath, to generate toolpath we need to click on an icon on the right side and choose "2D Profile Toolpath" for rectangular holes in the middle. First, need to click on vector and after adjust parameters

  • -Start Depth -0mm
  • -Cut Depth -10.3mm (same as wood thickness)
  • -Tool -1|8inch end mill
  • -Passes- 7
  • -Machine Vectors -Inside/Left /Clibe

  • Machine parameters

    By choosing a tool, you and change parameters like Tool Type, Diameter, Pass Depth, Stepover, Spindel Speed (r.p.m), Feed Rate, Plunge Rate(inches.sec) in my case I chouse

  • - Wood ,1| 8-inch, Strength (13728),ONSRUD ,2 flute ,end mill , up cut
  • -Pass Depth -0.125 inches
  • -Stepover -0.0625 inches 50%
  • -Spindel Speed -14000 r.p.m.
  • -Feed Rate- 2.0inches/sec
  • -Plunge Rate- 1.0 inches/sec

  • Also, I have added passes from 4 to 7(just for safety). After adjusting all parameters press calculate and observe 3D visualization on toolpath by using "Preview Toolpaths" tool in the Toolpaths section. After checking , go "Save toolpathes" and save the file somewhere by clicking "Save Toolpathes(s) to File"(it will generate g code for shopbot ). The same process is required to cut out(pocket).

    Introduction to 3D modeling

    As a 3D model, Mariam needs to design a holder for a camera that fits on the rail. The modeling of this part is very challenging because it has a complex structure. But by using Fusion 360 is very easy to drow and get the right design. Fusion 360 is an integrated CAD, CAM, and CAE software. It simplifies your entire workflow with one unified platform. Also, Fusion 360 has

  • -3D design and modeling
  • -Simulation
  • -Generative design
  • -Documentation
  • -Collaboration
  • -Manufacturing

  • The main process in 3D modeling is to draw 2D sketch and turn the 2D sketch into a 3D object by expanding it from the plane. Also by using the diferent tool you shape or modify your object 3D model. Before starting modeling we need to measurements from the rail. The main tools that have been used for modeling are

  • Create Sketch(in SKETCH)
  • Rectangle(in SKETCH)
  • Line(in SKETCH)
  • Fillet(in SKETCH)-Place an arc of a specified radius at the intersection of two lines or arcs. Select the vertex or the two lines or arcs. Spacify a radius for the fillet.
  • Circle(in SKETCH)-Center Diameter Circle C
  • Extrude
  • Fillet
  • Charmfer
  • Mesure
  • Computer-Controlled Machining(ShopBot)

    Introduction

    For cutting the legs we have used ShopBot Desktop MAX because we need to cut small part, and we decided to cut it on a smaller shopbot.

    Process

    After generating all files you must fit the material on shopbot surface and 0 the axis(X ,Y ,Z) of ShopBot .Just Simply go to at the position where you what to 0 X, Y and 0 it, for the Z axis you can use z zero plate. After 0 all axis and having all files, you can cut by pressing Cut Part(make sure your tool is near to zeroed axis) Press Start button on the remote controller and it will start cutting (Make sure your dust collector is turned on before starting cutting). After its finish remove the material (make sure that key is turned clockwise ), and measure it. Here is steps to follow

  • 1. READ. Read this manual well to acquaint yourself with how to handle the tool safely and effectively before use. Read related manuals for the router and/or spindle that will be mounted on your ShopBot.
  • 2. PRACTICE. Practice operating your ShopBot tool with your computer and the ShopBot Control Software BEFORE activating the router or spindle.
  • 3. Fix your material on the surface Turn on ShopBot.
  • 4. Change the mill(if you need to another mill, in my case it’s 1|8" inch Up Cut ”).
  • 5. Zero the axis.
  • 6. Turn on the Vacuum cleaner, plug key back and rotate.
  • 7. Press cut the part and “START” button.
  • 8. After first toll path remove sticks of wood and run next toolpath and when its stop , you finish.

  • In any case if you cut MDF be carryful- When MDF or other wood sheet is cut, a large number of dust particles are released into the air. It's important a respirator is worn and that the material is cut in a controlled and ventilated environment. It's good practice to seal exposed edges to limit emissions from binders contained in this material. So I turned on vacuum cleaner when I started to cut MDF.

    Main paramets for Plywood cutting with 1/8 inch mill

  • Feed Rate(ips)-1.8-3.0
  • RPM-18,000
  • Chip Load per leading edge-.003-.005
  • Cut depth -1 x D
  • 3D printing

    Introduction

    For 3D printing, we have used Ultimaker Extended 2 Plus. This 3D printer delivers robust single extrusion 3D printing. It is affordable, reliable, and user-friendly, the Ultimaker 2 Extended+ deliver consistent results – suitable for rapid prototyping and concept models. They feature swappable nozzles, a heated glass build plate, and an open filament system.

    First, we export our 3D model in .stl file format an imported it in "Cura" softer which is support Ultimaker printers. We have adjusted the position of the model to apply for less support. We have used custom settings

  • Material- 2.8mm Red ABS
  • Profile-Fine 0.15mm
  • Layer Height-0.2mm
  • Wall Thickness-1mm
  • Top/Bottom Thickness-1mm
  • Infill Density-30%
  • Gradual Infill Steps-0
  • Print Speed- 60mm/s
  • Infill Speed -30mm/s
  • Wall Speed-80.0mm/s
  • Outer Wall Speed-30mm/s
  • Inner Wall Speed-25mm/s
  • Top/Bottom Speed-30mm/s
  • Travel Speed-120mm/s
  • Colling -100%
  • Support- Raft (zigzag)

  • Ultimaker 2 Extended+ has: 228.6 x 226.06 x 304.8mm Build Volume Easily switch between 0.25, 0.40, 0.60 and 0.80 mm nozzles It prints ABS, PLA, HIPS, PET, ColorFabb XT, ColorFabb XT-Carbon Fibre, Woodfill, Bronzefill, Copperfill, Brassfill and flexible materials such as PolyFlex and Ninjaflex Requires 2.85mm filament.

    Electronics Production

    Electronics Design

    As board for our project, we choose to use Babken's board that he designed for the final project because it has all functions to run our machine. To check out the board go to Babken website serch in final project. Also we have added remote conntroll for Machine.

    Fab ISP

    For programming the board we used FabISPFabtinyISP is a 100% fabable ISP (In System Programmer) based on the FabTinyStar board, which was specificly designed to be made in a FabLab. FabTinyISP enables microcontrollers to be programmed while installed in a complete system, rather than requiring the chip to be programmed prior to installing it into the system. In other words it allows us to program microcontrollers on other boards we make. I recommend to read this paper Demystifying the FabISP before making the ISP In System Programmer, where you can learn in detail the purpose of each component on the board. Here are some points that I belive are essential:

    SRM-20

    We will mill the Printed circuit board and solder the componets. The milling machine that we'll use is Roland-monoFab SRM-20 you can find it's manual here. We teamed up with Miqael to explore our machine and to mill the recommended linetest pattern and it's cutout. We used 1/64in(0.4mm) endmill for milling the PCB traces and 1/32in endmill to cut out the PCB from the base material in our case FR-1.Setting up the Machine

  • It's always a good idea to follow the manual.
  • 1.Make sure the machine is clean of cutting waste.
  • 2.Turn the Power On
  • 3.Open the VPanel (This is a dedicated software for controlling the machine)
  • 4.Confirm the Command Set (in our case we'll be using NC code-Numerical control) This is the "language" that we'll be using to communicate with the machine and send the cutting commands.
  • 5.Check the total Spindle motor rotation time (image below). It is recommended to change spindle motor after 500hours in our case it was about 27hours so we are ok to go.
  • 6.Attach the cutting tool (image below). It's a good idea to mill the surface of the material and make the cutout from the base material after. In our case we will use 1/64in(0.4mm) endmill for milling the PCB traces and 1/32in endmill to cut out the PCB from the base material in our case FR-1. I made some macro photos of the endmills. They are magnified 200 times.
  • 7.Attach the material to the table (image below).
  • My advice on this is to take out the table (unscrew 4 screws at sides) and clamp the board for 5min to increase adhision, be careful not to tighten too much this can bend the table. Put something between clamp jaws and the table to keep the board and the table safe from scratches.
  • 8.Set the origin point. Select [Machine Coordinate System] in our case will use G54 and G55 that's the first 2 of 6 Work Coordinate Systems. Drive the bit to desired location with [X/Y] buttons shown above, and hit [X/Y] set origin point button in the right side of the Vpanel interface shown in the picture below. Drive down the bit just a little bit above the material using the [Z] buttons shown in the picture above. Unscrew the tiny bolt that holds the milling tool in place, support the tool with your finger so it drops and touches the copper surface. Fasten the bolt, but not too hard. Once done hit the [Z] set origin point button in the right side of the Vpanel interface shown in the picture below.

  • G code generation

    In our case the cut files are FabtinyISP traces and FabtinyISP cutout. The toolpath is the path that our bit has to travel in order to get the desired geometry on the base material. In order to generate the "toolpath" we'll be using FabModules (image below). And after generating the toolpath we'll save it as a NC code (G-code) for the machine to understand it. Select the input file from "input format" tab, select the output from "output format" tab in our case it's G-codes (.nc) and fianlly select the tool size from the "process" tab in our case it's PCB traces (1/64).

    At this point an image should appear under the selection we just did and a detailed settings on the right side. (image below). In "output" section you can set the

  • 1."cut speed" (Cutting speed) is the speed difference between the cutting tool and the surface of the workpiece while the tool is operating on it. The units are mm/s (milimeters per second).
  • 2."plunge speed" is the speed at which the router bit is driven down into the material when starting a cut and will vary depending on the bit used and the material being processed. The units are mm/s (milimeters per second)
  • 3."jog speed" is the speed at which the bit is driven when it's not in contact with the material (when the bit is not cutting). The units are mm/s (milimeters per second).
  • 4."jog height" is the height at which the router bit is driven up when it's trying to move from one working area to another. The units are mm (milimeters).
  • 5."spindle speed" is the speed at which the spindle is turning the bit. The units are RPM (Revolutions per minute).
  • 6."cut depth" is the depth which the bit will remove from the material material. The units are mm (milimeters).
  • 7."number of offsets" I couldn't get a precise definition for this setting, but what it actually does it adds toolpaths near the main toolpath while adding a space between them so the bigger the number the more times the tool will travel near the same place and eventually remove the copper near the traces. It's default value is 4 but I tried with 5 it took slightly more time but let less extra copper near the traces that had to be removed manually after. I would recommend to put 6 in order get less extra copper near the traces.
  • The default values work completly fine so hit "Calculate" from the right side of the interface and you'll get a toolpath like in the image above. Now save it. Now do the same thing for FabtinyISP cutout but instead of "traces 1/64" select "cutout 1/32" in the process tab of Fabmodules.org, now save it. The default Work Coordinate System of Fabmodules G-code is G54, but changing it is easier than you think. Just open the .nc file (G-code) with a text editor any will work. And find the G54 somewhere in the starting part of the code.
  • Open the V-panel make sure the 1/64 endmill is on the tool and is zeroed. Push the "cut" button from the interface hit "Delete all" to remove previous NC codes, now select the NC file you generated for the traces it's name should be "fts_mini_traces.nc" Change the speed value to 10 at the start of the cutting in order to have more time to react if something goes wrong. If everything is ok increase the speed to 100.

    Soldering

    Before starting soldering clean up the space around and make sure you have all supplys.

  • Soldering Iron.
  • Cuter
  • Fume Extractor for Soldering
  • Solder Wire
  • Flux
  • Soldering sponge
  • Pinset
  • also all components for Machine board

  • 2 ATtiny44 microcontrollers 1400AMD (2.9$)
  • 2 LM3480IM3-5.0v regulator 800AMD (1.7$)
  • 2 A4953 full bridge 760AMD (1.6$)
  • 2m copper cable 500amd (1.1$)
  • 9 smd resistors(45AMD) + 6 smd capacitors(30AMD) + 4 LDR 5528 Q5(400AMD)=475AMD (1$)
  • 1m ribbon cable 478AMD (1$)
  • 2 696ZZ ball bearings 300AMD (0.6$)
  • 1 FR1 PCB board 717AMD 1.5$
  • emove unnecessary parts on the board with cutter .Clean up your PCB with water . Water the soldering iron sponge .Start Soldering(Solder by looking on schematics and layout .I added a jumper , after programming you can put it in one pin )

  • Make sure that soldering iron is about 350 degree celsius .
  • Make sure that ventilation is working well (because the smoke is dangerous if you breathe a lot )
  • Clean the parts to be joined
  • Clean soldering iron tip and "tin" all faces of tip with a coating of solder
  • Heat parts ,not solder, to be joined
  • Apply flux-core solder to heated parts, not the soldering tip, and heat it till solder melts and flows freely
  • Remove unnecessary parts on the board with cutter .Clean up your PCB with water . Water the soldering iron sponge .Start Soldering(Solder by looking on schematics and layout .I added a jumper , after programming you can put it in one pin )

  • Make sure that soldering iron is about 350 degree celsius .
  • Make sure that ventilation is working well (because the smoke is dangerous if you breathe a lot )
  • Clean the parts to be joined
  • Clean soldering iron tip and "tin" all faces of tip with a coating of solder
  • Heat parts ,not solder, to be joined
  • Apply flux-core solder to heated parts, not the soldering tip, and heat it till solder melts and flows freely
  • Code

       
    		//
    		//
    		// machine.44.c
    		//
    		// //
    		// Babken Chugaszyan
    		// 06/01/19
    		//
    		// This work may be reproduced, modified, distributed,
    		// performed, and displayed for any purpose. Copyright is
    		// retained and must be preserved. The work is provided
    		// as is; no warranty is provided, and users accept all 
    		// liability.
    		//
    		
    		#include 
    		#include 
    		
    		#define output(directions,pin) (directions |= pin) // set port direction for output
    		#define input(directions,pin) (directions &= (~pin)) // set port direction for input
    		#define set(port,pin) (port |= pin) // set port pin
    		#define clear(port,pin) (port &= (~pin)) // clear port pin
    		#define pin_test(pins,pin) (pins & pin) // test for port pin
    		#define bit_test(byte,bit) (byte & (1 << bit)) // test for bit set
    		
    		
    		#define input_port PORTB
    		#define input_direction DDRB
    		#define input_pino (1 << PB0)//button
    		#define input_pini (1 << PB2)//button
    		#define input_pinu (1 << PB1)//button
    		#define input_pins PINB
    		
    		
    		#define bridge_port PORTA // H-bridge port
    		#define bridge_direction DDRA // H-bridge direction
    		#define A2 (1 << PA0) // H-bridge output pins
    		#define A1 (1 << PA1) // "
    		#define B2 (1 << PA3) // "
    		#define B1 (1 << PA4) // "
    		#define on_delay() _delay_us(25) // PWM on time
    		#define off_delay() _delay_us(5) // PWM off time
    		#define PWM_count 50 // number of PWM cycles
    		#define step_count 20 // number of steps
    		
    		static uint8_t count;
    		
    		//
    		// A+ B+ PWM pulse
    		//
    		void pulse_ApBp() {
    		  clear(bridge_port, A2);
    		  clear(bridge_port, B2);
    		  set(bridge_port, A1);
    		  set(bridge_port, B1);
    		   for (count = 0; count < PWM_count; ++count) {
    			  set(bridge_port, A1);
    			  set(bridge_port, B1);
    			  on_delay();
    			  clear(bridge_port, A1);
    			  clear(bridge_port, B1);
    			  off_delay();
    			  }
    		   }
    		//
    		// A+ B- PWM pulse
    		//
    		void pulse_ApBm() {
    		  clear(bridge_port, A2);
    		  clear(bridge_port, B1);
    		  set(bridge_port, A1);
    		  set(bridge_port, B2);
    		   for (count = 0; count < PWM_count; ++count) {
    			  set(bridge_port, A1);
    			  set(bridge_port, B2);
    			  on_delay();
    			  clear(bridge_port, A1);
    			  clear(bridge_port, B2);
    			  off_delay();
    			  }
    		   }
    		//
    		// A- B+ PWM pulse
    		//
    		void pulse_AmBp() {
    		  clear(bridge_port, A1);
    		  clear(bridge_port, B2);
    		  set(bridge_port, A2);
    		  set(bridge_port, B1);
    		   for (count = 0; count < PWM_count; ++count) {
    			  set(bridge_port, A2);
    			  set(bridge_port, B1);
    			  on_delay();
    			  clear(bridge_port, A2);
    			  clear(bridge_port, B1);
    			  off_delay();
    			  }
    		   }
    		//
    		// A- B- PWM pulse
    		//
    		void pulse_AmBm() {
    		  clear(bridge_port, A1);
    		  clear(bridge_port, B1);
    		  set(bridge_port, A2);
    		  set(bridge_port, B2);
    		   for (count = 0; count < PWM_count; ++count) {
    			  set(bridge_port, A2);
    			  set(bridge_port, B2);
    			  on_delay();
    			  clear(bridge_port, A2);
    			  clear(bridge_port, B2);
    			  off_delay();
    			  }
    		   }
    		//
    		// clockwise step
    		//
    		void step_cw() {
    		   pulse_ApBp();
    		   pulse_AmBp();
    		   pulse_AmBm();
    		   pulse_ApBm();
    		   }
    		//
    		// counter-clockwise step
    		//
    		void step_ccw() {
    		   pulse_ApBm();
    		   pulse_AmBm();
    		   pulse_AmBp();
    		   pulse_ApBp();
    		   }
    		
    		int main(void) {
    		   //
    		   // main
    		   //
    		  
    		   //
    		   // set clock divider to /1
    		   //
    		   CLKPR = (1 << CLKPCE);
    		   CLKPR = (0 << CLKPS3) | (0 << CLKPS2) | (0 << CLKPS1) | (0 << CLKPS0);
    		   //
    		   // initialize bridge pins
    		   //
    		   clear(bridge_port, A1);
    		   output(bridge_direction, A1);
    		   clear(bridge_port, A2);
    		   output(bridge_direction, A2);
    		   clear(bridge_port, B1);
    		   output(bridge_direction, B1);
    		   clear(bridge_port, B2);
    		   output(bridge_direction, B2);
    		
    		   set(input_port, input_pino); // turn on pull-up
    		   set(input_port, input_pini);
    		   set(input_port, input_pinu);
    		  
    		   input(input_direction, input_pino);
    		   input(input_direction, input_pini); 
    		   input(input_direction, input_pinu);     
    		  
    		   //
    		   // main loop
    		   //
    		   while (1) {
    			  int a=0;
    			   if (0 == pin_test(input_pins,input_pino))
    			  {if (0 == pin_test(input_pins,input_pinu)){
    			  for (a=0; a<50; a++){
    			  step_cw();}
    			  while(0 != pin_test(input_pins,input_pini))
    			  {
    			   ;
    			  }
    			  }
    			  else {
    			  step_ccw();
    			  }
    		
    			  }
    			  if (0 == pin_test(input_pins,input_pini))
    			  {if (0 == pin_test(input_pins,input_pinu)){
    		for (a=0; a<50; a++){      
    		step_ccw();}
    		while(0 != pin_test(input_pins,input_pino))
    		{
    		;
    		}
    		}
    			  else {
    			  step_cw();}
    			 }
    			 }
    		   }	
    	
    
    
    
    		>

    Conclusion

    So we make machine and take couple photos. With this machine is vary esay to ajust focus of the camera and we got grate pictures of mill bits. We have problem with shopbot cuting and 3D printing , but we somlve all problems together.

    Videos

    Files

  • Program (.c)Click here to download
  • Program make file (make)Click here to download
  • Machine legs(.crvClick here to download
  • Slider 3D model (.stl) Click here to download
  • KiCad Files(.zip) Click here to download
  • PCB .png files(.zip) Click here to download