硬禾学堂新推出基于CH579(支持BLE的Arm Cortex M0控制器)的元器件测试仪DIY套件,旨在鼓励高校的同学、行业工程师通过嵌入式系统编程深度熟悉元器件的特性,并激发同学们的学习兴趣。

3D效果图(使用KiCad设计)

已实现的简单功能的演示

comp_tester.png

功能框图

功能特性

  • 采用硬禾学堂设计的16管脚的CH579最小系统板
    • 集成BLE无线通讯的ARM内核32位微控制器
    • 内置串行12位ADC
  • 采用0.96寸、I2C接口的OLED显示
  • 一个按键启动测试
  • 三只管脚通过杜邦线连接外部待测器件

设计资料

相关参考

  • 挂在钥匙链上的元器件测试仪
  • Akshay Baweja基于Arduino Uno制作的元器件测试仪
  • AVR-Transistortest - 使用ATmega8, ATmega168, ATmega328或ATmega644以及ATmega1284处理器
    • 原理图
    • 主要特性:
      • 支持ATmega8、ATmega168、ATmega328或ATmega644以及ATmega1284处理器
      • 结果可显示在2×16或4×20字符的LCD上.
      • 也可显示在控制器为ST7565、NT7108或ST7920的LCD显示屏上. 支持控制器为SSD1306、通过SPI或I2C接口的OLED显示屏
      • 一键操作并可以自动关电
      • 三个测试端口以增加其通用性
      • 自动检测NPN、PNP、N- 或 P-沟MOSFET、JFET、二极管以及小的晶闸管、TRIAC.
      • 自动检测管脚的分配,被测的器件可以任意连接到测试端口
      • 对于三极管以及达林顿管,可以测量其hFE以及基极到发射极的压降
      • 对于三极管和MOSFET可以自动检测以及保护
      • Bipolar junction transistors are detected as a transistor with a parasitic transistor (NPNp = NPN + parasitic PNP).
      • Up to two resistors will be measured with a resolution down to 0.1 ohm. The measurement range is up to 50 Mohm (Megaohm). Resistors below 10 ohm will be measured with the ESR approach and a resolution of 0.01 ohm if a ATmega168/328 is used. Beware: resolution is not accuracy.
      • Capacitors in the range 35pF (picofarad) to 100mF (millifarad) can be measured with a resolution down to 1 pF.
      • If the processor has at least 32K flash memory, you can use the samplingADC method from Pieter-Tjerk to get a resolution of up to 0.01 pF for capacitors with lower capacity than 100 pF.
      • Resistors and capacitors will be displayed with their respective symbol, pin number and value.
      • Up to two diodes will also be displayed with their correctly aligned symbol, pin number and voltage drop.
      • If it's a single diode, the parasitic capacitance and reverse current will also be measured.
      • For ATmega168/328 a self calibration of zero-capacitance, zero-resistance and other parameters is possible.
      • For ATmega168/328 also inductances of 0.01 mH to 20 H can be detected and measured.
      • If your processor has at least 32K flash, you can use the samplingADC method to measure lesser inductances with a parallel capacitor of known capacity. The resonant frequency and the computed inductance value is shown and additionally the quality factor.
      • for ATmega168/328 a measurement of ESR (Equivalent Series Resistance) of capacitors greater than 20 nF is built in. The resolution is 0.01 Ohm. For lower capacity values the accuracy of ESR result becomes worse.
      • For ATmega168/328 Vloss of capacitors greater 5 nF is examined. With this it is possible to estimate its Q-factor.
      • For ATmega328 a menu function can be reached with a long key press (> 0.5 s). A short key press switches to the next function. A long key press starts the function. The list of built-in functions until now:
        • Frequency measurement at pin PD4. This pin is also used for the LCD and will be switched to input (High-Z) for the measurement. The frequency is measured for 1 second. If it is below 25 kHz, the period will be measured to improve accuracy. Resolution goes down to 0.001 mHz.
        • Voltage measurement at pin PC3, if it is not used for serial output. Since ATmega328 has 32 pins (PLCC), also ADC6 or ADC7 can be used. A 10:1 divider is used, so voltages up to 50 V can be measured. With an additional DC-DC converter, Zener diodes can also be measured.
        • Frequency generation at port TP2. A 680 ohm resistor connected to pin PB2 can be used to generate a signal with 1 Hz to 2 MHz at port TP2. Port TP1 is ground.
        • Variable PWM (pulse width modulation) with fixed frequency at port TP2. 10-Bit counter. Port TP1 is ground. Short press increases pulse width by 1 %, long press by 10 %.
        • There is a separate capacitance and ESR measurement available. Capacitors of 2 µF to 50 mF can usually be measured in-circuit. You have to ensure beforehand that the capacitor is not holding a charge anymore.

来自沁恒的参考设计:

基于CH579的手持万用表源代码

  1. 系统上电后,显示屏显示系统名字画面;
  2. 连接蓝牙,蓝牙名称为“Pocket Multimeter“,密码为“000000”,可以配合沁恒开发的蓝牙调试助手使用数据包长度需要设置为57以上,不连接蓝牙也能使用;
  3. 将测试表笔与器件引脚任意连接,按下按钮后系统开始测量,测量完成后在显示屏上显示结果,如果连接蓝牙,测量结果会显示到手机上;
  4. 再次按下按钮后会进行下一次测量。

注意:

  1. CH579F的最小电路板上TXD1/RXD1和芯片上的引脚接反了,以后如果更新的话可以改一下;
  2. 测量精度在±20%左右;
  3. 测量较大电容(50uF)时蓝牙会断连,有待优化;