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.

New OTA GUI v2.0 released

If you’ve been using Wirelessly Programming, a unique feature that comes with all Moteinos, you will love this new update to the OTA GUI. The main requirement for this release was the ability to change the Programmer Moteino settings right from the GUI without reprogramming through the Arduino IDE. Here is the summary of changes:

  • A few UI changes and improvements and a new settings section:

  • support for on-the-fly change of Programmer RF settings: networkIDnodeIDfrequency (in Hz), EncryptionKey (either blank for no encryption, or 16-character key), BitRate (either default or 300KBPS). Existing RF Settings can also be read from the OTA Programmer.
    Note: for the settings feature to work, the latest OTA Programmer sketch is required
  • UI no longer locks during transfer!  The GUI window can be moved/minimized, log can be cleared at any time
  • ability to CANCEL a transfer
  • ability to refresh the COM ports dropdown
  • updated instructions
  • backward compatible with older programmer/target code
  • various bugs fixes and improvements

When you change settings on the Programmer, for the OTA transfer to work, those same settings need to match on the Target (sample starter Target code here), or the target has no way to intercept any packets from the Programmer.

If you’d like to change the RF settings on the Target, then first compile the sketch with the new settings into a HEX file, transfer it as you’d normally do, then change the settings on the Programmer via this new GUI, and you’re ready to do more OTA transfers once settings match.

The ability to change to 300KBPS instantly is very useful. That makes transfers significantly faster:

As always, if you run into any issues, have suggestions or bugs to report, please don’t hesitate reach out or start a discussion in the forum.

Happy Moteino OTA-ing!

MoteinoMEGA based Data Logger

Ed Mallon runs the Cave Pearl Project which is all about “developing a data logging platform from inexpensive pre-made breakout boards, and are using this at the heart of new environmental sensors that anyone can build.” Ed is also a contributor in the forum, and has posted a great in-depth tutorial that steps through making a submersible data logger. From the blog’s own summary:

In this tutorial, a logger is built using a 3.3v Moteino MEGA with a 1284p CPU @ 16Mhz, w 4K eeprom,16K SRAM for variables & 128K program space. Considerably more than the 328’s 1K eeprom, 2K ram & 32K progmem. Also has a spare serial port for GPS/NEMA sensors.

MoteinoMEGA based Cave Pearl in ‘Prototyping Trim’ with I2C OLED screen & ADS1115 ADC. INT1 & Aref jumpered. The built also includes an RTC backed up by a coin cell.


It’s great to see Moteinos being put to serious work in such interesting and niche projects. While a custom PCB could be built to reduce the amount of wiring and make for a more compact logger/breakout solution, this tutorial is targeted and perfect for those who want to learn the skill of building data loggers or similar projects using off the shelf components. Thanks Ed and the Cave Pearl Project!

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.

RFM69 10bit node addresses

I made some changes to the RFM69 library to support 10bit node addresses, and you should see version 1.3.0 available in your Arduino IDE Library Manager. Previously the standard was a 1byte (8bits) address for sender and receiver, a total of 2 bytes used in each packet for addressing. I wanted to avoid using another 2 bytes to increase addressing to 16bit (65k addresses) because having that many nodes is impractical, and 2 more bytes is an “expense” most users won’t need. So I used the bottom 4 bits of the CTL byte, to add 2 bits to each of the existing to/from address bytes. The network addresses are kept at 1byte (8bit).

This yields an address space of 1024 total addresses. Address 0 is now reserved for the BROADCAST address, and you are left with 1023 possible addresses. A gateway is suggested to be kept at address 1 and the rest of the nodes should occupy incremental addresses.

There should be no impact on anyone not using more than 255 nodes as before. One required change for those wanting to use addresses larger than 1 byte (255) is they need to use uint16_t variables in their sketch. I’m looking forward for constructive feedback and any bug reports at this time. The ListenMode part of the code (which is experimental) was left untouched and it only supports 8bit addressing as before.

Here is the latest RFM69 packet header structure including a breakdown of the CTL byte:

Other important updates:

  • The BROADCAST address was changed to 0 (from 255 previously).
  • The previous RFM69 v1.2.0 included SPI Transactions, another important change to the library.
  • After it was brought up in the forum that Moteino AVR sketches compile to larger sketch size than Arduino, I recently released a new  AVR Moteino Boards definition (based on Arduino 1.6.23 AVR boards) which results in significant compiled size reductions for all Moteino sketches, please give this a try. In Arduino IDE’s Boards Manager you should be able to easily upgrade to the latest version.

Portable RaspberryPi IP Camera Monitor

RaspberryPi projects are always lots of fun, and when combine it with displays, 3D printing and Moteinos, the result can only be awesome!

I had an older RaspberryPi and a touch display, and I wanted a portable IP camera monitor which I can mount or move anywhere. You can build a similar portable display, it will run on battery up to a few hours depending battery capacity – and it will automatically safely shutdown if the battery dips below a programmable voltage. It’s a nice convenient way to monitor your smart home interface, or an IP camera, weather or whatever else.

I had to find a suitable case and this adafruit one was almost perfect as-is. But who uses a Pi with a hard power switch? I wanted to use my own hardware (MightyBoost + Moteino) for battery power and backup, as well as a convenient power and reset button, I had to mod the case and add some holes to make everything fit. I also added some tripod mounts so I could mount this on a tripod or hang it from a shelf or a cabinet. Read on for the build details. I also put together a guide that will be maintained with any future changes to this project.

Continue reading

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.

Transceivers In-Depth Overview

I prepared a complementary video to cover all the basics of the LoRa and RFM69 transceivers used on Moteino boards. I concentrated on the most common topics I’ve seen show up in the forum and in support emails. This should be a good primer for those getting started with using sub-Ghz transceivers with Arduino or Moteino or even other compatible boards, since most principles apply the same way. Feedback and comments are welcome.

New Dipole Antenna Review & How-To

I’m pleased to introduce a new version of the PCB Dipole Antenna, a significant upgrade from the previous version. This has a nice VSWR of almost 1.0 at both 868Mhz (at default 78mm length), and 915Mhz (trimmed at 73.5mm). It could be trimmed anywhere down to 2.4Ghz but it will be a best performer for the wideband LoRa and FSK radios in the sub Ghz ranges. Be sure to check out the dipole section in the RF-Best-Practices Guide for more theory on the dipole antenna.

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