ã¢ãã®ã€ã³ã¿ãŒãããïŒIoTãã¢ãã®ã€ã³ã¿ãŒãããïŒã¯ææãªåéã§ãããšã¢ããªã¹ãã¯èšããŸãã IoTã®äž»ãªåŸåã®1ã€ã¯ãäœå®
ã®èªååããŸãã¯ããŒã±ãã£ã³ã°æ
åœè
ãèšãããã«ãã¹ããŒãããŒã ãã®äœæã§ãã
å£é ã§ã®ç·Žç¿ã¯ãã®ãŸãŸã«ããŠãç¹å®ã®ãããžã§ã¯ããæ€èšããŸãããã
åé¡ã®å£°æ
ç§ã¯ã¢ã¹ã¯ã¯è¿ãã®èªåã®å®¶ã«äœãã§ããŸãã ãã®ã¿ã€ãã®å®¿æ³æœèšã®æãããªå©ç¹ã«å ããŠãããã€ãã®ãã¥ã¢ã³ã¹ããããŸãã 管çäŒç€Ÿãã¢ããŒãã®å»ºç©ã§å
±åäœæ¥ã®å€§éšåãåŒãåããå Žåãèªåã®å®¶ã§åå¥ã«è§£æ±ºããå¿
èŠããããŸãã
ç§ã«ãšã£ãŠãããã®ã¿ã¹ã¯ã®1ã€ã¯ãå ç±ã·ã¹ãã ã®ãªã¢ãŒãç£èŠãšå¶åŸ¡ã®å¿
èŠæ§ã§ããã ãã·ã¢äžéšã®å¬ã®ææ¿ã¯å¿«é©ãã®åé¡ã§ã¯ãªããçãæ®ãã®åé¡ã§ããããšã¯äºå®ã§ãã ç¹°ãè¿ã確èªãããŠããçµéšåã«ãããšããã¹ãŠã®ãã©ãã«ã¯æãäžé©åãªã¿ã€ãã³ã°ã§çºçããŸãã ç§ã®å®¶ã§10幎以äžç掻ããŠããç§ã¯ããã®æ³åŸã®æå¹æ§ã確信ããŸããã
ããããããšãã°ã30床ã®éã®äžã§çµŠæ°Žãã³ãã®æ
éãäœãšãå
æã§ããå Žåãææ¿ãã€ã©ãŒã®æ
éã¯çœå®³ã«å€ãããŸãã ãã®ãããªéã§ã¯ãéåžžæç±ããã家ã¯1æ¥ä»¥å
ã«å·ããŸãã
å¬ãå«ããç§ã¯ãã°ãã°é·ãé家ã«åž°ããªããã°ãªããŸããã ãããã£ãŠãææ¿ã·ã¹ãã ã®ç¶æ
ãšãã®å¶åŸ¡ããªã¢ãŒãã§ç£èŠããæ©èœã¯ãç§ã«ãšã£ãŠæ¥åãšãªã£ãŠããŸãã
ç§ã®å®¶ã§ã¯ãææ¿ã·ã¹ãã ã«ã¯2ã€ã®ãã€ã©ãŒããããŸãã1ã€ã¯ãœãŒã©ãŒãã€ã©ãŒïŒãŸããã¬ã¹ã¯ãªããäºæãããŠããŸããïŒãš1ã€ã§ãã ãã®éžæã¯ãäºçŽã®åé¡ã ãã§ãªããææ¿è²»ã®æé©åã«ãèµ·å ããŠããŸãã å€ã«ã¯ãæ¿ããéãé€ããŠãé»æ°ãã€ã©ãŒãäœåããŸããããã¯ã2é¢çšã®é»æ°ã¡ãŒã¿ãŒã家ã«èšçœ®ãããŠããããã§ãã ãã®ãã€ã©ãŒã®é»åã¯ãå¿«é©ãªå€ã®æž©åºŠïŒ18ã19床ïŒã«ååã§ãã ååŸããœãŒã©ãŒãã€ã©ãŒãä»äºã«å
¥ãã枩床ã22ã23床ã«äžããŸãã ãã®ã¢ãŒãã§ã¯ãå ç±ã·ã¹ãã ã¯æ°å¹Žé皌åããŠããããã®ãªãã·ã§ã³ãçµæžçã§ãããšçµè«ä»ããããšãã§ããŸãã
å ç±ã·ã¹ãã ã®æ¯æ¥ã®æååãæ¿ããæãåççãªéžæã§ã¯ãªãããšã¯æããã§ããããããã®ããã»ã¹ãèªååãããšåæã«ããªã¢ãŒãã³ã³ãããŒã«ã®å¯èœæ§ãæäŸããããšã決å®ãããŸããã
åç
§æ¡ä»¶
éçºè
ã®ç¿æ
£ã«åŸã£ãŠãç§ãæåã«ããããšã¯ãäœæãããå¶åŸ¡ã·ã¹ãã ã®èŠä»¶ãäœç³»åããŠãæè¡çãªã¿ã¹ã¯ã«äŒŒããã®ãèªåã§äœæããããšã§ããã
èšèšãœãªã¥ãŒã·ã§ã³ã®åºæ¬çãªèŠä»¶ã®çããªã¹ãã¯æ¬¡ã®ãšããã§ãã
- 家ãè·¯äžã§æž©åºŠãå¶åŸ¡ãã
- å ç±ãã€ã©ãŒãéžæããããã®3ã€ã®ã¢ãŒããæäŸããŸãïŒè©³çŽ°ã¯ä»¥äžïŒ
- ã·ã¹ãã ã®ç¶æ
ãšãã®ç®¡çã®ãªã¢ãŒãç£èŠãæäŸããŸã
æåã¯ããªã¹ãã«ã¯ããã«ããã€ãã®é
ç®ããããŸããããããŸããŸãªçç±ã§é€å€ãããŸããã ããšãã°ãçŸåšã®ãã©ã¡ãŒã¿ãŒã®è¡šç€ºãšã¿ããã¹ã¯ãªãŒã³ãä»ããŠå¶åŸ¡ããæ©èœãåããç»é¢ãã·ã¹ãã ã«è£
åããããšãèšç»ããŸããã ããããã€ã³ã¿ãŒããããä»ãããªã¢ãŒãã³ã³ãããŒã«ã®äžå¿
èŠãªè€è£œã®ããã«æããŸããã ãã¡ãããããŒã«ã«ã§ã®è¡šç€ºãšå¶åŸ¡ãå¿
èŠãªå Žåãéåžžã«çŸå®çãªç¶æ³ãæãã€ãããšãã§ããŸãã ç§ã¯è°è«ããŸãããããã®æ©èœãã·ã¹ãã ã®è€éããšã³ã¹ããããã«å¿
èŠãšããããšãå¿ããªãã§ãã ããã
ææ¿ã·ã¹ãã å¶åŸ¡ã¢ã«ãŽãªãºã ã«ã¯ãå®å
šãªåé»ã«é¢é£ããé»ç€ºé²ã·ããªãªãå«ãŸããŠããŸãã æ確ãªããžãã¹ããã®å Žåããªã¢ãŒãã³ã³ãããŒã«ã«ã€ããŠè©±ãå¿
èŠã¯ãããŸããã ãããã家ã«ãã人ã¯ãããã€ãã®ç°¡åãªæäœã§ç·æ¥ææ¿ã¢ãŒãã«å
¥ãããšãã§ããŸãã 1ã€ã®å€éš4極ãã°ã«ã¹ã€ãããåãæ¿ããŠãäºåã®ã¬ãœãªã³é§åçºé»æ©ãèµ·åããã ãã§ååã§ãã ããã«ããããœãŒã©ãŒãã€ã©ãŒã®é転ããªãã©ã€ã³ã«ãªããŸãã å®éã«ã¯ãæ°·éšãé»åç·ã®é
ç·ã®å€§èŠæš¡ãªç Žæã«ã€ãªãã£ããšãã«ãããã¯ãã§ã«æ°åçºçããŠããŸãã
è¿ä»£çãªææ¿ãã€ã©ãŒã¯ãéåžžãåŸæ¥ã®2ç·ã±ãŒãã«ã§æ¥ç¶ããããªã¢ãŒãã³ã³ãããŒã«ãŠããããåããŠããŸãã å·¥å Žã®å¶åŸ¡åè·¯ã«å
¥ããªãããã«ããããã®ã¯ã€ã€èªäœãéå€ãããããšã決å®ãããŸããã åŸæ¥ã®é»æ°æ©æ¢°åŒãªã¬ãŒã«ããæç·ã¯ããã€ã©ãŒã®ã·ã£ããããŠã³ã«ã€ãªãããŸãã
IoTã»ãã¥ãªãã£æ¹æ³
ã¹ããŒãããŒã ããããã³ã°ããå Žåã®çµæã«ã€ããŠã®ãã©ãŒã¹ããŒãªãŒãèªãã§ãç§ã¯ãããå®å
šã«ãã¬ã€ããå€éšã®ãããã³ã°ã®å¯èœæ§ãæå°éã«æããããšã«ããŸããã 誰ããããªãã®ã¹ããŒãããŒã ã解ãå¿
èŠããããšèšãã§ãããã ç§ã¯åæããŸããããã®å¯èœæ§ã¯æå°éã§ãããWebãµãŒããŒã®å®æçãªãããã³ã°ã®è©Šã¿ã芳å¯ããŠãç§ã¯ååã«åºã¥ããŠè¡åããããšã«ããŸããã åè«ã
ãããè¡ãããã«ãäžå€®ãµãŒããŒãåæ£ã¹ããŒãã»ã³ãµãŒïŒããã€ã¹ïŒã®ç®¡çãéå§ãããšãã«ãäžè¬çãªãã©ãã€ã ãæŸæ£ããŸããã ã¯ã©ã€ã¢ã³ããã¹ããŒãã»ã³ãµãŒã§ããåŸæ¥ã®ã¯ã©ã€ã¢ã³ã/ãµãŒããŒã¹ããŒã ã䜿çšããããšã決å®ãããŸããã
ãã®ãããªã¢ãŒããã¯ãã£ã®éžæã¯ãIoTã§ã¯åžžã«å¯èœãšããããã§ã¯ãããŸãããããã®å Žåãææ¿ã·ã¹ãã ã¯ååã«å€§ããªæ
£æ§ãæã£ãŠãããããéåžžã«åãå
¥ããããŸãã ã·ã¹ãã ã®èšå®ïŒéšå±ã®æž©åºŠãªã©ïŒãç¬æãã€ä»»æã«å€æŽãããå¯èœæ§ãããå Žåã§ããèšå®ããããã©ã¡ãŒã¿ãŒãå³åº§ã«éæããããšã¯ã§ããŸããã
ããŒã¿äº€æã®ã€ãã·ã¢ãããã¹ããŒãã»ã³ãµãŒã®åŽé¢ã«è»¢éããããšã«ãããèŠç¥ãã¬äººã«ãããããã³ã°ãã»ãŒå®å
šã«æé€ããããšãã§ããŸãã çµå±ã®ãšãããã»ã³ãµãŒã¯ãµãŒããŒããã®èŠæ±ã«å¯Ÿããå¿çã®ã¿ãèªèããŸãã çè«çã«ã¯ããã®ãããªãªã¯ãšã¹ããã€ã³ã¿ãŒã»ããããŠã¬ã¹ãã³ã¹ã眮ãæããããšãã§ããŸããããã®è
åšã¯ãããšãã°httpsãããã³ã«ã«ãã£ãŠæå°éã«æããããŸãã ã»ã³ãµãŒã§ãã®ãããã³ã«ãäžããå¿
èŠããªãå Žåã¯ãæ»æè
ãäºåã«ç¥ããªããã©ã¡ãŒã¿ãèæ
®ããŠãã§ãã¯ãµã ãèšç®ããããªã¢ã³ãããããŸãã ãããããã®æå·ã®åé¡ã¯ãã®ãããã¯ã®ç¯å²ãè¶
ããŠããŸãã
ãµãŒããŒãèŠæ±ã«å¯Ÿããå¿çãåä¿¡ããªãã£ãå Žåãã¹ããŒãã»ã³ãµãŒã¯ãç¹å®ã®ã¿ã€ã ã¢ãŠããåŸ
ã£ãåŸã以åã«èšå®ãããã¢ãŒãã§åäœãç¶ããŸãã
ãµãŒããŒãšããŠãMySQLããŒã¿ããŒã¹ãæã€å°ããªWebãµã€ããäœæããããšã決å®ãããŸãããMySQLããŒã¿ããŒã¹ã¯ãç§ã®ãµã€ãã®ããããã®ç¬¬3ã¬ãã«ãã¡ã€ã³ã«ãããã€ãããŸããã ãã®ãµã€ãã¯ã¢ãããã£ãã¬ã€ã¢ãŠãã䜿çšããŠèšè¿°ãããŠãããããã¹ããŒããã©ã³ã§å¿«é©ã«äœæ¥ã§ããŸãã
ãµãŒããŒãšæ
å ±ã亀æããããã«ã5åéãéžæãããŸããã
äžéšã«ã¯ããã®éžæã¯é»æ°ãã€ã©ãŒã®åŸ®åŠãªéãã«ãããã®ã§ãã ããŒã¿ãŒãã©ã¹ã³å
ã®ç±æ¹¯ãçºç±äœã®äœç±ãã沞隰ããã®ãé²ãããããããããã€ã©ãŒã©ã³ã¢ãŠãã䜿çšãããŸãã èšãæããã°ãå ç±çŽ åããªãã«ããåŸãå圢ãã³ãã¯ãã°ããåäœãç¶ããŸãã ãã€ã©ãŒã§ã¯ãããã©ã«ãã§ã¯4åéå®è¡ãããŸããããã£ãšé·ãããããšãã§ããŸãã ãããã£ãŠã5åéã®äº€æééã¯å ç±ã·ã¹ãã ã®ããžãã¯ã«é©åããŸãã ã¯ãããããŠãããé »ç¹ãªããŒã¿äº€æã¯äœã®å©çããããããããµãŒããŒããŒã¿ããŒã¹å
ã®ã¬ã³ãŒãæ°ã®å¢å ã«ã€ãªãããŸããã
äœæ¥ã¢ã«ãŽãªãºã
æ°è±¡ã¢ãžã¥ãŒã«ãšåŒã°ããã¹ããŒãã»ã³ãµãŒã®åäœã«ã¯ãç°åžžãªãã®ã¯å«ãŸããŠããŸããã ãµã€ã¯ã«ã§ã¯ã枩床ããã³æ¹¿åºŠã»ã³ãµãŒã調ã¹ãããŸãã ããã¯çŽ4.5åéç¶ããŸãã 次ã«ããµãŒããŒãžã®GETèŠæ±ãçæãããåä¿¡ããå¿çãåŠçãããŸãã ãã®çµæãæéïŒã¡ã€ã³ãµã€ã¯ã«ïŒã¯çŽ5åã®æéã§ååŸãããŸãã å®å
šãªç²ŸåºŠã¯å¿
èŠãããŸããããå®éã«ã¯æ°ç§ã§æéãçããªããåŸã
ã«ã·ããããŸãã 1æ¥5åã®çæ³çãªæéã§ã¯ã288ã®æž¬å®å€ãéä¿¡ãããŸãããå®éã«ã¯289ã290ããããŸãã ããã¯ãã·ã¹ãã ã®åäœã«ãŸã£ãã圱é¿ããŸããã
詳现ãªã³ã¡ã³ãä»ãã®ããã°ã©ã ã®ã¡ã€ã³ã¹ã±ããããªã¹ãã«è¡šç€ºãããŸãã èšå€§ãªã³ãŒãã®ããã䜿çšããã«ãŒãã³ã®å®è£
ãå
¬éããŸããã§ããã ãªã¹ãã«ã¯ã端æ«ãžã®åºåçšã®èšºæã¡ãã»ãŒãžãå«ãŸããŠããŸãã
ããã°ã©ã ã®ã¡ã€ã³ã¹ã±ãã // libs #include <Wire.h> #include "DHT.h" // wired connections // I2C, 104 #define DS3231_I2C_ADDRESS 104 // define #define HYSTERESIS 0.5 // , #define LONG_CYCLE 9 // , 9 - 5 #define SHORT_CYCLE 13 // , 13 . 30 #define DAY_BEGIN 6 // #define DAY_END 22 // #define MIN_INTERVAL 3000 // 3 #define PIN_DHT_IN 23 // AM2301 #define PIN_DHT_OUT 22 // AM2301 #define DHTTYPE DHT21 DHT dhtin(PIN_DHT_IN, DHTTYPE); DHT dhtout(PIN_DHT_OUT, DHTTYPE); #define RELAY_E 25 // #define RELAY_D 24 // #define LED_R 27 // LED RGB #define LED_G 29 // LED RGB #define LED_B 31 // LED RGB #define LED 13 // #define LEAP_YEAR(_year) ((_year%4)==0) // // vars uint32_t workTime; // float hIn; // float tIn; // float hOut; // float tOut; // float tModule; // float tInSet; // float tOutSet; // . . byte seconds, minutes, hours, day, date, month, year; byte del; // , char weekDay[4]; byte tMSB, tLSB; float temp3231; static byte monthDays[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; uint32_t unixSeconds; // UNIX uint16_t timeWorkElectro; // () uint16_t timeWorkDiesel; // () uint32_t unixSecondsStartCycle; // UNIX int modeWork; // , 0 - auto, 1 - -, 2 - -, 3 - -, 4 - -, 5 - - byte typeBoiler; // , 0 - , 1 - , 2 - char statusBoiler; // char unit = '1'; // id char mode; // String message; // char ans; // String answerServer; // String tInSer; // = String tOutSer; // = String timeSer; // = char datetime[15]; // void setup() { Serial.begin(115200); // COM Serial.println("Start setup()"); Serial.println("Meteo Module. Ver.13.0 Unit Number: " + String(unit)); pinMode(LED, OUTPUT); //LED flash pinMode(LED_R, OUTPUT); //LED_R pinMode(LED_G, OUTPUT); //LED_G pinMode(LED_B, OUTPUT); //LED_B // Wire.begin(); //set control register to output square wave on pin 3 at 1Hz Wire.beginTransmission(DS3231_I2C_ADDRESS); // 104 is DS3231 device address Wire.write(0x0E); Wire.write(B00000000); Wire.write(B10001000); Wire.endTransmission(); // tInSet = 21; tOutSet = -15; // pinMode(PIN_DHT_OUT, INPUT_PULLUP); dhtout.begin(); // pinMode(PIN_DHT_IN, INPUT_PULLUP); dhtin.begin(); // pinMode(RELAY_E, OUTPUT); pinMode(RELAY_D, OUTPUT); modeWork = 0; // // relayElectroSwitchOff(); relayDieselSwitchOff(); timeWorkElectro = 0; // timeWorkDiesel = 0; unixSecondsStartCycle = 0; // typeBoiler = 0; Serial.println("All Boilers Off"); digitalWrite(LED_G, HIGH); // RGB-. , // serial 1 is to esp8266 Serial1.begin(115200); // ESP8266 Serial1.setTimeout(1000); while (!Serial1); String startcommand = "AT+CWMODE=1"; // ESP8266 Serial1.println(startcommand); Serial.println(startcommand); delay(2000); del = 0; // } void loop() { Serial.print("Start loop(). "); // get3231Date(); // unixSeconds = timeUnix(seconds, minutes, hours, date, month, year); // UNIX- Serial.print("Current datetime: "); Serial.print(weekDay); Serial.print(", "); if (date < 10) Serial.print("0"); Serial.print(date, DEC); Serial.print("."); if (month < 10) Serial.print("0"); Serial.print(month, DEC); Serial.print("."); Serial.print(year, DEC); Serial.print(" - "); if (hours < 10) Serial.print("0"); Serial.print(hours, DEC); Serial.print(":"); if (minutes < 10) Serial.print("0"); Serial.print(minutes, DEC); Serial.print(":"); if (seconds < 10) Serial.print("0"); Serial.println(seconds, DEC); // Serial.println("Getting temperature and himidity"); getSensors(); // collectServerData(); // // Serial.println("Send data to server"); connectServer(); // controlServer(); // switch(modeWork){ case 0: // Serial.println("Current Mode: Auto"); autoMode(); break; case 1: // Serial.println("Manual Mode"); manualMode1(); break; case 2: // Serial.println("Manual Mode"); manualMode2(); break; case 3: // Serial.println("Manual Mode"); manualMode3(); break; case 4: // Serial.println("Semi Auto Mode Electro"); semiAutoMode4(); break; case 5: // Serial.println("Semi Auto Mode Diesel"); semiAutoMode5(); break; } del = LONG_CYCLE; // while (del > 0) { Serial.print("Start short cycle #"); Serial.println(del); // mDelay(SHORT_CYCLE); // Serial.println("Getting temperature and himidity"); getSensors(); del
åè¿°ããããã«ã倩æ°ã¢ãžã¥ãŒã«ã«ã¯3ã€ã®åäœã¢ãŒãããããŸãã
- èªå
- åèªå
- ããã¥ã¢ã«
èªåã¢ãŒãã§ã¯ãæ°è±¡ã¢ãžã¥ãŒã«ã¯ãå
èµã®ãªã¢ã«ã¿ã€ã ã¯ããã¯ã«åºã¥ããŠãäžåºŠã«ãªã³ã«ãããã€ã©ãŒãéžæããŸãã é»æ°ã®é¢çšãåŒãäžããããæéã®éã«ãé»æ°ãã€ã©ãŒãèµ·åãããŸãã
ãã®ã·ã¹ãã ã®åæããŒãžã§ã³ã§ã¯ããã£ãŒãŒã«çæãç¯çŽããããã«ãæŒéã§ãé»æ°ãã€ã©ãŒãäœåãããããšãå¯èœã§ããã ãã®å®æœåœ¢æ
ã§ã¯ãæ°è±¡ã¢ãžã¥ãŒã«ã¯ãæ¥äžã®é»æ°ãã€ã©ãŒã®æç¶æéãç£èŠããã 1æé以å
ã«å®¶ã®èšå®æž©åºŠã«éããããšãã§ããªãã£ãå Žåãé»æ°ãã€ã©ãŒã®é»æºãåããäžæåæ¢ããŠãããœãŒã©ãŒãã€ã©ãŒããªã³ã«ããŸããã
æåã®å¬ã®çµéšã«ãããšããã®ãªãã·ã§ã³ã¯åé€ãããŸããã çç±ã¯ãé»æ°ãã€ã©ãŒã®é»åãäžååã§ãã£ããããæ¯èŒçå³ããéïŒ-10床æªæºïŒã§æå®ã®å¿«é©ãªæž©åºŠãéæã§ããªãã£ãããã§ãã ãã®ãããååŸã«èªåã¢ãŒãã§æ確ã«ãœãŒã©ãŒãã€ã©ãŒãèµ·åããããšã決å®ãããŸããã
åèªåã¢ãŒãã¯ãæ°è±¡ã¢ãžã¥ãŒã«ã®æž©åºŠã»ã³ãµãŒã«å¿ããŠãã®åäœã®èªå調æŽãç¶æããªããããã€ã©ãŒãå³å¯ã«éžæããããšãæå³ããŸãã ãã®ã¢ãŒãã¯ãããã€ãã®å Žåã«æçšã§ããããšã蚌æãããŠããŸãã ãŸãã1ã€ã®ãã€ã©ãŒãæ
éãããšãæå»ã«é¢ä¿ãªããå¥ã®ãã€ã©ãŒã®åäœã匷å¶çã«èšå®ãããŸãã 第äºã«ãç©ãããªéãšéªè§£ãã§ã¯ã24æéé»æ°ãã€ã©ãŒããªã³ã«ããããšãã§ããŸããéã«ãéåžžã«å³ããéã§ã¯ããœãŒã©ãŒãã€ã©ãŒã®ã¿ãèµ·åã§ããŸãã
ç§ã¯å®è³ªçã«æåã¢ãŒãã䜿çšããŸããã ããã¯ãæäœã®ããã«ç¹å®ã®ãã€ã©ãŒãéžæããã ãã§ãªããæšæºã®å€éšãŠãããã«å¶åŸ¡ã移ãããšãæå³ããŸãã ã€ãŸãããã€ã©ãŒã¯ããã®ãŠãããã®èšå®æž©åºŠãã©ã¡ãŒã¿ãŒã«ãã£ãŠå¶åŸ¡ãããŸãã ãã®ã¢ãŒãã®æ°è±¡ã¢ãžã¥ãŒã«ã¯ã枩床ãšæ¹¿åºŠãç£èŠããããã®ã¹ããŒã·ã§ã³ãšããŠã®ã¿æ©èœãç¶ããŸãã
ãµãŒããŒãžã®ãªã¯ãšã¹ãã§ãæ°è±¡ã¢ãžã¥ãŒã«ã¯ããã€ã©ãŒã®çŸåšã®ç¶æ
ïŒéžæãããŠãããã€ã©ãŒã皌åããŠããªããã€ã©ãŒïŒãæ°è±¡ã¢ãžã¥ãŒã«ã®çŸåšã®çŸå°æéãéå»5åéã®ãã€ã©ãŒã®æéã家ã®å
å€ã®çŸåšã®æž©åºŠãšæ¹¿åºŠã«é¢ããæ
å ±ãå«ãããŒã¿ãã±ãããéä¿¡ããŸãã èŠæ±ã«ã¯ã倩æ°ã¢ãžã¥ãŒã«ã®èå¥åãå«ãŸããŸãã ç§ã®å Žåãããã¯äžèŠã§ãããã¹ã±ãŒãªã³ã°ã®ããã®èšèšã®ç¿æ
£ãæããããŸããã
èŠæ±ãéä¿¡ããåŸã倩æ°ã¢ãžã¥ãŒã«ã¯20ç§ä»¥å
ã«ãµãŒããŒã®å¿çãåŸ
ã¡ãŸãã åä¿¡ããåçã¯ãæ£èŠè¡šçŸã䜿çšããŠè§£æãããŸãã ãµãŒããŒå¿çã«ã¯4ã€ã®ãã©ã¡ãŒã¿ãŒããããŸãã
- 家ã®äžã®æž©åºŠã®ãããå€
- 家ã®å€ã®éŸå€æž©åºŠ
- æäœã¢ãŒããèšå®ãã
- ã¢ãžã¥ãŒã«ã®ãªã¢ã«ã¿ã€ã ã¯ããã¯ã®åæã»ããã¢ããæé
çŸåšã®ããŒãžã§ã³ã§ã¯ãå€æ°æž©åºŠã®ãããå€ã¯äœ¿çšãããŠããŸããã ãã®å¯èœæ§ã¯ããè¹å€ãã®æž©åºŠã«å¿ããŠãå ç±ãã¿ãŒã³ã®éžæã®å®è£
ã«æäŸãããŸããã ãããããã®æ©èœã¯å®è£
ãããã§ãããã
æåŸã®ãã©ã¡ãŒã¿ãŒã¯ã»ãšãã©å¿
èŠãããŸããã ç§ã¯åœŒã«äºåºŠã ãå°ããã ã¢ãžã¥ãŒã«ã®æåã®èµ·åæãããã³ãªã¢ã«ã¿ã€ã ã¯ããã¯ã¢ãžã¥ãŒã«ã®ããããªãŒäº€æåŸã äžæçãªèšå®ãå€æŽããå¿
èŠããªãå Žåããã®ãã©ã¡ãŒã¿ãŒã¯ãŒãã§ãã
ãµãŒããŒããã®å¿çã解æããåŸããã€ã©ãŒã®çŸåšã®æäœæéã«ãŠã³ã¿ãŒããªã»ãããããŸãã çµå±ã以åã®å€ã¯æ¢ã«ãµãŒããŒã«éä¿¡ãããŠããŸãã ãªã»ãããããšãããµãŒããŒããã®å¿çãåŸ
ã€ããã®äžæåæ¢æéãèæ
®ãããŸãã
éä¿¡ããããã€ã©ãŒé転æéã«ã¯æšå®å€ãããããšã«æ³šæããŠãã ããã ãã®ãã©ã¡ãŒã¿ãŒã¯ãããšãã°æ¶è²»é»åãèš±å¯ããŸããã ããã¯ãå ç±ãã€ã©ãŒã®æ©èœã«ãããã®ã§ãã ããšãã°ããã€ã©ãŒå
ã®æž©åºŠã80床ã«éãããšãªãã«ãªããŸããã埪ç°ãã³ãã¯åäœãç¶ããŸãã ã¯ãŒã©ã³ãã®æž©åºŠã60床ã«äžãããšããã€ã©ãŒã¯åã³ãªã³ã«ãªããŸãã æ°è±¡ã¢ãžã¥ãŒã«ã¯ããã€ã©ãŒã家ã®äžã®æž©åºŠãããå€ã«éãããŸã§ã«ããã£ãåèšæéã®ã¿ã枬å®ããŸãã
èšå®æž©åºŠã«éãããšããã€ã©ãŒã®ã¹ã€ããããªãã«ãªããæ°è±¡ã¢ãžã¥ãŒã«ã¯30ç§ã®é »åºŠã§æž©åºŠã€ã³ãžã±ãŒã¿ãŒãèªã¿åãç¶ããŸãã 枩床ã0.5床以äžäœäžãããšãå ç±ãã€ã©ãŒãåã³ãªã³ã«ãªããŸãã ãã®ãã¹ããªã·ã¹å€ã¯ãå ç±ã·ã¹ãã ã®æ
£æ§ãèæ
®ããŠçµéšçã«éžæãããŸããã
æ°è±¡ã¢ãžã¥ãŒã«ã®æäœæ§ãèŠèŠçã«ç€ºãããã枩床枬å®ãµã€ã¯ã«éã®é
延ãµãã«ãŒãã³ã«ç¹æ»
ããå
èµLEDãè¿œå ãããŠããŸãã
ãã€ã©ãŒã®åäœã¢ãŒãã®éžæã¯ã5åéã®çµããã«çºçããããšã«æ³šæããŠãã ããã ã¢ãžã¥ãŒã«ãåããŠãªã³ã«ãããšãããŸãã¯ã¢ãžã¥ãŒã«ãåèµ·åãããšããããã©ã«ãã¢ãŒãã¯èªåã§ãã
å®è£
ãã®ã¢ã€ãã¢ãå®è£
ããããã«ãæå
ã«ãããã®ã䜿çšããŸããã Arduinoã¢ãžã¥ãŒã«ã䜿çšããŠå€©æ°ã¢ãžã¥ãŒã«ãæ§ç¯ããããšã決å®ãããŸããã ããã»ããµããŒããMega 2560ã«ãªã£ãããããããŸã§ã®å®éšã®æ®ãã®éšåã ãã®ããŒãã¯ãã®ã¿ã¹ã¯ã«ã¯æããã«åé·ã§ãããå©çšå¯èœã§ããã ããã«ã圌女ã®ãããã¿ã€ãã·ãŒã«ããããããã®äžã«ä»ã®ã»ãšãã©ãã¹ãŠã®ã¢ãžã¥ãŒã«ãé
眮ãããŠããŸããã ããã¯ããªã¢ã«ã¿ã€ã ã¯ããã¯DS3231ããã³WiFiã¢ãžã¥ãŒã«ESP8266ïŒ01ïŒã§ãã é»æ°ãã€ã©ãŒãšãœãŒã©ãŒãã€ã©ãŒãå¥ã
ã«å¶åŸ¡ããããã«ã2ã€ã®ãªã¬ãŒãåããã¹ã€ããã³ã°ãŠãããã賌å
¥ãããŸããã
æ¢åã®ã³ã³ãã¥ãŒã¿ãŒã®é»æºãé»æºãšããŠäœ¿çšãããŸããã ãåç¥ã®ããã«ããã®ãããªãããã¯ã§ã¯ãäºæ¬¡äŸçµŠé»å§ã®ããªãå¹
åºãéžæããããŸãã + 5VããããESP8266 WiFiã¢ãžã¥ãŒã«ã䜿çšããå Žåã¯ç¹ã«éèŠã§ã+ 3.3Vã§ãã ããã«ããããã®ãŠãããã¯æ°è±¡ã¢ãžã¥ãŒã«ã®é£ç¶æ§ãèæ
®ããŠéåžžã«ä¿¡é Œæ§ããããŸãã
å³ã¯ãåè·¯åºæ¿ã®åãæ¿ãã瀺ããŠããŸãã åè·¯å³ã¯ããã®èšŒæ ãèæ
®ããŠæãããŠããŸããã å³ã«ã¯ã倩æ°ã¢ãžã¥ãŒã«ã®åäœã¢ãŒããèŠèŠçã«ç€ºãRGB LEDããããŸãã ç·è²ã¯ãã€ã©ãŒããªãã§ããããšã瀺ããèµ€è²ã¯ãœãŒã©ãŒãã€ã©ãŒãæå³ããéè²ã¯é»æ°ãæå³ããŸãã ç§ã¯æå
ã«220ãªãŒã ã®æµæåšãæã£ãŠããªãã£ããããRGB LEDã¯é»æµå¶éæµæåšãªãã§ããŒãåºåã«çŽæ¥æ¥ç¶ãããŠããŸããã ç§ã¯èªåãééã£ãŠãããšåçœããŸãããæèçã«ãªã¹ã¯ãåããŸããã åLEDåºåã®æ¶è²»é»æµã¯ããã20 mAã§ãããŒãã®åºåã«ããæ倧40 mAãæ¥ç¶ã§ããŸãã 3幎éã®éçšã§ã¯ããããŸã§åé¡ã¯ãããŸããã§ããã
枩床ã»ã³ãµãŒãšããŠDHT21ïŒAM2301ïŒã䜿çšãããŸããã åœåã家ã®äžã®æž©åºŠã枬å®ããããã«DHT11ã»ã³ãµãŒã䜿çšããŠããŸãããã枬å®ç²ŸåºŠãéåžžã«äœããäžæãªçç±ã«ããã2ã€ã®ç°ãªãã¿ã€ãã®ã»ã³ãµãŒãåè·¯ã§äœ¿çšããããšãã«DTH.hã©ã€ãã©ãªãæ£ããæ©èœããŸããã§ããã ããããé床ã®ãšã©ãŒã«ããDHT11ã®çœ®ãæãã¯æããã ã£ããããã©ã€ãã©ãªã®åé¡ã«ã¯å¯ŸåŠããŸããã§ããã
åè§ã®äžã®æ°åã¯ãå€éšããã€ã¹ãã¡ã€ã³ããŒãã«æ¥ç¶ããã¯ã€ã€ã®æ°ã瀺ããŠããŸãã
åè·¯å
šäœã¯ãé
ç·ã«äœ¿çšããããã³ãžä»ãéå±ã·ãŒã«ãã«çµã¿ç«ãŠãããŸããã ãã®ãããªã±ãŒã¹ã®éžæã¯ãæå
ã«ãã£ããã®ãšãé¢é£ããŠããŸããã
ããããããã§ã¯å®å
šã«äºæž¬å¯èœãªé©ããåŸ
ã£ãŠããŸããã ãã¢ãå®å
šã«éããç¶æ
ã§ãã·ãŒã«ãããŠãžã³ã°ãWiFiä¿¡å·ãã·ãŒã«ãããŸããã å¥ã®é©åãªå»ºç©ãæ¢ããŠãã¹ãŠãåããŠã³ãããå¿
èŠã¯ãªãã£ãããããã¢ãåéãã«ããŠããå¿
èŠããããŸããã ã ããç§ã¯ãã¢ãéããŠ3幎éäœãã§ããŸãã
管çãµãŒããŒ
ç£èŠãšå¶åŸ¡ã«äœ¿çšãããWebãµãŒããŒã¯ãçŽç²ãªPHPã§èšè¿°ãããé©å¿ã¬ã€ã¢ãŠããåããŠããŸãã åœåã¯ãAndroidçšã®ã¢ããªã±ãŒã·ã§ã³ãäœæãããšããã¢ã€ãã¢ããããŸãããããµãŒããŒãå¿
èŠã«ãªãããããã®ã¢ã€ãã¢ãæåŠããŸããã
æ¿èªåŸãæ
å ±ãå«ãããã€ãã®ããŒãžãå©çšå¯èœã«ãªããŸãã ããã¯ãæ°è±¡ã¢ãžã¥ãŒã«ããæåŸã«åä¿¡ããèŠæ±ãçŸåšã®æéã®å€ã®è¡šãããã³ä»»æã®æéã®èŠçŽæ
å ±ã®ã°ã©ãã£ãã¯è¡šç€ºã«ããã·ã¹ãã ã®çŸåšã®ç¶æ
ã§ãã 倩æ°ã¢ãžã¥ãŒã«ãå¶åŸ¡ããããã®èšå®ãéžæã§ããããŒãžããããŸãã
ãã®èšäºãæžããŠããæç¹ã§ã¯ãææ¿ã·ãŒãºã³ãçµäºããŠããããã倩æ°ã¢ãžã¥ãŒã«ã¯æ¢ã«ãªãã«ãªã£ãŠããŸãã ãããã£ãŠããµã€ãã®ã¡ã€ã³ããŒãžã®ãã¹ãŠã®ãã©ã¡ãŒã¿ãŒã¯ãã·ã£ããããŠã³æã«é¢é£ããŠããŸãã æ°é
ãã®ããèªè
ã¯ã5æ2æ¥ã§ããããšã«æ°ä»ãã§ãããã
ã°ã©ãã®äŸãšããŠãå€ã¯2018幎1æ25æ¥ã«è¡šç€ºãããŸãã æ£ã°ã©ãã¯ãã€ã©ãŒã®çšŒåæéã瀺ããŠããŸãã
ãã©ã¡ãŒã¿èšå®ããŒãž
ãã§ã«è¿°ã¹ãããã«ãå人äœå®
ã®ææ¿ã·ã¹ãã ãç£èŠããã³å¶åŸ¡ããããã®ãã®ãœãªã¥ãŒã·ã§ã³ã¯ã3ã€ã®ææ¿ã·ãŒãºã³ã§ãã§ã«æ©èœããŠããŸãã ãã®éãã€ã³ã¿ãŒããããžã®ãã£ãã«ãé·æã«ããã£ãŠæ¶å€±ããããšã«ãããã³ã°ã¯2ã€ãããããŸããã§ããã ããã«ã倩æ°ã¢ãžã¥ãŒã«å
šäœããã³ã°ããã®ã§ã¯ãªããESP8266 WiFiã¢ãžã¥ãŒã«ã®ã¿ããã³ã°ããŸããã
äžè¬ã«ãã·ã¹ãã ã®æ©èœã¯ç§ã«å®å
šã«åã£ãŠããŸããã䜿çšãããã©ãããã©ãŒã ã®æãããªåé·æ§ãèæ
®ããŠãæ¡åŒµããããšãèããŠããŸãã