New MoteinoM0 Released!

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:
    • SD-card logger ( with “zero” power control)
    • weather node
    • multi DOF accelerometer/gyroscope/magnetometer
    • secondary RFM transceiver (say you want an FSK and LoRa Gateway to listen concurrently or combine different concurrent frequencies)
  • 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:

Here is a quick pin reference and schematic:

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.

Challenges ahead

  • 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!

17 thoughts on “New MoteinoM0 Released!

  1. I don’t have a need for that kind of power yet, but it sure is pretty! Congratulations on getting it into production….

  2. It’s always a pleasure to pop in here and see that you’ve put your traditional polish on something like this, and switching microcontroller architectures is no small feat. It will be interesting to see what work went into limiting sleep currents for the SAMD21. And since it’s all on ARM now, it will be interesting to see if there’s anything that could be transferable to the forthcoming SAMD51 series.

  3. That’s great news, Felix – well done & congratulations. I look forward to seeing how the LowPower lib will handle getting the board down to 6ua (and bringing it back again). I have high hopes that it will work out for my RS485 network operating at 3MHz (1MHz RS485 per 16MHz of the MCU) where I like to put idle nodes to sleep only to be woken up by an external interrupt.

  4. Excellent! Though I would bet that the capabilities of the good old 328p are more than sufficient for 99 % of all RF node projects, it just human nature to look out for more power. And thanks to all the work you invested up front this increase in power seems have to price tag attached in regard to current draw and ease of use. Even the 22 $ feel very competitive.

    Even though you did not mention it, I really like the power supply options. Being able to simply plug in a LiPo is just awesome! Designing one’s own RF node on such a foundation has just become even easier.

  5. Felix,
    Nice job, I stayed far from M0 because of no really official support of LowPower, just revamped some libs and see nobody take deep study of datasheet but I was sure it should be possible to do. I wanted (one day) to inspect this, but you done it, and I now can think about using these devices.
    Seeing you in Low Power for M0 is a great new, and for sure, the only source for power optimization, is Data Sheet 😉
    Will order quickly.

  6. Excellent work Felix.
    Is it possible to power it by solar panel via the usb ? would it charge the lipo and power the mcu?

    • Sure, if the panel provides between 4-6V to power the charger, that will be enough for the LDO>MCU as well.
      For all other Moteinos you can also use a solar panel (although there is no charger version currently other than M0).
      Thanks for the feedback!

  7. This is awesome! Been holding out on buying development boards based on SAMD21, but this will definitely be my first buy.

    Question – does it go lower than 6uA without the watchdog timer and external pin interrupts active?

    • I will say that depending on the stock board options you can go down to between 7uA and 9uA.
      The SAMD21 itself is at 5uA, the difference is from the LDO and other micro draws in the peripherals I added to this board.
      If you really need much lower than that I will recommend the TPL5110 watchdog which will cut power obviously, but will sleep your whole circuit at just ~35nA.
      I am always focused on the best bang for the buck in terms of energy consumption. From my experience – if you can keep your circuit at avg. <10uA you are still in for a LOOOOONG time on any small LiPo battery. Even my 60uA avg mailbox notifier (chinese PIR using 50uA+ avg) lasts at least a year on a small Lipo. I would spend your time and energy to properly code/time radio transmissions and sleep everything else, rather than try to squeeze a few more uA from the schematic itself. If you can do that then you're servicing intervals will probably come sooner than the battery running out. Just my .02 😉

  8. This is brilliant! Low power lab’s boards are always meticulously designed. Looking forward to getting into ARM – it indeed is a natural step up from AVRs.

    I do have three questions that aren’t immediately apparent from checking the post or the schematic:

    1.) How do you burn bootloaders into this chip?!
    2.) What’s the idle current draw of the charging circuit when only the LiPo is connected and the USB is disconnected? 6uA seems pretty awesome if the charging IC isn’t manually switched off
    3.) Is the 6-7uA in sleep mode with USB enabled? If the board is in sleep mode and I plug it into a computer, would it be detected/assigned a COM port? Or leaving USB enabled consumes a bit more current, like the ATmega32u4

    Gonna buy a few of these are play around with them. Keep up the awesome work!

    • Hello Dave, thanks for your comment and questions.
      The bootloader is already burned for you so you don’t have to worry about that part.
      Current consumption figures are given for a LiPo battery, and the charger does not waste current when there is no USB power.
      For the lowest sleep you need to turn off *everything* including USB, meaning you won’t have a USB connection anymore, except if say you woke it up via an interrupt after which you re-enable USB. There is more discussion in the forums!

      • Thanks for your reply Felix.

        My question was more general — as in, how do YOU burn bootloaders into it. Just curious 😀 I’m more used to ISP pins on Arduino boards or a test socket with bare AVR chips. Wondering if it’s similar.

        Ah, I figured deep sleep would be with USB disabled. If we plug in a lowest sleep Moteino M0 into a computer and re-enable USB via some code, would that require rebooting the board before the computer can detect it or just enabling it will make it show up?

        Should probably continue this discussion in the forum.

        • An ICE ARM programmer is required to bootload the SAMD21. USB is just a device like serial or SPI or I2C, to make it active and enumerate to the PC you need to enable it. For more discussion let’s head over in the forum, thanks 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *