Introduction: SmartMesh - Arduino and Android Controlled Pneumatic Facade

This project was part of Multimodal Media Madness 2014, hosted by the chair for Computer Aided Architectural Design (CAAD) and the Media Computing Group of RWTH Aachen University. For more Smart Skins, please check this page: http://hci.rwth-aachen.de/m3_ss14

During this project, the students were asked to develop smart, intelligent facade elements under the general topic "Home Automation" which should then be used as addable elements for small houses (study rooms) which are constructed after the open source concept of the WikiHouse (see WikiHouse for more information).

Our group got the idea to create the "SmartMesh" which is basically an arduino controlled facade element that contains two balloons which can be filled with air and evacuated using small handy pumps in coordination to the inputs of two temperature sensors (one outside and one inside the house), as well as a light sensor.

PURPOSE
The SmartMesh reacts to the outside and inside environment and ensures a pleasant indoor climate - thermal comfort. It controls the light and heat transfer between the inside and outside and also provides the inside with fresh air. The smart facade senses bad weather and closes in order to prevent for example inside water damages. The grouping of more smart elements provides an aesthetic architectural value trough the fragmented surface.

Note: We are going to update the Instructable from time to time in the following days.

by Hasan Ayhan, Tobias Welschenbach, Snezhina Shukina

Step 1: Component List & Project Cost

The main components (electronical parts only, for the constructing materials refer to step 3 of this Instructable) are as follows:

  • A StarterKit+ for Arduino containing an Arduino Uno microcontroller and several parts to begin with. Watterott 35,50 EUR (Any Arduino Uno will do, however you might have to buy some parts which were already contained in this set, seperately)
  • 4x magnetic valvesPollin 2,50 EUR each
  • 2x 12V ROB-10398Vacuum PumpSparkfun (around 15 EUR each from German Sparkfun retailers)
  • SeeedStudio Bluetooth ShieldWatterott 21,80 EUR (other BT Shields or BT modules might also work but there has to be some changes done in the code)
  • 6x MOSFET IRLZ24N (We had to use one from the StarterKit because one of the others turned out to be defective but the ones from the StarterKit should also suffice for our project.)
  • 6x Diode 1N4007 (5 pcs are included in each kit, we had two of them)
  • 6x 10K Ohm resistor 1/4W , 10 pcs included in the kit so enough of them :)
  • 2x LM35CZ temperature sensor Watterott 3,00 EUR each
  • 1x TSL2561 light sensor Watterott 7,74 EUR
  • 1x TDK Lambda LS100-12 power supply Conrad 25,11 EUR
  • 6x 220 Ohm resistor (included in the kit)
  • 1x DC Connector Conrad 1,79 EUR
  • 2x Digital Taster (any taster should do, as long as not too much force is needed to activate it, because the balloon has to activate it)

Additionally, the project used the following smaller components and accessories:

  • A copper plate for making the printed circuit board
  • wires

The following tools were used:

  • Solder
  • Drill

Step 2: Constructing the Facade Element Chassis

COMPONENTS (ARCHITECTURE)

1. An optional (wooden) frame with the dimensions 562 x 562 x 281 mm, which makes it easier to build the panel and also a way of grouping the elements for the development of larger facades. In my opinion a grouping without the frame looks better.

2. An inner chassis, that gives the form of the mesh and also serves its purpose of integrating the electronics and vacuum pumps for each pneumatic fragment.

3. A group of two fragments, which gives the structure. Each one is filled with one latex balloon.

4. An extra strong latex balloon Ø 55cm or more - the longer the form is the better. It has to fill in the inner form of the mesh structure. In order to fix the balloon you will need a thin brass pipe (2.0-2.5mm) for each balloon.

5. Because of the outside conditions like rain the mesh needs a small pitch but only on the upper side, so that water flows down and not gets inside the mesh and provides any damage.

MACHINES USED

For building of one facade element a CNC milling machine and a Laser Cutter are used. The inner chassis is cut from a MDF panel by the CNC milling machine, but the inside of the chassis is hollow with enough space for all the electronics that you want to integrate. It is important that the material exposed to the outside environment is water and weather resistant. For our model we used MDF panels. In this case a weather resistant coating is needed from the outside and a nice looking wooden coating from the inside. The mesh structure (3) is made by 2D "stripes" (in the form of the mesh) arrayed with a distance between each other from around 50 mm. This structure gives more space inside the inner chassis, is lighter but still stable and allows an easy revision and maintenance of the panels' intergrated stuff.

MATERIALS

inside wood - MDF panel and a coating by choice (f.e. a wooden one)

outside aluminium - wood or wood with a coating is optional - in any case water resistant

HOW TO BUILD THE ELEMENT

Step I: get all the stuff you need

You are going to use the frame in order to build the element. The inner chassis is cut by the CNC machine. The mesh structure is cut by the laser cutter. For the chassis you need a MDF plane about 1000 x 700 mm (the square parts you do not need to cut with the CNC, but you might). For the mesh structure you need 3x planes of a water and weather resistant material 1mm thick. Here you will also find attached the 2D files for both machines. You also need glue for all the materials you have and a standard cutter.

Step II: building the chassis

Once you have cut all parts start building the element into the frame from the outside to the inside. First connect/glue the chassis parts - the MDF ones cut by the CNC machine. When you have done this, you are going to have the 6 parts (4 corners and the 2 middle parts), where you want to integrate the electronic stuff later. If you want to take off the frame later, you should not glue the 6 parts permanently to the frame but fix them by using just a little glue. Now you have the frame and the chassis build, but you still have the big holes in the middle, where you will put the mesh structure.

Step III: building the mesh structure

The mesh structure is cut in stripes, so you are going to array the mesh
stripes and connect the parts by coating them from the outside. You may have noticed that the stripes in the cut-file are separated in I (inside) and A (outside) stripes. First you need to glue the inner stripes, but be careful! you might want to put your electronics first. So first the inner stripes and the outside mesh structure (see cut-file 1 and 2) and then you can put the outside stripes, which gives the final form of the two fragments. From this point what has to be done is connect all the electronics and close the two fragments by coating them (see cut-file 3). For an instruction of how to connect the electronics refer to step 5 of this Instructable.

Step IV: connecting the balloon

Connect the ballon with the vacuum pump by fixing it to the top. (Additionally you can also fix the balloon to the bottom of each fragment, too, but we only connected the balloon to the hosepipe that comes from the pumps and then fixed the hosepipe to the top.)

We did not test this but fixing it also to the bottom of each fragment might provide a greater outer view because the balloon no longer just hangs down on the loosen side (bottom). So if you do this, you might also fix it to the side with the detailed space for it. In order to do this you put the thin brass pipe into the balloon. The pipe has to take the form of the meshes curve and to be fixed again. This enhances the look because the balloon will be filled with air starting from the fixed side developing to the other side.

Step V: getting rid of the annoying frame (additional)

Finally you can take of the frame by loosing it with a cutter - just cut between frame and element and it should loosen up, so that you can take out the element from the frame. (we did not do this either, again consider as additional)

Step VI: closing the element (consider this last step as additional also, for our project we did not do this, yet it might provide a better experience for under real-life conditions)

Close the two fragments from both sides, where the frame has been earlier. You will notice that you can still get to the electronics through the sides now when the frame is gone. This is going to be helpful for connecting more than one element in both directions - makes grouping possible not only visually but by wires.

Notes: The materials for the outer side of the panel (chassis and mesh structure) have to be water proved and weather resistant. A such coating can be used. The joints between chassis and mesh structure have to be absolutely waterproved especially to the outside environment.

Step 3: Constructing and Soldering the Printed Circuit Board (PCB)

Construction:

  • a small introduction:

This was the first slightly complex thing we had to do because we had never done something like that before and few to none experience with electrical circuits and the electronic stuff :)

After figuring out how everything had to be connected, we began to create an early version of an Eagle shematic. For those who don't know, Eagle is a free software which let's you create shematics of electronic circuits to be then printed on a board. After a few improvements the following eagle shematic was created (maybe it's not the most elegant shematic you might find but hey, it does work :) Below you can also download the eagle file for creating the exact same board.

  • a few words to the logics of the circuit:

Basically there are 6 MOSFETs in parallel each placed like for example in this great tutorial http://bildr.org/2012/03/rfp30n06le-arduino/http://bildr.org/2012/03/rfp30n06le-arduino/ with the exception that we placed the diodes in parallel not to the pumps or valves but to Drain and Source of the MOSFETs, which also works. We also added to each of the MOSFETs a 220 Ohm resistor in between the Gate and the Arduino's digital pins, in order to not let high voltage damage the Arduino. For more details and reasons why there have to be diodes on each MOSFET as well as what a MOSFET is, I suggest reading some tutorials. The above mentioned is a good starting point and should suffice for our purposes.

So now came the part which might not be redoable for everyone (in fact only for a small part of people). We have the advantage in our university of having a PCB milling machine which does all the milling and creating of the board automatically once given the eagle file of the board. If you are interested in how this works you can watch the attached video, where we filmed the machine's cutting of our board :)

Why even bother with creating such a PCB you might ask yourself? Well, firstly, the breadboard which came with our StarterKit does not allow current above 1A. Since our Pumps and Valves are in parallel the used current sums up so we had more than 1A definitely of current flowing and thus it was convenient to use an extra board for this whole project. Also we did not want to have several parts like MOSFETs etc. flowing around just connected by wires.

Soldering:

We assume for this step, that you know how to solder (if not we suggest you to first watch some tutorials for learning it) and just give you an explanation on what has to be soldered to which pin on the board. You have to solder 2x 7 pin connectors (in the picture the above ones), 1x 7 pin connectors (in the picture the bottom). Also you have to solder all the components (resistors, MOSFETs, diodes) exactly as in the picture with the notations and then you should be finished with the board. The other picture shows the other side of the board.

Step 4: Connecting the Electronic Parts

Wiring:

See the second picture (with the Arduino on it) which shows the whole wiring and how the electronic components have to be connected to the Arduino. The upper part of the sketch (the one with the MOSFETs on the breadboard) is exactly the same (logically) as the PCB board we just created in the last step. However, since not everyone is experienced in electronic circuits I added again the picture of the board from the last step. The comments on it explain exactly where you have to connect which cable.

Note: On the pictures you can't see the Bluetooth Shield. Just plug it on top of the Arduino and use the exact same pins but from the Bluetooth Shield top instead of the Arduinos pins. They are labeled exactly the same so there should be no problem. Also please use exactly the same pins as we experienced problems by using other pins, for example pin D6 and D7 have to be free for the BT Shield to work properly.

Preparing the 12V power supply :

Basically you take an old computer power connector cable and cut off the end that comes into the PC. Then you end up having three different couloured (usually blue, yellow/green, brown) cables. Now you have to put them in the right connectors on the power supply. Make sure to not attach the power cable to the 230V electric socket yet!!This is a huge amount of electricity and can cause severe danger!!! In our case and I think it is per standard (but if not sure look it up first) the brwon cable goes into the "L" labeled connector of the supply, the blue one into "N" and the green/yellow one into the inveresed "T" symbol which means ground.

Note: Before plugging in the other end of the cable into the electric socket, make sure you have connected all the wires correctly! It is strongly advised to put the power on after everything of the project has been finished, because we will have to be in contact with all the cables and electronics in the coming parts of the project!Installation of this is at own risk and could be very dangerous but normally nothing should happen if you did the above steps correctly.

After that, we want to create a connection between the power supply and the Arduino to power it on without a PC. For this we use the DC connector and put one of the ends of it in V+ and the other in V- of the supply. Finally put the DC plug into the DC power jack of the Arduino.

Step 5: Fitting the Electronic Parts Into the Chassis

Construction of the pneumatic system:

After having succesfully connected all the parts (which is a bit of a hassle to do because there are so many wires flowing around and have that to be put in a sistematic way), you have to fit them into the inner chassis. First make some construction for the two pumps similar to the photo above. You might do it a bit differently but the connection logic has to be the same or else the pneumatic system will not work properly! As seen in the picture, there is one valve for each pump directly connected to the specific pump. Then there are 2 T-connectors between them and on either ends again 2 valves are connected which directly control the air flow through each balloon. This construction ensures minimal air loss because without the 2 valves that are directly connected to each of the pumps, while pumping air into the balloons, an amount of air would flow not into the balloons but into the vaccuum pump because of the T-connection between the two pumps. On either of the balloon valves ends you connect a hosepipe whose other ends are plugged into the balloons later on. (We suggest to plug in the balloons later when the whole pneumatic system is fixed in the chassis to make it easier to operate). Make sure to connect everything exactly as in the two pictures above. If you put the system like in the pictures, the two outer holes of the pumps have to be connected. This is because each of the pumps can be either used as vaccuum or air pump and we want to use one as air pump and the other as vaccuum which is decided by which connectors of the pumps you connect the hosepipes to!

Fitting the Arduino and PCB Board into the chassis:

Having constructed this, we can start to fit the electronic parts into the chassis. For this as you can see in the first two photos, the 12V power supply gets fixed with screws into the middle part of the bottom of the chassis (holes for the srews are already prepared in the power supply's case). On one of the sides on the bottom of the chassis the Arduino and the PCB board are fixed also with screws in the therefore prepared holes again.

Fitting the pneumatic system into the chassis:

Now we get to the fixing of the pneumatic system we constructed earlier. For this, you have to put the whole facade element upside down. In the middle upper part of the chassis (which now is the bottom side) you fix the pneumatic system. Be sure to stick styrofoam (polystyrene) into the area where the pneumatic system will get fixed because it will prevent that the vibration of the pumps (which actually is high) will get transported to the whole frame and it also helps to put the pumps noise down a bit.

A few enhancements:

  • drill another hole into the bottom of the chassis between the Arduino and the power supply for the USB -Arduino cable in order to be able to flash the Arduino's software for later updates without opening the facade element.
  • also as you can see there is another hole in the pictures there for the power cable that comes from the power supply
  • drill 5 holes as marked in red in one of the above pictures in the outer sides of the chassis and the inner chassis (2 for temperature sensors, one on each of the sides, one side later gets the inside of the building and one side the outer side; 2 for the digital tasters, one per inner side of the chassis; and 1 for the light sensor)

Step 6: Arduino Program

After having told so much about how to make the facade we now want to give you an overview of the main program that powers the facade through an Arduino.

The idea was that this facade is able to react to the weather and indoor temperature by itself in an intelligent way, so that the user just has to install the element in his house and let it do everything automatically. However, we wanted to also give the user the opportunity to influence this "intelligence" by controlling the facade with an Android smartphone remote control. This will be explained in the next step in more detail.

Let us focus on the main program for now. The functions fillBalloon() and vaccBalloon() are there to either fill the balloons and thus close the facade or to empty (evacuate) them and open the facade. This happens in two possible modes, summer and winter, that have fixed standard temperature values.

Those values are there to set a maximal indoor temperature, which should not be more than the
outdoor temperature during winter time. Otherwise it could get really cold in our room. If it is summer, the aim is, to keep cold air inside and open the window only, when there is no direct sun light shining on it, or when the temperature outside is too hot. Of course those standard values are not a solution for everyone and every weather condition. And that is why a user is able to set his own values, and customize the automatic control of the window.

Step 7: Android Pfod in General

Overview: What is pfod?

pfod™ (Protocol For Operations Discovery) is a protocol for the communication between Arduino and an Android smartphone developed by Forward Computing and Control Pty. Ltd. The idea behind it is to let developers create Android apps to remotely control Arduino or other microcontroller projects without having to write any Android code, just the Arduino code.

How does it work?

On the Android side an app called "pfodApp" (you can get it in the Google Play store: click here) is used. This app receives special commands from the microcontroller encoded in the pfod Protocol (see pfodSpecification for more details) and reacts according to them by showing Menu pages. So the microcontroller (Arduino) completely controls what is seen on the smartphone's screen. Think of the pfodApp like an universal app which is programmed by the Arduino only.

Having paired the smartphone with the Arduino over the Bluetooth Shield (assuming we use Bluetooth as connection), once started, the pfodApp requests the main menu from the Arduino. The Arduino then responds by sending the pfod encoded menu page. Every time a button from the menu on the android side is pressed, a special command will be sent to the arduino which then starts a so called Action Code, a program routine that belongs to the button which has been pressed. So you could e.g. control remotely the lights by pressing a button on the Android phone and the Arduino reacts by turning on or off the lights.

This means that you could always update the functions of the pfodApp without having to provide the users a new app version, instead, just the Arduino code will be changed and updated and the users directly see the updated pfodApp when connected to the Arduino.

Step 8: Our PfodApp - SmartMesh Control

Enough for the overview and pfod in general. Let us now introduce our pfodApp we developed for our SmartMesh facade:

It is divided into three menus. Main Menu, "Intelligente Steuerung" and "Manuell".

Main Menu:

The first picture shows the Main Menu with two Buttons which, if pressed, activate the submenus "intelligente Steuerung" or "Manuell".

"Manuell":

In this menu the user can manually activate the air pump and vaccuum pump which is more for presetnation purposes actually because the real intelligent mode is implemented in the "Intelligente Steuerung" menu.

"Intelligente Steuerung":

Let us no come to the really interesting menu which has real life purpose. As stated before in the "Arduino Program" chapter, there are two modes "Summer" and "Winter" implemented in our program. Both of them have fixed standard values for indoor and outdoor temperature. With this menu we allow the user to customize the automatic control of the window. For this the user can switch between summer and winter modes with the two buttons and then if needed, he can set his own values for indoor and outdoor temperature with the two sliders below the buttons. This will activate the user's own values in the program and the automatic mode will then behave according to those values instead of the fixed standard values.

Giving the user the possibility to adjust the behaviour of the facade to his own climate. E.g. the user can set the mode to winter although it is summer, when the weather behaves like in winter and the facade will behave like in winter.

Step 9: Video of SmartMesh in Action

Here you can watch a video showing the manual and automatic mode in action. Unfortunately just in German right now, though.