140 likes | 585 Views
Presented by: Zivko Kokolanski , M. Sc. E-mail: kokolanski@feit.ukim.edu.mk Research director: Prof. Dr. Cvetan Gavrovski. Direct Sensor to Microcontroller Interfacing. Nis, November 2010. OUTLINE. Comparison of programmable signal conditioning techniques
E N D
Presented by: ZivkoKokolanski, M. Sc. E-mail: kokolanski@feit.ukim.edu.mk Research director: Prof. Dr. CvetanGavrovski Direct Sensor to Microcontroller Interfacing Nis, November 2010
OUTLINE • Comparison of programmable signal conditioning techniques • Introduction to direct sensor-mC interface • Single point calibration technique • Sources of measurement uncertainty • Experimental results and discussion • Effective number of resolution bits • Conclusions
mC mC Sensor OSCILLATOR Sensor Programmable signal condit.circuit A/D mC Relaxation oscillator Sensor A/D converter based programmable measurement system Oscillator based programmable measurement system Cref,Rref Direct sensor-microcontroller interface • Conversion of the measurement quantity in to proportional electrical signal and use of an A/D converter • Techniques based on measurement of frequency, period or duty cycle
DIRECT SENSOR-mC INTERFACE BASED ON MEAS. OF DISCHARGING TIME OF RCCIRCUIT NT0ºtp2 Rx Microcontroller Po “0” “HZ” Rp Pi “In” “1” VTL C tp1 tp2 f0
DIRECT SENSOR-mC INTERFACE BASED ON MEAS. OF DISCHARGING TIME OF RCCIRCUIT CONSTANTS • BUT: • The constantkis not very stabile • The output resistances and leakage currents of the microcontroller ports cause gain, offset and nonlinearity errors • Therefore direct sensor-microcontroller interface in practice is realized by using some calibration method
Vc Vth V0 t tp tx tp tc SINGLE POINT CALIBRATION Rx Microcontroller Po1 Rc Po2 Rp Pi C
SOURCES OF MEASURMENT UNCERTAINTY Every digital system makes±1 sample error. Errors are smaller for higherf0. • Reference freq. uncertainty, • Quantization uncertainty, • Uncertainty in the triggering point, • Program related errors , • Uncertainty of the reference element They are small for short meas. intervals. Noise from the mC during the execution of the program cycle. Better reference element. Dynamic element matching technique.
IMPROUVING THE MEASUREMENT UNCERTAINTY BY USING ADITIONAL ELECTRICAL CIRCUITS Rc Rc Microcontroller Microcontroller Pc Pc Po Po Rx Rx Px Px R0 R0 Pi + Pi K C C - Vr Comparator circuit Schmitt trigger circuit
EFFECTIVE NUMBER OF RESOLUTION BITS Relative standard measurement uncertainty Effective number of bits • PIC16F877 • MSP430F2274 • ATmegaAVR128
CONCLUSIONS • Direct sensor-mC interface is alternative approach for conditioning the resistive and capacitive sensors without use of A/D converter, • Single point calibration is the simplest calibration technique that cancels the contribution of the unstable parameters, • The output resistances and leakage currents of the microcontroller ports cause gain, offset and nonlinearity errors, • One of the uncertainty sources is the microcontroller “program” noise while execution the program cycle, • This uncertainty can be improved by using Schmitt Trigger or comparator circuit (one extra resolution bit), • The ENOB when using Schmitt Trigger circuit at time constant of 4ms was approximately 11.5/12.3 bits • Although this approach achieves relatively low measurement resolution (arround 13 bits max) and low sampling speed (arround 30 sps),its performances are remarkable considering the simplicity and the cost
THANK YOU FOR YOUR ATTENTION! Practical demonstration…