You are on page 1of 6

Microprocessors Lab Mini-Project Report

House Automation

Team members:Ashwin XXX Karthik XXX Kishan XXX

Introduction:
The process of automation involves the removal of a significant portion of manual work in a process through the use of technology. Most modern factories are automated today. The concept of ‘house automation’ was developed only over the last one decade. The implementation of the automation process is quite expensive and hence this can be seen mostly in luxury homes and offices. Our project is an effort to demonstrate the house automation process on a small scale.

Features:

The entire automation of the house is controlled through a single ‘control panel’. The automation can be switched off if required. The water pump for the house can be configured to automatically switch on when the water tank is empty and switch off when the tank is full. The devices that switch on and off when a person enters and leaves the room can be chosen – the options provided are fan, lights and air conditioning. A list if devices that are configured can be seen in the interactive configuration window.

• •

Design:
The Sensing Circuit: The sensing circuit is what helps detect the entrance/exit of a person into the room as well as when the water tank is empty/full. In this project, IR sensors have been used. A sensor pair consists of an IR emitter and an IR sensor. The IR sensor is a device whose resistance falls to a very low value when IR light falls on it. 2 sensor pairs are required for one room and 2 are required for the water tank. For a room, 2 sensor pairs are placed a little before its entrance, with a distance of approximately 1 metre between the 2 sensor pairs. The order in which a person blocks the sensors determines whether he/she is
1)

entering or leaving the room. In the case of the water tank, a parallel, thin and transparent cylinder is connected to the tank at the top and the bottom. The water level in the cylinder will be the same as that in the tank. A solid stick of diameter less than that of the cylinder and density less than that of water is put in the cylinder. The 2 sensor pairs are positioned along the cylinder such that when the tank is empty both sensors are not blocked and when the tank is full both sensors are blocked. The Control Device – The Microcontroller (LPC 2148): Using an input device (a keypad), the device is configured. The configuration involves choosing which devices are under automatic use. The inputs from the sensor circuits are received through the GPIO pins of the microcontroller. The outputs from the microcontroller are sent through GPIO pins as well. In the case of the water pump, when both sensors are not blocked, it means that the tank is empty and the control signal for switching on the water pump is enabled (the pump is switched on). When both sensors are blocked, it means that the tank is full and the control signal for switching on the water pump is disabled (the pump is switched off). In the case of a room, when the sensor away from the room’s entrance is blocked first and then the second sensor is blocked, it means that a person is entering the room and the room’s people-counter (a counter that keeps track of the number of people in the room) is incremented. In case the room’s people counter has a positive value, the devices under automatic use in the room are switched on. When the sensors are blocked in opposite order, it means that a person is leaving the room and the room’s people-counter is decremented. In case the room’s people counter has value equal to zero, the devices under automatic use in the room are switched off. The switching on and off of the devices are through enabling and disabling appropriate control signals.
2)

The Output Driving Circuit: The devices run on 230V, 50 Hz AC signal (and a current of 5A or higher in case of the air conditioning and the water pump). The output voltage from the GPIO pins of the LPC 2148 is only 3.3 V DC. Therefore the output has to be used to control the switching on and off of the devices (rather than the devices getting the power required from the microcontroller itself). This is accomplished by using a relay-based switching system. In this system, the control signal to
3)

the relay is the output from a 555 timer. The input to the 555 timer is output from the microcontroller’s GPIO pins. When the output signal is low, the devices are switched on and when it is high, the devices are switched off. The 555 timer (used as a Schmitt trigger because all pins do not have a constant 3.3 V or 0 V, they vary and the Schmitt trigger removes these variations) is used to source the current required to drive the relay.

Salient aspects of the logic and code:

The code uses UART (Universal Asynchronous Receiver and Transmitter) for the purpose of showing the interactive configuration menu as well as to receive the user inputs. The method of receiving the sensor inputs is by polling. Since many clock cycles elapse while a sensor is blocked (and therefore many samples are taken), a logic has been developed so that only the first sample is taken. Once a sequence of entrance/exit is completed, the room’s people counter is incremented/decremented and the sample counters of the sensors are reset to zero. LEDs on the microcontroller also serve to indicate whether a device is switched on. The entire system for inputs and outputs is configured active-low.

Usage:
1.

The home screen is the configuration window. There are 3 options here which allow the user to configure the devices, check the status of devices and to set the device ready for use. On choosing option 1 in the home screen, the device configuration screen appears in which there are 3 options – choose to automate the room’s devices, pump or exit. On choosing option 1 or 2, the device is listed and if it is to be automated ‘1’ is entered, else ‘0’ is entered. When option 3 (exit) is chosen, the home screen appears. If option 2 (show the status of devices) is selected, the status of devices is displayed and the home screen appears once again. When option 3 is chosen in the home screen the device is ready for use.

2.

3.

4.

5.

Additional features that may be incorporated:

Our project was done on a small scale but with more skill and expertise we could include the following features:
1. 2.

More rooms of the house may be included for automation. Using a temperature and humidity sensor, the air conditioning could be configured such that it automatically switches on/off when the room’s temperature and humidity fall/rise below/above a set level. The garage doors may be configured to automatically open when a car enters the gate and close when the car is properly parked in the garage. The number of people in the different rooms can be displayed in the ‘control panel’.

3.

4.