Close

Microcontroller selection

A project log for Apartment HVAC IoT

Bringing analog hvac system into home automation.

PyDrewPyDrew 10/30/2020 at 04:480 Comments

I had long been a fan of the Teensy series of arduino compatible boards and have used them in a variety of projects. Reasonable cost and a small form factor with plenty of supported libraries and plenty of I/O pins. But by the time you add bluetooth and/or wifi, one quickly starts approaching the costs of the many ESP-8266 and ESP-32 based chips.

Also, my C programming skills aren't what they used to be. I truly miss the days of the C fluency that I had when I designed UltraSPARC chips for Sun Microsystems. But too much time building web applications in java and python has softened me. And the (re)learning curve of getting back into C is daunting when I'm feeling more like creating something than skill building.

Yes, writing in python yields code that is not nearly as fast. And, yes, it feels like cheating to avoid memory allocation and typed variables on such low-level, embedded hardware. But with clock rates running faster on microcontrollers than the Sparc Workstations I used to develop on, it just doesn't seem necessary to program in C any longer for my use cases.

                                       teenyc-lc (left), feather lora (center), pycom wipy (right)

Python is more than capable of doing the simple calculations and stepper motion that I need. While I think there is room for micropython to be more "pythonic" (more to come in later posts), the allure of using a higher-level language is too difficult to pass up.

To ease into this new paradigm, I had an Adafruit Circuit Playground lying around after being curious about micropython a year or so ago. I then played around with Adafruit's line of Huzzah Feathers but they can only be powered by either USB or LiPo battery. The stepper motors were going to draw more current than either of those could provide. And the thought of having two DC power supplies for one project seemed silly.

There are certainly plenty of super low-cost ESP32s on ebay and amazon but without a specific company (or a dedicated community) to get help from, I was hesitant to go down that route for my first micropython project. While exploring Adafruit's website, I came across PyCom's line of development boards (and their eco-system and community) seems to be the best of the micropython microcontroller contenders. While their base-level WiPy boards is perfect for this application, it's been good to invest in getting to know a platform that has room for growth since their line includes 3, 4 & 5-network (SigFox, LoRa, WiFi, LTE, BLE) microcontrollers.

Discussions