家居活動:利用IoT技術和IFTTT打造「智能家居」(學生版)Household project: Make your home ‘smart’ using IoT and IFTTT (Student's version)


前言Introduction

IoT技術(又稱物聯網) 是一個可以把不同儀器和裝置透過網絡連接起來的系統,它可以確保物件與物件之間的資訊傳遞。

透過IoT技術,我們也可打造「智能家居」。在這個活動,我們將會應用IoT和 IFTTT,製作一個「智能」雪櫃和一個「智能」水龍頭。

The Internet of Things (IoT) is a system that connects device and equipment through Internet. It enables the transfer of information between them.

By using IoT, we can make our home ‘smart’. In this project, we are going to integrate the technology of IoT and IFTTT to make a ‘smart’ refrigerator and a ‘smart’ water tap!



STSE
了解甚麼是IoT技術Understanding more about IoT
IoT技術是甚麼?What is IoT?

The Internet of Things (IoT) describes the network of objects that are equipped with sensors, software, or other technologies, in order to exchange data between different devices and systems through the Internet. Different things in this network can then be ‘connected’.

IoT技術泛指一系列裝有感應器、軟件或其他科技的物件,透過互聯網使物件與物件之間能傳輸數據和資訊。透過IoT技術,不同物件得以「聯繫」起來。


IoT技術的應用Application of IoT

IoT技術能達致「物件與物件之間的溝通」,在日常生活中有很多應用。以下是其中一些例子﹕

IoT enables ‘device-to-device communication’. It has many applications in daily life. Let’s see some examples below.

保健科技﹕一些可穿戴的儀器例如手錶可用來 監測人體的生理狀況,包括心跳率、血糖水平 以至有否憂鬱等。透過IoT技術,這些可穿戴 的儀器讓我們可以更清楚自己的身體狀況,並 讓醫生得以遙距觀察病人的病情。

Healthcare Technology: Wearables such as a watch can be used to monitor body conditions including heart rate, blood glucose levels and even depression. Those wearables using IoT enable us to better understand our own health and allow doctors to monitor patients remotely.

智能城市﹕科學家和工程師可以透過IoT技術規劃智能城市。IoT技術在城市的應用範圍包括水資源管理、廢物處理和交通控制等。例如,在洛杉磯一些街道上的感應器會把實時交通情況傳送至中央系統,系統分析數據後,便會自動調節交通燈以應付當時的交通情況。

Smart Cities: Scientists and engineers can use IoT in areas like water management, waste control and transportation etc. For example, in Los Angeles, sensors on the road send real-time data of traffic flow to a central platform, which will then analyse the data and automatically adjust the traffic lights to cope with the traffic situation.

工業自動化﹕透過應用IoT技術,工廠可以實時監測供應鏈和產品的質量檢驗,從而隨時修改產品的設計和包裝,為顧客提供更優質的產品與服務。

Industrial Automation: With IoT applications, real-time monitoring becomes possible in the supply chain and product quality testing. Factories can then redesign their products and packaging to deliver better performance to customers.

1.

搜集一些關於香港應用IoT技術的剪報,並貼在下方空位內。

Collect some newspaper clippings about the use of IoT in Hong Kong and paste them in the space below.

2.

在互聯網上搜尋更多IoT技術的應用,並寫出其中兩個

Search information on the Internet and state TWO more applications of IoT.

3.

在互聯網上搜尋使用IoT技術的缺點,並寫出其中兩個

Search information on the Internet and state TWO disadvantages of using IoT.

IFTTT是甚麼?What is IFTTT?

IFTTT (IF This Then That)是一個新興的免費網絡服務,根據其他不同平台的條件來決定是否執行命令。這是其中一個例子:如果明天的天氣預測是下雨天,在今天傍晚傳送一個電郵或短訊給我。

IFTTT (IF This Then That) is a free web-based service to create chains of simple conditional statements, called applets. Here is an example: if the weather forecast is raining tomorrow, send me an email or SMS by today evening.

網站:Website: https://e-aristo.hk/r/isifttt.c https://e-aristo.hk/r/isifttt.e


STSE
了解甚麼是智能家居Understanding more about a smart home
智能家居是甚麼?What is a smart home?

智能家居是指透過應用 IoT技術來達致家居自動化。家居自動化系統能夠控制燈光、温度、影音設備以及其他電器。此外,家居保安系統例如出入控制或警報器也是智能家居的一部分。

A smart home means building automation for your home with the application of IoT. A home automation system can control lighting, electrical appliances, entertainment systems, etc. It may also include home security such as access control and alarm systems.


家居自動化系統的例子Examples of home automation system
控制家中的燈光Lighting control
聲控家居電器Control electrical appliances by voice
温度控制Temperature control
家居保安Household security
1.

搜集一些在香港應用智能家居的剪報,並貼在下方空位內。

Collect some newspaper clippings about applications of smart home in Hong Kong and paste them in the space below.

2.

在互聯網上搜集資料,寫出一些可以把自己的家打造成「智能家居」的主意。

Search information on the Internet and write down some ideas that you can make your home ‘smart’.



STEM
製作一個「智能」雪櫃Making a ‘smart’ refrigerator
難度﹕Difficulty: ★ ★ ★ ★
時間﹕Time: 1 天1 day

我們將會製作一個「智能」雪櫃。當我們忘記把雪櫃門關好時,便會收到一個提示信息,提醒我們要把雪櫃門關好。「智能」雪櫃的基本概念如下:

We are going to make a ‘smart’ refrigerator that when we forget to close its door (or it is not completely closed), we will receive a message reminding us to close it properly. The basic idea is as follows.

  1. 把一個micro:bit放進雪櫃內作為温度感應器。它會把數據傳輸至另一micro:bit。
  2. 第二個micro:bit(已連接至IoT:bit)會檢查雪櫃內的温度是否高於某特定數值,然後把已分析的數據傳送至 ThingSpeak網站。
  3. 如果高温持續一段時間,ThingSpeak會「告訴」IFTTT給我們發送一個提示信息。
  1. Put the first micro:bit into a refrigerator which acts as a temperature sensor. It will send data to the second micro:bit.
  2. The second micro:bit (connected to IoT:bit) will check whether the temperature is higher than a certain value and then send the analysed data to the website ThingSpeak.
  3. If a high temperature has been remained for a certain time, Thingspeak will ‘tell’ IFTTT to send us a reminder email.

所需物料:Materials required:
主要步驟:Main procedures:

把樣本程式檔案儲存至第一個micro:bit:

Import the sample code into the first micro:bit:

micro:bit程式檔案(第一部分)Program file of micro:bit (Part I) Arduino程式檔案Program file of Arduino

把micro:bit放進雪櫃,它可以作為一個温度感應器。

Put the micro:bit into a refrigerator. It acts as a temperature sensor.

把另一樣本程式檔案儲存至第二個micro:bit (已連接至IoT:bit和Wi-Fi):

Import another sample code into the second micro:bit (connected to IoT:bit and Wi-Fi):

micro:bit程式檔案(第二部分)Program file of micro:bit (Part II)

把第二個micro:bit放在雪櫃附近。

Put the second micro:bit near the refrigerator.

完成IFTTT網站上的設定:
https://e-aristo.hk/r/isfridgevideo2.c

Finish the settings on IFTTT website:
https://e-aristo.hk/r/isfridgevideo2.e

完成ThingSpeak網站上的設定:
https://e-aristo.hk/r/isfridgevideo3.c

Finish the settings on ThingSpeak website:
https://e-aristo.hk/r/isfridgevideo3.e

如果雪櫃門沒有關好, IFTTT上已設定的 「事件」便會被觸發。

If the door of the refrigerator is not completely closed, an event will be triggered on IFTTT.

一個提示信息便會傳送至你的電郵。

A reminder email will be sent to you.

你現在應去把雪櫃門關好!

You should now go to close the door of the refrigerator!



STEM
製作一個「智能」水龍頭Making a ‘smart’ water tap
難度﹕Difficulty: ★ ★ ★ ★
時間﹕Time: 1 天1 day

我們將會製作一個「智能」水龍頭。當我們忘記把水龍頭關好時,便會收到一個提示信息,提醒我們要把水龍頭關好。「智能」水龍頭的基本概念如下:

We are going to make a ‘smart’ water tap that when we forget to turn off the tap (or it is not completely turned off), we will receive a message reminding us to turn it off properly. The basic idea is as follows.

  1. 把一個micro:bit固定在水龍頭作為「位置感應器」。它會把數據傳輸至另一mirco:bit。
  2. 第二個micro:bit(已連接至IoT:bit)會檢查水龍頭的位置有否改變,然後把已分析的數據傳送至ThingSpeak網站。
  3. 如果水龍頭的位置改變了一段時間,Thingspeak會「告訴」IFTTT給我們發送一個提示信息。
  1. Put the first micro:bit on a water tap which acts as a ‘position sensor’. It will send data to the second mirco:bit.
  2. The second micro:bit (connected to IoT:bit) will check whether the position of the water tap changes and then send the analysed data to the website ThingSpeak.
  3. If the position of the tap has been changed for a certain time, Thingspeak will ‘tell’ IFTTT to send us a reminder email.

所需物料:Materials required:
主要步驟:Main procedures:

把樣本程式檔案儲存至第一個micro:bit:

Import the sample code into the first micro:bit:

micro:bit程式檔案(第一部分)Program file of micro:bit (Part I) Arduino程式檔案Program file of Arduino

把micro:bit固定在水龍頭上,然後按一下micro:bit上的「B」按鈕 ,以設定水龍頭的標準位置。

Put the micro:bit on a tap and press the ‘B’ button of the micro:bit to set the standard position of the tap.

把另一樣本程式檔案儲存至第二個micro:bit (已連接至IoT:bit和Wi-Fi):

Import another sample code into the second micro:bit (connected to IoT:bit and Wi-Fi):

micro:bit程式檔案(第二部分)Program file of micro:bit (Part II)

把第二個micro:bit放在水龍頭附近。

Put the second micro:bit near the tap.

完成IFTTT網站上的設定:
https://e-aristo.hk/r/istapvideo2.c

Finish the settings on IFTTT website:
https://e-aristo.hk/r/istapvideo2.e

完成ThingSpeak網站上的設定:
https://e-aristo.hk/r/istapvideo3.c

Finish the settings on ThingSpeak website:
https://e-aristo.hk/r/istapvideo3.e

如果水龍頭沒有關好, IFTTT上已設定的 「事件」便會被觸發。

If the water tap is not completely turned off, an event will be triggered on IFTTT.

一個提示信息便會傳送至你的電郵。

A reminder email will be sent to you.

你現在應去把水龍頭關好!

You should now go to turn off the water tap!


試想想:Think about:

你能想出其他方法(例如使用不同的感應器)來製作「智能」水龍頭嗎?

Can you suggest other methods (like using different sensors) to make a ‘smart’ water tap?


沒有使用權限No access right

你的學校未有使用本系列資源之權限。

Your school does not have the access right to open the resources of this series.

沒有使用權限No access right

你的學校未有使用本系列資源之權限。

Your school does not have the access right to open the resources of this series.