Dajbych.net


IoT hardware platforms

, 4 minutes to read

uc logo

The Internet of Things is a network of embedded systems. Microcontrollers are not a new thing. The BIOS in a computer motherboard is a microcontroller that loads code from a peripheral. There are many platforms you can build your own embedded system on. The more popular and easy-to-use the platform is, the more limits you usually have. I’m so impressed by how the hardware development field has moved during the last decade, but also very disappointed with Microsoft’s lack of support for the .NET Micro Framework.

AVR

AVR is a family of microcontrollers designed in 1996 by Atmel. These microcontrollers have (Norwegian modified) Harvard architecture and 8-bit memory addresses. The software written in C++ is compiled and transferred from a PC to the microcontroller via a programmer (like AVR Dragon). The programmer is connected to the PC via USB and the microcontroller is connected to the programmer via JTAG. The programmer allows debugging the code executed by the microcontroller. The development environment is Atmel Studio 7, which is based on Visual Studio Shell. A familiar development environment simplifies learning. With outstanding software/driver/firmware support by Microchip Technology, you can bet that your device will not be obsolete in a few years.

The only disadvantage is the need for low-level C programming. You cannot set microcontroller pin voltage by assigning a Boolean value to an object property that represents the pin. You must code this abstraction yourself. However, this becomes an advantage when you realize that most code samples and reference implementations of hardware peripherals are coded in C/C++. Moreover, you don’t have anything like a debug console, but when you stop on a breakpoint, you can see the values of your variables.

Arduino

Arduino is a preprogrammed ATmega168 (or similar) with the ability to program or debug the microcontroller without an external programmer. Arduino also introduced a standard pin connector layout. It allows connecting additional modules to the microcontroller board without soldering or wiring a breadboard. The development environment is the Arduino IDE, and the only supported programming language is Arduino. The syntax is based on C++. Arduino can reference and execute C/C++ code.

Raspberry Pi

Raspberry Pi is a monster. It is a preprogrammed ATmega328 microcontroller used basically as a BIOS for Windows IoT (or Raspbian) booted from an SD card. This architecture has one significant disadvantage. The device does not tolerate any power outage during an SD card writing operation. SD cards are formatted in FAT32 or exFAT filesystems, which are not journaled file systems like NTFS (Windows) or ext4 (Linux) filesystems. Applications for Raspberry devices are programmed in the same manner as those for PCs.

BigClown

BigClown is modular hardware. The core module is based on a preprogrammed Cortex-M0 controller. The development environment is Visual Studio Code, where you code in C, but you must use a command line for deploying the program to the microcontroller. It also means you cannot debug. There is another IDE called Playground, which is similar to the .NET Gadgeteer development approach.

Pycom

Pycom is modular hardware based on ARM ESP32 devices. The development environment is Pymakr, which uses MicroPython as a programming language. The device is connected directly to a PC or Mac by USB. MicroPython can call imported C code as a module.

TinyCLR OS

C# for microcontrollers has a long history. The initial release of .NET Micro Framework was in 2007. It is a tiny HAL (hardware abstraction layer) that supports deploying and debugging via USB. Due to a lack of maintenance by Microsoft, in 2017 GHI Electronics forked its own implementation called TinyCLR OS. The development environment is Visual Studio 2017 with the TinyCLR OS Project System extension. There are a few development boards, but FEZ has a pin layout compatible with Arduino. TinyCLR OS supports Interop code for referencing and executing native libraries.

nanoFramework

Another clone of .NET Micro Framework is nanoFramework. It runs on ARM ESP32 devices. The development environment is also Visual Studio 2017 with the nanoFramework extension. Managed code can use Interop for referencing and executing native libraries.

Meadow

Meadow is a full-stack .NET Standard IoT platform. It is driven by Bryan Costanich, former vice president of Xamarin, now founder of Wilderness Labs. Meadow is currently in its Kickstarter phase and has the ambition to bring PC-style programming to microcontrollers.