Electronics Microcontrollers "/>

What module to use in your IoT lectures?

15 September 2022 at 8:33 am

Article image for What module to use in your IoT lectures?

10 years ago there wasn’t many options if you wanted to make an always-on IoT or IIoT product. Then Particle and Electric imp came along with easy to integrate modules, good looking dashboards, great documentation and lots of smart API features. Electric imp is now part of Twilio and Particle has been falling apart for years, so what module should one use these days? I have only one good answer and it’s not only been available throughout the chip shortage, but it’s also six times cheaper than the alternatives.

When I changed from doing primarily software to hardware 10 years ago, your best option for wifi on a microcontrollers were $65 devices (or more). Now it’s down to $1 in some cases, so it’s certainly been a big change. In 2015 I discovered the Particle Photon and I soon integrated Particle devices in both products and lectures. It was just brilliant.

What ended my love affair with Particle

3 years ago, I gave up on Particle both for new products and for lecturing. They used to have one of the greatest IoT & IIoT solutions available, but lack of vision and a massively failed product launch (that cost them two years of dead time) made it so that they pretty much only had two good offerings left: one solution for mobile and one for Wifi connectivity. Then they sent out an End Of Life notice for the wifi product - without having a replacement available. The replacement finally arrives this month, but that’s too little, too late for me and my customers.

The company had been slowly falling apart for years and things that formerly had worked great started to fail without anyone solving it. Eventually, I could no longer trust the device or services. The greatest thing about Particle was always their community, but their sales department now tell you to not use that. If you have a problem these days, they’ll want you to call their support department where you’ll meet freshly employed teenagers rather than the skilled community professionals you’d meet at their forums. Formerly, this forum was filled with Particle employees that would chip in if the community could not answer something. These days, it’s only a few Particle employees that drop by and you can see the community activity dropping. The cloud services were at times so inconsistent that we had to disconnect from them in several products.

There’s still many great ppl at Particle and I think financially they’re doing well thanks to tracker unit sales, they just stopped serving my use cases? Anyway - enough ranting about former greatness…

Who could fill the void?

Some time ago I came to the conclusion that I might just as well bite the apple and build my own infrastructure instead of trusting Particle. Given that the firmware updates from Particle was more and more focused on new hardware (that is now discontinued) and sometimes broke units that we had sold across the world, it felt safer to roll our own solution. It’s a lot more work, but it offers safety against problems at a third party firm like Particle. Electric Imp never worked for me - despite one of it’s founders trying to push me towards it. Their business model also made them a little too expensive for my taste, but many have used them with success. There were also many vendors selling bare wifi modules with no ecosystem, but these were just too expensive to use in most products. Many of them were plagued with bugs (yes TI - I’m looking at you) or were just hard to use successfully.

Throughout the years, nothing has rocked the IoT world more than the wifi products from Espressif. I got in a little too early on the ESP8266 modules and gave up since the units had to reboot every 10 minutes to not crash. I’ve since learned that many early IoT products based on ESP8266 will still do this since they were sold without a way to update the firmware OTA. The company making these chips, Espressif, was not prepared for the wave of customers they got, but they slowly rose to the occasion. The bugs were patched and the product became the darling of IoT engineers across the world (also Particle). At this point, I still kept playing around with them but it was only when the ESP32 modules arrived that I really got into them and started building products around them for customers.

They’re just as easy to integrate into hardware as the Particle P0 and P1 modules, but there’s no deafult OTA, no dashboard and no set way to recover from errors. You build it all from ground up, but that’s also the plus side. This means that it’s a longer path from idea to product, but you’ll fully own the end result.

Lecturing with ESP32

The market has flooded with cheap dev boards the last years and ESP32’s became my replacement for Particle Photon in my Embedded Systems and M2M lectures. I had to rebuild the lectures completely and I had to find good cloud services to teach things that were already integrated with Particle, but in the end I think it’s a good solution. The ESP32 board I used with my students is called “Doit ESP32 Devkit” and it was dirt cheap, but solid.

These dev boards served me well in 2018-2020, but last year something happened that made me want to find a better solution. The dev kits basically died while you were looking at them. I had 40% failure rate - no matter from where the boards were sourced. For some the boards died during their exam, causing big problems for the students. I scrambled to get replacements when I saw this happen and in the end, this wasn’t a very cheap solution. There were multiple modes of failure, but it was primarily the LDO that failed and took the ESP32 module with it.

Custom ESP32 Feather for lecturing

Having built quite a few M2M projects based on the ESP32, I wanted to make a custom dev board for the students based on the Adafruit ESP32-S2 Feather, but with some minor twists. This makes it possible for the students to use the entire ecosystem of Feather Wings and Stemma/Qwiic to extend their projects. The S2/S3 Mini modules cost $3.25, so they are a little more expensive than the Wroom and Wrover modules, but they are smaller and has builtin USB that works really well. Not having to add a USB to Serial chip drives the price down significantly.

The final boards come in at about the same price as the boards from Adafruit, but the extra features I’ve added make it worth it. I’ve added a Lux sensor, temperature/moisture, accelerometer and a Hall Sensor. For now, I’ve built these boards using the Pick’n’place at my office/hackerspace Bitraf and as long as it’s a low volume, I’ll keep doing it this way. If I need to make a larger volume, I’ll just do a PCBA.

As with many of my projects, this is also an Open Hardware project. I’m been able to make this quickly thanks to the great great people at Adafruit and their license specifically instructs you to Share Alike (CC BY-SA 30), so all my source files for this project are on Github - named LectureFeather. I’l soon also publish files for a board that makes it easy for my students to use huge amounts of NeoPixel’s with any Feather board as “signage” is their theme this year. This board is currently in it’s first edition and I’m trying as hard as I can to break it to test the safety it’s supposed to provide.