a complete piece of Io T development hardware, the
Thingy must be able to interface to external devices
if necessary. The interface to external devices resides
on connector P4. The top pins allow access to the
I2C bus. Ports P0.2, P0.3, and P0.4 are analog inputs.
I/O pins from the port expander are marked as
EXT.0, EXT.1, EXT. 2, and EXT. 3.
Access to the gates and drains of four discreet
MOSFETS are available at M1.D–M4.D and
M1.S–M4.S. The MOSFET gates are directly attached
to the nRF52832 I/O pins. As you can see in Photo
3, there are additional ways to access the Thingy’s
I2C bus and I/O.
The Thingy schematic is a combination of
multiple smaller schematics which is a bit more than
we can print. So, if you want to see the Thingy
hardware details via schematic, you can get as much
of the Thingy schematic information you want from
the Nordic website.
Thingy Firmware Architecture
Behold Figure 1. The Thingy firmware is built upon
the Nordic nRF5 SDK (Software Development Kit). There
are many versions of the SDK, and the Thingy firmware is
based on version 12.1.0. As you can see in Figure 1, the
Thingy uses the SDK HAL (Hardware Abstraction Layer)
and peripheral drivers as a basis for its sensor drivers that
ride on top of the SDK modules.
The Thingy sensor drivers perform tasks such as
enabling and disabling the sensors, configuring the
sensors, and capturing sensor data. The BLE Handler
handles all the Bluetooth communications functions and
acts as an event dispatcher. Configuration parameters are
kept in the Flash storage.
BLE Services are the functional modules that make up
the Thingy application. BLE Services include the Thingy
Configuration Service, the Environmental Service, the User
Interface Service, the Motion Service, the Sound Service,
and the DFU Service.
The Thingy Configuration Service is responsible for
handling all the general configuration parameters that are
not tied to a specific module. The Environmental Service
provides the temperature, barometric pressure, air quality,
color, and humidity values we saw when we initially fired
The User Interface Service drives the Thingy LEDs and
senses the pushbutton events. The Motion Service reads
the Thingy’s nine-axis motion sensor and low power
accelerometer. The Sound Service responsibilities are
obvious, and we saw the DFU Service in action earlier in
To get a detailed look at how the Nordic engineers
put the Thingy firmware together, download the free
version of the Keil MDK-ARM compiler. Once you have
October 2017 57
■ FIGURE 1. This is a 10,000 foot view of the Thingy firmware
architecture. Basically, the nRF5 SDK supports the custom
Thingy firmware modules.
■ SCREENSHOT 7. The code modules are shown in the
expanded view. Note that the Thingy drivers and libraries
are contained within their own folders. The folders that
contain nRF labels support the nRF52832 microcontroller.