The STM32 Nucleo Pack for IoT Brings Makers to the IoT Cloud

作者:European Editors

投稿人:DigiKey 欧洲编辑

Inventors, tinkerers, and makers alike bring all sorts of innovative and creative projects and ideas to life through ready-to-go, low-cost hardware and software. They dream up and test various projects that solve real-world problems, or just do something really cool. These makers need ready-to-use tools to help them develop, test, and tweak their creations. These tools could include single board computers (SBCs), development tool chains, software interfaces, or anything that aids in the creation of a new device or the modification of an existing one.

Mass produced microcontroller boards started with the Arduino development boards and Atmel's 8-bit ATMEGA microcontrollers. Simplified software tools like Sketch and a large library of plug-and-play code meant almost anyone could pick up an Arduino and build something in a matter of minutes. Since then, many development boards have been released, each with their own unique advantages.

While these development boards provide makers and engineers with the tools to develop rapid prototypes to prove their designs, getting the captured data from the microcontroller or serial port into the Cloud often requires a much greater skillset, which includes:

  • Hardware developers
  • Embedded software developers
  • Back end infrastructure
  • Front end web portal
  • Smartphone application design
  • UX and UI designers

These are often a team of hardware and software engineers working together over an extended timeline. In a fast-paced market, this can prove both hazardous and expensive to any company. While creating from scratch is often an enticing challenge, the right development boards negate the need to do so.

The STM32 Nucleo pack for IoT nodes

STMicroelectronicsSTM32 Nucleo is a powerful, low-cost alternative to the Arduino series of development boards. The latest all-in-one STM32 Nucleo pack includes NFC, MEMs, and Wi-Fi expansion boards, bringing makers and engineers to the IoT cloud. The MEMs expansion board is jam packed with accelerometers, magnetometers, gyroscopes, pressure sensors, and temperature and humidity sensors. These expansion boards are only a small selection of the large number offered from STMicroelectronics. The STM32 Nucleo development boards are also Arduino UNO R3 expansion board compatible, meaning they can use almost all of the Arduino shields.

However, where the STM32 Nucleo really comes into play is with ST’s Open Development Environment function packs which provide direct connection to either Microsoft Azure’s or IBM Watson’s IoT Cloud. Pre-built binaries let the designer complete the full design implementation in a matter of minutes. This allows makers and engineers to spend time coming up with new ideas and cool projects, or focusing on adding desired features and functionality.

Breakdown of the STM32 Nucleo pack

Image of STMicroelectronics STM32 Nucleo pack for IoT nodes

Figure 1: STM32 Nucleo pack for IoT nodes.

The STM32 Nucleo pack features four development boards, each of which can be purchased separately. The NUCLEO-F401RE is the brains of the pack with the STM32F401RE MCU, a 32-bit ARM® Cortex®-M4 core with DSP and FPU, adaptive real-time accelerator, 512 Kbytes of Flash, and 96 Kbytes of SRAM. The board can be powered by USB or from an external source up to 12 volts. There’s an on-board ST-LINK/V2-1 debugger/programmer with three interfaces supported via micro USB: Virtual COM port, mass storage, and a debug port. The board also supports Arduino UNO R3 and ST morpho connectivity to all STM32 I/O. A wide choice of integrated development environments (IDEs) are supported, including IAR, ARM, Keil and GCC-based IDEs. The STM32 Nucleo board comes with the STM32 comprehensive software HAL library together with various packaged software examples, as well as direct access to the ARM mbed online resources. The ARM mbed online tool only works with Chrome, but it allows the user to write code through the web portal and download to the board’s memory storage over USB without the need to download large software IDEs.

Image of STMicroelectronics STM32 Nucleo-64 board

Figure 2: STM32 Nucleo-64 board.

The second development board is the X-NUCLEO-IDW01M1, a Wi-Fi expansion board based on the SWPF01SA module. It is both FCC and ETSI compliant with a low power 802.11 b/g/n transceiver and an integrated SMD antenna. A 1 MB extended Flash allows firmware updates over-the-air (FOTA). Other useful features include application layer functions such as web server supporting dynamic web pages, and REST API to get and post web content. As with any IoT device, personal security is a serious concern and is covered with WEP/WPA/WPA2. Control is through a simple AT command set host interface via the UART.

Image of STMicroelectronics Nucleo Wi-Fi expansion board

Figure 3: Nucleo Wi-Fi expansion board.

The third development board is the X-NUCLEO-IKS01A2 motion MEMS and environmental sensor expansion board, which is packed with several sensors to capture all sorts of data. Its features include:

  • LSM6DSL MEMS 3D accelerometer (±2/±4/±8/±16 g) and 3D gyroscope (±125/±245/±500/±1000/±2000 dps)
  • LSM303AGR MEMS 3D accelerometer (±2/±4/±8/±16 g) and MEMS3D magnetometer (±50 gauss)
  • LPS22HB MEMS pressure sensor, 260-1260 hPa absolute digital output barometer
  • HTS221: capacitive digital relative humidity and temperature

There’s also a 24-pin DIL socket for additional MEMS adapters and other sensors. All the sensors interface with the STM32 Nucleo over the default I2C interface.

Image of STMicroelectronics Nucleo Motion MEMS and environmental sensor expansion board

Figure 4: Nucleo Motion MEMS and environmental sensor expansion board.

The last board is the X-NUCLEO-NFC01A1, Dynamic NFC tag expansion board. Using the M24SR64-Y Dynamic NFC/RFID tag IC and NFC antenna (13.56 MHz), it is commonly used with the Wi-Fi expansion board and the ST25 smartphone application to set up Wi-Fi SSIDs and passwords in an easy-to-use and secure way. It also supports the Arduino UNO R3 connectors, but it does not contain the morpho connectors that the other expansion boards have.

Image of STMicroelectronics Nucleo Dynamic NFC tag expansion board

Figure 5: Nucleo Dynamic NFC tag expansion board.

While the STM32 Nucleo pack for IoT node only contains these three extra expansion boards, there is a wide range of supported expansion boards available including, but not limited to, the X-NUCLEO-IHM07M1 motor driver, X-NUCLEO-IDB05A1 Bluetooth Low Energy, X-NUCLEO-53L0A1 light sensor, and the X-NUCLEO-LED61A1 LED driver.

STM32 Nucleo and the IoT cloud

The cloud refers to an internet-based service, where computer processing and data is shared in an easy to access forum. It’s usually a distributed grouping of servers spread across the world that run specific programs to capture and store data to be reviewed at a later time. A simple example is a temperature sensor that sends the temperature to a remote server, where the data is parsed and stored in a database. This is then retrieved through a web portal or a smartphone application to be viewed by the end user.

One of the key offerings with the STM32 Nucleo development board includes two software packages from the STM32 Open Development Environment. The FP-CLD-AZURE1 and FP-CLD-WATSON1 are two software packages that help connect the development board with a web dashboard running on the cloud for sensor data visualization. These provide much needed out-of-the-box support for two of the most popular IoT clouds. Both packages offer complete middleware solutions to build applications based on Wi-Fi connectivity. The software includes drivers that recognize the Wi-Fi module (SPWF01SA), sensor devices (HTS221, LPS25HB, LSM6DS0, LIS3MDL, LPS22HB, LSM303AGR, LSM6DSL) and dynamic NFC/RFID tag (M24SR64-Y). It also includes a middleware package implementing the MQTT protocol for easy interaction of STM32 Nucleo-based microsystems with cloud services. The expansion software is built on STM32Cube software technology to ease portability across different STM32 microcontrollers.

The FP-CLD-AZURE1 functional package connects to Microsoft Azure’s IoT cloud. It comes with an integrated SDK for easy access to Azure’s services. It supports MQTT, device management primitives, telemetry and firmware update over-the-air (FOTA). Sample applications are available for the X-NUCLEO-IKS01A1, X-NUCLEO-IKS01A2, X-NUCLEO-IDW01M1 and X-NUCLEO-NFC01A1 boards connected to a NUCLEO-F401RE/NUCLEO-L476RG/NUCLEO-F429ZI board.

The FP-CLD-WATSON1 functional package connects to IBM Watson’s IoT cloud through Bluemix, IBM’s platform as a service (PaaS). Similar to Microsoft Azure’s IoT cloud, it provides complete middleware package to build applications based on Wi-Fi connectivity connecting the STM32 Nucleo board with cloud-based services. Sample implementations are provided for the X-NUCLEO-IKS01A1, X-NUCLEO-IDW01M1, and X-NUCLEO-NFC01A1, when connected to NUCLEO-F401RE.

While these two packages are readily supported by the STM32 Nucleo pack, they are not the only STM32 ODE function packs available. Function packs exist to connect devices to the Amazon AWS cloud, connecting 6LoWPAN IoT nodes to smartphones via Bluetooth Low Energy (BLE), creating BLE star networks connected via Wi-Fi to the IoT cloud, and 6LoWPAN networks through sub-1GHz RF communications.

Getting up on the IoT cloud

Looking at Microsoft Azure’s IoT cloud, getting started is all documented in the user manual (UM2043). The quick start guide is also another useful document to work through. However, both of these documents make assumptions that the user has already installed the IDE of choice and knows how to use it. The following simplifies the optimal steps to take:

  1. Download and install any of the three IDEs. Note that while all are powerful tools, only the AC6 system workbench for STM32 is free.
  2. Download a serial line monitor like TeraTerm.
  3. Download and unzip the Microsoft Azure IDE software package (FP-CLD-AZURE1).
  4. Set up the IoT hub.
  5. Register and provision the STM32 node and get its credentials.
  6. Register an active account on Microsoft Azure.
  7. Download Microsoft Device Explorer utility for Windows or iothub-explorer, a cross platform command line tool, to provision devices and manage the IoT hub.

Once the steps in the quick start guide have been followed and the STM32 Nucleo pack has been successfully programmed, the user can connect the node to the Wi-Fi network by programming the SSID and password into source code or by using the ST25 Android application and the attached NFC expansion board.

Once all the necessary software packages are downloaded and successful provisioning and registration of the IoT node is complete, it is possible to start using the existing code base to develop custom applications. Device Explorer is a Windows-based utility that is used to provision and manage the IoT hub. On top of this, it is also used to visualize messages sent from the node, change message properties on the fly and set up firmware updates.

Image of Windows Device Explorer for provisioning and IoT hub management

Figure 6: Windows Device Explorer for provisioning and IoT hub management.

The Android smartphone app provides extra features including setting up the SSID and password through the NFC tag expansion board.

Image of STMicroelectronics ST25 smartphone application

Figure 7: ST25 smartphone application.

Cloud-JAM

An alternative product by RushUp, the Cloud-JAM, is an accelerator specifically designed for makers, developers, and high mix, low volume products. It combines all four development boards (MCU, Wi-Fi, MEMS and NFC) of the STM32 Nucleo pack for IoT into the one compact design. One of the key features is the direct compatibility between the two development systems, allowing users to develop and debug on the STM32 Nucleo functional pack, and then download the same binary onto the Cloud-JAM. This interoperability allows the same ability to connect to the IoT cloud, as well as use the quick start guides for the STM32 Nucleo to get up and running. The datasheets and information on the Cloud-JAM product can be downloaded from RushUp’s GitHub repository.

Image of STMicroelectronics Cloud JAM accelerator product of STM32 Nucleo pack

Figure 8: Cloud JAM, accelerator product of STM32 Nucleo pack for IoT node.

Conclusion

Aiding makers, designers and engineers by providing comprehensive, easy-to-use tools is a positive move. STMicroelectronics has done a great job at tackling the complete package, from collecting sensor data on the embedded platform, transmitting to local networks, and storage in the IoT cloud where the nodes can be updated, controlled and monitored. The IoT cloud SDKs take the hassle out of connecting numerous systems together, allowing makers and engineers to jumpstart their development. Instead of a team of engineers with broad, separate skillsets, the full product package can be developed in a more cost-effective manner with a much improved time-to-market.

免责声明:各个作者和/或论坛参与者在本网站发表的观点、看法和意见不代表 DigiKey 的观点、看法和意见,也不代表 DigiKey 官方政策。

关于此作者

European Editors

关于此出版商

DigiKey 欧洲编辑