Introduction: UCL - IIoT - Indoor-climate 4.0
After reading and working with this instructable, you will have your own automatic indoor-climate, which you can observe online with the help of Node-red. In our case we developed this idea and presented it in a 3D-printet house.
Step 1: IO-list of Needed Materials for the Project
Arduino MEGA 2560
RAYSTAR OPTRONICS RC1602A-FHW-ESXDHT-sensor
Y.S.TECH FD244010HB 4010 40mm x10mm Fan 24V 0.07A 2Pin 446
Step 2: Flowchart
This is a flowchart to illustrate the complexity of the project. As you can see the data starts from the top of the flowchart and ends in the Arduino step by step. The flowchart is designed to provide a basic kind of knowledge of the project so anyone can understand how we have set up the system. More information about how node-red and wampserver works will be in later steps.
Step 3: 3D Printing the House
We use the size 18x16, and wouldn't make it any smaller because of the fact that the equipment has to fit inside. For 3D printing just use whatever you have experience with, or use Fusion360 or SketchUp. If you desire to implement more items or stuff to the project, you might want a bigger house to work with, atleast if you want the equipment inside.
The house we made is just a simple and easy working one. You can obviously make it more delicate and better looking if you are interested in that. But we like to stick to the KISS rule, Keep It Simple Stupid.
Step 4: Fritzing
If you want to fritz it our way, you need the same materials to make sure the project will work as intended. The position of the items are just to make it easy to see how they are wired. The LCD-screen goes to the roof, where we cut a hole for it and glued it, the rest of the stuff is inside the house.
Step 5: The Coding
The code is written in Arduino which is a combination of C and C++ programming language. Make sure that the same libraries are included if a copy is attempted.
Step 6: Node-red
Node-red is a software you download on your pc through the CMD. it is a flow-based development tool used for visual programming, which provides a browser-based flow editor.
It plays a major part in handling the values we get from the DHT-sensor and then displaying them as gauges on the dashboard. This is for the user of the project to easily know how the system is functioning at the moment. By looking at the gauges the user will be aware of the indoor- and outdoor-temperature, the indoor humidity, the current speed of the fan and a curious weather report as well. Apart from looking at it digitally, it can also be seen on the roof of the house on the LCD-screen.
We uploaded the code from our node-red through the clipboard so everyone can use it. What you have to do is have node-red downloaded on your device and import it in a tab on the dashboard. Once implemented make sure that you have your Arduino set to COM3 and have the same SQL database in Wampserver set up. We also decided to import data from Weather.com, to provide a view of the outdoor temperature in the chosen city. We converted the farhenheit to celcius to make the numbers more readable for us. Here we decided the temperature span to be between -100 and 100 degrees sinse that is a very realistic span that wont be overstepped.
A very important node is that you also need to have the same libraries installed in node-red in order to have the same functions. In manage pallet you can import libraries, and what you need to have the same as us is:
It is free to download and is essential for the outcome of the database. Node-rod will not work proberly without these libraries and will just give you errors if you try without them.
Step 7: Wampserver MySQL
Wampserver: MySQL-database is used to save data from the Arduino. In this case it its indoor and outdoor temperature, fan-speed and humidity. Everything on this type of database runs internally on the computer. In order to log in you must use an ID type "root" and the code area have to be empty. From node-red it is important that the data you send is provided the same names as the ones in MySQL, else the data would not reach the server and there will be errors in node-red.
In MySQL you have to create a database and in our case we named it 'nodered'. In this database you create a table where we make contact with the projekt, in this table you must create rows with names for the data you want to save in them. We have fan-speed, indoor humidity, outdoor humidity, temperature and time. Time is provided by node-red and the others are data from the Arduino.
Step 8: Illustration of the Project
A demonstration of the project working as it should.
4 years ago
Great project. You might consider using a single 9V battery. You can do this by connecting the power supply to the VIN.