(* Mathematica code to implement the calibration method of C. P. Green, H. Lioe, J. P. Cleveland, R. Proksch, P. Mulvaney and J. E. Sader, Rev. Sci. Instrum., Vol. 75, 1988-1996 (2004). To run: (1) first evaluate this file; (2) then type in kt[L, b, f, Q], where L is the length in um, b is the width in um, f is the torsional resonant frequency in kHz, Q is the quality factor of the torsional resonance peak. E.g.: To evaluate kt for the R1 (197x19um) cantilever in Table III of the above reference: Type kt[197, 19, 393.4, 104] *) (* Density and viscosity of air *) (* ---------------------------------------- *) rho = 1.18; eta = 1.86 10^(-5); (* Hydrodynamic functions *) (* ---------------------------------------- *) Ren[f_, b_] := N[rho f b^2 / 4 / eta]; omimag[x_] := (0.41 / Sqrt[10^x] + 1/(10^x)) * (0.82494 - 0.67701*x + 0.41150*x^2 - 0.16748*x^3 + 0.04897*x^4 - 0.01107*x^5 + 0.00148*x^6) / (1 - 0.72962*x + 0.40663*x^2 - 0.16517*x^3 + 0.04907*x^4 - 0.01110*x^5 + 0.00148*x^6); (* Calculation of spring constant *) (* ---------------------------------------- *) (* L, b in um. Resonant frequency f in kHz. Quality factor Q *) kt[L_, b_, f_, Q_] := N[0.1592 rho b^4 L 10^(-30) Q omimag[Log[10,Ren[2 Pi 1000 f, b 10^(-6)]]] (2 Pi 1000 f)^2];