Control of Light and Fan with Whistle and Clap Sounds

Please download to get full document.

View again

of 15
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Document Description
Control of Light and Fan with Whistle and Clap Sounds
Document Share
Document Tags
Document Transcript
   1EE389 EDL Report, Department of Electrical Engineering, IIT Bombay, November 2004 Control of Light and Fan with Whistle and Clap Sounds Kashinath Murmu(01D07038) Ravi Sonkar(01D07040) Group: D13 Supervisor : Prof.P.C.Pandey  Abstract  - We present an approach to control the household electrical devices like room light or fan in a room environment using whistle and clap. There are many alternative techniques to remotely control electrical devices in room environment such as using a TV remote control or speech recognition techniques etc. But our approach is the most cost effective. Though this product is aimed at physically challenged user, it has universal appeal as a comfortable way to control the room environment. We have designed microcontroller based circuits to detect clap and whistle against other sounds and are controlling the intensity of the load using a microcontroller based triac drive and a specific code. I. Introduction In this project our objective was to control the intensity of a load (light bulb etc.) using whistle and clap sounds. Whistle and clap is detected using a condenser microphone. Output of the microphone when whistle is detected is a sine wave. While for the clap there is one very high amplitude peak/trough which occurs at a very high frequency which is followed by another peak in the opposite direction. After the initial peak(s) there is a continuation of the wave at a much lower amplitude which oscillates around the base level decreasing in amplitude until base level is reached as shown in Figure.1. To give output of the whistle to the microcontroller as an input, we have designed a hardware for generating a positive pulse as long as whistle is blown. For the clap, the envelope of its output is detected and its decay time is converted to a pulse and then fed to the microcontroller. Intensity of the light bulb is controlled using a triac, which is activated when a pulse is applied to its gate terminal. The pulses are generated after detecting the zero crossings of 50   Hz sine wave of power supply. Different delay is generated according to a predefined code when different combination of clap or whistle is detected. Figure.1. Typical Clap Waveform   2  II. Design    A. Code Development 1)Clap:   From the users’ point of view for the ease of use and implementation and for avoiding noise, we detect only two claps separated by some specific interclap time. For the purpose of varying intensity, detected clap is classified as short clap  and long clap . The short clap is characterized by interclap time which is less than 0.5s while for the long clap the interclap time is greater than 0.5s but less than 1.5s. So according to this scheme wee have designed the code as below short clap = ON and increase intensity long clap = Decrease intensity and OFF 2)Whistle:    According to the length for which the whistle is blown, it can be classified as long or short. We have defined whistle blown for one second or lower as short whistle and for greater than one second as long whistle. So according to the above scheme, we have designed the following code. Short Whistle = ON and increase intensity Long Whistle = Decrease intensity and OFF  B. Hardware Design Our hardware consists of four major block. 1) Power Supply: The external power supply for our product is 230V AC supply and for our internal circuit to work we need a voltage range of -5V to +5V. So the need is to design a circuit which can give us output in the form of fix dc voltage which we want to use as Vcc, -Vcc and ground in our internal circuits, taking input as mains (230V AC). We want this fix dc voltage for both positive and negative half cycle of AC. An idea is to invert negative cycle of AC to positive which leads us to think of some rectifier circuits From our initial experiments we are already familiar with some regulator chips available which give some constant dc voltage if we increase or decrease voltage after a certain threshold voltage. These are some basics which leads us to think of a design using transformer, rectifier circuit and regulator chip. Figure. 2. Block Diagram of Power supply circuit   3 Description of circuit function:   For generating power supply for the circuit we used a transformer, bridge rectifier and regulator. We need +5Vand ground for our circuit to work. The central tap of the transformer is connected as ground in our circuit. Bridge rectifier works in both positive and negative half cycle. Output from bridge rectifier given to the regulator which gives us the required output. When we increase input of the regulator from 0V after a threshold value of input, voltage output of regulator is a constant voltage which we are using as the power supply of our circuit. Transformer: We are using 9-0-9V transformer in our circuit. The need of transformer is to convert ac mains to 9V. Vcc for our internal circuit is +5V and regulator chip we want to use has its threshold of 5.5V. So 9V transformer after rectifier circuit gives value above the threshold of regulator. We can also use some higher value voltage transformer but we are not going for this option because we are also using output of transformer to a voltage comparator after attenuating it through voltage divider. Bridge Rectifier: Figure. 3. Bridge Rectifier  A bridge rectifier makes use of four diodes in a bridge arrangement to achieve full-wave rectification. The positive potential at point C will forward bias D2 and reverse bias D1.The negative potential at point D will forward bias D3 and reverse bias D4. At this time D3 and D2 are forward biased and will allow current flow to pass through them; D4 and D1 are reverse biased and will block current flow. Regulator: we need +5V and -5V as Vcc and -Vcc for our internal circuit to work. Regulator 7805 gives constant +5V dc as output for every input voltage greater than a threshold voltage value. Same is for regulator 2 (7905) which gives constant -5V dc as output.   2)Triac Drive:   The requirement is microcontroller based clap and whistle detector and according to this detection we need to control the intensity and switch on or off electrical devices using triac drive. For triac to activate, we need to give a trigger pulse to GATE of the Triac. We are controlling the intensity by generating this pulse at different delays. A buffer circuit is also required between microcontroller and triac for protecting microcontroller chip (to take care of sink current in microcontroller chip pin).   4  Figure 4. Triac Drive Description of circuit function: Triac trigger from microcontroller given to buffer circuit as input .Output of this buffer circuit is given to gate of triac. This circuit takes care of sink current in microcontroller pin. Triac is connected with load and mains. So it is necessary to protect the microcontroller. We have used two transistors Q1(pnp) and Q2(npn) in the buffer circuit.Q2 is connected as noninverting configuration and Q1 as follower. So output is same pulses as the input with little attenuation. Triac: It is a three terminal device for controlling current in either direction. Triac controls and conducts current flow during both alternations of an AC cycle, instead of only one. Minimum holding current must be maintained in order to keep a triac conducting. Triac input output shown in Figure 4 with triac trigger pulse. Figure.5.Triac Output   5   Triac used- BTA06(600B) Description: Suitable for AC switching operation the BTA06 series can be used as an ON/ OFF function in applications such as static relays, heating regulation, induction motor starting circuits or for phase control in light dimmers, motor speed controller Specifications : V(T)= 1.55V (max) I(GT)= gate trigger current =50mA(max)  Average gate power =1W  Average gate current =4A Microcontroller based Triac trigger : To generate trigger pulse we are converting 50Hz sine wave to a square wave of 5V peak by passing sine wave to comparator. From this square wave by microcontroller program we are generating a small trigger pulse after some delay from zero crossing point of sine wave. By varying this delay we change the position of trigger pulse with respect to zero crossing point of  AC signal. Zero crossing detector(comparator): Out put square wave signal of same frequency as AC signal given as input to microcontroller which uses this square wave to generate triac trigger pulse but because of some loading we have earlier given it through buffer which is working fine. Now this comparator is replaced by the inbuilt analog comparator of the microcontroller. Output of this comparator is now internally used by our program. Input to this comparator is attenuated (by voltage divider) output of transformer and inverting terminal of comparator is connected to ground . Figure. 6.Microcontroller based triac trigger Voltage divider: Using 1K and 100 ohm in series and taking output across 100 ohm. This output is used as input to our comparator. As we can give max Vcc as input to comparator of 89C2051(microcontroller) and if we want to use AC signal of transformer we need to attenuate it, So for 1V as input to comparator and current( i  ) 10mA we used the above resistor values. Current i   also takes care of power rating of resistors used.
Similar documents
View more...
Search Related
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks