MoteinoM0 R2 released

MoteinoM0 is now at revision R2. Here’s a summary of changes:

  • removed castellations for the short side header, to allow better panelization and better routed side finish on the long sides. The castellations remain on the long sides.
  • the micro USB connector is slightly recessed, the front being about flush with the board edge
  • changed top silkscreen “VUSB” header pin to “Vin”
  • “Serial” changed to “Serial0” which corresponds to the board definition Serial0. Note: the main Serial is the USB serial and SerialUSB has been deprecated.
  • added “VBat” header hole on the upper header, next to “Vin”, this was a popular demand to allow connecting a battery through a header or feed the JST connected battery to external devices. More details in this forum thread.
  • minor other layout optimizations and trace thickness adjustments

Available now in the shop. Note that MoteinoM0 along with other Moteinos and boards are now also available from Welectron Germany, check it out if you’re in the EU, it’s a good time to shop from there rather than wait for months for the crippled regular mail service.

Moteino SAMD 1.5.0 release

There is a major new release for the Moteino SAMD Boards Package 1.5.0. It will popup as an update reminder the next time you restart Arduino IDE, or you can go to the Boards Manager and update from there:

Here are the most significant changes in the SAMD package:

  • All MoteinoM0 and CurrentRanger boards will start shipping with the UF2 bootloader (it’s well worth a read if you’re not familiar with it). The TLDR; is: it supports sam-ba serial protocol uploads as before (via CDC serial, from bossac or via the Arduino IDE) and it also supports drag-drop updates of the firmware as well as the bootloader itself (via a MSC flash drive that appears when the M0 is running the bootloader). Extremely useful if you want to allow an end user to update the firmware and/or bootloader with a newFirmware.uf2 file drag-drop to the “flash-drive” simulated by the bootloader, without the need for the IDE. You could enter the UF2 with a RST double-tap as before, and you’d see a new “flash-drive” on your system (the CURRENT.UF2 is the actual firmware loaded in the MCU – useful to back up before an update):
  • To top off the UF2 awesomeness, MoteinoM0’s will continue to support updates of the firmware from the external FLASH-MEM chip, after an OTA upload via RFM69. The latest RFM69 library release 1.4 has been updated to support this.
  • SerialUSB is now completely removed from the MoteinoM0 and CurrentRanger variant definitions:
    • On MoteinoM0 Serial is now the USB serial, Serial0 is the UART on pins 30/31, and Serial1 is the UART on pins 0/1.
    • On CurrentRanger Serial is now the USB serial.
    • SERIAL_PORT_USBVIRTUAL is now Serial by default
  • You might notice in the MoteinoM0/CurrentRanger boards menu, there are now some options like choosing the USB stack (Arduino, TinyUSB) and more notably the Crystal selection. You can compile for the external crystal (default for MoteinoM0 R1) and “crystal-less” ie. the internal ultra low power 32.768kHz clock). When running without the external crystal, the internal clock is tuned using the USB bus clock which is very precise.

Note that the Moteino AVR boards package is now at v1.6.1. You are encouraged to update both of these packages. Older boards running the sam-ba bootloader may be flashed with the new bootloader included in the 1.5.0 package via SWD programmer. I may even offer to do this for free if you’re willing to return the board and pay for shipping back to you. Please report any bugs or issues in the MoteinoM0 or CurrentRanger forums.

New products: M0 Breakout boards

There are now a few more breakouts available in the shop. With the release of MoteinoM0 I also wanted to make available a few boards specifically designed to mount flat on the M0 PCB for a super compact wireless sensor platform.

The new boards include a BME280 Breakout featuring the same sensor as on the previous WeatherShield

And there is an all new LSM9DS1 9DoF IMU Breakout featuring 3 sensors in 1 compact chip (acelerometer+gyroscope+magnetometer):


And here’s a mini SD-Card Logger Breakout featuring a low power switch to keep that hungry SDCard off when not in use.

You don’t even need to use pins at all, just solder the castellated side mounts (aka half holes). You may later desolder these with hot-air or a wide chisel tip on your solder iron. You can of course use these on a breadboard or with any other Arduino/dev board. You can also stack all these on a single MoteinoM0 if you’d like, just need to get a little creative with stacking them to keep pins connected correctly:

Details and sample code were added to the guide page.

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”.
Continue reading

New Moteino packages released for Arduino IDE

There is a new Moteino Arduino core package release (v1.4.0). If you’ve used the Moteino package so far with the Arduino IDE, you should get a little notice next time you start it up. By the way the link to the LowPowerLab package definition JSON is the same and should be pasted in your Preferences dialog under Boards Manager URLs:

Then you can either install or upgrade to the latest AVR package. Notice there is a brand new Moteino SAMD package with a new MoteinoM0 board as well, more on that in a separate post. Install/upgrade these in your Boards Manager:

These two packages includes a refined selection of taget boards:

  • [ Moteino / Moteino-USB ] – use this to send your sketch to a Moteino or MoteinoUSB
  • [ Moteino (8Mhz) ] – for 8Mhz Moteinos 
  • [ MightyHat ] – technically identical definition to Moteino but use this to target a MightyHat
  • [ MoteinoMEGA / MoteinoMEGA-USB ] – use this to program MoteinoMEGA or MoteinoMEGA-USB
  • [ MoteinoM0 ] – a new Moteino based on SAMD21 Cortex M0+!

Once the packages are installed or upgraded you should see these new boards in your Tools>Boards menu:

And if you’re using my custom IDE board/port shortcut bar add-on, you can quickly add and access them directly from a click of a button, no more searching in the mile long Boards submenu of doom:

Some notable changes in these new packages:

  • added standard LED_BUILTIN pin macro definitions for all boards, you can simply use this macro to address the onboard LED of any Moteino, no more need for specific checks of what board it is you’re targeting, the LED_BUILTIN will just work. This macro references D9 on 328P Moteinos and MightyHat, D15 on MoteinoMEGAs, and D13 on MoteinoM0, simply use this macro directly in your sketch:
  • added board macro definitions for all Moteino boards:
  • added SS_FLASHMEM macro pin definitions for all Moteinos, again this is to ease the use of the SPI CS/SS selection pin across all Moteino boards:

I hope you find these changes useful. There’s lot of work to be done to upgrade all the sketches in the RFM69 and SPIFlash libraries to make use of these new macros. Please report any issues and stay tuned for the coming updates on MoteinoM0!