Dajbych.net


IoT hardware platforms

, 6 minutes to read

In­ter­net of things is a net­work of em­bed­ded sys­tems. Mi­cro­con­trollers are not a new thing. BIOS in com­puter mother­board is a mi­cro­con­troller which loads code from a pe­riph­eral. There are many plat­forms you can build your own em­bed­ded sys­tem on. The more pop­u­lar and easy to use the plat­form is the more lim­its you usu­ally have. I’m so im­pressed how the hard­ware de­vel­op­ment field have moved dur­ing last decade, but also very dis­ap­pointed with Mi­crosoft’s lack of sup­port of .NET Mi­cro Frame­work.

AVR

AVR is a fam­ily of mi­cro­con­trollers de­signed in 1996 by At­mel. These mi­cro­con­trollers have (Nor­we­gian mod­i­fied) Har­vard ar­chi­tec­ture and 8-bit mem­ory ad­dresses. The soft­ware writ­ten in C++ is com­piled and trans­ferred from PC to mi­cro­con­troller via pro­gram­mer (like AVR Dragon). The pro­gram­mer is con­nected to PC via USB and the mi­cro­con­troller is con­nected to pro­gram­mer via JTAG. The pro­gram­mer al­lows de­bug­ging the code ex­e­cuted by mi­cro­con­troller. The de­vel­op­ment en­vi­ron­ment is At­mel Stu­dio 7 which is based on Vi­sual Stu­dio Shell. Fa­mil­iar de­vel­op­ment en­vi­ron­ment sim­pli­fies learn­ing. With an out­s­tand­ing soft­ware/driver/firmware sup­port by Mi­crochip Tech­nol­ogy you can bet that your de­vice will not be ob­so­lete in a few years.

The only disad­van­tage is a need of low style C pro­gram­ming. You can­not set mi­cro­con­troller pin volt­age by as­sign­ing a Boolean value to an ob­ject prop­erty which rep­re­sents the pin. You must code this ab­s­trac­tion by your­self. How­ever, this be­comes an ad­van­tage when you re­al­ize that most code sam­ples and ref­er­ence im­ple­men­ta­tions of hard­ware pe­riph­eries are coded in C/C++. More­over, you don’t have any­thing like de­bug con­sole but when you stop on break­point you can see val­ues of your vari­ables.

Arduino

Ar­duino is a pre­pro­grammed AT­mega168 (or sim­i­lar) with abil­ity to pro­gram or de­bug the mi­cro­con­troller without the ex­ter­nal pro­gram­mer. Ar­duino also in­tro­duced a stan­dard of a pin con­nec­tors lay­out. It al­lows to con­nect ad­di­tional mod­ules with the mi­cro­con­troller board without sol­der­ing or wir­ing a bread­board. The de­vel­op­ment en­vi­ron­ment is Ar­duino IDE and the only sup­ported pro­gram­ming lan­guage is Ar­duino. The syn­tax is based on C++. Ar­duino can ref­er­ence and ex­e­cute C/C++ code.

Raspberry Pi

Rasp­berry Pi is a mon­ster. It is a pre­pro­grammed AT­mega328 mi­cro­con­troller used ba­si­cally as a BIOS for Win­dows IoT (or Rasp­bian) booted from SD card. This ar­chi­tec­ture has one sig­nif­i­cant disad­van­tage. The de­vice does not tol­er­ate any power ou­tage dur­ing SD card writ­ing op­er­a­tion. SD cards are for­mat­ted in FAT32 or ex­FAT filesys­tem which is not a jour­naled file sys­tem like NTFS (Win­dows) or ext4 (Linux) filesys­tems are. Ap­pli­ca­tions for Rasp­berry de­vices are pro­grammed in the same man­ner as those for PCs.

BigClown

Big­Clown is modu­lar hard­ware. The core mod­ule is based on pre­pro­grammed Cor­tex-M0 con­troller. The de­vel­op­ment en­vi­ron­ment is Vi­sual Stu­dio Code where you code in C, but you must use a com­mand line for de­ploy­ing the pro­gram to the mi­cro­con­troller. It also means you can­not de­bug. There is an­other IDE called Play­ground which is sim­i­lar to .NET Gad­geteer de­vel­op­ment ap­proach.

Pycom

Py­com is a modu­lar hard­ware based on ARM ESP32 de­vices. The de­vel­op­ment en­vi­ron­ment is Py­makr which use Mi­croPython as a pro­gram­ming lan­guage. The de­vice is con­nected di­rectly to PC or Mac by USB. Mi­croPython can call im­ported C code as a mod­ule.

TinyCLR OS

C# for mi­cro­con­trollers has a long his­tory. The ini­tial re­lease of .NET Mi­cro Frame­work was in 2007. It is a tiny HAL (hard­ware ab­s­trac­tion layer) which sup­ports de­ploy­ing and de­bug­ging via USB. Due to lack of main­te­nance by Mi­crosoft in 2017 GHI Elec­tron­ics forked its own im­ple­men­ta­tion called Tiny­CLR OS. The de­vel­op­ment en­vi­ron­ment is Vi­sual Stu­dio 2017 with Tiny­CLR OS Project Sys­tem ex­ten­sion. There are a few de­vel­op­ment boards, but FEZ has a pin lay­out com­pat­i­ble with Ar­duino. Tiny­CLR OS sup­ports In­terop code for referenc­ing and ex­e­cut­ing na­tive li­braries.

nanoFramework

An­other clone of .NET Mi­cro Frame­work is nanoFrame­work. It runs on ARM ESP32 de­vices. The de­vel­op­ment en­vi­ron­ment is also Vi­sual Stu­dio 2017 with nanoFrame­work ex­ten­sion. Man­aged code can use In­terop for ref­erenc­ing and ex­e­cut­ing na­tive li­braries.

Meadow

Meadow is a full-stack .NET Stan­dard IoT plat­form. It is driven by Bryan Costanich, former vice pres­i­dent of Xa­marin, now founder of Wilder­ness Labs. Meadow is cur­rently in its Kick­s­tarter phase and has an am­bi­tion to bring PC style pro­gram­ming to mi­cro­con­trollers.