ac fan speed control using remote control power electronics term project report

29
Capital University of Science & Technology Department of Electrical Engineering Term Project Power Electronics Ac phase control using Remote control Karamatullah EE123022

Upload: kramat-ullah

Post on 11-Apr-2017

66 views

Category:

Engineering


1 download

TRANSCRIPT

Page 1: AC fan speed control using remote control power electronics term project report

Capital University of Science & Technology Department of Electrical Engineering

Term ProjectPower Electronics

Ac phase control using Remote control

Karamatullah EE123022

Page 2: AC fan speed control using remote control power electronics term project report

Copyright 2016 by CUST Student

All rights reserved. Reproduction in whole or in part in any form requires the prior written permission of karamatullah.

Page 3: AC fan speed control using remote control power electronics term project report

DECLARATION

It is declared that this is an original piece of my own work, except where otherwise acknowledged in text and references. This work has not been submitted in any form for another degree or diploma at any university or other institution for tertiary education and shall not be submitted by me in future for obtaining any degree from this or any other University or Institution.

karamatullahReg. No EE123022

June 2016

Page 4: AC fan speed control using remote control power electronics term project report

ACKNOWLEDGMENT

All the praise is for Allah, the most Merciful and Beneficent, who blessed us with the knowledge, gave us the courage and allowed us to accomplish this task. The special thanks goes to our teacher, Sir. Muhammad Rizwan Javed the support and demonstration that he gave us to complete this project is really helpful to us. We faced difficulties in completion of assigned tasks and we did best and valuable according to our working.

Page 5: AC fan speed control using remote control power electronics term project report

ABSTRACT

This project is about the AC phase control system using remote control. The Ac phase can be controlled by using TRIAC. After zero detection Arduino control the output power by generating a control gate pulse and firing it on the gate of TRIAC while getting data from remote. The remote generate the HEX number and send to Arduino. Arduino will trigger the TRIAC with a delay according to HEX code regions that are define. Using this method, it controls the average output of AC power.

Page 6: AC fan speed control using remote control power electronics term project report

TABLE OF CONTENTSDECLARATION......................................................................................................................iiiACKNOWLEDGMENT..........................................................................................................ivABSTRACT..............................................................................................................................vLIST OF FIGURES.................................................................................................................viiChapter 1....................................................................................................................................8INTRODUCTION.....................................................................................................................8

1.1 Overview.....................................................................................................................81.2 Statement of Problem..................................................................................................81.3 Purpose of the project.................................................................................................81.4 Specifications of proposed solution............................................................................81.5 Applications of the project..........................................................................................8

Chapter 2....................................................................................................................................9PROJECT DESIGN AND IMPLEMENTATION....................................................................9

2.1 Design Procedure........................................................................................................92.1.1 IR codes...............................................................................................................92.1.2 Zero Crossing Detector......................................................................................11

2.2 Details About Software.............................................................................................112.3 Software Implementation..........................................................................................12

2.3.1 Arduino Sketch..................................................................................................122.3.2 Proteus Implementation.....................................................................................13

Chapter 3..................................................................................................................................14TOOLS AND TECHNIQUES.................................................................................................14

3.1 Hardware used with technical specifications............................................................143.1.1 Arduino mega 2560...........................................................................................143.1.2 Zero Crossing Detector 4N25............................................................................153.1.3 TRIAC BT136...................................................................................................15

3.2 Software(s), simulation tool(s) used.........................................................................153.2.1 Proteus Professional...........................................................................................15

3.3 Summary...................................................................................................................16Chapter 5..................................................................................................................................17CONCLUSION........................................................................................................................17References................................................................................................................................18APPENDICES.........................................................................................................................19

Page 7: AC fan speed control using remote control power electronics term project report

Appendix – A.......................................................................................................................19

LIST OF FIGURESFigure 1:Block Diagram............................................................................................................9Figure 2:Power Control...........................................................................................................11Figure 3:Arduino Sketch..........................................................................................................12Figure 4:Proteus Implementation............................................................................................13Error! Bookmark not defined.Figure 8:Arduino Mega 2560...............................................14Figure 9: 4N25 OPTCOUPLER..............................................................................................15Figure 10:TRIAC BT136.........................................................................................................15

Page 8: AC fan speed control using remote control power electronics term project report

Chapter 1

INTRODUCTION

Arduino is an open-source prototyping platform based on easy-to-use hardware and software. Arduino boards are able to read inputs, turn it into an output, activating a motor and turning on an LED. You can tell your board what to do by sending a set of instructions to the microcontroller on the board. To do so you use the Arduino programming language [1].

1.1 OverviewThe Arduino platform gives you a lot of pre-wiring and free code libraries that will let you concentrate on testing your idea instead of spending your time building supporting circuitry or writing tons of low level code. Arduino based projects are useful because it allows easy and fast prototyping.

1.2 Statement of ProblemOur problem is to design a Temperature based Arduino automatic AC power control system using Arduino Mega 2560. We done this project in Arduino 1.6.7 software. The open-source Arduino Software (IDE) makes it easy to write code and upload it to the board [2]. It runs on Windows. This software can be used with any Arduino board.

1.3 Purpose of the projectThe purpose of this project is to design a speed control based on remote control using Arduino. To eliminate human involvement, familiar our self with Arduino Power based application and practical implementation in Power system.

1.4 Specifications of proposed solutionThe given specification of Proposed solution is to design a remotely control Arduino automatic AC power control system using a Power TRIAC and Arduino Mega 2560 on Arduino Software.

1.5 Applications of the project Motor frequency control. Motor speed control AC phase control Home automation

Page 9: AC fan speed control using remote control power electronics term project report

Chapter 2

PROJECT DESIGN AND IMPLEMENTATION

We design Arduino based cooling system in open-source Arduino Software. It’s easy to write code and upload it to the board using Arduino Software. Then we implement this project in Proteus 8 Professional.

2.1 Design Procedure

Arduino is interfacing with several devices.

Interfacing with zero crossing detector to get information when AC wave cross zero level.

Interfacing with TRIAC to control AC power.

Interfacing with remote with arduino.

2.1.1 IR codesswitch(results.value)

{

case 0xE318261B: Serial.println(" power ");

Regulated power Supply

220 V AC

Zero Crossing Detector

LoadTRIAC

IR receiver

Arduino

Figure 1:Block Diagram

Page 10: AC fan speed control using remote control power electronics term project report

break;

case 0xF0C41643: Serial.println(" zero "); break;

case 0x9716BE3F: Serial.println(" one "); break;

case 0x3D9AE3F7: Serial.println(" two "); break;

case 0x6182021B: Serial.println(" three "); break;

case 0x8C22657B: Serial.println(" four "); break;

case 0x488F3CBB: Serial.println(" five "); break;

case 0x449E79F: Serial.println(" six "); break;

case 0x32C6FDF7: Serial.println(" seven "); break;

case 0x1BC0157B: Serial.println(" eight "); break;

case 0x3EC3FC1B: Serial.println(" nine "); break;

delay(500); }//END translateIR

Page 11: AC fan speed control using remote control power electronics term project report

2.1.2 Zero Crossing DetectorThe zero-crossing detection circuit provides a 5v pulse every time the ac signal crosses zero volts. We detect this with the Arduino to trigger the circuit precisely in synchronization with these zero-crossing events. The method for power control is shown in the figure below [3].

Figure 2:Power Control

Once a zero crossing is detected, the TRIAC remains off for a controlled amount of time (t1). The longer this time is, the less power the ac circuit receives. Once the “off-time”, t1 has elapsed, the microcontroller turns on the TRIAC by applying a voltage to the gate (shown in red). Once turned on, the TRIAC will remain on even after the gate voltage has been removed. It will turn off if the gate voltage is zero the next time the ac waves crosses zero [3]. Because of this, we do not need to take care to turn the TRIAC off when the ac signal crosses zero again. All we need to do is to ensure that the TRIAC gets turned off inside of the period of ½ wave (t3). The duration of the gate pulse (t2) is determined by a minimum requirement of the TRAIC. If this pulse is too short, the TRAIC will not fire Once the second zero crossing occurs, since there is no voltage on the gate, the TRIAC remains off until triggered again in the next ½ cycle. The net result here is that we “chop” parts of the wave out resulting in lower average power [3].We will be using interrupts and the Arduino timer to precisely control the timing of the TRIAC gate. The AC signal is 50 Hz. This means is that the AC signal crosses zero, reaches peak positive voltage, crosses zero, reaches peak negative voltage and returns to zero 50 times each second [3].

2.2 Details About SoftwareArduino programs may be written in any programming language with a compiler that produces binary machine code. The Arduino project provides the Arduino integrated development environment (IDE). It includes a code editor with features such as syntax highlighting, brace matching, and automatic indentation, and

Page 12: AC fan speed control using remote control power electronics term project report

provides simple one-click mechanism for compiling and loading programs to an Arduino board. A program written with the IDE for Arduino is called a "sketch". The Arduino IDE supports the C and C++ programming languages using special rules of code organization. A typical Arduino C/C++ sketch consist of two functions that are compiled and linked with a program stub main () into an executable cyclic program [4].

setup (): a function that runs once at the start of a program and that can initialize settings.

loop (): a function called repeatedly until the board powers off [4].

2.3 Software Implementation2.3.1 Arduino Sketch

Figure 3:Arduino Sketch

Page 13: AC fan speed control using remote control power electronics term project report

2.3.2 Proteus Implementation

Figure 4:Proteus Implementation

Page 14: AC fan speed control using remote control power electronics term project report

Chapter 3

TOOLS AND TECHNIQUES

The tools and techniques used in Arduino based cooling system are given below in details. Tools and techniques includes both hardware and software.

3.1Hardware used with technical specificationsIn Arduino based cooling system we use following Hardware for the implementation of the project.

3.1.1 Arduino mega 2560

Arduino is an open-source computer hardware and software company, project and user community that designs and manufactures microcontroller-based kits for building digital devices and interactive objects that can sense and control objects in the physical world. The project is based on microcontroller board designs, manufactured by several vendors, using various microcontrollers. These systems provide sets of digital and analog I/O pins that can be interfaced to various expansion boards and other circuits. The boards feature serial communications interfaces, including USB on some models, for loading programs from personal computers. For programming it includes support for the C and C++ programming languages. An Arduino board historically consists of an Atmel 8-, 16- or 32-bit AVR microcontroller. Most boards include a 5 V linear regulator and a 16 MHz crystal oscillator. Arduino mega 2560 has 70 numbers of inputs and outputs. There are 5 numbers of digital inputs. There are 16 numbers of analog inputs and it has a 256 KB of flash memory on board [1].

Figure 5:Arduino Mega 2560

Page 15: AC fan speed control using remote control power electronics term project report

3.1.2 Zero Crossing Detector 4N25The 4N25 family is an industry standard single channel phototransistor coupler. Each OPTOCOUPLER consists of gallium arsenide infrared LED and a silicon NPN phototransistor [5].

Figure 6: 4N25 OPTCOUPLER

3.1.3 TRIAC BT136TRIAC use in applications requiring high bidirectional transient and blocking voltage capability and high thermal cycling performance. Typical applications include motor control, industrial and domestic lighting, heating and static switching [5].

Figure 7:TRIAC BT136

3.2 Software(s), simulation tool(s) used3.2.1 Proteus Professional

Proteus is a Virtual System Modeling that combines circuit simulation animated components and microprocessor models to co-simulate the complete microcontroller based designs. This is the perfect tool for engineers to test their microcontroller designs before constructing a physical prototype in real time. This program allows users to interact with the design using on-screen indicators and/or LED and LCD displays and if attached to the PC switches and buttons. One of the main components of Proteus is the Circuit Simulation. Proteus is best simulation software for various designs with microcontroller. It is mainly popular because of availability of almost all microcontrollers in it. You can simulate your programming of microcontroller in Proteus 8 Simulation Software. After simulating your circuit in Proteus Software you can directly make PCB design with it so it could be an all in one package for students and hobbyists [6].

Page 16: AC fan speed control using remote control power electronics term project report

3.3SummaryIn this chapter we discussed about the Hardware and Software tools that are used in temperature based Arduino automatic AC power control. Hardware tools are Arduino Microcontroller, zero crossing detector 4N25 and TRIAC. Then we discussed in details about these Hardware parts. Software tool that is used in this project. Then we discussed about Proteus Professional tools in details.

Page 17: AC fan speed control using remote control power electronics term project report

Chapter 5

CONCLUSION

This project increases our knowledge in the field of Power Electronics and Industrial Electronics. This field is most growing area in the field of electronic and electrical engineering. Through this project we learn the working of different electronics components and we also learned how to manage these components through computerized programmed device in our case is Arduino.

Page 18: AC fan speed control using remote control power electronics term project report

References

[1] "ARDUINO," [Online]. Available: https://www.arduino.cc/en/Guide/Introduction. [Accessed 15 June 2016].

[2] "ARDUINO," [Online]. Available: http://playground.arduino.cc/Projects/Ideas. [Accessed 15 June 2016].

[3] "ARDUINO," [Online]. Available: http://playground.arduino.cc/Main/ACPhaseControl. [Accessed 15 June 2016].

[4] "ARDUINO," [Online]. Available: https://www.arduino.cc/en/Main/Software. [Accessed 15 June 2016].

[5] "DatasesheetCatalog," [Online]. Available: http://www.datasheetcatalog.com/. [Accessed 15 June 2016].

[6] "PROTEUS," [Online]. Available: http://proteus.software.informer.com/. [Accessed 15 June 2016].

Page 19: AC fan speed control using remote control power electronics term project report

APPENDICES

Appendix – A#include "IRremote.h"

/*-----( Declare Constants )-----*/int receiver = 11; // pin 1 of IR receiver to Arduino digital pin 11

/*-----( Declare objects )-----*/IRrecv irrecv(receiver); // create instance of 'irrecv'decode_results results; // create instance of 'decode_results'/*-----( Declare Variables )-----*/

const int buttonPin = 2; // the number of the pushbutton pinconst int ledPin = 13; // the number of the LED pin

// variables will change:int buttonState = 0; // variable for reading the pushbutton status

void setup() { Serial.begin(9600); Serial.println("IR Receiver Raw Data + Button Decode Test"); irrecv.enableIRIn(); // Start the receiver // initialize the LED pin as an output: pinMode(ledPin, OUTPUT); // initialize the pushbutton pin as an input: pinMode(buttonPin, INPUT);}

void loop() { if (irrecv.decode(&results)) // have we received an IR signal?

{// Serial.println(results.value, HEX); UN Comment to see raw values translateIR(); irrecv.resume(); // receive the next value } // read the state of the pushbutton value: switch(results.value)

{

case 0xE318261B: Serial.println(" power "); if (13==HIGH ) {

Page 20: AC fan speed control using remote control power electronics term project report

digitalWrite(ledPin,LOW); } else digitalWrite(ledPin,HIGH); break;

// case 0xF0C41643: // buttonState = digitalRead(buttonPin);//// // check if the pushbutton is pressed.// // if it is, the buttonState is HIGH:// if (buttonState == HIGH) {// // turn LED on:// delay(8.9);// // digitalWrite(ledPin, HIGH);// // }// else {// // turn LED off:// digitalWrite(ledPin, LOW);// // }// break;

case 0x9716BE3F: if (13==HIGH ) { buttonState = digitalRead(buttonPin);

// check if the pushbutton is pressed. // if it is, the buttonState is HIGH: if (buttonState == HIGH) { // turn LED on: delay(0); digitalWrite(ledPin, HIGH); }// else {// // turn LED off:// digitalWrite(ledPin, LOW);// // } } else digitalWrite(ledPin, LOW); break;

Page 21: AC fan speed control using remote control power electronics term project report

case 0x3D9AE3F7: buttonState = digitalRead(buttonPin);

// check if the pushbutton is pressed. // if it is, the buttonState is HIGH: if (buttonState == HIGH) { // turn LED on: delay(5); digitalWrite(ledPin, HIGH); } else { // turn LED off: digitalWrite(ledPin, LOW); } break;

case 0x6182021B: buttonState = digitalRead(buttonPin);

// check if the pushbutton is pressed. // if it is, the buttonState is HIGH: if (buttonState == HIGH) { // turn LED on: delay(7); digitalWrite(ledPin, HIGH); } else { // turn LED off: digitalWrite(ledPin, LOW); } break;

// case 0x8C22657B: // buttonState = digitalRead(buttonPin);//// // check if the pushbutton is pressed.// // if it is, the buttonState is HIGH:// if (buttonState == HIGH) {// // turn LED on:// delay(5);// // digitalWrite(ledPin, HIGH);// // }// else {// // turn LED off:// digitalWrite(ledPin, LOW);//

Page 22: AC fan speed control using remote control power electronics term project report

// }// break;//// case 0x488F3CBB: // buttonState = digitalRead(buttonPin);//// // check if the pushbutton is pressed.// // if it is, the buttonState is HIGH:// if (buttonState == HIGH) {// // turn LED on:// delay(4);// // digitalWrite(ledPin, HIGH);// // }// else {// // turn LED off:// digitalWrite(ledPin, LOW);// // }// break;//// case 0x449E79F: // buttonState = digitalRead(buttonPin);//// // check if the pushbutton is pressed.// // if it is, the buttonState is HIGH:// if (buttonState == HIGH) {// // turn LED on:// delay(3);// // digitalWrite(ledPin, HIGH);// // }// else {// // turn LED off:// digitalWrite(ledPin, LOW);// // }// break;//// case 0x32C6FDF7: // buttonState = digitalRead(buttonPin);//// // check if the pushbutton is pressed.// // if it is, the buttonState is HIGH:// if (buttonState == HIGH) {// // turn LED on:// delay(2);// // digitalWrite(ledPin, HIGH);// // }// else {// // turn LED off:

Page 23: AC fan speed control using remote control power electronics term project report

// digitalWrite(ledPin, LOW);// // }// break;//// case 0x1BC0157B: // buttonState = digitalRead(buttonPin);//// // check if the pushbutton is pressed.// // if it is, the buttonState is HIGH:// if (buttonState == HIGH) {// // turn LED on:// delay(1);// // digitalWrite(ledPin, HIGH);// // }// else {// // turn LED off:// digitalWrite(ledPin, LOW);// // }// break;

// case 0x3EC3FC1B: // buttonState = digitalRead(buttonPin);//// // check if the pushbutton is pressed.// // if it is, the buttonState is HIGH:// if (buttonState == HIGH) {// // turn LED on:// delay(0);// // digitalWrite(ledPin, HIGH);// // }// else {// // turn LED off:// digitalWrite(ledPin, LOW);// // }// break;// }}void translateIR() // takes action based on IR code received

// describing Car MP3 IR codes

{

switch(results.value)

{

Page 24: AC fan speed control using remote control power electronics term project report

case 0xE318261B: Serial.println(" power "); break;

case 0xF0C41643: Serial.println(" zero "); break;

case 0x9716BE3F: Serial.println(" one "); break;

case 0x3D9AE3F7: Serial.println(" two "); break;

case 0x6182021B: Serial.println(" three "); break;

case 0x8C22657B: Serial.println(" four "); break;

case 0x488F3CBB: Serial.println(" five "); break;

case 0x449E79F: Serial.println(" six "); break;

case 0x32C6FDF7: Serial.println(" seven "); break;

case 0x1BC0157B: Serial.println(" eight "); break;

case 0x3EC3FC1B: Serial.println(" nine "); break;

}

delay(500);

}//END translateIR