16
Industrial Electrical Engineering and Automation Lund University, Sweden Position sensors and dimmer introduction 2019-10-16 Gunnar Lindstedt & Fran Márquez

Position sensors - IEA. Encoder and... · 2019-10-17 · BD179 2k2 100 100 100n 1N4004. n Applied Mechatronics. n Applied Mechatronics. n With filters

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Position sensors - IEA. Encoder and... · 2019-10-17 · BD179 2k2 100 100 100n 1N4004. n Applied Mechatronics. n Applied Mechatronics. n With filters

Industrial Electrical Engineering and Automation

Lund University, Sweden

Position sensors

and

dimmer introduction

2019-10-16

Gunnar Lindstedt & Fran Márquez

Page 2: Position sensors - IEA. Encoder and... · 2019-10-17 · BD179 2k2 100 100 100n 1N4004. n Applied Mechatronics. n Applied Mechatronics. n With filters

Industr

ial E

lectr

ical E

ngin

eering a

nd A

uto

mation

Applied Mechatronics

Measurement of Rot. Angle

• Potentiometer (no endstop)

• Resolver

• Digital absolute encoder

(Gray code)

• Incremental encoder

(optional index pulse)

Page 3: Position sensors - IEA. Encoder and... · 2019-10-17 · BD179 2k2 100 100 100n 1N4004. n Applied Mechatronics. n Applied Mechatronics. n With filters

Industr

ial E

lectr

ical E

ngin

eering a

nd A

uto

mation

Applied Mechatronics

Measurement of Rot. Angle

• Resolver

Page 4: Position sensors - IEA. Encoder and... · 2019-10-17 · BD179 2k2 100 100 100n 1N4004. n Applied Mechatronics. n Applied Mechatronics. n With filters

Industr

ial E

lectr

ical E

ngin

eering a

nd A

uto

mation

Applied Mechatronics

Measurement of Rot. Angle• Resolver

Page 5: Position sensors - IEA. Encoder and... · 2019-10-17 · BD179 2k2 100 100 100n 1N4004. n Applied Mechatronics. n Applied Mechatronics. n With filters

Industr

ial E

lectr

ical E

ngin

eering a

nd A

uto

mation

Applied Mechatronics

Measurement of Rot. Angle

• Digital absolute encoder (Gray code)

Page 6: Position sensors - IEA. Encoder and... · 2019-10-17 · BD179 2k2 100 100 100n 1N4004. n Applied Mechatronics. n Applied Mechatronics. n With filters

Industr

ial E

lectr

ical E

ngin

eering a

nd A

uto

mation

Applied Mechatronics

Incremental Encoder Waveform

Z optional

Page 7: Position sensors - IEA. Encoder and... · 2019-10-17 · BD179 2k2 100 100 100n 1N4004. n Applied Mechatronics. n Applied Mechatronics. n With filters

Industr

ial E

lectr

ical E

ngin

eering a

nd A

uto

mation

Applied Mechatronics

How to Keep Track of the Position?

(A,B)

S0

S2 S3

S1

10

00

01

01

11

10

11

00

Page 8: Position sensors - IEA. Encoder and... · 2019-10-17 · BD179 2k2 100 100 100n 1N4004. n Applied Mechatronics. n Applied Mechatronics. n With filters

Industr

ial E

lectr

ical E

ngin

eering a

nd A

uto

mation

Applied Mechatronics

Encoder algoritm by

René Sommer

AB BA Next AB

00 00 01 01

01 10 11 01

11 11 10 01

10 01 00 01

00 00 10 10

10 01 11 10

11 11 01 10

01 10 00 10

Page 9: Position sensors - IEA. Encoder and... · 2019-10-17 · BD179 2k2 100 100 100n 1N4004. n Applied Mechatronics. n Applied Mechatronics. n With filters

Industr

ial E

lectr

ical E

ngin

eering a

nd A

uto

mation

Applied Mechatronics

Alternative implementation(most common in this course)

switch (ABnew){

case 0 : if (AB==2)n++; else /* AB==1 */ n--; break;

case 1 : if (AB==0)n++; else /* AB==3 */ n--; break;

Page 10: Position sensors - IEA. Encoder and... · 2019-10-17 · BD179 2k2 100 100 100n 1N4004. n Applied Mechatronics. n Applied Mechatronics. n With filters

Industr

ial E

lectr

ical E

ngin

eering a

nd A

uto

mation

Applied Mechatronics

Implementation

• Count the passing of one transition

section in the graph

• Current state gives quad-resolution

• Consider the frequency of the

changes and select polling or interrupt

Page 11: Position sensors - IEA. Encoder and... · 2019-10-17 · BD179 2k2 100 100 100n 1N4004. n Applied Mechatronics. n Applied Mechatronics. n With filters

Industrial Electrical Engineering and Automation

Lund University, Sweden

Dimmer

Page 12: Position sensors - IEA. Encoder and... · 2019-10-17 · BD179 2k2 100 100 100n 1N4004. n Applied Mechatronics. n Applied Mechatronics. n With filters

Industr

ial E

lectr

ical E

ngin

eering a

nd A

uto

mation

Applied Mechatronics

AVR

board

Incremental

encoder board

Power amp Load

A B

PWM

Page 13: Position sensors - IEA. Encoder and... · 2019-10-17 · BD179 2k2 100 100 100n 1N4004. n Applied Mechatronics. n Applied Mechatronics. n With filters

Industr

ial E

lectr

ical E

ngin

eering a

nd A

uto

mation

Applied Mechatronics

In

Vcc

GND

+12V

Load

BC557

BD179

1002k2

100

100n

1N4004

Page 14: Position sensors - IEA. Encoder and... · 2019-10-17 · BD179 2k2 100 100 100n 1N4004. n Applied Mechatronics. n Applied Mechatronics. n With filters

Industr

ial E

lectr

ical E

ngin

eering a

nd A

uto

mation

Applied Mechatronics

Page 15: Position sensors - IEA. Encoder and... · 2019-10-17 · BD179 2k2 100 100 100n 1N4004. n Applied Mechatronics. n Applied Mechatronics. n With filters

Industr

ial E

lectr

ical E

ngin

eering a

nd A

uto

mation

Applied Mechatronics

Page 16: Position sensors - IEA. Encoder and... · 2019-10-17 · BD179 2k2 100 100 100n 1N4004. n Applied Mechatronics. n Applied Mechatronics. n With filters

Industr

ial E

lectr

ical E

ngin

eering a

nd A

uto

mation

With filters…

Applied Mechatronics