If you’ve watched the forum, it’s been suggested to develop a new Moteino board featuring new/more powerful/more flexible or even ARM microcontrollers. Mentioned candidates were the Atmega328PB, STM32, SAMD from Microchip and perhaps others were mentioned over time as well.
Say hello to MoteinoM0 – it features the popular SAMD21G ARM Cortex M0+ 32bit processor (48Mhz, 256kb FLASH, 32kb SRAM). It’s quite an awesome bit of silicon brains and after months of playing with it, tweaking libraries and sketches, testing peripherals and designing add-ons for it, and developing an Arduino package for it that is oriented on LowPowerLab‘s most important points of interest, it is now available to the public.
But SAMD21 has been offered by others for years you say. How is this exciting and why did this take so long? I didn’t want to spam the market with a new clone and claim this is the best thing since Arduino Zero. Here are a few highlights that I think will make MoteinoM0 different and interesting:
- long range wireless programming enabled just like all the other current AVR Moteinos!
- Got low power? You bet! How about 6µA in standby sleep? MoteinoM0 yields the real low power mode achievable by the SAMD21, 7µA in watchdog periodic sleep, +1µA for the external 4MBIT FLASH-MEM chip and radio module
- supports RFM69HCW and LoRa radios, plus secondary radios and add-ons, see below
- a modular design enables compact platform for I2C/SPI/GPIO add-ons, just a few examples to mention:
- break out as many useful and Arduino supported pins as possible in a symmetric and compact board layout
- ease of side castellated mounts allow these add-ons to be mounted directly flat on the PCB without additional headers, here’s a simple weather-node add-on board that only requires one sided soldering and can be easily removed and reused:
- you may also stack above/below using extra headers or solder extension wiring to the side half-holes for quick removal and re-use later:
A few things about similarity to the standard Arduino Zero:
- this board was designed to be as compatible with Arduino Zero as possible in terms of available MCU functionality
- GPIO and core package is adapted from Arduino Zero, all GPIO is accessible the same way, except PA28 (USB_HOST_EN) which is not connected
- as seen in the reference above, some pins are hardwired to the radio transceiver and SPIFlash (A2/SS for radio, D8 for FLASH-MEM) and used by these modules
- you should be able to use most Arduino examples with MoteinM0 without a lot of hassle. If you’re already familiar with Arduino Zero this board should feel right at home
Read below for why this took “so long”.
- the AVR Moteinos have been rock solid, ultra low power, beginner friendly and easy to use, widely adopted in many different types of projects and probably still fit most use cases for IoT/automation of all kinds, long range and long life battery operation etc.
- seeing some of the development boards based on SAMD21 including ArduinoZero, and how not-low-power they are, I had this impression lingering for some time that SAMD may not really be low power friendly. When I started hands-on with the SAMD21 myself I realized it can do a LOT better if properly designed and coded the SAMD21 can actually go down to ~5uA on its own, what a revelation! It helps dig datasheets sometimes 🙂
- they are much more powerful and rich in features and peripherals, most of which MCU features are not required in the simple LowPowerLab kits and projects
- I spent a few months developing this platform, it has gone through 3 prototype stages, I wanted to make sure it can meet all the claims I plan to make
Why the Atmel/Microchip SAMD ARM Cortex M0+?
As the pricing gap between 8bit and 32bit narrows down, it made a lot of sense to look into SAMD21 as the best candidate for a new generation of Moteinos, and the natural progression from the AVRs. Arduino has done a great job paving the way and these ARM micros are now accessible and relatively easy to use. I’ve played around with STM32 last year an although it’s a nice spec’d lineup I haven’t been impressed mostly because of how hard it is to use and the lack of official support – if I’m struggling to code this thing, my audience so much more. For instance the ATmega328PB is hardly an upgrade from the venerable 328P and it’s still 8bit. On the other hand with SAMD I was able to meet all my requirements “relatively easily”, plus it offers a very significant peripheral upgrade. Atmel (now Microchip) because it’s a “familiar” transition from the AVR. The M0+ because I see it as the perfect balance of price, features, low power and “enough” computing power to significantly narrow the gap between basic 8bit MCUs and high power micro computers like the RaspberryPi. There is so much more ARM has to offer, for now there’s lots to explore in the SAMD21 and I can’t wait to see what people will do with MoteinoM0.
- With power comes responsibility, and SAMD ARM chips are quite more complex than their 8bit AVR cousins. For most projects this complexity is not required, unless you get into fancy stuff like fast displays, touch control, fast ADC/DAC sampling, complex math, etc.
- The GPIO ports in the SAMD is more complex and getting low power requires a bit of fiddling with the GPIO to ensure it is disconnected from external circuitry. This means that although I got the low power and stable behavior I was after in development, use cases in the field might reveal bugs in the the freshly released MoteinoM0 package.
- As seen above, the MoteinoM0 was developed as a platform not just as a single board. Rather than develop 12 dozen different boards with SAMD21 chips, why not develop one very reusable main board, that accepts twelve dozen different sensor and custom add-ons instead? There are plans to produce these add-on boards, and that takes time and resources. I want to see how MoteinoM0 is received and see the level of interest in these add-ons and feedback/suggestions from you, of how you might be using these, or add-ons/features you want in coming releases and revisions. I’m all ears!
I hope this board and its features will be found useful and can enable exciting and interesting new projects. As I work on documentation, adapt libraries and sample sketches, and release new add-ons in the near future, I welcome and encourage feedback, suggestions, corrections, and contributions!