Translate

Saturday, 1 March 2014

Room Management System - Introduction


What is it supposed to do:
Just imagine, you come home, open the door and the light in the corridor come on without you having to look for a switch. You walk into the bathroom, again the light comes on just by itself and again, they switch of just a minute after you have left the room. The same in every room you go until you are finally tired and end up in your bedroom – the lights go on but now I'd like to sleep. I've thought of that. One button, one touch and the lights go off and wont come back on until it is pressed again. What is with with other lights like reading lights or bed side lights? No problem, they are on a separate circuit controlled by a master relay which is linked to a read switch in the main door. Soon as the main door is opened, the system checks for movement in the Apartment and if non is detected with in a preprogrammed time everything will switch off. System Error, well, just in case there was somebody left sleeping in a room and the system did for some reason not detect the presence of a person, ore somebody was staying on the terrace, taking care of the barbecue the master relay will switch on again with the first personal detection in any room. Since the hole system is planed for exclusive hotel rooms, the AC will switch off if a terrace door is opened for more than a preprogrammed time period and with the master relay.


Lets do some planing:

We want the system to work for:
3 Bedrooms
1 Living room
4 Bathrooms
1 Kitchen
1 Corridor
4 AC – units
All together we like to control the lights of 10 rooms and the AC's of 4 sections. In our case we have the 3 bedrooms and since it is a open plan living area with kitchen included, we need only 1 AC unit for kitchen and living area.

What do we need:
First thing is a Arduino board to control everything. I am using a Arduino Uno with a At-mega 328 microprocessor. In practical use the sensors to check up on personal presence in a room would be common motion sensors with a separate power supply, controlling a internal switch witch is normally open and closes soon as motion is sensed. In our project I am using normal push buttons for demonstration. Depending on the layout and the size of the room and also the specification of the used sensors we need to plan for up to 3 sensors in a big room . A normal sized bathroom with no hidden niches can be easily controlled by a single PIR.
Let's plan with push buttons for the demonstration part of the project.
We have 10 rooms, meaning, we need one input channel for each room. One extra input channel is needed for every bedroom or every room which can be converted to a sleeping area to place a push button for a “Priority Off” control. In our case we have 3 bedrooms, meaning another 3 input channels making a total of 13. Another input is needed for the read switch on the main door now counting up to 14 input channels. Further 4 channels are needed for the read switches of the AC units, making it 18 input channels.

Lets look at our input stage:

Since the Arduino Uno only has 14 Digital inputs and the first two (pin 0 and pin 1) are also reserved for serial communication which I would like to keep free for further development leaving us with only 12 input channels. To get over this little problem we will be using shift registers to expand the inputs by 8 channels per shift register using only 3 Arduino pins. A great tutorial how shift registers work and the Arduino shift in function which we will be using in this project you find at http://www.arduino.cc/en/Tutorial/ShiftIn#.UxDnbc6jJkg

To start our demo project we need:
3 full sized breadboards
18 push buttons for breadboard mount
24 10 K resistors 1/8 W
3 shift registers CD4021B
plenty of wires for the connections

Time to go shopping before we start building....




No comments:

Post a Comment