Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon

Introducing IoT with Particle's Photon and Electron

Save for later
  • 14 min read
  • 07 Sep 2016

article-image

In this article by Rashid Khan, Kajari Ghoshdastidar, and Ajith Vasudevan, authors of the book Learning IoT with Particle Photon and Electron, we will have a brief walkthrough of the evolution of Internet of Things (IoT) followed by an overview of the basics of IoT-related software and hardware, which every IoT enthusiast should know. The discussion then moves on to introduce Particle, an IoT company (https://www.particle.io/), followed by a description of Particle's popular IoT products—Core, Photon and Electron.

This article will cover following topics:

  • Evolution of IoT
  • Hardware and software in the IoT ecosystem
  • Market survey of IoT development boards and cloud services
  • What is Particle?
  • Summary

(For more resources related to this topic, see here.)

Evolution of IoT

It is not very clear exactly who coined the term IoT. Kevin Ashton (https://en.wikipedia.org/wiki/Kevin_Ashton) supposedly coined the phrase IoT while working for Procter & Gamble (P&G) in 1999. Kevin was then working on an RFID (https://en.wikipedia.org/wiki/Radio-frequency_identification) initiative by P&G, and proposed taking the system online to the Internet.

In 2005, UN's International Telecommunications Union (ITU) - http://www.itu.int/, published its first report on IoT. In 2008, the global non-profit organization IPSO Alliance (http://www.ipso-alliance.org/) was launched to serve the various communities seeking to establish IoT by providing coordinated marketing efforts available to the general public. IPSO currently has more than 50 member companies including Google, Cisco, Intel, Texas Instruments, Bosch, Atmel. In 2012, IoT Consortium (IoTC) - http://iofthings.org/, was founded to educate technology firms, retailers, insurance companies, marketers, media companies, and the wider business community about the value of IoT. IoTC has more than 60 member companies in the area of hardware, software, and analytics, a few of them being Logitech, Node, and SigFox.

A 2014 Forbes article by Gil Press mentions:

"Gartner estimates that IoT product and service suppliers will generate incremental revenue exceeding $300 billion in 2020. IDC forecasts that the worldwide market for IoT solutions will grow from $1.9 trillion in 2013 to $7.1 trillion in 2020".

Why IoT has become a household word now

IoT has, in recent years, become quite popular and an everyday phenomenon primarily due to IoT-related hardware, software, accessories, sensors, and the Internet connection becoming very affordable and user friendly. An explosion in the availability of free Integrated Development Environments (IDEs) and Software Development Kits (SDKs) have made programming and deployment of IoT really simple and easy. Thus, IoT enthusiasts range from school kids, hobbyists, and non-programmers to embedded software engineers specialized in this area.

Hardware and software in the IoT ecosystem

Advancement in technology and affordability has made acquisition and usage of IoT devices very simple. However, in order to decide which IoT package (boards, accessories, sensors, software) to choose for a particular application, and actually building projects, it is essential to have knowledge of IoT terminology, hardware, and software. In this section, we will introduce the reader to the essential terminology used when dealing with IoT. This will also help the reader understand and appreciate the features of the Particle IoT products—Core, Photon, and Electron.

Essential terminology

Let's learn about a few terms that we're going to be hearing all throughout this article, and whenever we work with IoT hardware and software components:

Term

Definition

IoT Development Board

A development board is essentially a programmable circuit board which wraps an IoT device. The IoT device's processor/microcontroller, memory, communications ports, input-output pins, sensors, Wi-Fi module, and so on are exposed by the development board, in a convenient way, to the user. A board manufacturer usually provides an IDE with it to write and deploy code to the physical board. A development board with the IDE enables rapid prototyping of IoT projects.

Microcontroller

A microcontroller is a highly compact single Integrated Circuit (IC) with a processor and limited Random Access Memory (RAM) and Read Only Memory (ROM) embedded in it with programmable peripherals. Microcontrollers are "computer on a single chip". Because of its limited memory and architecture constraints, usually, only one specific program is deployable and runnable on a microcontroller at one time. Preprogrammed microcontrollers are used in electrical machinery such as washing machines, dish-washers, microwave, and so on.

Microprocessor

A microprocessor is a single integrated chip which in itself is a Central Processing Unit (CPU). The microprocessor has separate RAM and ROM modules, and digital inputs and outputs. The Microprocessor CPU is usually more powerful than that of a microcontroller, and there is provision to add larger amounts of memory externally. This makes microprocessors suitable for general-purpose programming, and are used in desktop computers, Laptops, and the like.

Flash Memory

Flash memory is an electronic non-volatile storage device, for example, USB pen-drives, memory cards, and so on. Data in Flash memory can be erased and rewritten. Unlike RAM, access speed is lower for flash memories, and also unlike RAM, the data stored in flash memory is not erased when power is switched off. Flash memories are generally used as reusable extra storage.

RTOS

RTOS as the name suggests, RTOS responds to events in real time. This means, as soon as an event occurs, a response is guaranteed within an acceptable and calculable amount of time. RTOS can be hard, firm, or soft depending on the amount of flexibility allowed in missing a task deadline. RTOS is essential in embedded systems, where real-time response is necessary.

M2M

Machine-to-Machine (M2M) communication encompasses communication between two or more machines (devices, computers, sensors, and so on) over a network (wireless/wired). Basically, a variant of IoT, where things are machines.

Cloud Technology

Cloud refers to computing resources available for use over a network (usually, the Internet). An end user can use such a resource on demand without having to install anything more than a lightweight client in the local machine. The major resources relevant to IoT include data storage, data analytics, data streaming, and communication with other devices.

mBaaS

Mobile Backend as a Service (mBaaS) is a infrastructure that provides cloud storage, data streaming, push notifications, and other related services for mobile application developers (web, native, IoT app development). The services are exposed via web-based APIs. BaaS is usually provided as a pay-per-use service.

GPIO

General Purpose Input Output (GPIO), these are electrical terminals or 'pins' exposed from ICs and IoT devices/boards that can be used to either send a signal to the device from the outside (input mode), or get a signal out from the inside of the device (output mode). Input or Output mode can be configured by the user at runtime.

Module

Unit of electronics, sometimes a single IC and at other times a group of components that may include ICs, providing a logical function to the device/board. For example, a Wi-Fi module provides Wi-Fi functionality to a board. Other examples are Bluetooth, Ethernet, USB, and so on,

Port

An electrical or Radio-Frequency-based interface available on a board through which external components can communicate with the board. For example, HDMI, USB, Ethernet, 3.5mm jack, UART (https://en.wikipedia.org/wiki/Universal_asynchronous_receiver/transmitter).

Table 1: Terminology

Network Protocols

Connected smart devices need to communicate with each other, and exchange large volumes of messages between themselves and the cloud. To ensure near real-time response, smart bandwidth usage, and energy savings on the resource-constrained IoT devices, new protocols have been added to the traditional seven-layer network model (OSI model: https://en.wikipedia.org/wiki/OSI_model). The following table shows the major OSI network protocols and the IoT network protocols suitable for various smart, connected devices.

Layer

Examples of Traditional Network Protocols (OSI)

Examples of IoT Network Protocols

Application,

Presentation,

Session

HTTP, FTP, SMTP, TLS, RPC, JSON, CSS, GIF, XML

CoAP, MQTT, DDS, M2M service layer

Transport

TCP, UDP

UDP, DTLS

Network

ICMP, IPsec, IPv4, IPv6

6LoWPAN, RPL (Zigbee)

Data Link

IEEE 802.2, L2TP, LLDP, MAC, PPP

IEEE 802.15.4, BLE4.0, RFID, NFC, Cellular

Physical

DSL, Ethernet physical layer, RS-232, any physical transmission medium (for example, Cables)

Wires, Sensor drivers to read from sensor devices

Table 2: Layerwise Network Protocols – OSI vs IoT

Market survey of IoT development boards and cloud services

Here we list some of the most popular IoT boards and cloud services, available in the market at the time of writing this article, with some of their important specifications and features. These tables should help the reader get an idea as to where Particle products fit in on the IoT map.

IoT development boards

The next table lists the main specifications of popular IoT boards. These specs are the basic details one has to consider while selecting a board—its specifications in terms of processor and speed, memory, available communication modules and ports, and IO Pins. Also, while selecting a board, one has to analyze and match the project's requirements with the available boards, so that the right board is selected for the application in terms of fitment and performance.

Board Name

Microcontroller

Microprocessor

Memory

Modules

Ports

IO Pins

Raspberry Pi 1/2/3

Broadcom SoC BCM2835/6/7

Single/Quad-core ARM 11/Cortex-A7/A53 CPU, VideoCore IV GPU

256MB/512MB/1 GB RAM

Ethernet, Wi-Fi, Serial UART, I2C

HDMI, USB, Ethernet (RJ45), GPIO

26/40/40

Arduino Mini

ATmega328

NA

Unlock access to the largest independent learning library in Tech for FREE!
Get unlimited access to 7500+ expert-authored eBooks and video courses covering every tech area you can think of.
Renews at €18.99/month. Cancel anytime

32 KB Flash

2 KB SRAM

NA

NA

14

Arduino Yun

ATmega32u4

Atheros AR9331

32 KB Flash

2.5 KB SRAM,

16 MB Flash, 64 MB RAM

Wi-Fi, Ethernet

USB, Ethernet (RJ45)

20

Intel Edison

MCU at 100 MHz ( Intel Atom Soc)

Dual-core CPU at 500 MHz (Intel Atom Soc)

4 GB Flash, 1 GB RAM

Wi-Fi, Bluetooth 4.0

USB, UART, SPI, GPIO

28

Libelium Waspmote

ATmega1281

NA

128 KB Flash, 8 KB SRAM

Temp, Humidity, Light Sensors, (optional) GPS

UART, I2C, SPI, USB

19

NodeMCU ESP8266

ESP 8266 SoC

ESP-12 module

4 MB Flash

Wi-Fi,

Serial UART,

ADC

UART, GPIO, SPI

14

BeagleBone Black

Sitara SoC AM3358/9

AM335x 1 GHz ARM Cortex-A8

512 MB RAM, 2/4 GB flash storage

Ethernet, Serial UART, ADC, I2C

Ethernet (RJ45), HDMI, USB, GPIO

24

CubieBoard

ARM Cortex-A8 CPU

AllWinner A10 SoC

512 MB/ 1 GB RAM, 4 GB flash memory

Ethernet, Serial UART, ADC, I2C

Ethernet (RJ45) , USB, SATA

96

Table 3: IoT development Boards

Cloud services (PaaS, BaaS, M2M)

It is important to know what kind of cloud service we will be dealing with, and whether our board has open standards and allows us to use our own personal service easily, or whether the board-provided service needs some manipulation to use in the current project.

Cloud Service Name

Salient Features

  • Amazon Web Services (https://aws.amazon.com/)
  • Microsoft Azure (https://azure.microsoft.com/)
  • Cloud Foundry (https://www.cloudfoundry.org/)
  • IBM Bluemix (http://www.ibm.com/cloud-computing/bluemix/)

Platform as a Service (PaaS) Infrastructure (VM, Storage), Big Data Analytics, Application Services, Deployment and Management, Mobile and Device Services

  • Parse (http://www.parse.com/)
  • Kinvey (http://www.kinvey.com/)
  • AnyPresence (http://www.anypresence.com/)
  • Appcelerator (http://www.appcelerator.com/)

mBaaS

ThingWorx (https://www.thingworx.com/)

M2M offering from PTC (http://www.ptc.com/)

Table 4: Cloud services

What is Particle?

Particle (https://www.particle.io), formerly known as Spark, is a company started by Zach Supalla. It provides hardware and software for development of IoT projects.

Journey of Particle

The first company started by Zach Supalla in 2011 was known as Hex Goods, and it sold designer products online. In early 2012, Hex Goods was shut down, and Zach started a second company called Switch Devices, which dealt with connected lighting. Switch Devices was then renamed Spark Devices. The name Spark was used as it provided a double meaning to the founders. Spark stood for spark of light and also sparks of inspiration.

In early 2013, Spark transformed to an IoT platform for engineers and developers. The name Spark also did not last long as the founders felt Spark created confusion for a lot of users. There exist 681 live trademarks that include the word Spark. Apart from the number of trademarks, there are some other great, unrelated software and hardware products employing the name Spark in them—some of them being Apache Spark, SparkFun, and Spark NZ. It has been reported that a lot of people logged on to Zach's #spark IRC channel and asked doubts about big data.

The name Particle was finally chosen, as it gave plenty of room to grow in terms of products and offerings. Particle, in scientific terms, is a single discreet unit within a larger system. The name draws a parallel with the mission of Particle—the company which provides development kits and devices as single units used to build the greater whole of IoT.

We'll cover Particle IoT products in depth, and see how and when they perform better than other IoT development boards.

Why Particle?

Today, the most recurring problem with all existing IoT prototyping boards is that of connectivity. In order to connect the existing boards to the Internet, additional components such as Wi-Fi or GSM modules have to be attached in the development environment as well as in production. Attaching external devices for communication is cumbersome, and adds another point of failure with frequent issues such as Internet unavailability, intermittent network connectivity, and so on. This leads to a bad experience for the developer.

Developers have to frequently (re)write code, deploy it onto the device(s), test, debug, fix any bugs, rinse, and repeat. The problem with code deployment with existing boards is that the boards need to be connected to a computer, which means for even the smallest code update, the device/board needs to be connected to the developer's computer, either by moving the computer to the device (which may be located at a not-so-easily accessible location) or vice versa. This poses a problem when the device, after an update at the developer's site, has to be placed back in its original production environment for testing and debugging the new changes. This means large turnaround times to load new code into production.

Particle provides products that have built-in Wi-Fi modules or GSM modules, which help in easy connection to a network or the internet, with support for OTA (Over-The-Air) code deployment. This removes the hassle of adding extra modules on the prototyping boards for connectivity, and it also allows for pushing code or testing/debugging on site. As previously mentioned, one of the important features which differentiates Particle products from other devices is the Particle device's ability of deployment of code over the air. New code can be deployed onto the device or burnt, as the process is called in embedded systems' parlance, via REST API calls, which makes it very convenient to provide updates. This feature of Particle products helps in faster code release cycle and testing/debugging.

What does Particle offer?

Particle offers a suite of hardware and software tools to help prototype, scale, and manage the IoT products. It also provides the ability to build cloud-connected IoT prototypes quickly. If you're satisfied with your prototype and want to productize your IoT design, no problem there. It helps us to go from a single prototype to millions of units with a cloud platform that can scale as the number of devices grow. The popular Particle hardware devices are listed as follows:

  • Core: A tiny Wi-Fi development kit for prototyping and scaling your IoT product. Reprogrammable and connected to the cloud, this has now been superseded by the Photon.
  • Photon: A tiny Wi-Fi development kit for prototyping and scaling your IoT product. Reprogrammable and connected to the cloud.
  • Electron: A tiny development kit for creating 2G/3G cellular connected products.

The Photon and the Core are bundled with Wi-Fi modules, which help them connect to a network or the Internet without adding any extra modules.

The Electron has a 3G/2G GSM module, which can be used to send or receive messages directly or connect to the Internet.

The firmware for the Photon, Electron, and Core can be written in a web-based IDE provided by Particle, and the deployment of the firmware code to the device is done over-the-air. Particle also offers SDKs for mobile and web to extend the IoT experience from the devices/sensors to the phone and web.

Summary

In this article, we learnt about IoT, and how it all began. We briefly touched upon major organizations involved in IoT, common terminology used, and we looked at different hardware products and cloud services we have available for building IoT projects. 

Resources for Article:


Further resources on this subject: