Implementation of a Temperature Control System using ARDUINO

Similar documents
Implementation of a Fuzzy Logic-Based Embedded System for Engine RPM Control. (Speed Control)

ELG3331: Digital Tachometer Introduction to Mechatronics by DG Alciatore and M B Histand

SPEED CONTROL OF INDUCTION MOTOR WITHOUT SPEED SENSOR AT LOW SPEED OPERATIONS

Linear Integrated Circuits

Single-phase Variable Frequency Switch Gear

HAW-Arduino. Sensors and Arduino F. Schubert HAW - Arduino 1

Multiple Instrument Station Module

Introduction to IC-555. Compiled By: Chanakya Bhatt EE, IT-NU

TMC603EVAL MANUAL Evaluation board for the TMC603 three phase motor driver with BLDC back EMF commutation hallfx

ECE 5670/6670 Project. Brushless DC Motor Control with 6-Step Commutation. Objectives

MTY (81)

DC Motor and Servo motor Control with ARM and Arduino. Created by:

AEDA-3200-Txx Series Ultra Miniature, High Resolution Incremental Encoders

Application Note. Brushless DC Motor Control AN-1114

Fuzzy Logic Temperature Control System For The Induction Furnace

CHAPTER 3 METHODOLOGY

LINEAR IC APPLICATIONS

DUAL STEPPER MOTOR DRIVER

6. HARDWARE PROTOTYPE AND EXPERIMENTAL RESULTS

CHAPTER 4 FUZZY LOGIC CONTROLLER

Jaguar Motor Controller (Stellaris Brushed DC Motor Control Module with CAN)

STEPPING MOTOR EMULATION

push-pole (2014) design / implementation /technical information

Phase Control IC TCA 785

MTY (81)

Where: (J LM ) is the load inertia referred to the motor shaft. 8.0 CONSIDERATIONS FOR THE CONTROL OF DC MICROMOTORS. 8.

Dedan Kimathi University of technology. Department of Electrical and Electronic Engineering. EEE2406: Instrumentation. Lab 2

PreLab 6 PWM Design for H-bridge Driver (due Oct 23)

AVL-10000T AUDIO VIDEO LINK TRANSMITTER TECHNICAL MANUAL

Agilent AEDA-3200-Txx Series Ultra Miniature, High Resolution Incremental Encoders

Tarocco Closed Loop Motor Controller

CHAPTER-5 DESIGN OF DIRECT TORQUE CONTROLLED INDUCTION MOTOR DRIVE

Modeling, Simulation and Implementation of Speed Control of DC Motor Using PIC 16F877A

2.017 DESIGN OF ELECTROMECHANICAL ROBOTIC SYSTEMS Fall 2009 Lab 4: Motor Control. October 5, 2009 Dr. Harrison H. Chin

EUP V/12V Synchronous Buck PWM Controller DESCRIPTION FEATURES APPLICATIONS. Typical Application Circuit. 1

NJM3777 DUAL STEPPER MOTOR DRIVER NJM3777E3(SOP24)

Lab 5: Inverted Pendulum PID Control

CHAPTER ELEVEN - Interfacing With the Analog World

Evaluation Kit: MPS 160 ASIC. Magneto Encoder ASIC

MP V-to-16V,1.2A, Single-Phase Brushless DC Motor Driver

For more information on these functions and others please refer to the PRONET-E User s Manual.

National Infotech. Electrical Drive Trainers. Developed By: : Authorized Dealer : Embedded System Solutions

Capacitive Touch Sensing Tone Generator. Corey Cleveland and Eric Ponce

PowerAmp Design. PowerAmp Design PAD112 HIGH VOLTAGE OPERATIONAL AMPLIFIER

MCP Bit, Quad Digital-to-Analog Converter with EEPROM Memory. Features. Description. Applications

MOBILE ROBOT LOCALIZATION with POSITION CONTROL

EEE312: Electrical measurement & instrumentation

AN1114 APPLICATION NOTE

Assembly Language. Topic 14 Motion Control. Stepper and Servo Motors

Designated client product

Figure 1. Digilent DC Motor

PowerAmp Design. PowerAmp Design PAD117A RAIL TO RAIL OPERATIONAL AMPLIFIER

RX23T inverter ref. kit

DIGITAL ELECTRONICS ANALOG ELECTRONICS

Lab 9. Speed Control of a D.C. motor. Sensing Motor Speed (Tachometer Frequency Method)

Experiment#6: Speaker Control

Smart motor driver with embedded Hall sensor

SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE

University of North Carolina-Charlotte Department of Electrical and Computer Engineering ECGR 3157 Electrical Engineering Design II Fall 2013

Brushed DC Motor Microcontroller PWM Speed Control with Optical Encoder and H-Bridge

LS7362 BRUSHLESS DC MOTOR COMMUTATOR / CONTROLLER

HIGH SPEED, 100V, SELF OSCILLATING 50% DUTY CYCLE, HALF-BRIDGE DRIVER

Features DIMENSIONS ARE MILLIMETERS INCHES LEAD THICKNESS: CH B CH A. Gnd VCC X 50 H97X

Analog-to-Digital Converter (ADC) And Digital-to-Analog Converter (DAC)

CAP6637A AC-DC Open Loop Converter

Fig 1: The symbol for a comparator

PowerAmp Design. PowerAmp Design PAD20 COMPACT HIGH VOLTAGE OP AMP

Mini Encoder High Resolution

AEDR-871x. Data Sheet. 3-Channel High Resolution Reflective Incremental Encoder (Digital Outputs) Description. Features.

20V, 2A Buck Switching Regulator

USB4. Encoder Data Acquisition USB Device Page 1 of 8. Description. Features

NU1005/6: 5V Full Bridge Driver for High Integration, High Efficiency and Low Cost Wireless Power Transmitter

EEE3410 Microcontroller Applications Department of Electrical Engineering. Lecture 10. Analogue Interfacing. Vocational Training Council, Hong Kong.

AUTOMATIC RESISTOR COLOUR CODING DETECTION & ALLOCATION

Chapter 2 Signal Conditioning, Propagation, and Conversion

BLuAC5 Brushless Universal Servo Amplifier

DC Geared Motor with Encoder MO-SPG-30E-XXXK

Data Sheet. HEDL-65xx, HEDM-65xx, HEDS-65xx Series Large Diameter (56 mm), Housed Two and Three Channel Optical Encoders. Description.

3185 THRU 3189 HALL-EFFECT LATCHES FOR HIGH-TEMPERATURE OPERATION FEATURES. ABSOLUTE MAXIMUM RATINGS at T A = +25 C V CC GROUND OUTPUT SUPPLY

Lab 2 Revisited Exercise

Thornwood Drive Operating Manual: Two-SCR General Purpose Gate Firing Board FCRO2100 Revision H

TECHNICAL DATASHEET #TDAX ISOLATED DUAL CHANNEL UNIVERSAL SIGNAL CONVERTER

MASTER/SLAVE TENSION CONTROL

TDA 4700 TDA Control IC for Single-Ended and Push-Pull Switched-Mode Power Supplies (SMPS)

A Hybrid Particle Swarm Optimization Algorithm for Maximum Power Point Tracking of Solar Photovoltaic Systems

Application Note. I C s f o r M o t o r C o n t r o l. Evaluation board for the TDA5143/TDA5144. Report No: EIE/AN R. Galema

NEW DIGITAL ANGLE MEASUREMENT FACILITY BASED ON FPGA

Bipolar Hall Effect Switch CYD72X

PIC Functionality. General I/O Dedicated Interrupt Change State Interrupt Input Capture Output Compare PWM ADC RS232

Peak Current. Continuous Current. See Part Numbering Information on last page of datasheet for additional ordering options.

Electronic Components

EEPROM-Programmable TFT VCOM Calibrator

GATE: Electronics MCQs (Practice Test 1 of 13)

Figure 1.1 Mechatronic system components (p. 3)

Magnetic Encoder MEM 22

MICROCONTROLLERS Stepper motor control with Sequential Logic Circuits

CHAPTER 7 MAXIMUM POWER POINT TRACKING USING HILL CLIMBING ALGORITHM

INTEGRATED CIRCUITS. AN109 Microprocessor-compatible DACs Dec

ML4818 Phase Modulation/Soft Switching Controller

AN457 APPLICATION NOTE

Transcription:

1. Implementation of a Temperature Control System using ARDUINO

System structure 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 implementation 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, I 2 C interface Provide analog value of control signal Phase control board Analog amplifier for control voltage AD820 TCA 785 phase control IC

Block diagram

5 Computational Intelligence in Complex Decision Systems Functional diagram u(k) = u(k-1) - du c (k)

6 Computational Intelligence in Complex Decision Systems ARDUINO UNO development board

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

8 Computational Intelligence in Complex Decision Systems DAC MCP4725 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 I 2 C Interface Eight Available Addresses

9 Phase control TCA 785 Control thyristors, triacs, and transistors. The trigger pulses can be shifted within a phase angle between 0 and 180

1 0 TCA 785

1 1 Computational Intelligence in Complex Decision Systems Thermal enclosure Phase control board

1 2 16 x 2 LCD

1 3 Experimental setup

1 4 Experimental setup

1 5 Computational Intelligence in Complex Decision Systems Fuzzy logic system

1 6 1 0.8 Neg Zero Pos Input fuzzy sets 0.6 0.4 0.2 0-1 -0.5 0 0.5 1 err; cerr Output fuzzy sets 1 0.8 N Z P 0.6 0.4 0.2 0-1 -0.5 0 0.5 1 du

Rule base errfls cerrfls Neg Zero Pos Neg N N Z 1 Zero N Z P 2 Pos Z P P 3 4 5 6 7 8 9 Control surface

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 Computational Intelligence in Complex Decision Systems

1 9 Waveforms for the power circuit Computational Intelligence in Complex Decision Systems 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

2 0 Experimental results, Tref = 45 o C 50 45 Tref T temperature [C] 40 35 30 process perturbation: opening the thermal enclosure 25 0 500 1000 1500 2000 2500 time [s]

2 1 Experimental results, Tref = 45 o C 60 temp 40 20 0 500 1000 1500 2000 2500 20 err 0-20 0 500 1000 1500 2000 2500 20 cerr 0-20 0 500 1000 1500 2000 2500 1000 du 0-1000 0 500 1000 1500 2000 2500 4000 u 2000 0 0 500 1000 1500 2000 2500

Experimental results, Tref = 45 o C 60 temp 40 20 0 500 1000 1500 2000 2500 1000 du 0-1000 0 500 1000 1500 2000 2500 4000 u 2000 contr. voltage 0 0 500 1000 1500 2000 2500 4 2 0 0 500 1000 1500 2000 2500

Experimental results, Tref = 37 o C Computational Intelligence in Complex Decision Systems 38 temperature [C] 36 34 32 30 Tref T 28 26 0 100 200 300 400 500 600 700 800 900 time [s]

Experimental results, Tref = 34 o C from 37 o C 37 36.5 Tref T 36 temperature [C] 35.5 35 34.5 34 33.5 0 200 400 600 800 1000 1200 time [s]

Experimental results, Tref = 34 o C from 37 o C 40 temp 35 30 0 200 400 600 800 1000 1200 1000 du 0-1000 0 200 400 600 800 1000 1200 6000 u 4000 2000 0 200 400 600 800 1000 1200 4 contr. voltage 3 2 0 200 400 600 800 1000 1200

2. IMPLEMENTAREA UNUI SISTEM DE CONTROL AL TEMPERATURII UTILIZÂND MATLAB

Fundamentare teoretică Controler fuzzy reguli definite de utilizator fiecărei reguli îi corespunde o mulţime parţială de ieşire e = e(k) - e(k-1) e y * y y * + y - e e Controler fuzzy u c Element de ieşire control Întârziere t senzor

Implementare practică Schema de principiu Flux achiziţie Senzor Execuţie Prelucrare analogică pentru achiziţie Prelucrare analogică pentru comandă CAN CNA Controler fuzzy Incinta termică Platforma EEboard Placa de sunet MATLAB/ Simulink Flux comandă Placă de sunet - limitare cuplaj capacitiv valori tensiune: [-1V; +1V] - amplificare achiziţie 3:1 comandă 1:1 Computational Intelligence in Complex Decision Systems

Senzor de temperatura Incinta termică LM35 factor de scală liniar +10 mv/ C (ex. 30 C 300mV) măsurarea temperaturii în intervalul -55 C,+125 C temperatura citită - diferită cu 0.01 C de temperatura suprafeţei precizie 0.5 C (la +25 C ) tensiune de alimentare - între 4V şi 30V Rezistenţă termică Implementare practică două rezistenţe ceramice conectate în paralel P max U 2 R ech iv

Implementare Platforma Electronic Explorer Flux de achiziţie Conversie cc ca Vcc Vcc 0 9 Vee 0-9 GND Vcc LM35 Vcc GND OUT GND Senzor de temperatură 0 3k Vcc V+ + LM741 OUT - Vee V- 11k 1k 0 VCC Vcc TRIGGER RESET OUTPUT CONTROL THRESHOLD Vcc DISCHARGE LM555 GND 1k GND 1k 2.2u + LM741 - V+ Vcc OUT Vee V- 1k 47n 0 1k Amplificator Av=12 Computational Intelligence in Complex Decision Systems Repetor (buffer) 0

Implementare cont. Flux de comandă Vcc Vee Vsursa + V+ Vcc D Vcc Vsursa Tranzistor Darlington 0 9 0-9 0 +12 LM741 OUT - Vee V- 10u 27k + V+ LM741 OUT - Vee V- Q1 2N2221 Q2 5.5k BD237 0 0 1k 0 Detector de vârf pozitiv Amplificator Av = 6.5 Rezistenţa de încălzire 6,8 6.8k 0 22 22k

Implementare Schemă Simulink

Controler fuzzy T-S Variabile de intrare: e, de 3 mulţimi de tip zmf, gauss, smf Variabila de ieşire: du 3 mulţimi singleton: Ne = -0.2 Ze = 0 Po = 0.2 Baza de reguli e de N Z P N Ne Ne Ze Z Ne Ze Po P Ze Po Po Computational Intelligence in Complex Decision Systems

Exemplu de activare a regulilor Reguli activate 5: Dacă (e este Z) şi (de este Z) atunci (du este Ze) 8: Dacă (e este P) şi (de este Z) atunci (du este Po) Defuzzificare - medie ponderată y * z 5 z 5 5 8 8 8

Rezultate experimentale Flux de achiziţie Semnalul preluat de la senzor Semnalul preluat de la 555 Semnalul transmis spre Simulink

Rezultate experimentale Flux de comandă Semnalul de la iesirea detectorului de vârf Semnalul provenit din Simulink

Rezultate experimentale Evoluţia temperaturii incintei:tref=45 C Computational Intelligence in Complex Decision Systems

Rezultate experimentale Evoluţia semnalelor: Tref = 45 C T e u c u cmax e 0 du c u c e, du, u c c const.

Rezultate experimentale Evoluţia temperaturii incintei:tref-variabilă 45 C 37 C

3. Implementation of a Fuzzy Logic-Based Embedded System for Engine RPM Control

Introduction implements an embedded system for the Engine RPM control based on a development board developed around an Arduino Mega board fuzzy logic system as controller offers an easy understanding of the main concepts regarding embedded systems Computational Intelligence in Complex Decision Systems

System implementation Block diagram

DC-Motor: Gear ratio: 30:1 Free run speed at 6V: 1000RPM Free run current at 6V: 120mA Stall current at 6V: 1600mA

Quadrature Encoder: Six pole magnetic disk +PCB Dual Channel 12 counts/revolution 2.8V -18V Output signal of the encoder

Motor Driver: L298 Middle class 2 Motors Sensors power supply

Arduino Mega Pinout LCD screen

The Arduino Mega board is the brain of the entire system. It is primarily responsible for the update of the digital control signal u, at every time instance. Therefore, the actual RPM, RPM k is read and the actual RPM error (err k ) and change of RPM error (cerr k ) are updated, as follows: (1) where is the RPM error in the previous time instance. The star of the entire system is the fuzzy logic controller, whose role is to infer the best modification in the control signal, in every time instance. The operation of the fuzzy logic controller is explained later on. The digital version of the actual control signal is updated using the relation: (2)

To obtain the actual RPM: Compute RPM a method based on a fixed time interval (time window) to count the revolutions of the main motor shaft. a counter is triggered at the initial time t i and it counts the pulses received from the Hall effect sensor up to the final increment t f. The RPM is computed using the relation : C f - final value of the counter C i - initial value of the counter C r = 12, number of counts/revolution G r = 30, the gear ratio (30:1) t f, t i are measured in seconds Computational Intelligence in Complex Decision Systems

first-order Takagi-Sugeno two inputs errfls and cerrfls one output ΔuFls The Fuzzy Logic Controller Fuzzy sets for the inputs Fuzzy sets for the output Computational Intelligence in Complex Decision Systems

Block diagram of the fuzzy logic controller errfls cerrfls Neg Zero Pos Neg N N Z Zero N Z P Pos Z P P Rule base of the fuzzy logic system

The defuzzification method, used to transform the partial output fuzzy sets resulted from the inference process into a crisp value is the weighted average method.

output Computational Intelligence in Complex Decision Systems Control surface of the fuzzy logic controller Err cerr

Control Circuit RPM ref + _ RPM err 1 z _ + cerr s e s c -1-1 +1 +1 errfls cerrfls Fuzzy logic system ΔuFls s u Δu - + 0 1 z 255 u Motor Driver u a DC Motor

System setup

Experimental results RPM from 0 to 1000 rise time = 8.8 s; max. positive error = 5 rpm ; max. negative error = 5rpm; RPM from 1000 to 500 fall time = 6.75 s; max. positive error = 6 rpm ; max. negative error = 9rpm; RPM from 500 to 750 rise time = 4.75 s; max. positive error = 8 rpm ; max. negative error = 6rpm; RPM from 750 to 0 fall time = 6.5 s;

Decreasing the time response To drastically decrease the time response of the control system, the control strategy should be slightly modified. Because the control characteristic of the DC motor driven by the H-Bridge is almost liner, when a large variation of the motor speed is required (larger than 60 rpm), the control signal is not determined by the fuzzy logic system, but it is estimated by a simple linear interpolation, that acts as a course adjustment of the control signal. Then, the fuzzy logic system regains its role for the fine adjustment of the speed.

Tracking mode operation: RPM tracks the temperature variation Computational Intelligence in Complex Decision Systems

Duty Cycle 23% Low Speed 55% Medium Speed 90% High Speed

4. Controlul pendulului inversat

4. Controlul pendulului inversat demonstratie video pendul.fis http://www.razorrobotics.com/articles/fuzzy-control-system/