Fablab Alahsa Smart AC Project (فاب لاب الأحساء المكيف الذكي)
by Fablabahsa in Circuits > Arduino
210 Views, 0 Favorites, 0 Comments
Fablab Alahsa Smart AC Project (فاب لاب الأحساء المكيف الذكي)


.jpeg)
:تعريف المشروع
مشروع تعاوني بين فريق فاب لاب الأحساء ومتطوعين من المجتمع، يتمحورحول تحويل نظام التكييف التقليدي في الفاب لاب إلى نظام ذكي يتماشى مع التقنية وإنترنت الأشياء.
قدم المشروع مستشار فاب لاب الأحساء المهندس أحمد الحاجي وأخصائية الفاب لاب المهندسة رِهام الراشد.
:أهداف المشروع
يهدف المشروع إلى تعزيز استخدام التصنيع الرقمي وتثقيف المجتمع بإنترنت الأشياء.
Project definition
A collaborative project between the Fab Lab Al-Ahsa team and volunteers from the community, centered around transforming the traditional air conditioning system in the Fab Lab into a smart system that is compatible with technology and the Internet of Things.
The project was presented by Fab Lab Al-Ahsa consultant, Engineer Ahmed Al-Hajji, and Fab Lab specialist, Engineer Reham Al-Rashed.
Project goals:
The project aims to promote the use of digital manufacturing and educate the community about the Internet of Things.
المخرجات (Outputs):

المخرجات:
- برمجة وحدات التكييف في المعمل والتحكم بها عن بعد عن طريق تطبيق الجهاز الذكي
Outputs:
- Programming the air conditioning units in the lab and controlling them through the application of the smart device.
متطلبات المشروع (Project Requirements):

متطلبات المشروع:
- Wemos D1 mini: microcontroller with wifi chip ESP8266
- Relay: للتحكم بتشغيل وإطفاء التكيف
- Door sensor (حساس الباب)
- DHT11 for temperature and humidity readings (حساس الحرارة والرطوبة)
- Voltage regulator 220v AC to 5v DC
- Terminal blocks
- PCB board
- Wires
- Arduino IDE for Wemos programming
- Blynk App for the application to control the system(تطبيق بلنك)
Project requirements:
- Wemos D1 mini: microcontroller with wifi chip ESP8266.
- Relay: to control the Air conditioner's control board by the ON/OFF button.
- Door sensor or reed switch.
- DHT11 for temperature and humidity readings.
- Voltage regulator 220v AC to 5v DC.
- Terminal blocks.
- PCB board.
- Wires.
- Arduino IDE for Wemos programming.
- Blynk App for the application to control the system.
الإعداد للمشروع (Project Preparation):




الإعداد للمشروع:
- للعمل على تحويل وحدات التكييف الموجودة في المعمل إلى مكيفات ذكية علينا أن نبدأ بدراسة طريقة تشغيل نوع التكييف الموجود لدينا، قررنا أن نتعرف على لوح التحكم الخاص بالمكيف وكيفية عمله وتشغيله لوحدة التكييف لتحديد طريقة توصيل وتشغيل الدائرة الكهربائية التي سنصنعها
- زر التشغيل والإيقاف الخاص بلوح التحكم الموجود في الصور يُشغل المكيف بضغطة واحدة، ولإيقاف المكيف نحتاج إلى ثلاث ضغطات متتالية حتى يتم إيقاف تشغيل المكيف من اللوح
- (طريقة التشغيل والإطفاء تختلف حسب نوع التكييف)
- تجهيزنا للقطع الإلكترونية والإدوات يعتمد على آلية العمل المذكورة
- من هذا الزر الضاغط سوف نوصل الريلاي لنرسل إليه إوامر الإيقاف والتشغيل من المتحكم
Project preparation:
- To work on converting the air conditioning units in the lab into smart air conditioners, we have to start by studying the method of operating the type of air conditioning we have.
- (The method of turning on and off varies according to the type of air conditioning).
- Our preparation of electronic parts and tools depends on the mentioned mechanism of action.
- From this push button, we will connect the relay to send stop and start commands from the controller.
- The on and off button of the control panel in the pictures turns on the air conditioner with one click, and to turn off the air conditioner we need three consecutive presses to turn off the air conditioner from the panel.
تقسيم المعمل (lab Zones) :
تقسيم المعمل:
تم تقسيم منطقة العمل نسبةً إلى عدد وحدات التكييف، كل وحدتي تكييف يمثلون منقطة واحدة.
قُسم المعمل إلى 6 مناطق كالآتي:
- منطقة الإلكترونيات
- منطقة طباعة ثلاثية الأبعاد
- منطقة CNC Router
- منطقة الاستديو
- منطقة Milling machine
- منطقة الليزر
Blynk حيث تم ربط وحدات تكييف المنطقة بقطعة ويموس واحدة ويتم التحكم بها عن طريق تطبيق
.ومن خلاله نستطيع تشغيل وإطفاء أحد المكيفات أو جميعهم مع معرفة حالة التشغيل الخاصة بكل مكيف ونسبة الحرارة والرطوبة في المنطقة.
lab zones:
The work zones was divided according to the number of air conditioning units. Every two air conditioning units are considered as one zone.
The lab was divided into 6 zones as follows:
- Electronics zone.
- 3D zone.
- CNC Router zone.
- studio zone.
- Milling machine zone.
- laser zone.
Each two air conditioning units in the same zone are connected to a single Wemous and controlled by the Blynk application.
Through Blynk application we can turn on or off any air condition in the lab connected to the Wemous. Also knew the state of the air condition (on or off), temperature, and the humidity in each zone.
تصميم PCB (Printed Circuit Board):



تصميم PCB:
تم تصميم الدائرة الكهربائية لترتيب توصيل القطع والحساسات اللكترونية المستخدمة في المشروع
الصورة الاولى:
صُممت لوحة البي سي بي على برنامج فريتزنق لمعرفة المنافذ المستخدمة من لوح الويموس وتوصيلها مع باقي الحساسات
يتبين في الصورة توصيل الكهرب الى القطع والمتحكم بقوة 5 فولت وتوزيع الموجب والسالب
الصورة الثانية:
التوصيل الفعلي للقطع، تم استخدام منظم جهد ليحول كهرباء 220 المترددة الى كهرباء بقوة 5 فولت الثابتة
الصورة الثالثة:
أخذنا مصدر الكهرباء بقوة 220 فولت من كهرباء المكيف
Printed Circuit Board (PCB):
The electrical circuit is designed to arrange the connection of the electronic parts and sensors used in the project
The first picture:
The PCB board is designed on the Fritzing program to find out the used ports from the Wemos board and connect them with the rest of the sensors.
The picture shows the connection of electricity to the parts and the controller with a power of 5 volts and its distribution to positive and negative.
The second picture:
The voltage regulator was used to convert 220 AC electricity into 5V constant electricity(DC).
Tاhe third picture:
We took 220 volts of electricity from the air conditioner's electricity.
تطبيق الجوال (Blynk APP)


.jpeg)

تطبيق الجوال:
آلية عمل زر الإيقاف والتشغيل ترجع إلى لوح التحكم الخاص بالتكييف، إذ أن وحدات التكييف الخاصة بالمعمل أمر التشغيل يرسل إليها بضغطة واحدة، أما أمر الإطفاء فيحتاج إلى ثلاث ضغطات متتالية حتى يتم إيقاف تشغيل التكييف
(وطريقة التشغيل والإطفاء تختلف من وحدة تكييف إلى أخرى)
هذا المفهوم تمت برمجته على الزر الافتراضي في التطبيق ليرسل الأمر إلى المُرحِّل أو الريلاي المُوصل في لوح التحكم في التكييف.
أما حساس الباب فيوضع على أجنحة التكييف المتحركة ليعطي قراءة بحالة التكييف عند تشغيله أو إطفاءه وذلك عند حركة أجنحة التكييف.
Blynk APP:
The way that the project is done in controlling the working of the air condition is through the air conditioner control panel in side it.
In the programming part:
Pressing the (on button) in the Blynk app for once turn the AC on.
Pressing the (off button) in the Blynk app for three times turn the AC off.
(And the method of turning on and off varies from one air conditioning unit to another).
But we have programmed the hypothetical button in the Blynk app to be pressed once and it will continue for three times sending the command for the relay that is connected to the control panel in side the AC.
Door sensor
It is placed on the wings of the air conditioning to give a reading of the condition of the air conditioning when it is turned on or off when the air conditioning wings are moving.
Wemos Setup Link (رابط إعداد الويموس):
رابط إعداد الويموس:
https://averagemaker.com/2018/03/wemos-d1-mini-set...
انتقل إلى الرابط أعلاه واتبع الخطوات لإعداد WEMOS.
Wemos Setup Link :
https://averagemaker.com/2018/03/wemos-d1-mini-set...
Go visit the link above and follow the steps to setup your WEMOS.
Arduino IDE Code (برمجة الاردوينو ):
#define BLYNK_PRINT Serial #include <ESP8266WiFi.h> #include <BlynkSimpleEsp8266.h> #include <DHT.h> char auth[] = ""; //Authentication token from blynk char ssid[] = ""; // Wifi name char pass[] = ""; //wifi password #define DHTPIN 2 #define DHTTYPE DHT11 int door1 = 12; //GPIO5 D6 Pin number on which door sensor is connected int door2 = 14; //GPIO15 D5 void myTimerEvent(){ //function for door status indication for AC1 if(digitalRead(door1) == 0){ // door closed Blynk.virtualWrite(V0, "AC1 OFF"); //print the status on the display widget in blynk project Blynk.virtualWrite(V2, LOW); } else if(digitalRead(door1) == 1){ Blynk.virtualWrite(V0, "AC1 ON"); Blynk.virtualWrite(V2, HIGH); } } void myTimerEvent2(){ //function for door status indication for AC2 if(digitalRead(door2) == 0){ Blynk.virtualWrite(V1, "AC2 OFF"); Blynk.virtualWrite(V3, LOW); }else if(digitalRead(door2) == 1) { Blynk.virtualWrite(V1, "AC2 ON"); Blynk.virtualWrite(V3, HIGH); } } DHT dht(DHTPIN, DHTTYPE); BlynkTimer timer; void sendSensor() { //function for the DHT sensor float h = dht.readHumidity(); float t = dht.readTemperature(); if (isnan(h) || isnan(t)) { Serial.println("Failed to read from DHT sensor!"); return; } Blynk.virtualWrite(V5, h); //show the value on the labeld value widget at blynk project Blynk.virtualWrite(V6, t); } int relay= D7; //D7 //to control the board for AC1 int relay2=15; //D8 //to control the board for AC2 BLYNK_WRITE(V2){ //the virtual button V2 in blynk project int pinData = param.asInt(); //method that returns the button state when its clicked if (pinData == 1){ // to turn AC on digitalWrite(relay,LOW); delay(1000); digitalWrite(relay,HIGH); }else{ // 3 clicks to turn the AC off digitalWrite(relay,LOW); delay(1000); digitalWrite(relay,HIGH); delay(1000); digitalWrite(relay,LOW); delay(1000); digitalWrite(relay,HIGH); delay(1000); digitalWrite(relay,LOW); delay(1000); digitalWrite(relay,HIGH); } } BLYNK_WRITE(V3){ //for the second AC int pinData = param.asInt(); //method that returns the button state when its clicked if (pinData == 1){ digitalWrite(relay2,LOW); delay(1000); digitalWrite(relay2,HIGH); }else{ digitalWrite(relay2,LOW); delay(1000); digitalWrite(relay2,HIGH); delay(1000); digitalWrite(relay2,LOW); delay(1000); digitalWrite(relay2,HIGH); delay(1000); digitalWrite(relay2,LOW); delay(1000); digitalWrite(relay2,HIGH); } } BLYNK_WRITE(V4){ //virtual button to turn both ACs ON int pinData = param.asInt(); if (pinData == 1){ if(digitalRead(door1)==0){ //if off Blynk.virtualWrite(V0, "AC1 ON"); //make it on Blynk.virtualWrite(V2, HIGH); digitalWrite(relay,LOW); delay(1000); digitalWrite(relay,HIGH); } if(digitalRead(door2)==0) { Blynk.virtualWrite(V1, "AC2 ON"); Blynk.virtualWrite(V3, HIGH); digitalWrite(relay2,LOW); delay(1000); digitalWrite(relay2,HIGH); } } } BLYNK_WRITE(V7){ ////virtual button to turn both ACs OFF int pinData = param.asInt(); if (pinData == 1){ if(digitalRead(door1) == 1){ //check if the AC's door is on/open Blynk.virtualWrite(V0, "AC1 OFF"); //make it off Blynk.virtualWrite(V2, LOW); digitalWrite(relay,LOW); delay(1000); digitalWrite(relay,HIGH); delay(1000); digitalWrite(relay,LOW); delay(1000); digitalWrite(relay,HIGH); delay(1000); digitalWrite(relay,LOW); delay(1000); digitalWrite(relay,HIGH); } if(digitalRead(door2)==1) { Blynk.virtualWrite(V1, "AC2 OFF"); Blynk.virtualWrite(V3, LOW); digitalWrite(relay2,LOW); delay(1000); digitalWrite(relay2,HIGH); delay(1000); digitalWrite(relay2,LOW); delay(1000); digitalWrite(relay2,HIGH); delay(1000); digitalWrite(relay2,LOW); delay(1000); digitalWrite(relay2,HIGH); } } } void setup() { pinMode(door1, INPUT_PULLUP); pinMode(door2, INPUT_PULLUP); pinMode(relay, OUTPUT); // set relay pin as output pinMode(relay2, OUTPUT); digitalWrite(relay,HIGH); digitalWrite(relay2,HIGH); // Debug console Serial.begin(9600); Blynk.begin(auth, ssid, pass); // Setup a function to be called every second timer.setInterval(1000L, myTimerEvent); timer.setInterval(1000L, myTimerEvent2); timer.setInterval(1000L, sendSensor); dht.begin(); } void loop() { Blynk.run(); timer.run(); }<br>
Downloads
فيديو (Video) :
فيديو:
فيديو لطريقة عمل المشروع
Video:
Video of how the project works.