Installation of the Smart School

2.1 Teaching Building

1. Installation of the Teaching Building

Step 1: Install ESP32 board

1.1

Required parts

ZH_01

1.2

ZH_02

1.3

ZH_03

1.4

Note: The servo angle needs to be calibrated. Follow the instructions shown below.

Required parts

D1

Required wire:

2p200

  • 2PIN M-F DuPont wire (random color)

servo

servo control module

orange wire

S

red wire

V

brown wire

G

servo control module

main control board

5V

5V

G

GND

Wiring diagram:

D2

D3

After servo calibration, please remove all the wiring.

Step 2: Assemble desks and chairs

2.1

Required parts

ZH_04

2.2

ZH_05

ZH_06

ZH_07

ZH_08

ZH_09

ZH_10

2.3

ZH_11

ZH_12

ZH_13

Step 3: Install modules on the back wall

3.1

Required parts

ZH_14

3.2

ZH_15

ZH_16

3.3

ZH_17

ZH_18

Step 4: Install the classroom blackboard

4.1

Required parts

ZH_19

4.2

ZH_20

ZH_21

4.3

ZH_22

ZH_23

Step 5: Install modules on the front wall

5.1

Required parts

ZH_24

5.2

ZH_25

ZH_26

5.3

ZH_27

ZH_27

Step 6: Assemble walls

6.1

Required parts

ZH_28

6.2

ZH_29

ZH_30

Step 7: Assemble two side walls, install the button module

7.1

Required parts

ZH_31

7.2

ZH_32

ZH_33

7.3

ZH_33

ZH_33

2. Wiring of Teaching Building

Step 8: Teaching building wiring

8.1

Please connect the wires in the following order. When connecting, please distinguish the color of the wires.

#

Module

Wire

ESP32 board pin

1

camera

4PIN (black-red-yellow-white)

2

button module

3PIN 250mm

IO26

3

PIR motion sensor

3PIN 250mm

IO25

4

stepper motor drive board

6PIN 200mm

5

white LED module

3PIN 200mm

IO12

6

motor drive board

4PIN 350mm (black-red-blue-green)

IO5(INA) IO13(INB)

7

passive buzzer

3PIN 200mm

IO19

8

obstacle avoidance sensor

3PIN 200mm

IO18

9

OLED module

4PIN 200mm (black-red-blue-green)

10

ENS160 air quality sensor

4PIN 200mm (black-red-blue-green)

BUS 12C

11

AHT20 temperature
and humidity sensor

4PIN 200mm (black-red-blue-green)

BUS 12C

12

RFID module

4PIN 400mm (black-red-blue-green)

BUS 12C

13

photoresistor

3PIN 200mm

IO34

14

RGB LED module

3PIN 200mm

IO4

8.2

Connect the module to the ESP32 main control board via the wire as shown in the diagram.

Module

Wire

Corresponding pin

camera

4PIN (black-red-yellow-white)

UART

The wire needed here:

![XH2.54-4P 200mm 01](./img/XH2.54-4P 200mm 01.png)

When wiring, connect the 4pin header to the camera, and pass 4 female headers through hole 1 and then connect them to the ESP32 main board.

J1-1

When connecting to the main board, please distinguish the colors of wires.

camera

Wire color

ESP32 board pin

V

Red wire

V

G

Black wire

G

TX

Yellow wire

RX

RX

White wire

TX

J1

8.3

Connect the module to the ESP32 main control board via the wire as shown in the diagram.

Module

Wire

Corresponding pin

button module

3PIN 250mm

IO26

The wire needed here:

![3p 250mm 01](./img/3p 250mm 01.png)

When wiring, connect one end of the wire to the single-channel button module, and pass the other end successively through Hole 2 and Hole 1, and then connect it to the ESP32 main board.

j2-1

When connecting to the main board, please distinguish the color of the wires.

Module

Wire color

ESP32 board pin

V

Red wire

V

G

Black wire

G

S

Yellow wire

IO26

J2

8.4

Connect the module to the ESP32 main control board via the wire as shown in the diagram.

Module

Wire

Corresponding pin

PIR motion sensor

3PIN 250mm

IO25

The wire needed here:

![3p 250mm 02](./img/3p 250mm 02.png)

When wiring, connect one end of the wire to the PIR motion sensor, and pass the other end successively through Hole 3 and Hole 1, and then connect it to the ESP32 main board.

j3

When connecting to the main board, please distinguish the color of the wires.

Module

Wire color

ESP32 board pin

V

Red wire

V

G

Black wire

G

S

Yellow wire

IO25

J3

8.5

Connect the module to the ESP32 main control board via the wire as shown in the diagram.

Module

Wire

Corresponding pin

stepper motor drive board

6PIN 200mm

The wire needed here:

![6Pin ](./img/6Pin .png)

⚠️ Please note that there is no need to pay attention to the color of the 6-pin wire. Make sure that the module wiring corresponds to that of main board.

When wiring, connect one end of the wire to the stepper motor drive board, and pass the other end through Hole 4, and then connect it to the ESP32 main board.

j4

Please connect to the main control board in the order of the wiring on the stepper motor drive board as shown below:

J4

8.6

Connect the module to the ESP32 main control board via the wire as shown in the diagram.

Module

Wire

Corresponding pin

white LED module

3PIN 200mm

IO12

The wire needed here:

![3p 200mm 01](./img/3p 200mm 01.png)

When wiring, connect one end of the wire to the white LED module, and pass the other end through Hole 5, and then connect it to the ESP32 main board.

j5

When connecting to the main board, please distinguish the colors of the wires.

Module

Wire color

ESP32 board pin

V

Red wire

V

G

Black wire

G

S

Yellow wire

IO12

J5

8.7

Connect the module to the ESP32 main control board via the wire as shown in the diagram.

Module

Wire

Corresponding pin

motor drive board

4PIN 350mm (black-red-blue-green)

IO5、IO13

The wire needed here:

![4Pin 350mm 01](./img/4Pin 350mm 01.png)

When wiring, connect the 4pin end of the wire to the motor drive board, and pass 4 female headers successively through Hole 3 and Hole 1, and then connect them to the ESP32 main board.

j6

j6-1

When connecting to the main board, please distinguish the colors of the wires.

Module

Wire color

ESP32 board pin

GND

Black wire

G

VCC

Red wire

V

B-IB

Green wire

IO13

B-IA

Blue wire

IO5

J6

8.8

Connect the module to the ESP32 main control board via the wire as shown in the diagram.

Module

Wire

Corresponding pin

passive buzzer

3PIN 200mm

IO19

The wire needed here:

![3p 200mm 02](./img/3p 200mm 02.png)

When wiring, connect one end of the wire to the passive buzzer, and pass the other end through Hole 6, and then connect it to the ESP32 main board.

j7

When connecting to the main board, please distinguish the color of the wires.

Module

Wire color

ESP32 board pin

V

Red wire

V

G

Black wire

G

S

Yellow wire

IO19

J7

8.9

Connect the module to the ESP32 main control board via the wire as shown in the diagram.

Module

Wire

Corresponding pin

obstacle avoidance sensor

3PIN 200mm

IO18

The wire needed here:

![3p 200mm 03](./img/3p 200mm 03.png)

When wiring, connect one end of the wire to the obstacle avoidance sensor, and pass the other end through Hole 6, and then connect it to the ESP32 main board.

j8

When connecting to the main board, please distinguish the color of the wires.

Module

Wire color

ESP32 board pin

V

Red wire

V

G

Black wire

G

S

Yellow wire

IO18

J8

8.10

Connect the module to the ESP32 main control board via the wire as shown in the diagram.

Module

Wire

Corresponding pin

OLED display

4PIN 200mm (black-red-blue-green)

BUS 12C

The wire needed here:

![4Pin 150mm](./img/4Pin 150mm.png)

When wiring, connect 4pin end of the wire to the OLED display, and connect 4 female headers to the ESP32 main board.

j9

j9-1

When connecting to the main board, please distinguish the color of the wires.

Module

Wire color

ESP32 board pin

GND

Red wire

GND

VCC

Black wire

VCC

SCL

Blue wire

SCL

SDA

Green wire

SDA

Note that the sequence of SCL and SDA on the main board is reversed to that of the OLED module.

J9

8.11

Connect the module to the ESP32 main control board via the wire as shown in the diagram.

Module

Wire

Corresponding pin

ENS160 air quality sensor

4PIN 200mm (black-red-blue-green)

BUS 12C

The wire needed here:

![4Pin 200mm Double splicing 01](./img/4Pin 200mm Double splicing 01.png)

When wiring, connect one end of the wire to the ENS160 air quality sensor, and pass the other end through Hole 7, and then connect it to the ESP32 main board.

j10

When connecting to the main board, please distinguish the color of the wires.

Module

Wire color

ESP32 board pin

GND

Black wire

GND

VCC

Red wire

V

SDA

Blue wire

SDA

SCL

Green wire

SCL

J10

8.12

Connect the module to the ESP32 main control board via the wire as shown in the diagram.

Module

Wire

Corresponding pin

AHT20 temperature and humidity sensor

4PIN 200mm (black-red-blue-green)

BUS 12C

The wire needed here:

![4Pin 200mm Double splicing 02](./img/4Pin 200mm Double splicing 02.png)

When wiring, connect one end of the wire to the AHT20 temperature and humidity sensor, and pass the other end through Hole 7, and then connect it to the ESP32 main board.

j11

When connecting to the main board, please distinguish the color of the wires.

Module

Wire color

ESP32 board pin

GND

Black wire

GND

VCC

Red wire

V

SDA

Blue wire

SDA

SCL

Green wire

SCL

J11

8.13

Connect the module to the ESP32 main control board via the wire as shown in the diagram.

Module

Wire

Corresponding pin

RFID module

4PIN 400mm (black-red-blue-green)

BUS 12C

The wire needed here:

![ ](./img/4Pin 400mm Double splicing 02.png)

When wiring, connect one end of the wire to the RFID module, and pass the other end successively through Hole 3 and Hole 1, and then connect it to the ESP32 main board.

j12

j12-1

When connecting to the main board, please distinguish the color of the wires.

Module

Wire color

ESP32 board pin

GND

Black wire

GND

VCC

Red wire

V

SDA

Blue wire

SDA

SCL

Green wire

SCL

J12

8.14

Connect the module to the ESP32 main control board via the wire as shown in the diagram.

Module

Wire

Corresponding pin

photoresistor

3PIN 200mm

IO34

The wire needed here:

![3p 200mm 04](./img/3p 200mm 04.png)

When wiring, connect one end of the wire to the photoresistor, and pass the other end through Hole 8, and then connect it to the ESP32 main board.

j13

When connecting to the main board, please distinguish the color of the wires.

Module

Wire color

ESP32 board pin

V

Red wire

V

G

Black wire

G

S

Yellow wire

IO34

J13

8.15

Connect the module to the ESP32 main control board via the wire as shown in the diagram.

Module

Wire

Corresponding pin

RGB module

3PIN 200mm

IO4

The wire needed here:

![3p 200mm 05](./img/3p 200mm 05.png)

When wiring, connect one end of the wire to the RGB module, and pass the other end through Hole 8, and then connect it to the ESP32 main board.

j15

When wiring, please distinguish the color of the wire.

Module

Wire color

ESP32 board pin

V

Red wire

V

G

Black wire

G

S

Yellow wire

IO4

J15

Note: After wire up the above sensors and modules, it is as shown below.

j16

2.2 Playground

1. Construction of Playground Facilities

Step 9: Build the battery holder slot

9.1

Required parts

9.2

ZH_39

Step 10: Mount the teaching building and its base

10.1

ZH_40

10.2

ZH_41

ZH_42

10.3

ZH_43

ZH_44

Step 11:Install the basket and obstacle avoidance sensor

11.1

Required parts

ZH_45

11.2

ZH_46

ZH_47

11.3

ZH_48

ZH_49

Step 12: Assemble street lamp

12.1

Required parts

ZH_50

12.2

ZH_51

ZH_52

Step 13: Assemble flag lifting platform

13.1

Required parts

ZH_53

13.2

Pay attention to the color of the wires. Wires should be placed on the right side, with the red wire at the bottom. Note to pass wires through the rectangular hole.

ZH_54

ZH_55

13.3

ZH_56

ZH_57

Step 14: Mount playground facilities

14.1

Required parts

ZH_58

14.2

ZH_59

ZH_60

Step 15: Build the access control system

15.1

Required parts

ZH_61

15.2

ZH_62

ZH_63

15.3

ZH_64

ZH_65

15.4

ZH_66

ZH_67

ZH_68

15.5

ZH_69

ZH_70

15.6

ZH_71

ZH_72

15.7

ZH_73

ZH_74

Step 16: Assemble the access control system

16.1

Required parts

ZH_75

16.2

ZH_76

⚠️ Note: Before installing the servo onto the base board, servo wires need to be inserted through the rectangular hole on the base board.

ZH_77

16.3

ZH_78

ZH_78-1

ZH_79

16.4

ZH_80

ZH_81

16.5

ZH_82

ZH_83

Step 17: Install the flagpole of the platform

17.1

Required parts

ZH_84

ATTENTION: Acrylic flagpole is packaged separately. It is recommended to remove its protective films.

X2

17.2

ZH_85

ZH_86

ZH_87

17.3

ZH_88

ZH_89

17.4

ZH_90

ZH_91

ZH_92

17.5

ZH_93

2. Wiring of Playground Facilities

Step 18: Wire up the motor drive board and servo

18.1

Please connect the wires in the following order. When connecting, please distinguish the color of the wires.

#

Module

Wire

Corresponding pin

1

servo

/

ESP32 board: IO32

2

motor

/

motor drive board: blue terminal

18.2

Connect the module to the ESP32 main control board via the wire as shown in the diagram.

Module

Wire

Corresponding pin

servo

/

IO32

Wind servo wires from the bottom to the back of the building and pass it through Hole 4.

j19

When connecting to the main board, please distinguish the color of the wires.

Module

Wire color

ESP32 board pin

V

Red wire

V

G

Brown wire

G

S

Yellow wire

IO32

J14

18.3

Connect the module to the ESP32 main control board via the wire as shown in the diagram.

Module

Wire

Corresponding pin

motor

/

motor drive board: blue terminal

j20

![J6 - 1](./img/J6 - 1.png)

2.3 Fences and Classroom Equipment

1. Fences

Step 19: Build the school fence

19.1

Required parts

ZH_95

19.2

ZH_96

OP

19.3

ZH_98

ZH_99

ZH_100

ZH_101

2. Classroom Equipment

Step 20: Install stepper motor drive system

20.1

Required parts

ZH_102

20.2

ZH_103

ZH_104

20.3

ZH_105

ZH_106

20.4

ZH_107

ZH_108

20.5

ZH_109

ZH_110

20.6

ZH_111

ZH_112

Step 21: Put on the curtain

21.1

Required parts

ZH_113

21.2

ZH_114

ZH_114-1

ZH_115

ZH_115-1

21.3

ZH_116

ZH_117

21.3

Stick the curtain on the wall of the teaching building.

Step 22: Install RGB module

22.1

Required parts

ZH_118

ATTENTION: Acrylic ceiling is packaged separately. It is recommended to remove its protective films.

ZH_118-1

22.2

ZH_119

ZH_120

Step 23: Assemble the ceiling

23.1

Required parts

ZH_121

23.2

ATTENTION : First, install the ceiling into the two small round holes on the front wall of the teaching building, and then press the ceiling down vertically against the back wall.

ZH_122

ZH_123

ZH_124

2.4 Ball Collection Box and Battery Holder

1. Ball Collection Box

Step 24: Make a movable ball collection box

24.1

Required parts

ZH_125

24.2

ZH_126

ZH_127

ZH_128

ZH_129

24.3

ZH_130

2. Battery Holder

Step 25: Add a wire hook and the battery holder

25.1

Required parts

ZH_132

25.2

ZH_133

25.3

Connect the wires of the stepper motor to the stepper motor driver board, and arrange the wires of the servo and the stepper motor onto the hook

25.3

Completed !

ZH_134