Wednesday, September 1, 2010

Intelligent Automation to Home Appliances (2007)

Intelligent Automation to Home Appliances (2007)  
Project Team: Chaitanya Rudra, G. Anil Kumar, D.SriVidya, T.Sri Devi 
Project guide:  Prof B.Kanta Rao 
Introduction: 
With the intelligent capabilities of the modern processors   at a cost effective price, such as 
HCS08, it is possible to provide plenty of features to any appliance to make it intelligent. It is 
easy to give intelligence to any device using the programmable features of a modern embedded 
processor 
 This project uses HCS08, to demonstrate way to make a single domestic appliance, “intelligent”. 
We convey by this that any appliance can be made self regulatory by a program present in the 
processor’s flash, such that it emulates all the qualities of a house wife expects  using the 
appliance in her daily  work relieving her of her routine chores. 
Intelligent systems:  
Intelligent systems are those which work mostly on their own with minimal human intervention 
and yet meeting the human requirement. They can be realized using microcontrollers. 
This project aims at making life easier for a householder, demonstrating a simple task 
implementation. 
How to control domestic appliances? 
A domestic appliance is chosen for the project since such appliances are used every day in most 
families. The main functions of almost all the domestic appliances used by the householders 
include: 
1) Starting / stopping a system 
2)  Increasing the speed(or brightness) 
3) Decreasing the speed(or brightness) 
4) Timing the events  
5) Sensing and measuring          
Such a device will do the task to suit the user defined conveniences. 



Need for controlling domestic appliances automatically: 
The prime requirement is to make life more easier, safer and cheaper for  a householder.  For 
example a person on entering a room need not feel the hassle of operating the regulators to 
modulate the lighting systems or the fans for regulating the air movement.  Similarly a housewife 
can be relived of the ennui of operating the stove knobs for regulating the intensity of flame. 
Let us consider some devices and see how automation is useful in our day to  day life:     
We use various utensils for boiling milk, cooking rice etc., in our houses.  If we take the case of 
boiling of milk, one needs to watch constantly to avoid overflowing of milk. 
Speaking about a pressure cooker, its general functioning is that once the cooker is mounted on 
the stove and flame is provided with certain intensity, it gets heated and thus pressure builds up. 
After observing the necessary indications like hissing of steam, the housewife turns off the gas 
stove. In most cases, households put the flame at low intensity, so that the householder can gain 
time to attend to other activities, simultaneously. This consumes both time and gas. Automation 
can optimize the operation without the need for constant attendance on the cook up. 
Let’s consider one more example, with respect to modulation of lighting. Instead of using lights 
with different intensities for performing various activities (like bright lights for reading, dim 
lights as bed lights…) we can use a single light per room with intensity control which is easily 
achievable through control of voltage by pulse width modulation. A number of power wastes can 
be switched by TTL logic from a processor.  
These examples by no means comprehensive demonstrate that by providing a device for 
controlling the gas stove, increasing or decreasing the flame or intensity of a light with ease 
make the life of a householder very easy. That too if there is a single device which can control all 
these devices it would make the work of person efficient and one may devote to other activities. 
How our model outperforms : 
 The striking features of our model are: 
A single controller for almost all the devices. 
Using IR for transmission and reception which is of very low frequency [40 kHz]. 
On the whole it’s very cost effective.  
Can be easily attached to present devices with out much wiring. 
  Only restriction is that the central command processor must be in a line of sight of a 
vintage point in the house. 



Applications: 
The main aim of the model which we developed is to provide a flexible automation to the 
domestic appliances  
    These are the prominent applications: 
a) Flexibly automated control for gas stove to optimize gas usage. 
b) Controlling the intensity of light (power saving). 
c) Regulating the speed of fans and mixers (Adds to convenience).   

 Implementation: 
In the current model we are showing only one device, a gas stove controller. But it can be easily 
extended to as many devices as required for a normal householder, and can add many new 
features to this existing mode by adding program only-no additional hardware. 
the entire system can be classified into 3 main blocks 
i) A centralized remote controller for all the devices. An IR module(hand held 
ii) A centralized receiver for all the devices).[Central Command Processing unit] 
iii) A controller for each of the devices (like light or gas stove etc.)[A device controller] 
Now we present a brief description of each of the blocks in the model: 
1) The centralized remote controller: 
The device selected by a single push button, only to make it simple pressing the key once 
twice or thrice and select devices. Besides this, a thumb wheel of the type used in 
electronic mouse models is incorporated. This module has direction sensing logic to 
identify the wheel motion direction. The wheel motion conveys to the device to either 
increase a parameter or decrease it. 
    A press of the thumb wheel, depresses a key informing the central station of the 
selection, device, direction and speed (for such devices), suitable LED displays the status 
of the device selection and operate. This hand held module is self contained with its own 
processor (HCS08 in this project) a built in regulator, and a 9V battery. A separate 3.3V 
regulator is provided to supply power to the unit. 
   A standard infrared transmitter is driven by CPU, along with code for each device. The 
selected device identified by a green LED currently no display is provided since MISO is 
not used in the current model. The central control station is only one and has to be located 
in a centrally accessible location with in line of sight of the infrared command module. 
   The handheld control module handles the IR transmission using 38 KHz, using the    
processor to generate the frequency as well as the commands using the pulse width 
modulation using SONY encryption code. 
The block diagram of handheld IR Transmitter is as follows 

    The major functions of our remote: 
a) Get the input from the user about the device to be selected 
b) Get the input from user about clockwise or anti-clockwise motion of the knob of gas 
stove 
c) Form a meaningful data from the user given inputs, and transmit it to the receiver. 
For the above functionalities we have provided the remote with the components as listed 
below: 
a) A button: 
 Button is provided to select a device. Generally in any of  remote operating appliances  
we find buttons  to control  a device .   To make it simple and easy we used only a 
single button to select up to about 3 devices. For example: 
1) A single click on the button would select the gas-stove. 
2) Double  click would  select light 
Also by using a single button we have greatly reduced the space cost and confusion to the 
user, we reduced the number for I/O pins used and also reduced the programming logic 
used for the remote control. According to the device selected a 2 bit code is generated 
which is sent to receiver through the IR transmitter. 
b) LEDs: 
     We have provided up to three LEDs on the panel of the remote. The purpose being, 
to indicate the device selected. Since we provided a single button for selection of all 
the 3 devices we provided an indication through the LEDs for the device selected.  

c) Roller:  
    We used a roller ---one similar to the wheel used in the wheeled mouse. It can be 
rolled forward or backward according to which we modulate the speed or intensity or 
direction of the mechanical devices (like gas stove) .  
 According to the movement of the roller (forward or backward) and the number 
of rotations moved (in either direction) we prepare the data which is to be transmitted 
to the device under control. 

d) Infra Red Transmitter

A command is transmitted by the IR Transmitter using PWM code using SONY 
Encoding protocol. 
    We have used a 8 bit code which gives details about the direction and the amount of 
rotation of the gas stove knob 
For example: 

  
  
                Device               direction                 Speed of rotation 

    The IR transmitter is the main advantage of the system, reason being low frequency 
transmission. Thus it makes the entire system cost effective. 
Also the design becomes simpler and is easy to use. 
    For the transmission of the data using the IR transmitter we have used Pulse Width 
Modulation.  0’s and 1’s were represented using different time periods 
The start bit is also differentiated from the data using PWM. 
So the data which is being sent out from the transmitter is of the following form: 
   
                   Sync  pulse                    data  
Where each one and zero in the data is represented as follows 
   0    1    0    1    0    0    1    1 
 1  1  1  1    1 1 1 1 0 1 0 1 0 0 1 1 

                              
                     􏰀 for zero 
                           T    2 T 
                     
                              
                      􏰀for one 


                         

 􏰀sync pulse 
Using a 38 carrier frequency for which many receiving devices are commercially 
available, we modulated the PWM bit pattern at 38 kHz. The data received is then 
processed by the CPU to decode the command. 




The design aspects of the circuits and other details are provided in further sections . 

2) The centralized Receiver: 

            The system is configured with the following blocks first a brief description of the 
block is presented, followed by a detailed block diagram.  

      We have provided a single centralized receiver called ‘CENTRA COMMAND 
PROCESSOR’ which receives the data from the remote control module.  A centralized 
receiver is provided instead of a providing receiver for each device.  By doing so we are 
making use of one of the excellent features provided by this processor, i.e. the SPI bus. 

 This system is configured to handle 3 external devices in the preliminary model. The 
device handling is implemented using an infra red pulse width modulated code 
encryption to send commands to a central control system. The control station receives the 
infrared data, decodes it to an 8bit command by a central processor in the control station. 
The control station then transmits the 8bit data using SPI bus.  By just using the 2 lines 
(SS for slave select and MOSI for master out slave in) of the SPI bus we can control as 
many as 128 devices connected serially through the same bus. In the preliminary version 
one master controls the slaves, using MOSI (Master out Slave In) commands. No return 
information is expected in the preliminary prototype. Time constraint presented to 
incorporate reception of intelligent information back to the command module. It is 
possible to receive temperature, pressure, speed, voltage etc information in subsequent 
models. Each device is identified by a device code (3 bit only) in the model making it 
possible to select 8 devices. The central control system keeps waiting for infrared 
commands and translates them to the devices selected. The slave select code is dispatched 
by the master 
      


The block diagram of Central Command Station is as follows 


The functioning of the above system can be divided into the following main blocks: 
     a)  An Infra Red Receiver: 
  We have used an IR receiver 1738 which operates at 38 KHz frequency. That     is 
it can demodulate a data which is sent at 38 KHz carrier frequency. 
             One common problem encountered during the IR reception of data is that we don’t 
exactly get the same data which has been transmitted. So we used fuzzy logic on the 
received data. We provided a tolerance that is a range of values for both one and zero 
detection instead of taking the exact values as received. The received pulse widths are 
adjusted (corrected) to within a range of values, instead of a fixed width. 
         For example  
          a) If the bit 1 has time period of 2.65ms we considered all the bits from                                                         
                              2ms to 3ms as bit 1 
b) Similarly for bit 0 if the time period is 930µs we considered all the data             
in range of 900µs to 1000µs as bit 0  

2) Transmission of the data from the receiver to the appliances: 
                   For this purpose we have used the SPI bus in the processor. The programming logic 
helps in identifying the device which is to be controlled by getting the first 2 bits of the data . 
For example: 

  
  
                device               direction                 Speed of rotation 

Bits 7; 6 = Identify device to be selected [4 max] 
Bits 5; 4 = Direction of activity [2] 
Bits 0-3= Speed value[16] 
 00􏰀no action 
 01􏰀gas stove controller 
 10􏰀light controller 
11􏰀no action [currently] 
After getting this information the processor comes to know which device is to be selected and 
then accordingly, using a multiplexer, the processor asserts the SS’ pin low for the required 
device. Now using the MOSI pin the required data for the motion of the device (i.e., the next 6 
bits of the data received) can be sent to that particular device. 
    Once the data is sent to the proper device, the receiver again starts waiting for the next chunk 
of data to be obtained from the remote. 
The block diagram, circuits and other design details of the receiver are provided in further 
section. 
3) End device controller 
 The central command station is connected to the controlled device by an SPI. The SPI bus is 
selected for its simplicity and cost effectiveness. We did not prefer wireless for these reasons 
1. electromagnetic interference problems 
   0    1    0    1    0    0    1    1 
2. possible error in operation when other electronic units are in operation 

Gas stove control:  
            We have developed our model for a gas stove controller alone because of time constraint 
which has many functions to be performed—some of which are automated and others which are 
regulated through the remote by the user. This device is designed to control the gas flow in a 
standard kitchen gas stove. Extreme care is taken in the implementation not to handle gas control 
directly. Instead the standard knob which the house wife uses is removed, and the standard shaft 
is controlled by our module, to rotate in either direction. The module is self contained and can be 
attached or detached easily by a magnetic hold to the stove frame. For aluminum and other stove 
bases, suitable modifications can be easily adopted 
The block diagram for Remote device: Gas stove control 

                     
We briefly list the exact functions which our device helps in providing to the gas stove 
controller: 
1)  User controlled (through remote): 
     1.1) the reset device resets to zero state, switching off any gas flow. A buzzer will indicate the 
status 

    1.2) Given command, the shaft is rotated by the stepper, obtaining direction from the thumb 
wheel. In the model the gas has to be lighted manually                  -This is done from safety from 
of view 
      1.2.1)  Setting the forward or backward movement of the knob. 
       1.2.2)  Rotating the knob for required amount of time(in either direction). 
2)  Automated (which the processor automatically does): 
      2.1) Using a thermistor and other semiconductor temperature sensors, we can capture the 
heat of the pressure cooker. By quickly heating up the cold vessel and then reduce the gas while 
pressure is building up will optimize the gas. 
      2.2) A condenser microphone with requisite hiss filter is provided to identify the pressure 
cooker status to automatically reduce the gas flow on first ‘hiss’ .Thus reducing the heating cycle 
and a subsequent ‘hiss’ the gas will be turned off automatically. 

Timer provision also could be made in this model. 
The hardware implementation for the above system includes the following in addition to the 
HCS08 processor: 
A stepper motor: 
              We have used a stepper motor which is attached to the knob through a shaft. We 
provided a gear system to rotate the shaft and thus we can rotate the knob of gas stove. We 
have used a stepper motor (instead of a DC motor ) because we have the control over the 
number of steps which it is moving and thus can control the rotation of the motor (number of 
degrees) .We have also made dc controlled devices but later rejected it. 
We can exactly rotate the knob to the extent that we desire. The logic being increase of the 
no of steps in the program controls the stepper motor. The system operates on 5/9v supply, 
preferably by a built in battery pack to avoid any electrical hazard. 

A thermistor/Semiconductor sensors:    
         We provided a thermistor attached to the cooker to capture the heat of the pressure 
cooker. The processor is provided with comparator. We can use comparator reference level 
to trigger a gas control. We can set a temperature level (which we  consider as the maximum 
heating level) and heat the  cooker quickly  up to that temperature and then provide a low 
flame, by automatically moving the knob. 
  
Lighting control 
For the light intensity control the main principle is to control the voltage which is being 
given to the lighting device.This can also be done using the SPI bus of the processor, 
along with many lighting control devices that are readily available. 
Since there is not many functions to be performed in this case, we need not have a 
controller. Instead we can just have a “shift register” and send the data from the SPI bus 
to that register which in turn is connected to the light and drives the h/w providing the 
voltage to the lighting device  
Shortcomings of the prototype model and its reasons: 
As the total duration of the project was very short, we have developed a model of a gas 
stove controller only, due to time and other constraints. 
For IR transmission we had to generate 38 KHz frequency, which we generated using the 
TIMER / PULSE WIDTH MODULATION feature of HCS08.But the output obtained 
from the chip was a triangular wave with 38 kHz frequency which was unacceptable to 
transmit.  We had to reshape by Schmidt trigger. Instead we could have built a simple 
Schmidt oscillator instead of CPU as source. But we made all attempts to use the CPU 
only for it. This wasted out time 
In order to set the IR sender and receiver at the same frequency we set both  the internal 
oscillators at same frequency using  registers ICSC1 and ICSC2.But it was observed that 
code warrior was unable to communicate with processor due to some reason which was 
not clearly mentioned. Without making the processors run at same frequencies we could 
not obtain the data transmitted at the receiving edge. Due to this problem we were unable 
to debug the receiver. 
In the CodeWarrior, SPI module was not explained clearly. The SPID memory block was 
not shown at sender’s end. Also the help files in the Code Warrior were misleading 
regarding SPI module. This caused us a lot of confusion and wastage of time. We were 
stuck at this problem till we connected both the processors and had seen the data transfer. 
Better explanation of Hi-Ware and Hi-Top tools is required in the help files. 
Errors information in CodeWarrior can be improved. 


Further Implementations: 
System can be expanded to more number of devices controlling almost all the electronic 
and electrical devices used in home appliances at minimum cost. Apart from that 
intelligence could be provided to individual devices since the controlling modules are 
separate. Development is much easier as the system is modular and each component can 
be improved further. With minimum installation efforts all the present devices can be 
used making a totally automated home.     
             


     
Contact Address: Chaitanya Rudra; 
                           
                          Email: chaitu_rudra@yahoo.co.in 

No comments:

Post a Comment