Dec50132 Internet Based Controller Iot-Chapter 2
Dec50132 Internet Based Controller Iot-Chapter 2
Chapter 2
Course Outline
5 Project Development
IoT
Hardware and Software
Introduction to Internet of Things
Course Content Outline
► Microcontrollers can be thought of as tiny computers that can be added to any physical
object or space to give it a ‘brain’. They contain one or more computer processors,
along with memory and programmable input/output peripherals – all in a single
integrated circuit.
► MCUs are different from the microprocessors that are found in personal computers
because they are specifically designed for embedded applications where computing is
not the sole purpose of the application.
► While MCUs have less capability than a standard computer processor, their low cost
makes them a more practical option for adding computing capabilities to an object,
space, or process that doesn’t have them.
► Think of something like a warehouse, bridge, or industrial machine that typically
doesn’t contain a computer. In cases like these adding an Internet-connected
microcontroller provides enough computing power to enhance these things without
adding the higher cost and complexity of standard computer processors.
Key Features of Microcontrollers
In order to be able to determine which microcontroller will work the
best with your application, you’ll need to know some of the key
features of microcontrollers and what they do.
Below are some of the specs that you’ll encounter and need to make
sense of when looking at a data sheet for a MCU:
► Bits: Microcontrollers are typically sold by the number of bits they offer.
This impacts the speed with which they are able to perform non-trivial
computations.
► RAM: RAM is fast-access memory that does not retain data in an absence
of power. All MCUs come with certain amounts of RAM, which allows
your microcontroller to quickly perform various actions. The more you
have, the better, but the added RAM increases the cost of the MCU.
► Flash: Flash is computer memory that retains data in the absence of
power. At least some of this is essential, and it’s very useful for features
like offline storage.
Key Features of Microcontrollers
► GPIO: GPIO stands for general-purpose input/output pins. These are the
pins that you will use for connecting your sensors and actuators to the
MCU and the internet. The number of pins can range from one to the
hundreds depending on the microcontroller.
► Connectivity: This is how the board (and application) connects to the
internet via wifi, ethernet or some other means. This is an important
aspect of connected sensor applications, so we’ll go over this topic later in
the book.
► Power consumption: Power consumption is critically important for
connected sensor applications, particularly so when your device has to rely
on something like battery or solar power. This spec will tell you how power
hungry the MCU is by default and whether or not it supports power-
conscious programming techniques.
► Development tools & community: It’s important that there is a mature set
of tools, documentation, and community support to help build programs
that will run on the MCU you select for your application.
Choosing A Microcontroller For Your IoT
System
► There are many different development boards and microcontrollers
available from a variety of companies: TI, Samsung, Arduino, Raspberry
Pi and more. Choosing which one is right for you depends on a number of
factors that vary depending on the nature of your application.
► Compatibility: Does the MCU support the sensors and actuators you want
to use? Depending on your sensors and actuators, you might need many or
just a few ports. You’ll want to make sure that you have enough
input/output ports available.
► Architecture: Is the architecture sophisticated enough to handle the
complexity of your program? Most applications use either ARM, MIPS, or
X86. Choosing one depends on the functional requirements of your
application and how much computing power your system needs.
► Memory: Does the MCU come with enough memory – RAM and Flash – for
your program? It is highly recommended that you choose an MCU with a
comfortable amount of extra memory for future updates. This will save
you time, money, and some major headaches in the long run!
Choosing A Microcontroller For Your
IoT System
► Availability: Can you easily get the MCU that you want and in the quantity that you need?
This is important to consider at the beginning of the process, especially if you plan on
scaling up your system later on.
► Power: How much power will the MCU need? Will it need to be wired or can you use
batteries? Energy efficiency is extremely important to consider for Industrial IoT
applications because you’ll want to minimize the need for sending maintenance crews to
inspect edge infrastructure.
► Cost: How much does each unit cost? Does the price make sense based on the value it will
deliver? Again, you’ll want to think about scaling the project up later on. Make sure that
your IoT budget support including more of the MCUs you choose.
► Development Kit: Is a development kit available? Development kits are an excellent way to
get started with the MCU you choose because they are designed to give customers an
out-of-box experience. This will make the development of your IoT application much easier!
► Development Support: Is good documentation for your MCU available? What is the
community surrounding this board like? These factors are crucial in order to make informed
decisions on how to use your MCU properly. A good online community can help guide you
when you are stuck or encounter a problem with your implementation.
► https://blog.temboo.com/how-to-choose-a-microcontroller-for-iot/
Top Hardware Platforms for Internet of
Things (IoT)
IoT Hardware Development Platform
► This essentially refers to platforms that are used for the development of the “things” in the
internet of things. It could refer to communication modules, Microcontrollers, and SoC modules
with features that make them desirable for use in the development of IoT devices. The list
below is in no particular order and by no means exhaustive as there are more development
platforms than one could probably name, but it contains some of the most comprehensive, and
maker-friendly platforms.
► 1. Particle.io
► Particle.io is one of the most comprehensive end to end IoT platforms. It is an all-in-one io
platform that offers IoT hardware development platform, connectivity, device cloud and apps.
Particle makes a long line of IoT hardware development products for both rapid prototypes and
DFM level production. Building an IoT product starts with connecting the devices to the
internet and all the Particle’s microcontroller boards are enabled to communicate over
either of Wi-Fi, cellular (2G/3G/LTE), or mesh. With some of their boards featuring multiple
communication options onboard. Their microcontrollers are controlled by a special OS which
enables developer to integrate the devices easily with particle’s device cloud and apps. As a
peck, their devices and communication modules come with CE and FCC certifications which
reduce the cost of certificate, on when the product is ready to be scaled. Their boards are open
source ensuring there is a lot of support for product development.
IoT Hardware Development Platform
https://circuitdigest.com/article/top-hardware-
platform s-for-internet-of-things-iot
2.1.1 Identify different type of embedded
controller module specification
► https://www.embedded-computing.com/embedded-computing-design/an-
iot-development-kit-comparison
Comparing ESP8266 and ESP32
► https://www.cnx-software.com/2016/03/25/esp8266-and-esp32-
differences-in-one-single-table/
Compare
PARAMETER Arduino UNO Rasberry Pi B+ ESP8266 ESP32
Processor ATMega328P Broadcom BCM2837B0 Xtensa Dual-Core 32-bit Xtensa Dual-Core 32-bit LX6 with 600 DMIPS
quad-core A53 LX6 with 600 DMIPS
(ARMv8) 64-bit
Ports 14 40 17 36
Power use Power down sleep No sleep mode three low power Active Mode, Modem Sleep Mode, Light Sleep Mode, Deep
modes: Light Sleep, Sleep Mode, Hibernation Mode
Modem Sleep and
Deep Sleep.
Security feature - SSH SSL IEEE 802.11 standard security features all supported,
securi secur including WFA, WPA/WPA2 and WAPI
ty ity 1024-bit OTP, up to 768-bit for customers
Firew Firew Cryptographic hardware acceleration: AES, SHA-2, RSA,
all all elliptic curve cryptography (ECC), random number
generator (RNG)
Support (IDE) Arduino IDE Any Linux compatible IDE Arduino IDE, LUA Loader Arduino IDE
Additional note
https://www.quora.com/What-is-the-difference-between-SSL-and-SSH-Are-they-both
-just-a-way-to-safely-access-a-remote-computer-through-encryption-Do-they-also-tra
nsfer-data
SOFTWARE PART OF
EMBEDDED SYSTEM BOARD
Embedded software is computer software, written to control machines or devices that are
not typically thought of as computers, commonly known as embedded systems. It is
typically specialized for the particular hardware that it runs on and has time and memory
constraints.[1] This term is sometimes used interchangeably with firmware.
A precise and stable characteristic feature is that no or not all functions of embedded
software are initiated/controlled via a human interface, but through machine-interfaces
instead.
Integrated Development
Environment (IDE)
What Is IDE?
An integrated development environment (IDE) is a software application that provides
comprehensive facilities to computer programmers for software development. An IDE
normally consists of at least a source code editor, build automation tools, and a debugger.
Some IDEs, such as NetBeans and Eclipse, contain the necessary compiler, interpreter,
or both; others, such as SharpDevelop and Lazarus,
Integrated Development Environment (IDE)
Tools
Features :
1) Ultra-Low-Power-Solution
2) Complete Integration Solution
3) Basic Protocols : Wifi & Bluetooth
Install and configure IDE
software for related embedded
module( ESP32)
Please Follow Practical Work 1
2.3 SENSOR AS A THING
SENSOR IN IOT APPLICATION
• The use of sensor is allow to create information from action, a generic term intended to capture the
concept of a sensing system comprising sensors, microcontrollers, modem chips, power sources, and
other related devices.
• Different sensors capture different types of information.
• Accelerometers measure linear acceleration, detecting whether an object is moving and in which
direction, while gyroscopes measure complex motion in multiple dimensions by tracking an object’s
position and rotation.
• By combining multiple sensors, each serving different purposes, it is possible to build complex value
loops that exploit many different types of information
SENSOR ACTIVE VS SENSOR PASSIVE
Active sensor Passive sensor
1. Emit energy of their own and then sense the response of the 1. Receive energy (in whatever form) that is produced external
environment to that energy to the sensing device.
2. Can be used in a wider range of environmental conditions 2. Require less energy
3. Example - Radio Detection and Ranging (RADAR) - Emits an 3. Example – A standard camera is embedded with a passive
electromagnetic signal that bounces off a physical object and is sensor—it receives signals in the form of light and captures
“sensed” by the RADAR system. them on a storage device.
TYPES OF SENSOR - POSITION
• A position sensor measures the position of an object; the position measurement can be either in
absolute terms (absolute position sensor) or in relative terms (displacement sensor).
• Position sensors can be linear, angular, or multi-axis.
• Example - Potentiometer, inclinometer, proximity sensor
TYPES OF SENSOR – FORCE AND PRESSURE SENSOR
• Force sensors detect whether a physical force is applied and whether the magnitude of force is
beyond a threshold.
• Pressure sensors are related to force sensors and measure the force applied by liquids or gases.
Pressure is measured in terms of force per unit area.
• Example - Force gauge, viscometer, tactile sensor (touch sensor), Barometer, bourdon gauge,
piezometer
TYPES OF SENSOR - TEMPERATURE
• Temperature sensors measure the amount of heat or cold that is present in a system.
• They can be broadly of two types: contact and non-contact.
• Contact temperature sensors need to be in physical contact with the object being sensed.
• Non-contact sensors do not need physical contact, as they measure temperature through
convection and radiation.
• Example - Thermometer, calorimeter, temperature gauge
TYPES OF SENSOR - HUMIDITY
• Humidity sensors detect humidity (amount of water vapor) in the air or a mass.
• Humidity levels can be measured in various ways: absolute humidity, relative humidity, mass ratio,
and so on.
• Example - Hygrometer, humistor, soil moisture sensor
TYPES OF SENSOR - BIOSENSOR
• Biosensors detect various biological elements such as organisms, tissues, cells, enzymes, antibodies,
and nucleic acids.
• Example - Blood glucose biosensor, pulse oximetry, electrocardiograph
TYPES OF SENSOR - VELOCITY AND ACCELERATION
• Velocity (speed of motion) sensors may be linear or angular, indicating how fast an object moves
along a straight line or how fast it rotates.
• Acceleration sensors measure changes in velocity.
• Example - Accelerometer, gyroscope
TYPES OF SENSOR - LIGHT
1. detects
two possible status: if it is working at 1. measures continuously the variable and detects
100% or at 0% any proportional value between 100% and 0%.
2. RTD - have higher resolution (positive and 2. Digital sensors have low calculation
range. For
negative temperature). This feature makes analog example, digital temperature sensors such as HYT
sensors suitable for wide temperature range and 271 and SHT series have lower temperature range.
stability.
3. 3.
ANALOGUE SENSOR
DIGITAL SENSOR
Explain sensor power requirement and
connection to MCU I/O.
Write code to read data from digital
sensor
Write code to read data from analogue
sensor
Please Follow Practical Work 2
2. 4 Actuator & Sensor
What is actuator?
► http://www.home-automation-community.com/arduino-low-power-how-to-run-atmega328p
-for-a-year-on-coin-cell-battery/
► https://bbs.espressif.com/viewtopic.php?t=133
► https://lastminuteengineers.com/esp32-sleep-modes-power-consumption/
► https://makeradvisor.com/esp32-vs-esp8266/
► https://randomnerdtutorials.com/arduino-vs-raspberry-pi-vs-beaglebone-vs-pcduino/
► https://www.researchgate.net/publication/309917878_Power_consumption_of_the_Raspbe
rry_Pi_A_comparative_analysis
► https://www.raspberrypi.org/documentation/configuration/security.md
► https://www.raspberrypi.org/magpi/raspberry-pi-3bplus-specs-benchmarks/
► https://frightanic.com/iot/comparison-of-esp8266-nodemcu-development-boards/
► https://jjssoftware.github.io/secure-your-esp8266/
► http://esp32.net/