Showing posts with label Machine Shop. Show all posts
Showing posts with label Machine Shop. Show all posts

Saturday, 30 November 2024

CNC Machining Feed Rate for Material Surface Finish in Ra using Scilab

Topic: Turning (Lathe) Feed Rate Calculation for a given Average Roughness;

Subject: Machine Shop Technology;

Tool: Scilab;

By: Gani Comia, Nov. 2024;

Average Roughness, or Ra, is a parameter to measure the surface finish of a workpiece. Ra is typically expressed in micrometers \( \mu m \). Shown here are some of the common Ra values for different surface finishes:

  • Polished; Ra 0.05~0.2 \( \mu m \)
  • Machined (Finish): Ra 0.8~3.2 \( \mu m \)
  • Machined (Rough): Ra 3.2~12.5 \( \mu m \)
  • Casted: Ra 12.5~50 \( \mu m \)
In turning metal workpieces, feed rate, f (mm/rev), is one of the considerations to achieve the required surface finish. Let us say we wanted to achieve an Ra 3.2 \( \mu m \) and we have two types of insert, round and rhombic. The machining parameter, which is feed rate, can be calculated and used in the CNC turning program. Below is the basis for calculating feed rate in mm/rev and its Scilab script.

$$f\;=\;{2}\;{\sqrt{\frac{r\;R_a}{125}}}$$


Scilab Script

// Machining Feed Rate Calculation in CNC Turning
// Gani Comia, Jan. 2023
clear;clc;

// given insert type and corner radius
// round corner, r=6.35 mm, rhombic corner, r=0.2 mm
r = [6.35 0.2];                                 // mm
// standard Ra, surface finish
Ra_std = [0.1 0.2 0.4 0.8 1.6 3.2 6.3 12.5];    // um
Ra = linspace(0.1,12.5,200);                    // um

// formula feed/rev for insert radius and Ra requirement
function f=feedPerRev(r, Ra)
    f = 2.*sqrt(r.*Ra./125);  // mm/rev, feed per rev
endfunction

// calculation of feed rate for standard Ra
f_std_round = feedPerRev(r(1), Ra_std);
f_std_rhombic = feedPerRev(r(2), Ra_std);
// table of feed rate for standard Ra
mprintf("\n Ra(um)\t\tf(mm/rev) Round\tf(mm/rev) Rhombic\n")
Table = [Ra_std' f_std_round' f_std_rhombic'];
mprintf("\n %3.2f \t\t %3.3f \t\t %3.3f\n", Table)

// calculation of feed rate from 0.1 to 12.5 um, Ra
f_round = feedPerRev(r(1), Ra);
f_rhombic = feedPerRev(r(2), Ra);

// plotting results
clf;
plot(Ra, f_round, "b-", "linewidth", 1.5)
plot(Ra, f_rhombic, "r-", "linewidth", 1.5)

title("CNC Lathe Feed Rate for Surface Finish")
xlabel(["Average Roughness", "$\Large{R_a\,\;(\mu\,m)}$"])
ylabel(["Feed Rate", "$\Large{f\,\;(mm/rev)}$"])
legend(["Round r = 6.35 mm", "Rhombic r = 0.2 mm"],2)

// case scenario for Ra=3.2 um
Ra_32 = 3.2;
f_round_32 = feedPerRev(r(1), Ra_32);
f_rhombic_32 = feedPerRev(r(2), Ra_32);

// line plot of special concern
xpt_ver = [3.2 3.2]; ypt_ver = [0 f_round_32];
plot(xpt_ver, ypt_ver, "g--")
xpt_hor = [3.2 0]; ypt_hor = [f_round_32 f_round_32];
plot(xpt_hor, ypt_hor, "g--")
xpt_hor_1 = [3.2 0]; ypt_hor_1 = [f_rhombic_32 f_rhombic_32]
plot(xpt_hor_1, ypt_hor_1, "g--")

// plotting points
plot(Ra_32, f_round_32, ".b")
xstring(0.1, f_round_32, ["$\large{f\;=\;0.806\;mm/rev}$"])
plot(Ra_32, f_rhombic_32, ".r")
xstring(0.3, f_rhombic_32, ["$\large{f\;=\;0.143\;mm/rev}$"])
xstring(3.2, 0.30, ["$\Large{R_a\;=\,3.2\;\mu\;m}$"], -90)

Visualization of the relationship of f and Ra for a given nose radius, r, in turning machining is a helpful guide for machinist reference. 

Fig. 1. Turning Feed Rate for Insert Type and Surface Finish.

This toolbox can be your handy reference to calculate the turning feed rate as the initial machining parameter in the CNC program.

Feel free to comment for inquiry, clarification, or suggestion for improvement. Drop your email to request the softcopy of the file.


C++ and Python for Numerical Solution to Spring-Mass-Damper Model

Topic: SDOF Spring-Mass-Damper System Subject: Numerical Methods & Mechanical Vibration Tools: C++, CodeBlocks, GitHub Copilot, LabP...