Implementation of a Temperature Control System using ARDUINO · Phase control TCA 785 Control...

25
Fuzzy Logic Systems G. Oltean Implementation of a Temperature Control System using ARDUINO

Transcript of Implementation of a Temperature Control System using ARDUINO · Phase control TCA 785 Control...

Page 1: Implementation of a Temperature Control System using ARDUINO · Phase control TCA 785 Control thyristors, triacs, and transistors. The trigger pulses can be shifted within a phase

Fuzzy Logic Systems G. Oltean

Implementation of a Temperature Control

System using

ARDUINO

Page 2: Implementation of a Temperature Control System using ARDUINO · Phase control TCA 785 Control thyristors, triacs, and transistors. The trigger pulses can be shifted within a phase

Fuzzy Logic Systems G. Oltean

Close control loop

Fuzzy controller

Fuzzy logic system: 9 rules

Temperature Sensor

One Wire Digital Temperature Sensor - DS18B20

Heating element

Heating resistor 2Ω, supplied in ac (12V peak value)

Heating power control

Phase control of a SCR (thyristor) – TCA 785

System structure

Page 3: Implementation of a Temperature Control System using ARDUINO · Phase control TCA 785 Control thyristors, triacs, and transistors. The trigger pulses can be shifted within a phase

Fuzzy Logic Systems G. Oltean

Arduino development board

• “Brain” of the entire system

• Read current temperature

• Compute error and change-of-error

• Run fuzzy logic system

• Determine digital value of control signal

DAC - MCP4725, I2C interface

Provide analog value of control signal

Phase control board

Analog amplifier for control voltage – AD820

TCA 785 – phase control IC

System implementation

Page 4: Implementation of a Temperature Control System using ARDUINO · Phase control TCA 785 Control thyristors, triacs, and transistors. The trigger pulses can be shifted within a phase

Fuzzy Logic Systems G. Oltean

Block diagram

Page 5: Implementation of a Temperature Control System using ARDUINO · Phase control TCA 785 Control thyristors, triacs, and transistors. The trigger pulses can be shifted within a phase

Fuzzy Logic Systems G. Oltean

5

Functional diagram u(k) = u(k-1) - duc(k)

Page 6: Implementation of a Temperature Control System using ARDUINO · Phase control TCA 785 Control thyristors, triacs, and transistors. The trigger pulses can be shifted within a phase

Fuzzy Logic Systems G. Oltean

6

ARDUINO UNO development board

Page 7: Implementation of a Temperature Control System using ARDUINO · Phase control TCA 785 Control thyristors, triacs, and transistors. The trigger pulses can be shifted within a phase

Fuzzy Logic Systems G. Oltean

7

Programmable Resolution 1-Wire Digital Temperature Sensor

9-bit to 12-bit Celsius temperature measurements

Unique 1-Wire® Interface Requires Only One Port Pin for

Communication

Allows multiple DS18B20s to function on the same 1-Wire bus

Page 8: Implementation of a Temperature Control System using ARDUINO · Phase control TCA 785 Control thyristors, triacs, and transistors. The trigger pulses can be shifted within a phase

Fuzzy Logic Systems G. Oltean

8

12-Bit Resolution

On-Board Non-Volatile Memory (EEPROM)

External Voltage Reference (VDD)

Rail-to-Rail Output

Single-Supply Operation: 2.7V to 5.5V

I2C Interface

Eight Available Addresses

DAC MCP4725

Page 9: Implementation of a Temperature Control System using ARDUINO · Phase control TCA 785 Control thyristors, triacs, and transistors. The trigger pulses can be shifted within a phase

Fuzzy Logic Systems G. Oltean

9

Phase control TCA 785

Control thyristors, triacs, and transistors.

The trigger pulses can be shifted within a

phase angle between 0 ˚ and 180 ˚

Page 10: Implementation of a Temperature Control System using ARDUINO · Phase control TCA 785 Control thyristors, triacs, and transistors. The trigger pulses can be shifted within a phase

Fuzzy Logic Systems G. Oltean

10

TCA 785

Page 11: Implementation of a Temperature Control System using ARDUINO · Phase control TCA 785 Control thyristors, triacs, and transistors. The trigger pulses can be shifted within a phase

Fuzzy Logic Systems G. Oltean

11

Thermal enclosure Phase control board

Page 12: Implementation of a Temperature Control System using ARDUINO · Phase control TCA 785 Control thyristors, triacs, and transistors. The trigger pulses can be shifted within a phase

Fuzzy Logic Systems G. Oltean

12

16 x 2 LCD

Page 13: Implementation of a Temperature Control System using ARDUINO · Phase control TCA 785 Control thyristors, triacs, and transistors. The trigger pulses can be shifted within a phase

Fuzzy Logic Systems G. Oltean

13

Experimental setup

Page 14: Implementation of a Temperature Control System using ARDUINO · Phase control TCA 785 Control thyristors, triacs, and transistors. The trigger pulses can be shifted within a phase

Fuzzy Logic Systems G. Oltean

14

Experimental setup

Page 15: Implementation of a Temperature Control System using ARDUINO · Phase control TCA 785 Control thyristors, triacs, and transistors. The trigger pulses can be shifted within a phase

Fuzzy Logic Systems G. Oltean

15

Fuzzy logic system

Page 16: Implementation of a Temperature Control System using ARDUINO · Phase control TCA 785 Control thyristors, triacs, and transistors. The trigger pulses can be shifted within a phase

Fuzzy Logic Systems G. Oltean

16

-1 -0.5 0 0.5 10

0.2

0.4

0.6

0.8

1

err; cerr

Neg

Zero

Pos

-1 -0.5 0 0.5 10

0.2

0.4

0.6

0.8

1

du

N

Z

P

Input fuzzy sets

Output fuzzy sets

Page 17: Implementation of a Temperature Control System using ARDUINO · Phase control TCA 785 Control thyristors, triacs, and transistors. The trigger pulses can be shifted within a phase

Fuzzy Logic Systems G. Oltean

Control surface

errFls

cerrFlsNeg Zero Pos

Neg N N Z

Zero N Z P

Pos Z P P

Rule base

1

2

3

4

5

6

7

8

9

Page 18: Implementation of a Temperature Control System using ARDUINO · Phase control TCA 785 Control thyristors, triacs, and transistors. The trigger pulses can be shifted within a phase

Fuzzy Logic Systems G. Oltean

Waveforms

for the

phase

control

circuit

CH3 - the analog control voltage applied at pin 11 of the TCA785 IC, 4.8V

CH2 - the ramp voltage, generated by the TCA785 IC, at pin 10

CH1 - the positive voltage pulse generated by the TCA785 at pin 15, to be applied in the gate of the

SCR to set it on (ch1, yellow); the voltage pulse is generated when the ramp voltage exceeds the

analog control voltage

CH4 - the almost sinusoidal supply voltage, in the secondary of the line transformer; the moment

when the SCR switches on (when the positive pulse appears in its gate) is obvious on the waveform –

the voltage decreases due to the large current ensured through the 2Ω heating resistor

Page 19: Implementation of a Temperature Control System using ARDUINO · Phase control TCA 785 Control thyristors, triacs, and transistors. The trigger pulses can be shifted within a phase

Fuzzy Logic Systems G. Oltean

1

9 Waveforms

for the

power

circuit

CH1 - the supply voltage, in the secondary of the line transformer

CH2 - the voltage drop across the SCR

MATH - the voltage drop across the heating resistor

Page 20: Implementation of a Temperature Control System using ARDUINO · Phase control TCA 785 Control thyristors, triacs, and transistors. The trigger pulses can be shifted within a phase

Fuzzy Logic Systems G. Oltean

20

0 500 1000 1500 2000 250025

30

35

40

45

50

time [s]

tem

pera

ture

[C

]

Tref

T

Experimental results, Tref = 45oC

process perturbation:

opening the thermal enclosure

Page 21: Implementation of a Temperature Control System using ARDUINO · Phase control TCA 785 Control thyristors, triacs, and transistors. The trigger pulses can be shifted within a phase

Fuzzy Logic Systems G. Oltean

21

0 500 1000 1500 2000 250020

40

60

tem

p

0 500 1000 1500 2000 2500-20

0

20

err

0 500 1000 1500 2000 2500-20

0

20

cerr

0 500 1000 1500 2000 2500-1000

0

1000

du

0 500 1000 1500 2000 25000

2000

4000

u

Experimental results, Tref = 45oC

Page 22: Implementation of a Temperature Control System using ARDUINO · Phase control TCA 785 Control thyristors, triacs, and transistors. The trigger pulses can be shifted within a phase

Fuzzy Logic Systems G. Oltean

0 500 1000 1500 2000 250020

40

60te

mp

0 500 1000 1500 2000 2500-1000

0

1000

du

0 500 1000 1500 2000 25000

2000

4000

u

0 500 1000 1500 2000 25000

2

4

con

tr.

vo

ltag

e

Experimental results, Tref = 45oC

Page 23: Implementation of a Temperature Control System using ARDUINO · Phase control TCA 785 Control thyristors, triacs, and transistors. The trigger pulses can be shifted within a phase

Fuzzy Logic Systems G. Oltean

Experimental results, Tref = 37oC

0 100 200 300 400 500 600 700 800 90026

28

30

32

34

36

38

time [s]

tem

pera

ture

[C

]

Tref

T

Page 24: Implementation of a Temperature Control System using ARDUINO · Phase control TCA 785 Control thyristors, triacs, and transistors. The trigger pulses can be shifted within a phase

Fuzzy Logic Systems G. Oltean

Experimental results, Tref = 34oC from 37oC

0 200 400 600 800 1000 120033.5

34

34.5

35

35.5

36

36.5

37

time [s]

tem

pera

ture

[C

]

Tref

T

Page 25: Implementation of a Temperature Control System using ARDUINO · Phase control TCA 785 Control thyristors, triacs, and transistors. The trigger pulses can be shifted within a phase

Fuzzy Logic Systems G. Oltean

0 200 400 600 800 1000 120030

35

40te

mp

0 200 400 600 800 1000 1200-1000

0

1000

du

0 200 400 600 800 1000 12002000

4000

6000

u

0 200 400 600 800 1000 12002

3

4

con

tr.

vo

ltag

e

Experimental results, Tref = 34oC from 37oC