Control of Electrical Lights and Fans using TV Remote

Similar documents
Small Signal Pulse Detection

Water Jet with Electronically Controlled Flow and Temperature Settings

Application Note AN-3006 Optically Isolated Phase Controlling Circuit Solution

Spectrum analyzer for frequency bands of 8-12, and MHz

Design And Construction Of A Remote Controlled Fan Regulator

Touchless Control: Hand Motion Triggered Light Timer

Control of Lighting System

AC POWER CONTROL USING ANDROID CELLPHONE WITH LCD DISPLAY

6. HARDWARE PROTOTYPE AND EXPERIMENTAL RESULTS

AVR Microcontroller based remote controlled embedded system to regulate AC fan or dim AClight with power level, temperature and humidity display.

Power Factor Compensation Using PIC

CHAPTER 6 IMPLEMENTATION OF FPGA BASED CASCADED MULTILEVEL INVERTER

Low Cost Screening Audiometer

[Aathinarayanan, 5(12): December2018] ISSN DOI /zenodo Impact Factor

Wireless Infrared Data Communications Using the IRM3XXX Family of IrDA Compatible Infrared Transceivers. Appnote 68

MOC3010M, MOC3011M, MOC3012M, MOC3020M, MOC3021M, MOC3022M, MOC3023M 6-Pin DIP Random-Phase Triac Driver Output Optocoupler (250/400 Volt Peak)

Design and Implementation of Digital Trigger Circuit for Converter

CHAPTER 6 DIGITAL INSTRUMENTS

Speed Control of Single Phase Induction Motor Using Infrared Receiver Module

CHAPTER 4 MULTI-LEVEL INVERTER BASED DVR SYSTEM

Screening Audiometer

ADC Bit µp Compatible A/D Converter

MAINTENANCE MANUAL AUDIO MATRIX BOARD P29/

Power Factor Improvement Using Thyristor Switched Capacitor Using Microcontroller Kacholiya Saurabh 1, Phapale Sudhir 2, Satpute Yuvraj 3, Kale.S.

Feed Forward Control of Induction Motor using AC Voltage Regulator

Calhoon MEBA Engineering School. Study Guide for Proficiency Testing Industrial Electronics

CHAPTER 5 CONTROL SYSTEM DESIGN FOR UPFC

Technical Brief FAQ (FREQUENCLY ASKED QUESTIONS) For further information, please contact Crystal Semiconductor at (512) or 1 (800)

CHAPTER 2 VSI FED INDUCTION MOTOR DRIVE

IGBT based Multiport Bidirectional DC-DC Converter with Renewable Energy Source

Activity 4: Due before the lab during the week of Feb

ENGN Analogue Electronics Digital PC Oscilloscope

DESIGN OF TEMPERATURE BASED SPEED CONTROL SYSTEM USING ARDUINO MICROCONTROLLER

Four Quadrant Speed Control of DC Motor with the Help of AT89S52 Microcontroller

Design and Implementation of AT Mega 328 microcontroller based firing control for a tri-phase thyristor control rectifier

Devices and Op-Amps p. 1 Introduction to Diodes p. 3 Introduction to Diodes p. 4 Inside the Diode p. 6 Three Diode Models p. 10 Computer Circuit

The SOL-20 Computer s Cassette interface.

ASTABLE MULTIVIBRATOR

Learn about the use, operation and limitations of thyristors, particularly triacs, in power control

Micro-controller Based Multi-phase Sequence Detection System.

There are many circuits for throttles in the model railway world. Unfortunately the number that are computer controllable are few.

University of California at Berkeley Donald A. Glaser Physics 111A Instrumentation Laboratory

Tel: Fax:

Implementation Of Solid State Relays For Power System Protection

MOC3010M, MOC3011M, MOC3012M, MOC3020M, MOC3021M, MOC3022M, MOC3023M 6-Pin DIP Random-Phase Optoisolators Triac Driver Output (250/400 Volt Peak)

CHAPTER 3 H BRIDGE BASED DVR SYSTEM

PC-OSCILLOSCOPE PCS500. Analog and digital circuit sections. Description of the operation

CHAPTER 4 CONTROL ALGORITHM FOR PROPOSED H-BRIDGE MULTILEVEL INVERTER

POWER ELECTRONICS LAB MANUAL

I. INTRODUCTION II. LITERATURE REVIEW

Induction Motor Protection using Micro Controller

6-PIN DIP RANDOM-PHASE OPTOISOLATORS TRIAC DRIVER OUTPUT (250/400 VOLT PEAK)

3 Circuit Theory. 3.2 Balanced Gain Stage (BGS) Input to the amplifier is balanced. The shield is isolated

DLVP A OPERATOR S MANUAL

Chapter 6 ACTIVE CLAMP ZVS FLYBACK CONVERTER WITH OUTPUT VOLTAGE DOULER

DESIGN OF A THREE PHASE CONTROLLED RECTIFIER FOR USE IN THE LABORATORY

Analysis of Solar PV Inverter based on PIC Microcontroller and Sinusoidal Pulse Width Modulation

Single-phase Variable Frequency Switch Gear

Quad 12-Bit Digital-to-Analog Converter (Serial Interface)

BINARY AMPLITUDE SHIFT KEYING

DIGITAL ELECTRONICS ANALOG ELECTRONICS

ADC0808/ADC Bit µp Compatible A/D Converters with 8-Channel Multiplexer

RV4145A Low-Power Ground Fault Interrupter

PERFORMANCE ANALYSIS OF MICROCONTROLLER BASED ELECTRONIC LOAD CONTROLLER

ANALOG AND DIGITAL INSTRUMENTS

Published by: PIONEER RESEARCH & DEVELOPMENT GROUP ( 1

Solid State Relays Dr. Lynn Fuller Webpage:

Monitoring of Intravenous Drip Rate

Fig 1: The symbol for a comparator

LABORATORY EXPERIMENT. Infrared Transmitter/Receiver

B.E. SEMESTER III (ELECTRICAL) SUBJECT CODE: X30902 Subject Name: Analog & Digital Electronics

UNIT-V: WAVEFORM GENERATORS AND SPECIAL FUNCTION ICs. PARTA (2 Marks)

Auto-Seq Documentation Written April 6th, 2014

1 Signals and systems, A. V. Oppenhaim, A. S. Willsky, Prentice Hall, 2 nd edition, FUNDAMENTALS. Electrical Engineering. 2.

As you can see, by varying the turn-on point, the amount of power getting to the bulb is adjustable, and hence the light output can be controlled.

REACTIVE POWER COMPENSATION IN DISTRIBUTION SYSTEM

PT8A3270/1/2/3/4/5/6/7 Heating Controller

(A) im (B) im (C)0.5 im (D) im.

[Ahmed, 3(1): January, 2014] ISSN: Impact Factor: 1.852

Process Components. Process component

Module 5. DC to AC Converters. Version 2 EE IIT, Kharagpur 1

Micro-controller Based Three-phase Voltage Source Inverter for Alternative Energy Source. Abstract

ANGULAR POSITION CONTROL OF DC MOTOR USING SHORTEST PATH ALGORITHM

8-Bit, high-speed, µp-compatible A/D converter with track/hold function ADC0820

University of California at Berkeley Physics 111 Laboratory Basic Semiconductor Circuits (BSC) Lab 12

Control of Light and Fan with Whistle and Clap Sounds

Analytical Chemistry II

EMBEDDED SYSTEM DESIGN FOR A DIGITAL MULTIMETER USING MOTOROLA HCS12 MICROCONTROLLER

CHAPTER 5 IMPLEMENTATION OF FIVE LEVEL CASCADED MULTILEVEL INVERTER AND HARDWARE RESULTS

9 Feedback and Control

International Journal of Advance Engineering and Research Development

Number of Lessons:155 #14B (P) Electronics Technology with Digital and Microprocessor Laboratory Completion Time: 42 months


Automatic Railway Gate Control & Track Switching

ADVANCED SAFETY APPLICATIONS FOR RAILWAY CROSSING

Application description AN1014 AM 462: processor interface circuit for the conversion of PWM signals into 4 20mA (current loop interface)

CHAPTER 8 PHOTOMULTIPLIER TUBE MODULES

EE ELECTRICAL ENGINEERING AND INSTRUMENTATION

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

DEPARTMENT OF ELECTRICAL ENGINEERING LAB WORK EE301 ELECTRONIC CIRCUITS

Transcription:

EE 389 Electronic Design Lab -II, Project Report, EE Dept., IIT Bombay, October 2005 Control of Electrical Lights and Fans using TV Remote Group No. D10 Liji Jayaprakash (02d07021) <liji@ee.iitb.ac.in> Harshita Rawat (02d07023) <harshita@ee.iitb.ac.in> Ankur Gupta (02d07032) <ankz@ee.iitb.ac.in> Supervisor: Prof. P.C.Pandey Course Instructors: Prof. P.C.Pandey & Prof. L.R.Subramaniam Abstract: - The objective of the project is to build a system for controlling intensity/speed of electrical lights and fans using a TV remote or serial port interface. The system follows a linear profile, provides regulation against input power supply and also takes into account the frequency variation of the power supply. Intensity/speed of the load is controlled by changing the RMS voltage using triac circuitry and changing the corresponding firing angle. An ADC circuit monitors the unregulated input voltage, followed by software to check for voltage variation and provide regulation. Frequency of input voltage supply is calculated and any change monitored and compensated by changing the instance of firing the triac trigger pulse accordingly. 1 INTRODUCTION The aim of the project is to design and build an controller to control electrical lights and fans using a TV remote or serial port interface. The system should provide regulation against input power supply. The system should be independent of frequency of incoming power supply. Intensity of a light bulb (resistive load) or speed of a fan (inductive load) is related to the RMS voltage supplied, which can be controlled by the firing angle of the triac according to Vm θ 0.5 Vrms = (1 ) 2 π By changing the firing angle of the triac we can change the brightness/speed of the light/fan. For example, if the triac is fired when the AC supply crosses zero, the load receives maximum power, if it is fired at peaks, only half power is available to the load, and so on. Absence of triac firing turns off the load. Our design aims at generating these pulses and controlling the delay of their firing in order to control power supplied to the load. Regulation against input power supply is achieved by similarly delaying or forwarding the fired triac pulse. Also frequency of the incoming supply is monitored, in order to make the system independent of frequency fluctuations as well as the frequency itself. A block diagram is shown in Fig. 1. It consists of: Power supply consisting of 230V/9V transformer, bridge rectifier, filter and 5 V regulator IR receiver for TV remote control RS232 level shifter for RS232 commands. Zero crossing detector for generating time reference for triac firing pulses 1

ADC for measuring the unregulated voltage as a measure of mains RMS value A 20-pin and a 40-pin microcontroller have been used to modulate the hardware and software development. Triac circuitry (followed by load) Fig. 1 Block diagram 2 DESCRIPTION OF THE SYSTEM The working of the various blocks is explained in the following subsections:- 2.1 Power Supply We generated a 5V DC supply (to be used by the ICs in the circuit) from the AC main supply. A 230/9 volts transformer followed by a bridge rectifier consisting of IN4001 diodes and voltage regulator 7805 was used as shown in Fig. 2. The low voltage side of the step down transformer (230V/9V) is connected to the fullwave bridge rectifier circuit and the high voltage side is connected to the mains supply. The bridge rectifier output is filtered by C1 and regulated to 5 V DC by IC1 (7805). Ceramic capacitors C2 and C3 are used for frequency stability. The regulated 5 V output is taken as Vcc for the circuit. The unregulated output Vx is used for sensing variations in the input supply mains voltage. 2

Fig. 2 Power supply circuit 2.2 IR Receiver Circuit First we shall examine the infrared input signal received by the IR receiver circuit. Fig. 3 shows the typical output from a standard RC5 coded TV remote. Every time a button is pressed at the remote control, it sends a train of 14 bits, 1.728ms per bit, the whole train is repeated every 130 ms if the button is kept pressed. Fig. 3 RC5 coded TV remote output Each bit is sliced in two halves. The left and right half has opposed levels. If the bit to be transmitted is one (1), its left side is OFF while its right side is ON. If the bit to be transmitted is zero (0), its left side is ON while the right side is OFF. The first two bits in the bit train, #1 and #2, are called Auto Gain Control (AGC) calibration. They are ON on the left side, and serve to calibrate the IR receiver s AGC. The bit #3 is the CHECK bit, every time a key is pressed at the remote (even repeatedly the same key) this bit flips state. The next 5 bits, #4 to #8, are used for SYSTEM ADDRESS, or to identify which kind of device should execute the COMMAND bits. The next 6 bits, #9 to #14, are used for COMMAND information to the device selected by the ADDRESS bits. Bit #14 is the LSB. The Infrared receiver used is TSOP 1738. It is a 3-pin module with active low output. Fig.4 shows the circuit used for IR receiver. Here we have used a 10 k pull-up resistor between Vcc and TSOP output. The capacitor is used to filter the power supply to the IR receiver, thus preventing a false trigger. The output Vir is given as input to a microcontroller. 3

Fig. 4 IR receiver circuit 2.3 RS232 driver In this project we require only the receiver part of RS232. The level shifting of RS232 input for interfacing to the microcontroller has been carried out using IC3 (MAX232) as shown in Fig. 5. Fig. 5 RS232 Driver 4

2.4 Zero Crossing Detector The RMS voltage is controlled by varying the position of the trigger pulse to the triac gate in both the half cycles with respect to zero crossing points. Hence to generate the pulses with appropriate delay, the microcontroller has o be given the zero crossing instants. We used the circuit shown in Fig.6 for this purpose. Fig. 6 Zero crossing detector The two ends of the step down transformer are connected to resistor potential dividers, connected to the inverting and non-inverting terminals of op-amp IC4A as a comparator. Output is followed by a buffer which is finally (Vz) connected to P3.7 of microcontroller IC6. The buffer was used to prevent loading of the comparator so that the comparator output doesn t get loaded by the microcontroller. Va1 and Va2 are unipolar with respect to the ground and hence the attenuated inputs to IC4A can be used to get the zero crossing without requiring a dual supply. Input and output waveforms of the zero crossing detector is shown in Fig. 7 Fig. 7 Input and output waveforms of zero crossing detector 2.5 Intensity regulation against mains voltage variation Voltage regulation against supply variation was achieved by sensing the mains voltage through a single-channel 8-bit ADC. Input to the ADC comes from Vx, the unregulated DC input to the 5

regulator IC1. Vx is proportional to the RMS value of AC mains. Hence the digital output of the ADC can be used by the microcontroller IC7 to adjust the triac firing angle in order to compensate variation in supply voltage. Voltage span of the ADC has been adjusted to 1.9V- 3.8V by providing a constant 1.9V to the analog ground and Vref/2. A zener diode of 1.9 V was used for this purpose. The ADC clock is internally generated with CLK R connected to a resistor and a capacitor to the ground and the voltage across the capacitor and ground is fed to CLK IN. The CS (chip select) and RD are asserted by connecting them to ground thereby providing continuous mode of operation. The write for the ADC is asserted by a signal from the microcontroller through P1.7 pin. After the conversion is completed, the ADC interrupts the microcontroller through P2.7 pin. The digital output from the ADC is connected to port 0 with LSB connected to P0.0 and the MSB connected to P0.7 and the other bits in the same increasing order. 2.6 IR decoder IC6, 20-pin microcontroller AT89C2051 is used to receive the commands from the IR receiver and the RS232 receiver. It decodes the output from the IR receiver by sampling the command bits in the IR signal (14 bit train) received from the remote and sets the bits of port 1 accordingly. The microcontroller can also be interrupted by a computer sending commands over the serial inputs. The command consists of a train of 11 bits (including one start bit and two stop bits with baud rate 4800). The microcontroller decodes this data and sets the bits of port 1 accordingly. It then gives an interrupt to microcontroller IC7 which then accordingly calculates the delay for firing the triac connected to the concerned load. The various switches of the remote control which are used to regulate the loads are: Switch 1: To switch ON the first load. Switch 2: To switch ON the second load. Switch 3: To switch OFF the first load. Switch 4: To switch OFF the second load. Volume up: To increase the intensity of the first load. Volume down: To increase the intensity of the second load Channel up: To decrease the intensity of the first load. Channel down: To decrease the intensity of the second load. The complete flowchart of the working is given in Fig.8. 2.7 Triac firing pulse generation IC7, 40-pin microcontroller AT89C52 processes the decoded signal from microcontroller IC6 and generates the triac firing pulses. The task of decoding the signal and triac firing pulse generation has been partitioned between the two microcontrollers in order to modularize the hardware and software development. Output from the zero crossing detector is used to set the instants of the triac firing pulses. ADC output is processed to account for supply voltage variation and shift the firing pulses as required. Fig.9 shows the flowchart for its working. 2.8 TRIAC A triac is a three terminal semiconductor for controlling current in either direction. It is basically two SCRs back to back with common gate. The supply to the triac is an A/C signal and it will always turn off when the applied voltage reaches zero at the end of the current half-cycle. If a turn-on pulse is applied at some controllable point after the start of each half cycle, it will 6

directly control the percentage power of that half-cycle that gets applied to the load. This makes the triac ideal for light dimmer controls. Fig. 8 Flowchart for decoding IR output 7

Fig. 9 Flowchart for generation of triac firing pulses 8

Fig. 10 Triac circuit The circuit in Fig. 10 is used to control the amount of power that is made available to the load. The triac circuit has to be fired (exciting the gate terminal) twice in every cycle after the zero crossings. The delay in firing decides the total power provided to the load, greater the delay lesser the power. The pulses from the triac driving circuit are connected to the pin-1 (the anode of the photodiode) of the opto-coupler MOC3020 and the cathode (pin-2) is connected to the ground of the electronic circuit. On the pulses, the photodiode radiates and drives the triac inside MOC3020. In this part the pulses are in optical form hence providing the optical isolation between the triac load circuit and the electronic circuit. The diac of the opto-coupler further drives the triac with the load connected across it. If the load is inductive (fan), the triac will be non-sensitive and hence an additional resistor-capacitor network is used for the connection between MOC3020 and triac. The MOC3020 drives the gate of the triac while the load is connected in between a power supply terminal and A2 terminal of the triac and the other power supply terminal and A1 are shorted. It is not necessary to connect the neutral and live in a specific way as an opto-coupler has been used. 4 IMPLEMENTATION Fig. 11 shows the complete circuit diagram. Figs. 12, 13 and 14 show voltage waveforms for mains supply, across triac and across inductive load (fan) for speed levels 2, 5 and 8 respectively. Figs. 15 and 16 show voltage waveforms when the amplitude of input voltage supply was varied using an auto-transformer and the corresponding waveforms across the triac. 5 CONCLUSION The control of light intensity and fan speed was successfully achieved. The system follows a linear profile and it provides regulation against input power supply voltage. The system is supply voltage frequency independent, i.e., it works for any given supply voltage frequency. The system has been implemented on a printed circuit board (PCB) as well. 9

10

Fig. 12: a) Mains supply voltage b) Voltage across triac c) Voltage across inductive load (fan) for speed level 2 Fig. 13 a) Mains supply voltage b) Voltage across triac c) Voltage across inductive load (fan) foe speed level 5 11

Fig. 14 a) Mains supply voltage b) Voltage across triac c) Voltage across inductive load (fan) foe speed level 8 (maximum) Fig. 15 Voltage waveforms of different magnitudes Fig. 16 Voltage waveforms across triac corresponding to input waveforms shown in Fig. 15 12

REFERENCES [1] A. S. Sedra and K. C. Smith Microelectronic Circuits, Fourth edition, 1982, Oxford, Oxford University Press (2002) [2] K. J. Ayala 8051 Microcontroller, Architecture, Programming & Applications, Second Edition, 1997, Singapore, Penram International Publishing Pvt. Ltd. (2005) [3] Atmel Corporation, 8-bit Microcontroller with 8K Bytes Flash http://www.atmel.com/dyn/resources/prod_documents/doc0313.pdf [4] National Semiconductor, ADC0801/ADC0802/ADC0803/ADC0804/ADC0805 8-Bit µp Compatible A/D Converters, http://cache.national.com/ds/dc/adc0804.pdf [5] ST Microelectronics, BTA/BTB06 Series, http://www.st.com/stonline/books/pdf/docs/2936.pdf [6] National Semiconductor, LM124/LM224/LM324/LM2902Low Power Quad Operational Amplifiers, http://cache.national.com/ds/lm/lm124.pdf [7] Fairchild Semiconductor, 1N4001-1N4007, http://www.fairchildsemi.com/ds/1n/1n4003.pdf#page=1 [8] Fairchild Semiconductor, 3-Terminal 1A Positive Voltage Regulator, http://www.fairchildsemi.com/ds/ka%2fka7805.pdf [9] Fairchild Semiconductor, BC556/557/558/559/560, http://www.fairchildsemi.com/ds/bc/bc557.pdf [10] Fairchild Semiconductor, 6-Pin Dip Random-Phase Optoisolators Triac Driver Output, http://www.fairchildsemi.com/ds/mo/moc3020-m.pdf APPENDIX User manual: The following manual is for the remote buttons and their functions. Switch 1: To switch ON the first load. Switch 2: To switch ON the second load. Switch 3: To switch OFF the first load. Switch 4: To switch OFF the second load. Volume up: To increase the intensity of the first load. Volume down: To increase the intensity of the second load Channel up: To decrease the intensity of the first load. Channel down: To decrease the intensity of the second load. The following is the manual for computer control. 1: To switch ON the first load. 2: To switch ON the second load. 3: To switch OFF the first load. 4: To switch OFF the second load. 5: To increase the intensity of the first load. 6: To increase the intensity of the second load 7: To decrease the intensity of the first load. 8: To decrease the intensity of the second load. 13