Procedures/Methods

2.1 Equipment 




2.2 Diagrams


Exterior view of house

Fig. 22: 1st Exterior view of virtual house

Fig. 23: 1st Exterior view of real house

Fig. 24: 2nd Exterior view of virtual house

Fig. 25: 2nd Exterior view of real house

Fig. 26: 3rd Exterior view of virtual house

Fig. 27: 3rd Exterior view of real house

Fig. 28: 4th Exterior view of virtual house

Fig. 29: 4th Exterior view of real house

Interior view of house


Fig. 30: Interior view of virtual house

Fig. 31: Interior view of real house

Brain of automation system

Fig. 32: Virtual view of the brain of automation system (Arduino, relay switch, breadboard, e.t.c)

Fig. 33: Real view of the brain of automation system (Arduino, relay switch, breadboard, e.t.c)

Sensors of automation system

Fig. 34: Virtual Light dependent resistor

Fig. 35: Real Light dependent resistor

Fig. 36: Virtual Temperature Sensor

Fig. 37: Real Temperature Sensor

Fig. 38: Virtual Rain Sensor

Fig. 39: Real Rain Sensor

Electrical appliances controlled by the automation system



Fig. 40: Virtual LED Lamp



Fig. 41: Real LED Lamp


Fig. 42: Virtual Paper Air-conditioner

Fig. 43: Real Paper Air-conditioner

Fig. 44: Virtual automatic window

Fig. 45: Real automatic window

Electrical generator (Solar Panel)

Fig. 46: Virtual Solar Panel

Fig. 47: Real Solar Panel


Circuit diagram of how everything is connected

Fig. 48: Circuit Diagram

Programming Codes




Fig. 49: Programme code


2.3 Procedures


Hardware (construction of house/systems):


Position and fit house to desired position and size:



1• Flip house and let it lie on one of its side.
2• Remove the cover.
3• The side with the opened hole as there is no more cover is the back part of the house.
4• The opposite side is the front side of the house.
5• Using a hammer, knock off stilts at the bottom of the crate (now the front side of the house).
6• Using pliers, pull out the nails.
7• On the right side of the house, when looking from top view, hot glue a piece of wood of 5mm, after cutting it out, with its dimensions being 10 cm x 63cm). This would be the shelf for sensors.

Door:



1• Cut a 2mm thick acrylic piece of its dimensions being 15 cm in breadth, and 25cm in length using the heavy duty plastic cutter and a metal ruler.
2• On the front side of the crate, 5cm above the base and 10cm away from the right corner of the crate, cut a rectangular hole of dimensions being 15 cm in breadth, and 25cm in  length using the Jig Saw.
3• Position two hinges at the two extreme ends of the length of the cutout hole, on the right side, with the pivoting piece being allowed to move. (With the hinge on the outside of the crate)
4• Using a hand drill, drill the holes on the wood where there are holes on the hinges.
5• Position the acrylic piece such that it pressed against the wood, with the hinges’ pivoting piece on top of the acrylic piece.
6• Where the  holes of the pivoting piece of the hinges lie over the acrylic, mark out the holes on the acrylic and drill.
7• Attach the hinges to the crate first by using the longer screw (7cm in length). Place the screws into the holes of the hinge. Behind the hinges where the screws emerge from, place 2 washers for each screw.
8• Press the screws with the hinges onto the crate, making sure that all screws are poked into the crate. Behind the wood of the crate, place a washer each, followed by a nut.
9• Using a screwdriver compatible with the screws used, turn the screws, while using a plier to hold the nuts in place.
10• Tighten the screws.
11• Attach the hinges to the cut out acrylic by using the shorter screw (3cm in length). Place the screws into the holes of the hinges.
12• Press the screws with the hinges onto the crate, making sure that all screws are poked past the acrylic piece. Behind the acrylic, place a washer each, followed by a nut.
13• Using a screwdriver compatible with the screws used, turn the screws, while using a plier to hold the nuts in place.
14• Tighten the screws.


Window above the door:



1• Cut a 2mm thick acrylic piece of its dimensions being 15 cm in breadth, and 15cm in  length using the heavy duty plastic cutter and a metal ruler.
2• On the front side of the crate, 1cm above the door and 10cm away from the right corner of the crate, cut a square hole of dimensions being 15 cm in breadth, and 15cm in  length using the Jig Saw.
3• Position a hinge at the middle of the length of the cutout hole, on the right side, with the pivoting piece being allowed to move. (With the hinge on the outside of the crate)
4• Using a hand drill, drill the holes on the wood where there are holes on the hinge.
5• Position the acrylic piece such that it pressed against the wood, with the hinge’s pivoting piece on top of the acrylic piece.
6• Where the holes of the pivoting piece of the hinge lie over the acrylic, mark out the holes on the acrylic and drill.
7• Attach the hinges to the crate first by using the longer screw (7cm in length). Place the screws into the holes of the hinge. Behind the hinges where the screws emerge from, place 2 washers for each screw.
8• Press the screws with the hinges onto the crate, making sure that all screws are poked into the crate. Behind the wood of the crate, place a washer each, followed by a nut.
9• Using a screwdriver compatible with the screws used, turn the screws, while using a plier to hold the nuts in place.
10• Tighten the screws.
11• Attach the hinge to the cut out acrylic by using the shorter screw (3cm in length). Place the screws into the holes of the hinge.
12• Press the screws with the hinges onto the crate, making sure that all screws are poked past the acrylic piece. Behind the acrylic, place a washer each, followed by a nut.
13• Using a screwdriver compatible with the screws used, turn the screws, while using a plier to hold the nuts in place.
14• Tighten the screws.
15• Cut a 2mm thick acrylic piece of its dimensions being 3 cm in breadth, and 15cm in  length using the heavy duty plastic cutter and a metal ruler. This is the ledge of the window.
16• Place this piece on top of the window, with its length lined along the length of the window.


Door for interaction between real human and interior of house:




1• Cut a 2mm thick acrylic piece of its dimensions being 63 cm in breadth, and 63cm in length using the heavy duty plastic cutter and a metal ruler.
2• Position two hinges at the two extreme ends of the length of the opened hole when the cover is removed, on the right side, with the pivoting piece being allowed to move. (With the hinge inside the crate, at a 90º angle when door is closed)
3• Using a hand drill, drill the holes on the wood where there are holes on the hinges.
4• Position the acrylic piece such that it pressed against the wood, with the hinges’ pivoting piece on top of the acrylic piece.
5• Where the  holes of the pivoting piece of the hinges lie over the acrylic, mark out the holes on the acrylic and drill.
6• Attach the hinges to the crate first by using the longer screw (7cm in length). Place the screws into the holes of the hinge. Behind the hinges where the screws emerge from, place 2 washers for each screw.
7• Press the screws with the hinges onto the crate, making sure that all screws are poked into the crate. Behind the wood of the crate, place a washer each, followed by a nut.
8• Using a screwdriver compatible with the screws used, turn the screws, while using a plier to hold the nuts in place.
9• Tighten the screws.
10• Attach the hinges to the cut out acrylic by using the shorter screw (3cm in length). Place the screws into the holes of the hinges.
12• Press the screws with the hinges onto the crate, making sure that all screws are poked past the acrylic piece. Behind the acrylic, place a washer each, followed by a nut.
12• Using a screwdriver compatible with the screws used, turn the screws, while using a plier to hold the nuts in place.
13• Tighten the screws.
14• At the areas where the acrylic comes into contact with wood when the door is closed, cut out and paste Velcro.


Window on door( for interaction between real human and interior of house):



1• Cut a 2mm thick acrylic piece of its dimensions being 15 cm in breadth, and 15cm in  length using the heavy duty plastic cutter, a metal ruler and a dremel, from the door.
2• On the acrylic door, directly at the same position as the window across it.
3• Position a hinge at the middle of the length of the cutout hole, on the left side, with the pivoting piece being allowed to move. (With the hinge on the outside of the crate)
4• Using a hand drill, drill the holes on the wood where there are holes on the hinge.
5• Position the acrylic piece such that it pressed against the acrylic door, with the hinge’s pivoting piece on top of the acrylic piece.
6• Where the holes of the pivoting piece of the hinge lie over the acrylic, mark out the holes on the acrylic and drill.
7• Attach the hinges to the crate first by using the shorter screw (3cm in length). Place the screws into the holes of the hinge. Behind the hinges where the screws emerge from, place 2 washers for each screw.
8• Press the screws with the hinges onto the crate, making sure that all screws are poked into the crate. Behind the acrylic door, place a washer each, followed by a nut.
9• Using a screwdriver compatible with the screws used, turn the screws, while using a plier to hold the nuts in place.
10• Tighten the screws.
11• Attach the hinge to the cut out acrylic by using the shorter screw (3cm in length). Place the screws into the holes of the hinge.
12• Press the screws with the hinges onto the crate, making sure that all screws are poked past the acrylic piece. Behind the acrylic, place a washer each, followed by a nut.
13• Using a screwdriver compatible with the screws used, turn the screws, while using a plier to hold the nuts in place.
14• Tighten the screws.
15• At the areas where the acrylic comes into contact with the acrylic door when the window is closed, cut out and paste Velcro.


Plastic shelter for house to allow collected rainwater to flow to a specific location for use:
1• Position an L plate on the middle of the shelf and use a hand drill to drill holes in the wood, where the holes on the L plate lie on the wood, with the back of the L plate facing the opposite side of the shelf
2• Press a longer screw through each hole on the wood and tighten them with a washer and a nut, using pliers and a screwdriver compatible with the screw.
3• Cut out a 2mm thick acrylic piece of dimensions being being  30cm in breadth, and 63cm in length using the heavy duty plastic cutter and a metal ruler.
4• Hot glue this piece of acrylic onto the L plate.
5• Hot glue 3 L plate onto the top of the house, with its back facing the back of the house, after positioning it equally along the back of the house.
6• Cut out 2 pieces of right angled triangular acrylic pieces (2mm in thickness), with its height being 30cm, and its length being 63cm.
7• Place one of these pieces against the back of the L plates places and hot glue it to fasten it at that position. Also hot glue where ever needed to secure the piece very well.
8• Cut out a 3mm thick acrylic piece of dimensions being being  63cm in breadth, and 75cm in length using the heavy duty plastic cutter and a metal ruler.
9• Hot glue this piece of acrylic, with its breadth hot glued on the length of the rectangular piece of acrylic, and its opposite breadth on the top of the house, at the opposite side from the shelf.
10• Position the second piece of triangular piece of acrylic, similar to the first.
11• Tape the part where the height of the triangular piece of the acrylic meet the breadth of the rectangular piece of acrylic using sellotape to act as a hinge.
12• Paste Velcro on the slanted piece of acrylic as well as the second triangular piece of acrylic where they both contact when the triangular piece of acrylic is closed.




Placement of Lamp:


1• Using the hand drill, drill a hole of 3cm in diameter in the middle of the top of the house.
2• Pass the light sensor’s wires through the hole from inside the house to outside the house.
3• Press the lamp against the top of the house, in the interior of the house and hot glue it to fasten it.


Mounting of servo onto window above door:


1• Using hot glue a servo onto the exterior part of the house, with its moving piece on the ledge of the window.


Making and mounting of Paper Air Conditioner:


1• On each breadth side of the plastics, translucent box, cut out a hole of 10cm x 10cm, with the hole starting from the bottom of the box.
2• Press a computer fan against each of these two square holes and fasten the computer fans down using hot glue,after making sure that they are facing the same direction.
3• Wrap each sponge with one wire mesh., leaving the smaller sides without wire mesh, and hot glue the ends of the wire mesh to prevent it from coming out.
4• Place both of these two sponges wrapped around with wire mesh, at the two extreme ends of the breadth of the box, in between both computer fans.
6• At the side of the crate where the shelf is attached to, as well as 4cm directly below the shelf and in the middle in terms of the shelf’s length, cut a square hole of dimensions being 10 cm in breadth, and 10cm in length using the Jig Saw.
7• Hot glue 2 L plates onto the crate on the left and right side of the cut out hole, at both extreme ends of the side, with its back facing one another.
8• Align the box of the paper air conditioner such that the 4 angles are able to contact the box.
9• Hot glue the angles to the box.
10• Directly above the box, on the edge of the shelf, hot glue a funnel, with the smaller hole facing down.
11• Stuff both rubber tubings up into the smaller hole of the funnel and hot glue them into place, as well as hot glue the air spaces in between the rubber tubings.
12• Bend each rubber tubing outwards such that they contact the wire mesh of each sponge.
13• Hot glue one rubber tubing to each sponge’s wire mesh.


Placement of LDR:


1• Using hot glue, hot glue the LDR to the shelf, with the sensor part facing upwards.


Placement of Temperature Sensor:


1• Using insulation tape, tape the wire part of the connect to the temperature sensor down, after positioning it in the house, on the interior side of the house connected to the shelf, and 30cm above the floor of the house, and 7cm away from the acrylic door.  



Making and mounting of Rain Sensor:


1• Hot glue a 1.5v D size battery holder onto the shelf, nearest towards the edge closest to the front of the house.
2• Place a 1.5v D size battery in it.
3• 5cm towards the left, away from the battery holder, hot glue a hinge to the shelf, with a piece of balsa wood beneath the hinge, with the hinge’s pivoting point as far out as possible from the length edge of the shelf.( The moving piece of the hinge must be able to droop down below the shelf.
4• Beneath the moving part of the hinge and on the edge of the shelf, hot glue a spring and make sure that the moving part of the hinge is supported slightly above a flat angle by the spring.
5• On top of the moving part of the spring, hot glue a bottle with its top half cut off, and a hole punctured beneath the bottle.
6• Below the moving part of the hinge, and as close to the front of the house as possible, and furthest out as possible, hot glue on a jumper wire’s tip, with the opther tip connected to the positive terminal of the battery holder.
7• Below the wire tip, hot glue an L plate on the edge of the shelf, with its flat part facing toward the wire tip.
8• Hot glue another jumper wire’s wire tip to the L plate, where, when the spring compresses, the wire tip on the hinge would contact the wire tip on the L plate.
9• Directly below the battery holder, below the shelf, make a box with L plate, by hot gluing 2 L plates against the crate and hot glue another 2 L plate with its back facing opposite sides of one another, each one on each L plate connected to the crate directly.
10• Use tape to cover the sides of the DIY ‘box’ to prevent light to enter/escape.
11• On the front of the box, use a piece of balsa wood as a cover and use sellotape to act as a hinge and fastener to allow it to be opened/closed for maintenance.
12• Tape a bulb holder in the ‘box’, with the bulb facing towards the balsa wood.
13• Poke a LDR through the balsa wood, with the light sensor part facing the light bulb.
14• Attach the other tip of the jumper wire to a terminal of the bulb holder and another jumper wire’s tip to the other terminal of the bulb holder, with the other tip to the other terminal of the battery holder.
15• Wire LDR to the arduino board.
16• Wire one pin of LDR to 10k resistor (that is then connected to the 5v rail) and output A2, the other to the ground of arduino.
17• Wire the right side of relay 2 input to ground and the left side of relay 2 to output port 8.


Electronics (placement of electronics components responsible for controlling the automation system as well as supplying electricity):


Battery, Solar Regulator, Solar Panel, Breadboard, Arduino and Relay board:
1• Add in the L plates (3 of them) into 2 sides at the corner and drill holes for screws to fit through the wood.
2• Screw in the L Plates and put the battery on top of the L plates.
3• Glue a piece of balsa wood with the same area as the base area of the solar regulator at the base of the regulator.
4• Glue the balsa, together with the solar regulator, onto the roof of the house.
5• Attach the solar panel at the top of the house (outside), nearer towards the shelf, using Epoxy.
6• Glue in the breadboard, arduino and relay board onto the side of the house.
7• After attaching the wires etc, tape the wires together.



Electronics (wiring and programming of the systems):



Main Electrical Components (solar panel, regulator, battery, down-stepper):


1• Connect a diode pointed away from the solar panel at the positive side of the solar panel.
2• Connect the solar panel to the solar regulator.
3• Connect the battery to the solar regulator at the battery input slot.
4• Connect two wires to the relay from the output side of the solar regulator.
5• Connect a 9V Battery to the arduino board via an adapter of the 9v battery adapter soldered onto the arduino power adapter.
6• Connect 12V to 6V down-stepper to the output of solar regulator.


Light Sensor:


1• Connect LED bulb to 12V Power source and one output slot of the relay.
2• Wire LDR to the arduino board.
3• Wire one pin of LDR to 10k resistor (that is then connected to the 5v rail) and output A2, the other to the ground of arduino.
4• Wire the right side of relay 2 input to ground and the left side of relay 2 to output port 7.


Temperature Sensor:


1• Wire middle pin of temperature sensor to output pin A0.
2• Wire the left pin to the 5v rail and the right pin to the ground.


Fan System


1• Wire the black pin to the red wire of the output from solar regulator.
2• Wire the red pin to the left side of the output of relay 1.
3• Wire the black wire of the output from solar regulator to the right side of the output of relay 1.
4• Wire arduino output pin 8 to the left side of the input of relay 1.
5• Wire right side of input of relay 1 to the ground of arduino.


Servo for Window


1• Wire the white pin to arduino output pin 9.
2• Wire the red pin to the positive side of the down-stepper.
3• Wire the black pin to the negative side of the down-stepper.


Rain Sensor


1• Wire one pin of LDR to 10k resistor (that is then connected to the 5v rail) and output A3, the other to the ground of arduino
2• Wire LDR to the arduino board.


Final Step for everything: Upload code to arduino board!


CODE:


const int temperaturePin = 0; //The temperature pin is input A0
const int sensorPin = 2; //The LDR pin for light bulb is input A2
const int rainPin = 3; //The LDR pin for rain sensor is input A3
#include <Servo.h> //Allow Servo to work
Servo servo1; //Name of servo
int state = HIGH;
const int ledPin = 7; //Output pin 7 for LED bulb
int rain, high = 0, low = 1023; //The range of rain sensor LDR
int lightLevel, maximum = 0, minimum = 1023; //The range of light sensor LDR


//7 = light, 8 = fan, 9 = servo
void setup(){
 Serial.begin(9600);
 pinMode(13,OUTPUT);
 pinMode(12,OUTPUT);
 pinMode(8,OUTPUT);
 pinMode(7, OUTPUT);
 pinMode(0,INPUT);
 pinMode(2,INPUT);
 pinMode(3,INPUT);
 servo1.attach(9);
}
void loop(){
 lightLevel = analogRead(sensorPin);
 rain = analogRead(rainPin);
 if(lightLevel < 150)
 {
   digitalWrite(7,LOW);
 }
 else if(lightLevel > 200)
 {
   digitalWrite(7,HIGH);
 }
 
 
 float voltage, degreesC;
 voltage = getVoltage(0);
 degreesC = (voltage - 0.5) * 100.0;
 
 if(degreesC >= 24.71)
 {
   if(rain < 300)
   {
     digitalWrite(8,LOW);
     servo1.write(0);
     
   }
   else if(rain > 800)
   {
     digitalWrite(8,HIGH);
     servo1.write(0);
     
   }
 }
 else if(degreesC <= 22.75)
 {
   if(rain < 300)
   {
     servo1.write(0);
     digitalWrite(8,LOW);
   }
   else if(rain > 800)
   {
     servo1.write(95);
     digitalWrite(8,LOW);
   }
 }
   else if(rain < 300)
   {
     servo1.write(0);
     digitalWrite(8,LOW);
   }
   else if(rain > 800)
   {
     servo1.write(95);
     digitalWrite(8,LOW);
   }
 
//Serial.print is just to see the output for troubleshooting and confirming that the system is working correctly.
 int flexposition;
 flexposition = analogRead(flexpin);
 Serial.print(" Rain: ");
 Serial.print(rain);
 Serial.print(" Light: ");
 Serial.print(lightLevel);
 Serial.print("  voltage: ");
 Serial.print(voltage);
 Serial.print("  RAW:  ");
 Serial.print(analogRead(0));
 Serial.print("  State:  ");
 Serial.print(state);
 Serial.print("  deg C: ");
 Serial.println(degreesC);
 delay(500);
}
float getVoltage (int pin)
{
 return (analogRead(pin) * 0.004882814);
}


2.4 Risk Assessment and Management


1. List/identify the hazardous chemicals, activities, or devices that will be used.

 We would be using drills, saws, screws, screwdrivers, pliers, hot glue gun and epoxy. We would be using the tools mainly to make ledges and cut holes to fit in the solar panels and other sensors and electronic devices. We would also be using wires for all the sensor and systems.

 2. Identify and assess the risks involved.

 While using the tools one might easily cut themselves with the sharp blade which might cause severe bleeding and also infection because of the wood shavings from the wood cutting. The wood shaving may also enter someone's eyes or mouth. The wires may come into contact with water which might cause a electrocution which might even lead to death.

 3. Describe the safety precautions and procedures that will be used to reduce the risks.

While cutting, it is best to not keep fingers or any part of the body close to the blade. This is mostly because the blade can easily slide off and cut the fingers of the person using it. While using the drill, there would be wood shavings on the drill. It is best to use a brush and sweep off the wood shavings and not use our hands. We should also make sure the wire has no cuts while handling it. If there are cuts, the power should be turned off before handling it.

 

4. Describe the disposal procedures that will be used (when applicable).

The wood shavings should be put inside a plastic bag and disposed. This is to make sure the wood shavings does not fly in the wind while being disposed

 5. List the source(s) of safety information.

 - Safety tags on the drills and wires.

 - Safety measurements in the Research lab and ADMT studio.

2.5 Data Analysis

1)Light Sensor Testing Procedure

-Firstly, we turn off the light in the surrounding area to simulate low light intensity during night time or when its cloudy. If the light turns on automatically, it means that our light sensor works partially.

-Secondly, when we turn on the light in the surrounding area to simulate high light intensity during daytime. If the light turns off automatically, it means that our light sensor works completely.

2)Temperature and Rain Sensor Testing Procedure

We decided to test both sensors at once as they control the same features in the house which is the opening and closing of window and the turning on and off of the fan.

-Firstly, we press on the temperature sensor to warm it up so that it will read an increase in temperature. Shortly, if the fans turn on and the window closes, it means that the temperature sensor is partially working.

-Secondly, when we press the rainwater collector down on the metal bracket(simulates the presence of rain), it creates a close circuit with the battery(shown in video which is in results) and a light bulb and the light bulb turns on. There is a light sensor placed next to the bulb and if detects that there is an increase in the light intensity, and if the windows remain close and the fans turn off accordingly, the rain sensor is partially working. 

-Next, we stop pressing on the temperature sensor and if senses a dip in the temperature, and if the window opens accordingly, the temperature sensor is working completely.

-Finally, when we stop pressing down the rainwater collector on the metal bracket(simulates the absence of rain), the light should not turn on and the light sensor should observe that there is no significant change in the lux(light intensity). So, if the window remains open, the rain sensor is in pristine working condition.


No comments:

Post a Comment