最近好几个网站都在DIY晶体管测试仪。我前不久也用洞洞板做了一个,精度还可以
10K AE金属箔电阻
10K AE金属箔电阻
(原文件名:nEO_IMG_100_6739.jpg) 误差0.01%
5K AE金属箔电阻
5K AE金属箔电阻测试
(原文件名:100_6743.JPG) 误差0.24%
2.5KAE金属箔电阻
2.5K AE金属箔电阻测试
(原文件名:nEO_IMG_100_6741.jpg) 误差1.4%
250RAE金属箔电阻
250R AE金属箔电阻
(原文件名:nEO_IMG_100_6740.jpg) 误差0.4%
除了电容,其它类型元件的测试和电阻一样,但是我没有精度可靠的元件,加上晚上拍效果不好就不拍了。
另外安装的时候因为螺丝滑丝了,直接用万能胶粘上了
就不放裸照了
这个晶体管测试仪也是根据一个德国人的开源项目做的,原始资料地址是 http://www.mikrocontroller.net/articles/AVR-Transistortester
这个网页有原理说明,原理图和源代码。
下面是我的其他元件的测试结果
红色发光LED: Diode: A=2;K=1
Uf=1967mV
绿色发光LED: Diode: A=2;K=1
Uf=2926mV
整流桥1-交流;2-交流;3-负电压端:Double Diode CA
A=3;K1=2;K2=1
SR360:Diode: A=2;K=1
Uf=209mV
8050: NPN 1=E;2=B;3=C
hFE=22 Uf=754mV
TIP35C: NPN 1=B;2=C;3=E
hFE=46 Uf=603mV
BC557: PNP 1=C;2=B;3=E
hFE=43 Uf=793mV
2N7000: N-E-MOS C=0.12n
GDS=231 Vt=1550m(V超出显示不出来了)
电容没有电容表,所以无法确定测量精度,不过经过多个测试,感觉还可以
104CBB: 100.23nF
105CBB: 1.00uF
104绿色WIMA:101.45nF
0.47uF红色WIMA:507.15nF
1uF红色WIMA:1.08uF
225CBB:2.20uF
47uF无极性电解电容:48.87uF
22uF电解:21.53uF
1000uF电解:1263.67uF (测试时间需10秒左右)
6800uF电解:7099.87uF (测试时间需30秒左右)
10000uF电解:9225.12uF (测试时间更长,其中几次还误报为小电阻,呵呵充电电流太小了)
下面说说我的制作过程中的几个小经验
原电路图:
电路图
(原文件名:Schaltplan_transistortester.png) 其原来的设计是使用9V电池,但是我不用考虑外出携带,不在乎功耗,所以那几个3级管构成的开机电路我就取消了,直接使用内置小变压器供电。整个设计使用元件极少,所以用洞洞板做也很方便。
不过我保留了检测供电电压的那两个电阻R11,R12用来校准M8内部ADC。根据实际测量值计算转换因子。
程序中查找“diodes[NumOfDiodes].Voltage = (adcv[1]*54/11);”将其中的54和11换成根据实际测量值得出的转换因子。例如我的是 diodes[NumOfDiodes].Voltage = (adcv[1]*1115UL/229UL);
测试使用AVCC作为基准电压,大家在制作时可以使用LM317供电,加上可调电阻调整供电电压为4.096V这样AD转换线性度较好。我恰好手上没有,用的7805。
采样电阻R1~R7对结果影响很大,我花4块钱买了1%精度的金属膜电阻各100个,从中挑选出3对阻值最接近的。没有1%的普通5%的也行,只要每种3个电阻的阻值尽量接近就行不用非要恰好是680和470K,可以通过程序中的
#define R_L_VAL 680
#define R_H_VAL 470000UL
这两个地方更改。最重要是的每种3个阻值要尽量一致,不然引脚和测试线的连接不同测试结果也会不同。
---------------------------------------------------------------------------
ReadADC我稍微更改了一下,不过其实对结果和精度影响应该不大或者说几乎没有。
unsigned int ReadADC(uint8_t mux) {
//ADC通道初始化
ADMUX = mux | (1<<REFS0); //采用内部基准,参考电压REFS0始终为1
//采用AVCC或内部基准由参数mux引入
//第一次测量值抛弃
ADCSRA |= (1 << ADSC);
while((ADCSRA & (1<<ADSC)) != 0);
//对ADC采样22次去除最大值和最小值后返回20次有效采样的平均值
unsigned int adcx = 0;
unsigned int adcx_max = 0;
unsigned int adcx_min = 0;
unsigned int adcx_t = 0;
for(unsigned char ti = 0; ti< 22; ti++)
{
ADCSRA |= (1 << ADSC);
while((ADCSRA & (1<<ADSC)) != 0);
adcx_t = ADCW;
if( ti == 0)
{
adcx_max = adcx_t;
adcx_min = adcx_t;
}
if(adcx_t > adcx_max)
{
adcx_max = adcx_t;
}
if(adcx_t < adcx_min)
{
adcx_min = adcx_t;
}
adcx = adcx + adcx_t;
}
adcx = (adcx - adcx_max - adcx_min) / 20;
return adcx;
}
---------------------------------------------------------------------------------------
源程序的显示是德文的,我改成了英文,注意我加了几个我用到的字符串
unsigned char TestRunning[] EEMEM = "Testing...";
unsigned char Bat[] EEMEM = "Battery ";
unsigned char BatWeak[] EEMEM = "Weak";
unsigned char BatEmpty[] EEMEM = "Empty!";
unsigned char TestFailed1[] EEMEM = "No Component or ";
unsigned char TestFailed2[] EEMEM = "Damaged ";
unsigned char Bauteil[] EEMEM = "Component";
unsigned char Unknown[] EEMEM = " Unknown";
unsigned char Diode[] EEMEM = "Diode: ";
unsigned char DualDiode[] EEMEM = "Double Diode ";
unsigned char TwoDiodes[] EEMEM = "2 Diodes";
unsigned char Antiparallel[] EEMEM = "Antiparallel";
unsigned char InSeries[] EEMEM = "in Serie A=";
unsigned char mosfet[] EEMEM = "-MOS";
unsigned char emode[] EEMEM = "-E";
unsigned char dmode[] EEMEM = "-D";
unsigned char jfet[] EEMEM = "-JFET";
unsigned char Thyristor[] EEMEM = "Thyristor";
unsigned char Triac[] EEMEM = "Triac";
unsigned char A1[] EEMEM = ";A1=";
unsigned char A2[] EEMEM = ";A2=";
unsigned char K1[] EEMEM = ";K1=";
unsigned char K2[] EEMEM = ";K2=";
unsigned char hfestr[] EEMEM ="hFE=";
unsigned char NPN[] EEMEM = "NPN";
unsigned char PNP[] EEMEM = "PNP";
unsigned char t1str[] EEMEM = " 1=";
unsigned char t2str[] EEMEM = ";2=";
unsigned char t3str[] EEMEM = ";3=";
unsigned char gds[] EEMEM = "GDS=";
unsigned char Uf[] EEMEM = "Uf=";
unsigned char vt[] EEMEM = "Vt=";
unsigned char mV[] EEMEM = "mV";
unsigned char Anode[] EEMEM = "A=";
unsigned char Gate[] EEMEM = "G=";
unsigned char TestTimedOut[] EEMEM = "Timeout!";
unsigned char DiodeIcon[] EEMEM = {4,31,31,14,14,4,31,4,0}; //Dioden-Icon
unsigned char OrBroken[] EEMEM = "or Damaged ";
unsigned char Resistor[] EEMEM = "Resistance: ";
unsigned char NullDot[] EEMEM = "0,";
unsigned char GateCap[] EEMEM = " C=";
unsigned char Capacitor[] EEMEM = "Capacitor: ";
---------------------------------------------------------------------------------------------
源程序对3级管的显示是 B=?;C=?;E=?,我感觉不习惯改成了按测试引脚顺序显示
1=?;2=?;3=?
个人习惯而已,改不改无所谓
源程序是:
lcd_eep_string(bstr); //B=
lcd_data(b + 49);
lcd_eep_string(cstr); //;C=
lcd_data(c + 49);
lcd_eep_string(estr); //;E=
lcd_data(e + 49);
我替换成:
lcd_eep_string(t1str);
if(b==0)
{
lcd_data('B');
}
if(c==0)
{
lcd_data('C');
}
if(e==0)
{
lcd_data('E');
}
lcd_eep_string(t2str);
if(b==1)
{
lcd_data('B');
}
if(c==1)
{
lcd_data('C');
}
if(e==1)
{
lcd_data('E');
}
lcd_eep_string(t3str);
if(b==2)
{
lcd_data('B');
}
if(c==2)
{
lcd_data('C');
}
if(e==2)
{
lcd_data('E');
}
MOS管的显示原设计也是按固定顺序而不是引脚顺序,但是我很少用MOS所以懒得改了
---------------------------------------------------------------------------------------