Introduction: Smart Home (model)

We live in the modern age. The internet is at the reach of our hands and smart devices are almost in every pocket. The technology we have, can help us to:

  • save more energy, cut costs and keep the Earth green at the same time,
  • save our time that we can spend somewhere else,
  • improve our living comfort in order for us to get more rest an feel better overall to easily complete everyday tasks,
  • increase safety and security of us, our children and our homes.

How can we achieve this?

To play with that idea, I decided to make a simple model of a house. It would have everything that a real house has; 4 walls, 2 floors, doors, windows a ceiling and a roof. It would be equipped with devices that make living in a real house easier. It would have a heating device for winter months, a cooling device for the summer, ventilation fan, lighting, security alarm and even automated doors and windows. Everything would be physically connected to a smart controller where we could somehow tell the home system what to do, so it could become ''smart''.


Smart functions

Before we start building our house, we should specify what kind of functions it should have. For starters, it should regulate the temperature. With temperature regulation we will achieve more comfort. We will never overheat the place, therefore we should save fuel, keep the environment cleaner and cut costs at the same time.

Similar goes for the lights. They don't need to be lit all the time. They should be off when we don't need them. They can automatically turn ON at specific event (in the evening when the natural light goes down or on the motion for specified amount of time – as comfort or security feature) and OFF (when somebody forgets to turn them off in the morning when the natural light increases).

The quality of the air we breathe should be considered, too. Air circulation is very important as the inside moisture.

We should not forget about the safety. Alarm systems are almost a default home equipment nowadays.

Since we will have servo motors on doors an windows, we should somehow make them useful, too. To get some fresh air into the house, the windows could automatically open in the morning at the specific time, in case alarm is off (when the house is being occupied) and there is no rain. Another convenient feature could be if doors would automatically open when somebody wants to enter the house (again in case the alarm is off).

Our smart home functions would then
be:

  • heating and cooling, air ventilation (HVAC)
  • automated lighting
  • automated doors and windows
  • security alarm

Step 1: Electronic Parts

To ensure all the functions are operative and working correctly, we need to select the appropriate electronic elements. When done, they will also dictate the scale of a house model.

I selected next electronic parts:

  • 2x Peltier heaters for heating and cooling
  • PC ATX housing 12V fan for air circulation
  • 5x standard 5mm white LED diodes for main entrance and interior lighting
  • IR motion sensor module for motion detection,
  • red and green pair of pushbutton and an LED for alarm arming, disarming an status display functions,
  • 110dB siren for alarm sound
  • Piezo buzzer for sound feedback
  • 2x microservo 9g motors to open and close door and a window,
  • 16x2 LCD display for status information.

We have elements that need either 5V or 12V power supply. Before selecting those, make sure you do your homework calculating all the currents needed, especially for the Peltiers.

In order to make this set of electronics smart, we need some kind of a controller. I decided to go with PoKeys, coming from PoLabs, which is affordable, has a lot of connections and functions, and is easy to use. You don't need to have programming knowledge. You just place & connect the blocks, download a diagram into the device and you're done.

Since the pins can provide only a limited amount of current, I decided to use the PoLabs 8-channel relay expansion board PoExtBusRE for more power-hungry devices. Open collector board for PoKeys exists too, but the Peltier current demands just might exceed its limitations.

For light, temperature and humidity measurements, I chose to use PoLabs' PoSensors board. I connected the relay and sensor extension boards using the supplied flat cable with 5-pin connector.

PoKeys controller, PoExtBusRE relay extension board and PoSensors board are all available on www.poscope.com.

To heat the place, I chose the Peltier heater. Until a friend of mine told me it's a basic element of a home fridge, I didn't even realize that such thing existed in electronics. Basically, it's a junction of two different metals. When connected to power supply, they create a temperature difference between the two metals. One side of the Peltier heater gets hot, while the other one gets cooled down. What's even better is that you can't connect it with the opposite polarity. In that case, the direction of heat transfer will also change. So, with appropriate relay circuitry to switch the polarity when needed and a temperature sensor, I was able to create an autonomous temperature controller.

If you need help connecting each element properly, see instructions in the PoKeys user manual.

When a desktop test is done and you make sure that everything works, it's time to put it into an enclosure shaped like a real house. I figured that I should put the power supplies, relay board and a horn on the back wall of the house model. So the space that those elements would take, dictates the size of the back plate, which should be proportinal with other house walls and a roof.

Step 2: Enclosure Plan

Enclosure is made of spruce and plexiglass. Spruce is soft enough material to work with easily. Plexiglass is appropriate for this kind of project because it's transparent. To cut plexiglass use a wallpaper knife or a laser cutter if available. To cut wooden pieces, use a japanese or other kind of fine saw. When done, you will be able to see through the walls, all the electronics and connections will be visible.

First I made a frame of 2x2cm spruce pieces. When figuring out what the frame dimensions should be, I took into account the size of the back plate with electronic devices installed.

Step 3: Electronics Plan

Electronics mounted on the front side of the house. On / off switch is used to turn the PoKeys controller on or off, there is also a status LED. LCD will show statuses of all installed systems; heating, ventilation, lighting, automated doors and windows and a security alarm system, which will be controlled by the 2 pushbuttons on the right. Red button is used to turn the alarm system on and the green button is used to turn the alarm system off. Corresponding LEDs show the alarm system status. Servos are used to open door and a window.

Note that the PoKeys controller is mounted on the face of the backplate, so it's visible from the front.

Backside of a house. The electronic devices are installed on a non-transparent piece of plastic. There will be 2 power supplies; 5V and 12V, a PoKeys relay extension board, ground connections and a horn. To avoid ground related issues, make sure that you connect all the grounds using a wire with larger diameter. 0,5mm2 should do just fine. Best practice to do it is to make the distance from device grounds to the actual ground as short as possible. With ground wire, do not travel from one device to another. Instead make it a star topology and connect the devices to the center of such star, from there continue to actual ground with wire that has larger diameter. Dashed line shows the mounting position of PoKeys controller on the other side of the PVC board (inside of the house, visible from front).

On the left side, 2 Peltiers are placed. In order to reduce the current needed, I wired them in series. Since Peltiers use more current than small electronic devices, I advise you to use at least 1mm2 diameter wire. You should install fans on the each side of each Peltier to improve the air circulation over the aluminium coolers.

In order to properly deliver fresh air into the house and to help remove the heat out of the house, install the fan on the oposite side of Peltiers. Wire it in such a way that it pulls the air out of the house.

Last but not least, there is a ceiling, equipped with lighting LEDs. On the front door you will also find PIR motion sensor module. It will be used to automatically open doors, when somebody approaches front of the house and for security alarming purposes.

Step 4: The Build

All the components are mounted as planned. Use a carpenter knife to cut out the holes for the components.

Step 5: Programming

PoKeys configuration setup & testing

I tested every component connected to Smart Home in PoKeys application. In the user interface I have set up all the inputs and outputs. LED's and Piezo are set as digital outputs (1,2,3,4,5,29), servo motors are set as PWM outputs (18,19), pushbuttons, on/off switch and an IR sensor module are set as digital inputs. Rest of the components are connected to the extension relay board PoExtBusRE.

I have tested inputs and outputs of PoKeys in the Peripherals --> Digital inputs and outputs. Black mark on a tile means that the pin on the PoKeys is configured as an output. Otherwise it's an input. When colored green, the I/O is active, otherwise it is inactive.

I have tested the servo motors (door and window) in Peripherals --> PWM settings. I have set the PWM period to 20 ms and used a slider to change cycle time. Duty cycle 0-2ms causes the servo to rotate from 0 to 180°.

I have tested the components (Peltier heaters, all the vents, alarm siren) that are connected to extension relay board PoExtBusRE in the Peripherals --> PoExtBus settings. On left click the output goes on (green). On the right click the output goes off (grey).

PIN - IN/OUT - DESCRIPTION
------------------------------------------

01 - OUTPUT - WHITE LED

02 - OUTPUT - WHITE LED

03 - OUTPUT - WHITE LED

04 - OUTPUT - WHITE LED

05 - OUTPUT - WHITE LED (PORCH)

18 - OUTPUT - SERVO (WINDOW)

19 - OUTPUT - SERVO (DOOR)

20 - OUTPUT - PIEZO

50 - INPUT - GREEN PUSHBUTTON

51 - INPUT - RED PUSHBUTTON

52 - INPUT - IR MOTION SENSOR

53 - INPUT - ON/OFF SWITCH

RE1 - OUTPUT - PELTIER HEATER

RE2 - OUTPUT - PELTIER HEATER

RE2 - OUTPUT - PRESSURE VENT

RE3 - OUTPUT - PRESSURE VENT

RE4 - OUTPUT - PRESSURE VENT

RE4 - OUTPUT - PRESSURE VENT

RE5 - OUTPUT - ATX PC FAN

RE6 - OUTPUT - ALARM SIREN

PoBlocks Programming

The ON/OFF switch is the main condition for everything to work. When ON the ON/OFF indication LED will turn ON.

Alarm system turns on with the red pushbutton. When turned on, the alarm siren can be triggered by motion sensor on the porch. Alarm can be reset with the green pushbutton. The red and green LED will indicate the state of alarm system.

The temperature is regulated between 20 and 22 degrees celsius. The polarity of the 2 Peltiers is being switched by the relay expansion board PoExtBusRE. One polarity causes them to heat, other to cool down. In order for the temperature regulation to work, the system must be on and alarm turned OFF (people present). When the alarm is ON (people not present), the temperature regulation will not work.

When it gets dark outside, lights will automatically turn on. There are two conditions for that to happen. Someone has to be home (alarm system OFF) and the schedule has to be on. Schedule is set that lights will only be lit up until 10pm, then they will shut down automatically. When alarm is turned ON (we left the house) the lights will automatically turn off.

Step 6: Future Possibilities

In this instructable only a model of a house is represented. I used it to test various scenarios before starting on a real thing – my home.

I used PoKeys to control electronic elements in the house model. But it can be used in a real house, too. It has a lot of connections and features. It can regulate inside temperature and humidity, and with added peripherals, it can control power devices, also.

To measure the environment variables, you will need one of more of PoSensors boards (temperature, humidity, light). Please note that you have to mount the temperature and humidity sensors about 1,20 – 1,50m high, measured from the finished floor. Light sensor must be mounted where only sun has influence, instead of internal lighting, for instance in an IP66 casing with transparent cover, so the sunlight could come through. Typically it's mounted on a facade.

To control high voltage devices, which exceed the current limitations of PoKeys itself, you will need relay extension board, called PoExtBusRE. One supports 8 outputs, but you can add more, if needed.

Sensor and relay boards communicate with PoKeys through factory prepared cable which is quite short (approx. 20cm). Therefore you will have to install those 3 devices (controller, sensors, relay board) near each other. You could put them in a flush mounted housing and add, for instance a 4x20 LCD display on its cover, to show statuses of multiple systems. You could also install a few pushbuttons to manually control the smart home, if automatic settings fail to please your expectations.

High voltage lines that travel from relay board to 110 / 230 Vac powered devices (ventilation fan, lights) shouldn't represent an issue, since they can easily go to 300m and more. You can control the power circuits in the electrical cabinet, electrical wall box, on the light switches or on the device itself. Please note that this has to be done somewhere between the fuse and the device.

You can control low voltage devices (like central heating system, AC, automatic blinds, windows and doors and an alarm system) directly from PoKeys. All of the low voltage devices have an in-built electronics which also support some kind of external input signal to control how they work. PoKeys also has quite comprehensive control features (ON-OFF and even PID regulation) which come handy when connecting it to various HVAC systems.

Comments

author
TarekM2 made it! (author)2016-07-17

G.T

Screenshot - 01_07_2016 , 04_41_08 م.png

About This Instructable

4,790views

36favorites

License:

More by TronikMaker:Cheap Time LapseSmart Home (model)The COMFORT Meter
Add instructable to: