Keyestudio IoT Smart Home Kit for ESP32

image1

1. 説明

インターネットの急速な発展に伴い、さまざまなスマート機器が私たちの日常生活に徐々に統合されてきています。例えば、RFIDを使ってドアを開けることができます。また、キッチンにはガス検知アラームが備えられ、危険なガスや大量の煙を検知したときに警告を出します。雨を検知すると、自動で洗濯物を取り込み窓を閉めることができます。あらゆる電気機器はスマートフォンで制御でき、照明、ファン、エアコンなどを操作できます。

このような背景から、ESP32制御のこのスマートホーム製品を発売します。多数のセンサーやモジュール、およびネットワーク機能を備えており、インターネットに関する関連知識をより身近に感じられるようになります。

2. 特徴

  1. エレガントな外観

  2. 多数のセンサーモジュール

  3. スマートフォンアプリによるネットワーク制御

  4. モールス信号によるパスワードドア

  5. 自動で窓を閉めることができる

  6. RFID機能

  7. C言語とMicroPython対応

3. キット内容

#

Picture

Name

QTY

1

image2

Wooden Board

1

2

image3

Acrylic Board

1

3

image4

ESP32 PLUS Development Board

1

4

image5

6812 RGB Module

1

5

image6

Analog Gas Sensor

1

6

image7

Button Module

2

7

image8

RFID Module

1

8

image9

Passive Buzzer Module

1

9

image10

130 Motor

1

10

image11

Steam Sensor

1

11

image12

XHT11 Temperature and Humidity Sensor

1

12

image13

PIR Motion Sensor

1

13

image14

Yellow LED Module

1

14

image15

Servo

2

15

image16

I2C1602 LCD Module

1

16

image17

3P F-F 150 mm Dupont Wire

5

17

image18

3P F-F 200 mm Dupont Wire

4

18

image19

F-F 200 mm /40P/2.54 Wires

0.1 (4 strands)

19

image20

4P F-F 200 mm Splicing Dupont Wire

2

20

image21

M1.4*6MM Round Head Screws

4

21

img

M1.2*4MM Round Head Screws

4

22

image22

M3 Nickle-plated Nut(self-locking)

5

23

image23

M4*8MM Round Head Screws

24

24

image24

M3*6MM Round Head Screws

9

25

image25

M3*10MM Round Head Screws

5

26

image26

M2*12MM Round Head Screws

5

27

image27

M4 Nickle-plated Nut

24

28

image28

M3 Nickle-plated Nut

7

29

image29

M2 Nickle-plated Nut

6

30

image30

M3*8MM Flat Head Screws

3

31

image31

Cross Wrench

1

32

image32

3.0*40MM Screwdriver

1

33

image33

2.0*40MM Screwdriver

1

34

image34

M3*10MM Dual-pass Copper Pillar

4

35

image35

USB Cable

1

36

image36

6-Slot AA Battery Holder

1

37

image37

M3*12MM Round Head Screws

4

38

image38

White Card

1

39

image39

ABS RFID Key

1

4. スマートホームの取り付け方法

Step1
必要なコンポーネント

image40

取り付け図

image41

プロトタイプ

image42

Step 2
必要なコンポーネント

image43

取り付け図

image44

プロトタイプ

image45

Step 3
必要なコンポーネント

image46

取り付け

image47

プロトタイプ

image48

Step 4
必要なコンポーネント

image49

取り付け図

image50

プロトタイプ

image51

Step 5
必要なコンポーネント

image52

取り付け図

image53

プロトタイプ

image54

Step 6 必要な部品

image55

取り付け(セルフロックナットを締めないでください)

image56

プロトタイプ

image57

ステップ7

必要な部品

image58

⚠️ 特別注意: 取り付け前に窓のサーボを0度に調整してください

サーボ

PCB

茶色の線

G

赤い線

5V

オレンジの線

GPIO5

⚠️ 特に注意: 以下の2つの方法から、ご自身の状況に合わせて自由に選択できます。

方法1:Arduinoコード

⚠️ 特別注意: コードを書いてアップロードする前に、Arduino IDEをインストールする必要があります。リンク 5. Arduino Tutorial <https://docs.keyestudio.com/projects/KS5009/en/latest/docs/Arduino/arduino.html>__\ にアクセスし、5.2 Getting started with Arduino の部分を参照してください。

コードはどのように入手しますか?

フォルダ …\Resource compression package\arduino Code にある Initialization-of-window-servo-angle.ino ファイルを開くか、以下のテストコードをArduino IDEにコピー&ペーストしてください。

Img

#include <ESP32Servo.h>
Servo myservo;
#define servoPin 5

void setup() {
  myservo.attach(servoPin,500,2500);
  myservo.write(0);
  delay(300);
  myservo.write(90);
  delay(300);
  myservo.write(0);
  delay(300);
}

void loop() {
  // put your main code here, to run repeatedly:
}

方法2:MicroPythonコード

⚠️ 特別注意: コードを書いてアップロードする前に、MicroPython IDEをインストールする必要があります。リンク 6. Python tutorial <https://docs.keyestudio.com/projects/KS5009/en/latest/docs/Python/Python.html>__, にアクセスし、6.2 get starter with Thonny の部分を参照してください。

コードはどのように入手しますか?

フォルダ …\Resource compression package\MicroPython Code にある Initialization-of-window-servo-angle.py ファイルを開くか、以下のテストコードをThonny IDEにコピー&ペーストしてください。

image59

from machine import Pin, PWM
import time
pwm = PWM(Pin(5))
pwm.freq(50)

'''
The duty cycle corresponding to the angle
0°----2.5%----25
45°----5%----51.2
90°----7.5%----77
135°----10%----102.4
180°----12.5%----128
'''
angle_0 = 25
angle_90 = 77
angle_180 = 128

pwm.duty(angle_0)
time.sleep(1)
pwm.duty(angle_90)
time.sleep(1)
pwm.duty(angle_0)
time.sleep(1)

# while True:

窓のサーボの角度を0°に調整した後、次の写真のように取り付けを進めてください)

image60

以下のようにM1.4*6MMのタッピングねじを取り付けます

image61

プロトタイプ

image62

ステップ8

必要な部品

image63

取り付け図

image64

プロトタイプ

image65

ステップ9

必要な部品

image66

取り付け図

image67

プロトタイプ

image68

ステップ10 必要なコンポーネント

image69

取り付け図

image70

プロトタイプ

image71

ステップ 11

必要なコンポーネント

image72

取り付け図

image73

プロトタイプ

image74

ステップ 12

必要なコンポーネント

image75

取り付け図

image76

プロトタイプ

image77

ステップ 13

必要なコンポーネント

image78

取り付け図

image79

プロトタイプ

image80

ステップ 14

必要なコンポーネント

image81

取り付け図

image82

プロトタイプ

image83

ステップ 15

必要なコンポーネント

image84

取り付け図

image85

プロトタイプ

image86

ステップ 16

必要なコンポーネント

image87

取り付け図

image88

プロトタイプ

image89

ステップ 17

必要なコンポーネント

image90

取り付け図

image91

プロトタイプ

image92

ステップ 18

必要なコンポーネント

image93

取り付け図

image94

プロトタイプ

image95

ステップ 19

必要なコンポーネント

image96

取り付け図

image97

プロトタイプ

image98

配線パート

温度・湿度を io17 に接続

3P 接続線は短いものを使用:15cm

image99

image100

黄色のLEDモジュールを io12 に接続 image101

image102

蒸気センサーを io34 に接続

3P 接続線(短):15cm

image103

image104

ファン(IN- を io18 に、IN+ を io19 に)

使用した Dupont ワイヤー: 4本(分岐して使用)

image105

image106

PIR モーションセンサーを io14 に接続

3P 接続線(短):15cm

image107

image108

左ボタンモジュールを io16 に接続

3P 接続線(長):20cm

image109

image110

右ボタンモジュールを io27 に接続

3P 接続線(長):20cm

image111

image112

RFID モジュールを IIC に接続

4P 結合線

image113

image114

LCD1602 ディスプレイを IIC に接続

4P 結合線

image115

image116

6812RGB LED を io26 に接続

3P 接続線(短):15cm

image117

image118

ガスセンサーを io23 に接続

3P 接続線(長):20cm

image119

image120

ブザーセンサーを io25 に接続

3P 接続線(長):20cm

image121

image122

窓用サーボを io5 に接続

image123

image124

ドア用サーボを io13 に接続

image125

image126

電源配線

image127

ステップ20

必要な部品

image128

Installation Diagram

image129

Prototype

image130