Projekt ISSNBS - 1 - DAAD Deutscher Akademischer Austausch Dienst German Academic Exchange Service...

11
Projekt „ISSNBS“ - 1 - DAAD Deutscher Akademischer Austausch Dienst German Academic Exchange Service Direct Sensor to Direct Sensor to Microcontroller Interfacing Microcontroller Interfacing Presented by: Zivko Kokolanski, M. Sc. Presented by: Zivko Kokolanski, M. Sc. E-mail: [email protected] Research director: Prof. Dr. Cvetan Gavrovski Nis, November 2010

Transcript of Projekt ISSNBS - 1 - DAAD Deutscher Akademischer Austausch Dienst German Academic Exchange Service...

Page 1: Projekt ISSNBS - 1 - DAAD Deutscher Akademischer Austausch Dienst German Academic Exchange Service Direct Sensor to Microcontroller Interfacing Presented.

Projekt „ISSNBS“

- 1 -

DAADDeutscher Akademischer Austausch DienstGerman Academic Exchange Service

Direct Sensor to Microcontroller Direct Sensor to Microcontroller InterfacingInterfacing

Presented by: Zivko Kokolanski, M. Sc.Presented by: Zivko Kokolanski, M. Sc.

E-mail: [email protected]

Research director: Prof. Dr. Cvetan Gavrovski

Nis, November 2010

Page 2: Projekt ISSNBS - 1 - DAAD Deutscher Akademischer Austausch Dienst German Academic Exchange Service Direct Sensor to Microcontroller Interfacing Presented.

Projekt „ISSNBS“

- 2 -

DAADDeutscher Akademischer Austausch DienstGerman Academic Exchange Service

OUTLINE

• Comparison of programmable signal conditioning

techniques• Introduction to direct sensor-C interface• Single point calibration technique• Sources of measurement uncertainty• Experimental results and discussion• Effective number of resolution bits• Conclusions

Page 3: Projekt ISSNBS - 1 - DAAD Deutscher Akademischer Austausch Dienst German Academic Exchange Service Direct Sensor to Microcontroller Interfacing Presented.

Projekt „ISSNBS“

- 3 -

DAADDeutscher Akademischer Austausch DienstGerman Academic Exchange Service

SensorProgrammable

signal condit.circuit

C

A/D Sensor OSCILLATOR

C

A/D converter based programmable measurement system

Oscillator based programmable measurement system

• 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

C

Sensor

Cref,Rref

Direct sensor-microcontroller interface

Page 4: Projekt ISSNBS - 1 - DAAD Deutscher Akademischer Austausch Dienst German Academic Exchange Service Direct Sensor to Microcontroller Interfacing Presented.

Projekt „ISSNBS“

- 4 -

DAADDeutscher Akademischer Austausch DienstGerman Academic Exchange Service

tp1 tp2

VTL

Po

Pi

Rx

C

Rp

“HZ”

CRt pp 1

“1”

tl

rxp VV

VVCRt

0

02 ln

“0”

“In”

NT0tp2

f0

DIRECT SENSOR-C INTERFACE BASED ON MEAS. OF DISCHARGING TIME OF RC CIRCUIT

Page 5: Projekt ISSNBS - 1 - DAAD Deutscher Akademischer Austausch Dienst German Academic Exchange Service Direct Sensor to Microcontroller Interfacing Presented.

Projekt „ISSNBS“

- 5 -

DAADDeutscher Akademischer Austausch DienstGerman Academic Exchange Service

tl

rxp VV

VVCRtN

0

02 ln

xkRN

CONSTANTS

BUT:• The constant k is 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

DIRECT SENSOR-C INTERFACE BASED ON MEAS. OF DISCHARGING TIME OF RC CIRCUIT

Page 6: Projekt ISSNBS - 1 - DAAD Deutscher Akademischer Austausch Dienst German Academic Exchange Service Direct Sensor to Microcontroller Interfacing Presented.

Projekt „ISSNBS“

- 6 -

DAADDeutscher Akademischer Austausch DienstGerman Academic Exchange Service

Po1

Pi

Rx

C

Po2

Rc

Rp

Vc

t

Vth

V0

tp tx tp tc

tl

rc

tl

rx

c

x

VVVV

CR

VVVV

CR

tt

0

0

0

0

ln

ln

cc

xx Rtt

R

SINGLE POINT CALIBRATION

Page 7: Projekt ISSNBS - 1 - DAAD Deutscher Akademischer Austausch Dienst German Academic Exchange Service Direct Sensor to Microcontroller Interfacing Presented.

Projekt „ISSNBS“

- 7 -

DAADDeutscher Akademischer Austausch DienstGerman Academic Exchange Service

• 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.

rr CRprogtrigqfxt /0

Every digital system makes ±1 sample error.

Errors are smaller for higher f0.

2

/

22

T

nsnitn TV

VV

Better reference

element.

Dynamic element matching technique.

Noise from the mC during the execution of the program cycle.

SOURCES OF MEASURMENT UNCERTAINTY

Page 8: Projekt ISSNBS - 1 - DAAD Deutscher Akademischer Austausch Dienst German Academic Exchange Service Direct Sensor to Microcontroller Interfacing Presented.

Projekt „ISSNBS“

- 8 -

DAADDeutscher Akademischer Austausch DienstGerman Academic Exchange Service

Po

P

i C

Px

Rx

Pc

Rc

R0

Po

Pi C

Px

Rx

Pc

Rc

R0

Vr

+-

K

Schmitt trigger circuit Comparator circuit

Without external circuit

Schmitt trigger

Comparator with divider

Comparator with TL431

(tx)[s] 0,36 0,16 0,19 1,34

u(tx)/tx x10-3 0,32 0,14 0,17 1,18

IMPROUVING THE MEASUREMENT UNCERTAINTY BY USING ADITIONAL ELECTRICAL CIRCUITS

Page 9: Projekt ISSNBS - 1 - DAAD Deutscher Akademischer Austausch Dienst German Academic Exchange Service Direct Sensor to Microcontroller Interfacing Presented.

Projekt „ISSNBS“

- 9 -

DAADDeutscher Akademischer Austausch DienstGerman Academic Exchange Service

0,00

1,00

2,00

3,00

4,00

5,00

6,00

7,00

8,00

9,00

0,0 2,0 4,0 6,0 8,0 10,0

u(t x)

/t x

x10-

4

t[ms]

7

8

9

10

11

12

13

14

15

0,1 0,22 0,47 1 2,2 4,7 10

Резо

луци

ја

C[F]

M

ENOB, n=1

ENOB, n=5

Relative standard measurement uncertainty

Effective number of bits

• PIC16F877

• MSP430F2274

• ATmegaAVR128

EFFECTIVE NUMBER OF RESOLUTION BITS

Page 10: Projekt ISSNBS - 1 - DAAD Deutscher Akademischer Austausch Dienst German Academic Exchange Service Direct Sensor to Microcontroller Interfacing Presented.

Projekt „ISSNBS“

- 10 -

DAADDeutscher Akademischer Austausch DienstGerman Academic Exchange Service

CONCLUSIONS• Direct sensor-C 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

Page 11: Projekt ISSNBS - 1 - DAAD Deutscher Akademischer Austausch Dienst German Academic Exchange Service Direct Sensor to Microcontroller Interfacing Presented.

Projekt „ISSNBS“

- 11 -

DAADDeutscher Akademischer Austausch DienstGerman Academic Exchange Service

THANK YOU FOR YOUR ATTENTION!

Practical demonstration…