Io IoT Device ce Ar Arch chitect ecture e and Pr Programming
Chaipo Chaiporn J n Jaik aikae aeo De Department of f Computer Engineering Kasetsart Unive versity
01219335 Data Acquisition and Integration
Revised 2020-08-20
Io IoT Device ce Ar Arch chitect ecture e and Pr Programming - - PowerPoint PPT Presentation
Io IoT Device ce Ar Arch chitect ecture e and Pr Programming 01219335 Data Acquisition and Integration Chaiporn J Chaipo n Jaik aikae aeo De Department of f Computer Engineering Kasetsart Unive versity Revised 2020-08-20 Ou
Chaipo Chaiporn J n Jaik aikae aeo De Department of f Computer Engineering Kasetsart Unive versity
01219335 Data Acquisition and Integration
Revised 2020-08-20
2
3
Communication Module CPU Sensors/ Actuators Power Supply Memory (RAM/Flash)
Microcontroller
4
https://www.electrodragon.com/product/ esp32-wifi-bluetooth-ic-model/ http://www.jarzebski.pl/arduino/arduino-i- klony/arduino-m0-zero-pro-atsamd21g18.html
5
Radio Transceiver radio wave bit stream
6
7
Rx Tx Idle Sleep
8
hygrometer, …
9
cost/volume/weight/recharge time/longevity
combination with some form of energy harvesting
10
11
Primary b batteries Chemistry Zinc-air Lithium Alkaline Energy (J/cm3) 3780 2880 1200 Secondary b batteries Chemistry Lithium NiMH NiCd Energy (J/cm3) 1080 860 650
http://en.wikipedia.org/wiki/Energy_density https://en.wikipedia.org/wiki/Lithium-ion_battery http://clipart-library.com/
12
20 mA
will the device last without charging?
13
14
characteristics are as follow:
Component Power consumption Time fraction in each mode Processor Active mode: 10 mA Sleep mode: 0.01 mA 10% 90% Radio module Transmitting mode: 100 mA Receiving mode: 20 mA Idle mode: 10 mA 1% 5% 94% Sensor Active mode: 30 mA Idle mode: 0 mA 5% 95%
15
used peripherals into a single board
https://www.electrodragon.com/product/esp32-wifi-bluetooth-ic-model/ https://github.com/LilyGO/TTGO-T8-ESP32 http://www.jarzebski.pl/arduino/arduino-i-klony/arduino-m0-zero-pro- atsamd21g18.html https://www.adafruit.com/product/2772
16
https://www.arduino.cc/en/Main/Boards http://www.dragino.com/products/nb-iot/item/130-nb-iot-shield.html https://store.arduino.cc/usa/arduino-wifi-shield http://www.dragino.com/products/lora/item/102-lora-shield.html
WiFi Shield NBIoT Shield LoRa Shield
17
https://microbit.org/guide/features/
18
https://www.raspberrypi.org/products/
Cortex-A53
Raspberry Pi 3 Model B+ Raspberry Pi Zero W
19
https://www.shenzhen2u.com/NodeMCU-32S https://www.aliexpress.com/i/32967228739.html https://wiki.wemos.cc/products:d32:d32_pro
20
USB-C Connector ESP32 Module
External peripheral connectors Real-Time Clock Battery Light Sensor Temperature Sensor 16x8 LED Matrix Triple-Axis Accelerometer & Magnetometer Push Switches
22
Source ce code (C (C/Assembly) Cross Compiler/Assembler Fi Firmware code (b (binary)
010101 011101 110110
Microcontroller Chip Programmer Uploader Software
U S B U S B
23
flash memory
Bootstrap Loader (BSL)
Microcontroller module Source ce code (C (C/Assembly) Cross Compiler/Assembler Fi Firmware co code (b (binary)
010101 011101 110110
Uploader Software
U S B U S B firmware code
24
flash memory
Bootstrap Loader (BSL)
Microcontroller module Uploader Software Py Python source ce code (. (.py py) Micr croPython fi firmware (b (binary)
010101 011101 110110
uploaded
.py
U S B U S B
26
WiFi connectivity)
27
KidBright's Schematic provided by INEX
28
from machine import Pin from time import sleep # make pin 2 an OUTPUT, refer to it as 'led_wifi' led_wifi = Pin(2, Pin.OUT) while True: # set pin 2’s voltage to 3.3V led_wifi.value(1) sleep(0.5) # set pin 2’s voltage to 0V led_wifi.value(0) sleep(0.5)
29
30
to IO14 and IO16 pins
reading is 0
status reading is 1
KidBright's Schematic provided by INEX
31
from machine import Pin from time import sleep # make pin 16 an INPUT pin with pull-up activated # (i.e., give logic 1 when the pin is floating); # then refer to it as 's1' s1 = Pin(16, Pin.IN, Pin.PULL_UP) while True: # read and print out the button value print("S1 status =", s1.value()) # delay a little to slow down screen output sleep(0.1)
32
communication module, and sensors
Python scripts