Digital Capacitance Meter
This is a simple capacitance meter which can measure capacitance value easy. There are some measurement methods for capacitance, at one time the capacitance was measured with a impedance bridge or a dip meter. Recently typical capacitance meters can measure capacitance and some additional characteristics from current vector by applying AC voltage to the Cx. Some simple capacitance meter use integration method that measureing transient response of the R-C network. There are some construction kits based on this method.
This project uses the integration method. There is an advantage that the resulut can be got as a digital data directly because it bases measurement of time, accurate analog circuit is not required and its calibration can be done easy by using a micro controller. Therefor the integration method is suitable for hand built capacitance meter with high realizability.
Hardware
To measure a charge time, only a voltage comparator, a counter and some glue logics are needed. However, a microcntroller (AT90S2313) is used for this project to realize the system easy. In point of fact, I had thought that analog comparator in the AVR is not useful. But I found that the compare output can also be used as a captureing trigger of TC1. This is a nice feature for that use :-)
The integration circuit can be simplified like shown in the circuit diagram. The threshold voltage is generated by divider registers. It seems not stable to valiation of supply voltage however the charge time is not affected by the supply voltage. You will able to find that voltage terms can be erased when apply formure 2, VC1/E term is dtermined by only divide ratio. This advantage is the essence found in the NE555 timer IC. Ofcourse the supply voltage must be steady during integration.
According to the foundation, measure integration time with only one threshold voltage will do. However input voltage of near ground level is little difficult to use due to following reasons.
To avoid to use near zero volt, two threshold voltages VC1(0.17 Vcc) and VC2(0.5 Vcc) are used and measure t2-t1(0.5RC). This can avoid avobe problems and comparator delay/offset will also be canceled. As for the leakage currnet, circuit board should be kept clean to minimize surface leak.
The supply voltage is generated with a DC-DC converter powered from a 1.5V AA cell. The swiching power supply is not suitable for measurement circuit but it seems not affected by ripple voltage because two ripple filters are applied. I recommend to use a 9V 6LR61 battery and a 78L05 instead, and do not omit BOD or you will be afflicted with EEPROM data collaption.
Calibration
When power is on first time, full segment, "E4" and ten several pF will be displayed. This value means stray capacitance on the circuit. The stray capacitance can be canceled by SW1. Two reference capacitors of 1nF and 100nF are needed to calibrate the capacitance meter. If you could not obtain the reference capacitors, accurate capacitors within ±1% can be used insted. This capacitance meter does not have any trimmer pot, it performs the calibration by reading the reference capacitor and saving gain adjustment value in full automatic operation.
To calibrate low range: First, adjust zero with SW1. Next, tie pin #1 and #3 of connector P1, set a 1nF reference capacitor and push SW1.
To calibrate high range: Tie pin #4 and #6 of connector P1, set a 100nF reference capacitor and push SW1.
"E4" at power on means calibration value in the EEPROM has been broken. It will never be displayed if once calibration is performed. As for zero adjustment, it is not saved into the EEPROM, it will require each time power-on or any jig is attached.
Free Firmware
This project uses the integration method. There is an advantage that the resulut can be got as a digital data directly because it bases measurement of time, accurate analog circuit is not required and its calibration can be done easy by using a micro controller. Therefor the integration method is suitable for hand built capacitance meter with high realizability.
Hardware
To measure a charge time, only a voltage comparator, a counter and some glue logics are needed. However, a microcntroller (AT90S2313) is used for this project to realize the system easy. In point of fact, I had thought that analog comparator in the AVR is not useful. But I found that the compare output can also be used as a captureing trigger of TC1. This is a nice feature for that use :-)
The integration circuit can be simplified like shown in the circuit diagram. The threshold voltage is generated by divider registers. It seems not stable to valiation of supply voltage however the charge time is not affected by the supply voltage. You will able to find that voltage terms can be erased when apply formure 2, VC1/E term is dtermined by only divide ratio. This advantage is the essence found in the NE555 timer IC. Ofcourse the supply voltage must be steady during integration.
According to the foundation, measure integration time with only one threshold voltage will do. However input voltage of near ground level is little difficult to use due to following reasons.
- Voltage not drop to 0 volt. Capacitor voltage will not be discharged to zero volt. It require a time to discharge capacitor to sufficientaly low voltage for measuring operation. It will expand measureing interval. Saturation voltage at discharge switch is also increase this effect.
- There is a time beween start to charge and then start timer. It will cause a measurement error. This can be ignored on the AVR because it requires only one clock cycle for that sequence. Any other microcontroller may rquire to consider this problem.
- Leakage current on analog input. Accrding to AVR data sheet, the leakage current on analog input is increased near zero volt. This will cause a measurement error.
To avoid to use near zero volt, two threshold voltages VC1(0.17 Vcc) and VC2(0.5 Vcc) are used and measure t2-t1(0.5RC). This can avoid avobe problems and comparator delay/offset will also be canceled. As for the leakage currnet, circuit board should be kept clean to minimize surface leak.
The supply voltage is generated with a DC-DC converter powered from a 1.5V AA cell. The swiching power supply is not suitable for measurement circuit but it seems not affected by ripple voltage because two ripple filters are applied. I recommend to use a 9V 6LR61 battery and a 78L05 instead, and do not omit BOD or you will be afflicted with EEPROM data collaption.
Calibration
When power is on first time, full segment, "E4" and ten several pF will be displayed. This value means stray capacitance on the circuit. The stray capacitance can be canceled by SW1. Two reference capacitors of 1nF and 100nF are needed to calibrate the capacitance meter. If you could not obtain the reference capacitors, accurate capacitors within ±1% can be used insted. This capacitance meter does not have any trimmer pot, it performs the calibration by reading the reference capacitor and saving gain adjustment value in full automatic operation.
To calibrate low range: First, adjust zero with SW1. Next, tie pin #1 and #3 of connector P1, set a 1nF reference capacitor and push SW1.
To calibrate high range: Tie pin #4 and #6 of connector P1, set a 100nF reference capacitor and push SW1.
"E4" at power on means calibration value in the EEPROM has been broken. It will never be displayed if once calibration is performed. As for zero adjustment, it is not saved into the EEPROM, it will require each time power-on or any jig is attached.
Free Firmware
Digital Capacitance Meter
Reviewed by haru
on
May 11, 2009
Rating:
No comments