Book Image

Learning IoT with Particle Photon and Electron

By : Rashid Khan, Kajari Ghoshdastidar, Ajith Vasudevan
Book Image

Learning IoT with Particle Photon and Electron

By: Rashid Khan, Kajari Ghoshdastidar, Ajith Vasudevan

Overview of this book

IoT is basically the network of physical devices, vehicles, buildings and other items—embedded with electronics, software, sensors, actuators, and network connectivity that enable these objects to collect and exchange data.. The number of connected devices is growing rapidly and will continue to do so over years to come. By 2020, there will be more than 20 billion connected devices and the ability to program such devices will be in high demand. Particle provides prototyping boards for IoT that are easy to program and deploy. Most importantly, the boards provided by Particle can be connected to the Internet very easily as they include Wi-Fi or a GSM module. Starting with the basics of programming Particle Photon and Electron, this book will take you through setting up your local servers and running custom firmware, to using the Photon and Electron to program autonomous cars. This book also covers in brief a basic architecture and design of IoT applications. It gives you an overview of the IoT stack. You will also get information on how to debug and troubleshoot Particle Photon and Electron and set up your own debugging framework for any IoT board. Finally, you’ll tinker with the firmware of the Photon and Electron by modifying the existing firmware and deploying them to your boards. By the end of this book, you should have a fairly good understanding of the IoT ecosystem and you should be able to build standalone projects using your own local server or the Particle Cloud Server.
Table of Contents (11 chapters)

Photon, Electron, and Core


The first prototyping board that was released by Particle (then known as Spark) was called Core. The subsequent prototyping boards released by Particle were called Photon and Electron. Core was superseded by the more powerful, faster, and less expensive Photon. Sale of Core has since been discontinued at Particle's online store at https://store.particle.io/, and hence, we will primarily discuss the Photon and the Electron. At the end of this chapter, we do a feature-wise comparison of the boards. The comparison can help one arrive at the most suitable board for one's project needs.

Spark Core

The Spark Core was the first IoT prototyping board released by Spark (now known as Particle) in a successful Kickstarter campaign that raised $567,968 from 5,549 backers. The Spark Core is an Arduino-compatible, Wi-Fi enabled, cloud-powered development platform that makes creating Internet-connected hardware a breeze.

Figure 1: Spark Core

The technical details of Spark Core are as follows:

  • ARM Cortex M3 CPU

  • 72 MHz operating frequency

  • 128 KB flash memory

  • 20 KB RAM

  • 12-bit ADC

  • Wireless programming

  • Analogue and digital I/O pins

  • TI CC3000 Wi-Fi module

  • 802.11 b/g Wi-Fi support

  • USB 2.0 full-speed interface

The Spark Core is priced at $39 USD.

Particle Photon

The Photon was built considering the feedback received from Core users. Thus, the Photon is the successor of the Core, and is more powerful than the Core in terms of CPU and memory.

The Photon can be ordered with or without headers, which means it has the flexibility to be used as a prototyping board (with headers) by hobbyists, or it can be soldered into a bigger circuit (without headers) for production.

The Photon is also Arduino-compatible, like its predecessor.

Figure 2: Particle Photon

The technical details of the Photon are as follows:

  • 120 Mhz ARM Cortex M3 processor

  • Wireless programming

  • Broadcom BCM43362 Wi-Fi chip

  • Supports 802.11 b/g/n Wi-Fi

  • 1 MB flash memory

  • 128 KB RAM

  • 18 GPIO and peripheral pins

  • On-board RGB LED

  • Real-time operating system (FreeRTOS)

  • Support for AP (Access Point) mode (SoftAP)

  • Open source design

  • FCC, CE, and IC certified

The Photon has additional capabilities such as a wake-up pin for waking up from low power modes. The Photon is optimized to use less power, and this is made possible by the new Wi-Fi module it uses—Broadcom's BCM43362, which it incorporates. This new Wi-Fi chip powers other popular IoT products such as Nest Protect, LIFX, and others, as it provides the most stable solution. The Photon is available for $19 USD, and can be purchased from Particle's online store at https://store.particle.io.

Particle Electron

The Electron is a cousin of the Photon with minor differences. It has a GSM module instead of a Wi-Fi module. The Electron can be used for creating cellular-connected electronics projects and products. It ships with a SIM card, and is optimized for low-bandwidth messages. The SIM card offers affordable data plans for over 100 countries worldwide through carriers such as Telefonica, AT&T, T-Mobile, O2, Movistar, Vivo, Telenor, Rogers, and many more. You can find the list of countries where the Electron's GSM connectivity is available at https://www.particle.io/cellular.

Figure 3: Particle Electron

The technical details of the Electron are as follows:

  • 1 MB flash

  • 128 KB RAM

  • Wireless programming

  • U-blox SARA-U260/U270 (3G) and G350 (2G) cellular module

  • STM32F205 120 MHz ARM Cortex M3 microcontroller

  • RGB status LED

  • 30 mixed-signal GPIO and advanced peripherals

  • Open source design

  • RTOS

  • FCC, CE, and IC certified

The Electron is available both in 2G and 3G variants. The Electron 2G is available for US $39, while the Electron the 3G variant is available for US $59. The Electron SIM card is available without any contracts, and the basic data charges are $2.99 per month for 1 MB and an additional $0.99 for each additional megabyte of data transferred.

Comparison

This section provides a tabular comparison between Spark Core, Particle Photon, and Particle Electron. This table can help in an easy reference of technical specifications, and can also help decide the best board to use for a given project.

Feature

Spark Core

Particle Photon

Particle Electron

Wi-Fi Support

802.11 b/g

802.11 b/g/n

No

Wireless Module

TI CC3000

Broadcom BCM43362

U-Blox SARA U-Series or G-Series

Microcontroller

STM32F103

STM32F205

STM32F205

CPU speed

72 MHz

120 MHz

120 Mhz

Flash memory

128 KB

1 MB

1 MB

RAM

20 KB

128 KB

128 KB

Wakeup pin exposed

No

Yes

Yes

VBAT pin exposed

No

Yes

Yes

No. of GPIO pins

18

18

30

UART present

Yes

Yes

Yes

JTAG present

Yes

Yes

Yes

I2C present

Yes

Yes

Yes

SPI present

Yes

Yes

Yes

ADC present

Yes

Yes

Yes

DAC present

No

Yes

Yes

CAN present

No

Yes

Yes

Dimensions and weight

35.6 mm x 20.3 mm x 11 mm, 6 g

With headers -36.6 mm x 20.3 mm x 6.9 mm, 5 g

Without headers - 36.6 mm x 20.3 mm x 4.3 mm, 3.7 g

20.32 mm x 16.5 mm x 52.1 mm, 10 g

Operating voltage and current

3.6V to 6V,

~ 50 mA to 300 mA normally,

3.2 μA in deep sleep

3.6V to 5.5V,

~ 80 mA normally

~ 80 uA in deep sleep mode

3.7V,

~ 180 mA normally

~ 130 uA in deep sleep mode.

Price

$39

$19

$39 or $59

Table 5: Comparison of Particle products