Analog meters are handy for making things with. Stick it on an amplifier project or an ugly cobbled-together kludge you like to pretend is a remotely useful bit of test gear. It doesn't matter where you use them; sometimes it's just easier to use an analog meter than a digital one. The only real obstacle in any application is creating the corresponding legend for the meter face. Here, I'll show my method which works well for nonlinear scales.

With original meter face |

To start, I took a set of known resistors in the meter's range and correlated their values to the existing 0-16 linear scale. I performed this test in both ranges, resulting in two sets of resistances and scale values. I then measured the radius and chord length of the existing meter scale.

Measure this shit so you can find section angle and legend size |

%% ESR meter scales clc; clf; clear all; format compact; rtlo=[0.18 1 1.5 3 6.8 10 25]; rthi=[0.18 1 1.5 3 6.8 10 25 46]; xlo=[15.2 11.2 9.4 5 1 0.2 0]; xhi=[16 15.8 15.6 14.8 12.6 10 3.2 0.4]; % create semi logarithmic resistance space %z = -1:1; d=1:9; %R=cell2mat(arrayfun(@(i) d.*10^z(i),1:length(z),'UniformOutput',false)); R=[0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 ... 1 1.5 2 2.5 3 4 5 6 7 8 9 ... 10 15 20 25 30 40 50]; % linear interpolation %Xlo=interp1(rtlo,xlo,R); %Xhi=interp1(rthi,xhi,R); % or calculate from rational fit (or other function type; try cftool) %fitlo=[-12.57 162.3 2.023 10.16]; %fithi=[-103.5 6662 -4.942e+04 -8.055 355.9 -3069]; %Xlo=(fitlo(1)*R + fitlo(2)) ./ (R.^2 + fitlo(3)*R + fitlo(4)); %Xhi=(fithi(1)*R.^2 + fithi(2)*R + fithi(3)) ./ (R.^3 + fithi(4)*R.^2 + fithi(5)*R + fithi(6)); % or use splines see if i care Xlo=spline(rtlo,xlo,R); Xhi=spline(rthi,[-0.15 xhi -0.10],R); figure(1); semilogx(rtlo,xlo,'r',R,Xlo,'c'); hold on; grid on; semilogx(rthi,xhi,'r',R,Xhi,'c');

Spline and original data (scale value versus resistance value) |

%% curved scales clf; figure(2); r=52; % scale centerline radius in mm l=76; % scale chord length in mm sw=2*acos(l/(2*r)); % scale swing in rad fontsize=18; linescale=0.5; plot([0],[0],'+'); axis([-40 40 0 60]); axis equal; for n=1:22; if Xlo(n)<=16; phi=sw/2 - (Xlo(n)/16)*sw + pi/2; if sum(find(R(n)==[1.5 2.5 15 25]))==0; textrad=r+2.5; offset=0.005*fontsize/10; textstring=num2str(R(n)); if R(n) < 1; t=text(textrad*cos(phi+offset),textrad*sin(phi+offset),textstring(2:end)); else t=text(textrad*cos(phi+offset),textrad*sin(phi+offset),textstring); end set(t,'Rotation',(phi*180/pi)-90); set(t,'FontWeight','bold'); set(t,'FontSize',fontsize); end linerad=[r r+1.5]; h=line(linerad*cos(phi),linerad*sin(phi)); if sum(find(R(n)==[1.5 2.5 15 25]))==0; set(h,'LineWidth',2*linescale) else set(h,'LineWidth',1*linescale) end end end for n=1:length(Xhi); if Xhi(n)<=16 && R(n)>=1; phi=sw/2 - (Xhi(n)/16)*sw + pi/2; if sum(find(R(n)==[1.5 2.5 15 25]))==0; textrad=r-2.5; offset=0.01*fontsize/10; t=text(textrad*cos(phi+offset),textrad*sin(phi+offset),num2str(R(n))); set(t,'Rotation',(phi*180/pi)-90); set(t,'FontWeight','bold'); set(t,'FontSize',fontsize); end linerad=[r-0 r-1.5]; h=line(linerad*cos(phi),linerad*sin(phi)); if sum(find(R(n)==[1.5 2.5 15 25]))==0; set(h,'LineWidth',2*linescale) else set(h,'LineWidth',1*linescale) end end end th=pi/2-sw/2:sw/100:pi/2+sw/2; h=line(r*cos(th),r*sin(th)); set(h,'LineWidth',3*linescale) linerad=[r+3 r-4]; line(linerad*cos(pi/2-sw/2),linerad*sin(pi/2-sw/2)); set(h,'LineWidth',1*linescale)

The scale as produced by the script using plot/draw tools |

The scale in Inkscape after adjusting a few things |

Measuring a bad LUXON capacitor with the new meter face |

No wait. Not unicorns. That would be bad.

## No comments :

## Post a Comment