Web-Bluetooth Devices Integration

Chrome Browser version 53 came out with a new feature: Origin Trial for Bluetooth which allows websites to use this feature and enable Web Bluetooth for all their visitors. Web Bluetooth is a new technology that connects the Web with the Internet of Things, this technology will provide a level of integration in the IoT scene that never happened before making web designers eager to get their bits out into the real world.

There is no need to install a mobile app on your smartphone to control any of your Bluetooth Low Energy (BTLE) devices anymore. Thanks to this technology, it will be easier to build one solution that will work on all platforms, including both mobile and desktop, that result to lower development costs, more open source control interfaces for various physical products, and more innovation.

To understand how that works, here’s an example of a drone controlled from a web app:

In Bluetooth Low Energy networks, devices play two roles. A device can be either a “Central” or a “Peripheral”. Bluetooth device with services that correspond to one function of the device. Each service exposes variables called characteristics that represent one parameter of the service, which can be read, written or both. Each service and characteristic is identified by a unique 16-bit or 128-bit number and they are defined by the Bluetooth SIG (Special Interest Group).

Bluetooth Low Energy: Peripherals, Services and Characteristics
Bluetooth Low Energy: Peripherals, Services and Characteristics

How to use Web Bluetooth

  • In order to use Web Bluetooth, your site must be served over a secure connection (HTTPS). A secure website is becoming a requirement for a growing number of new web APIs. One way is using GitHub hosting. The implementation of the Web Bluetooth API is partially complete and currently available on Chrome OS, Chrome for Android M, Linux, and Mac.
  • Go to chrome://flags/#enable-web-bluetooth, enable the highlighted flag, restart Chrome and you should be able to scan for and connect to nearby Bluetooth devices, read/write Bluetooth characteristics, receive GATT (Generic Attribute Profile) Notifications and know when a Bluetooth device gets disconnected.
  • Building a Web Bluetooth App

This is the process that will be common for all Web Bluetooth apps:

  1. Scan for a relevant Device
  2. Connect to it
  3. Get the Service you are interested in
  4. Get the Characteristic you are interested in
  5. Read, Write or Subscribe to the Characteristic

The code should be written in JavaScript. It has to scan for a device with an identified Service number, then ask for this service, ask for a specific characteristic number, and finally write the desired command. An example for hacking a light bulb and connecting it to the web via bluetooth is available here.

Although the browser is the most ubiquitous cross-platform operating system that the world has ever seen working on all platforms and systems, it could be a threat because of many malicious websites that mischief with your security. Sites ask the browser to show a list of nearby Bluetooth devices matching certain criteria, and the user either picks which to grant access to or cancels the dialog. Thus, users’ permission is the only responsible about their own privacy.

Two conflicting views are raising right now, one is for IoT enthusiasts and the other’s for security geeks. Essentially, this integration will push forward the development of new IoT applications. but it may risk users’ privacy. On the contrary, Developers are promising to minimize risks and are assuring that connection through this API will be secure and privacy-preserving. The Chrome team will end the trial in next January (2017), and after that, they expect to be able to stabilize the feature and move it closer to a general release.

Further details can be found at the official documentation website, the blog of one the developers, and this step-by-step tutorial. More about the security model can be reached here.

Collecting GPS Data Using GPS Module With Windows IoT

Bardaan A published a guide on hackster.io showing full instructions for developing a Windows IoT application that receives and extracts essential GPS data from a connected serial GPS module.

To follow this guide, you have to use Raspberry Pi 3 model B with Andoer NEO-6M GPS module, and also have Microsoft Visual Studio 2015 installed on your computer.

Application Interface
Application Interface

The Raspberry Pi 3 model B is a $35 single board computer with the size of a credit card. It is an improved version of Raspberry Pi 2 Model B and it features a 1.2 GHz 64-bit quad-core CPU,1GB RAM, integrated Wireless LAN, and Bluetooth 4.1 supporting Bluetooth Low Energy (BLE). The main board contains 4 USB ports, 40 I/O pins, HDMI port, Ethernet port, 3.5mm audio jack, and microSD card slot.

Raspberry Pi 3 model B
Raspberry Pi 3 model B

Andoer NEO-6M is a standalone GPS receiver module that implements the NEO-6M position engine developed by u-blox. It supports UART, USB, DDC (I2C compliant) and SPI interfaces and has low power consumption with high performance capabilities. NEO-6M’s strength point is that one of the received NMEA sentences is the GPGGA sentence, Global Positioning System Fix Data, which provides essential fix data.

Andoer NEO-6M GPS Module
Andoer NEO-6M GPS Module

The received GPGGA sentence will be send by Raspberry Pi to the application which processes it and extracts the essential information such as time, geographic coordinates, and altitude, and eventually displays them on a GUI with the connection status .

The GPS receiver must be connected to the Raspberry Pi as shown in the figure:


The source code with the detailed tutorial can be reached here.

An isolated analog output for Arduino Uno


Giovanni Carrera discuss how to achieve an isolated analog output on Arduino. He writes:

This project completes the series of my articles about the Arduino analog I/O with the aim to use it as a controller of small automation systems.
In control systems of the industrial plants it is always advisable to isolate both the inputs and the outputs coming from the field. This prevents disturbances caused by power surges, lightning strikes or other EMI sources and also by ground potential differences.
Arduino Uno, or systems based on the ATmega328 chip has no a true analog output, but it may be realized using a PWM output averaged with a low-pass filter.

An isolated analog output for Arduino Uno – [Link]

A $20 Heart Rate Module For Health-Tech Projects

Heart rate monitoring is a common procedure for most of health related projects. Therefore, producing sensors modules and circuit boards for such tasks will facilitate and push forward the development of new health-tech projects.

Maxim Integrated, an analog and mixed-signal integrated circuits manufacturer, has developed a new module for measuring heart rate and pulse oximetry. It’s called “MAXREFDES117#”, derived from Maxim Reference Design, and it is a small board which is compatible with Arduino and Mbed boards, enabling a wide range of possibilities for developers.


MAXREFDES117# can be powered by 2 to 5.5 volts. It is a photoplethysmography (PPG)-based system that uses optical method for detecting heart rate and SpO2. It consists of three main parts:

1. MAX30102, a high sensitivity heart rate and pulse oximetry sensor. It is used with integrated red and IR LEDs for heart rate and pulse oximetry monitoring.

2. MAX1921, a low-power step-down digital-to-digital converter. It generates 1.8 V from input to supply the sensor.

3. MAX14595, a high speed logic-level translator. It works as an interface between the sensor and the connected developing board.

MAXREFDES117 Block Diagram
MAXREFDES117 Block Diagram

The board size is only 0.5” x 0.5” (12.7mm x 12.7mm) and has low power consumption that make it suitable for wearable applications. Thus, it can be placed on a finger, an earlobe, or other fleshy extremity.

MAXREFDES117# uses open-source heart-rate and SpO2 algorithm in its firmware. It also can be used with any controller having I2C interface. But the available firmware had been tested only on 6 different development boards, three of them are Arduinos (Adafruit Flora, Lilypad USB, and Arduino UNO), and the others are mbed boards (Maxim Integrated MAX32600MBED#, Freescale FRDM-K64F, and Freescale FRDM-KL25Z).

The MAXREFDES117# Firmware Flowchart
The MAXREFDES117# Firmware Flowchart

Accuracy of data collected by MAXREFDES117# depends on the used platform. According to the results with tested boards, Arduino boards give less accuracy than mbed ones because of theirs smaller SRAM size.

MAXREFDES117# is available for $20, it can be ordered online through the website.
More detailed information and quick start guide are presented here. In addition, all of the source files including schematic, PCB, BOM, and firmware are open and can be reached at the official product page.

An open-source IoT power meter

The first step toward finding ways to reduce home electricity usage begins with installing an energy monitoring system. These days you can find an electric meter in every residence, but it is likely that you would find it installed in a location that is more convenient to access for a utility person and not for you, the homeowner. This DIY Internet-of-Things enabled power meter is what you would need for an easy access to the real-time electricity usage data right on your computer screen at your desk.

IoT Power meter
IoT Power meter

This IoT power meter (IPM) is designed by Solenoid and it works in conjunction with a regular watt meter that consists of a flashing LED as a watt-hour usage indicator. The IPM senses the blinks of the LED using a light-dependent resistor (LDR), counts those pulses, saves the values to an SD card, and later uploaded to a cloud service, such as Google spreadsheet, for remote access using internet. Another advantage of IPM over the regular power meter is it extrapolates the measured data samples for improved resolution and estimation of energy usage.

The heart of this project is the WiFi-enabled ESP8266 microcontroller, which is coupled to an SD card and a 0.96” OLED screen. The SD card is used for storing the energy usage data as well as the HTML web pages that are served by ESP8266 on a client’s request. The network credentials required by ESP8266 to connect to a WiFi router are hardcoded into the firmware. The OLED serves as a local display for showing the current time and date, local IP address of the ESP8266 device, watt-hour usage for the day, etc. For accuracy, the ESP8266 synchronizes its local time with an NTP server.

IPM prototyping on a breadboard
IPM prototyping on a breadboard

The IPM is an open-source project and costs about $20 to build. The BOM and detail documentation can be found here.

Wireless biosensor platform for medical disposables


STMicroelectronics and HMicro have announced a single-chip product for disposable, clinical-grade wearable patches and biosensors, to replace wires for vital-sign monitors and electrocardiograms. The IC technology developed by HMicro and ST also targets other high-volume clinical and industrial-IoT applications. By Graham Prophet@ edn.com:

Hmicro is a wireless solutions developer working in wireless peripherals and complex biosensor applications. With STMicroelectronics the two companies have launched their cooperation to create the first single-chip solution for clinical-grade, single-use disposable smart patches and biosensors. The product, HC1100, targets the 5 billion wired wearable sensors, such as those for vital-sign monitors and electrocardiogram leads, utilized annually.

Wireless biosensor platform for medical disposables – [Link]

FFTs and oscilloscopes: A practical guide


Arthur Pini @ edn.com published a guide on how to use FFT found in most modern oscilloscopes.

The FFT (Fast Fourier Transform) first appeared when microprocessors entered commercial design in the 1970s. Today almost every oscilloscope from high-priced laboratory models to the lowest-priced hobby models offer FFT analysis. The FFT is a powerful tool, but using it effectively requires some study. I’ll show you how to set up and use the FFT effectively. We’ll skip the technical description of the FFT, because its already implemented in the instruments. Instead I’ll focus on the practical aspect of using this great tool.

FFTs and oscilloscopes: A practical guide – [Link]

Arduino Touch Screen Music Player and Alarm Clock Project


Dejan Nedelkovski build an Arduino-powered MP3 Music Player plus Alarm Clock. The player has a 3.2″ TFT display and the home screen displays time, date and temperature along with touch control buttons.

In this project I will show you how you can make an Arduino Touch Screen MP3 Music Player and Alarm Clock. You can watch the following video or read the written tutorial below.

Arduino Touch Screen Music Player and Alarm Clock Project – [Link]

Lightweight Body Heat – Electricity Converter

Powering wearable technologies using thermoelectric generators (TEGs) is becoming more efficient. An undergraduate student in North Carolina University, Haywood Hunter, is producing a lightweight and an efficient wearable thermoelectric generator. It generates electricity by making use of the temperature differential between the body and the ambient air.This converter produces 20 times more electricity than other technologies (20 µwatts) and it doesn’t use any heat sink, making it lighter and much more comfortable.

Study co-lead Haywood Hunter, shows off the TEG-embedded T-shirt at work.
Study co-lead Haywood Hunter, shows off the TEG-embedded T-shirt at work.

The design begins with a layer of thermally conductive material that rests on the skin and spreads out the heat. The conductive material is topped with a polymer layer that prevents the heat from dissipating through to the outside air. This forces the body heat to pass through a centrally-located TEG that is one cm2. Heat that is not converted into electricity passes through the TEG into an outer layer of thermally conductive material, which rapidly dissipates. The entire system is only 2 millimeters, and flexible. Some limitations to size can be solved by choosing right power settings for different sizes.

Even though the wrist is the best place to use heat-electricity converters because the skin temperature is higher, the irregular contour of the wrist limits the surface area of contact between the TEG band and the skin. To solve this issue, it was recognized that the upper arm was the optimal location for heat harvesting. Meanwhile, another experiment showed that wearing the band on the chest limited air flow and heat dissipation, since the chest is normally covered by a shirt.The researchers found that the T-shirt TEGs were still capable of generating 6 µW/cm2 – or as much as 16 µW/cm2 if a person is running. It was realized then that T-shirts are just not as efficient as the upper arm bands.

TEG-embedded T-shirt (left) and TEG armband (right).
TEG-embedded T-shirt (left) and TEG armband (right).

The work was funded by National Science Foundation (NSF) and the research was done in the Nanosystems Engineering Research Center for Advanced Self-Powered Systems of Integrated Sensors and Technologies (ASSIST) at North Carolina State. This center’s mission is to create wearable, self-powered, health and environmental monitoring systems, such as devices that track heart health or monitor physical and environmental variables to predict and prevent asthma attacks.

Further details can be reached at the university website and the project’s paper.

Via: ScienceDaily

LTM2889 – Isolated CAN FD µModule Transceiver and Power


The LTM2889 is a fully ISO 11898-2 compliant CAN (controller area network) μModule transceiver and isolator that guards against large ground-to-ground differentials and common mode transients in 3.3V or 5V applications. In practical CAN systems, ground potentials vary widely from node to node, often exceeding the tolerable range, which can result in an interruption of communications or destruction of a transceiver. The LTM2889 separates grounds by isolating the CAN transceiver using internal inductive isolation. It implements multiple levels of protection to significantly improve system reliability, including 2,500VRMS of galvanic isolation, ±60V bus voltage fault tolerance, greater than 30kV/μs common mode transient immunity, and ±25kV HBM ESD protection. The LTM2889 requires no external components, ensuring a complete and robust μModule solution for isolated serial data communications.

LTM2889 – Isolated CAN FD µModule Transceiver and Power – [Link]