All about Moteino

Video introduction to Moteino Rev1:

Video introduction to Moteino Rev3 and RFM69H/RFM69HW transceivers and library:

What is Moteino?

Moteino is a low cost low-power open-source wireless Arduino UNO development platform clone based on the popular ATMega328 chip used in traditional Arduinos, making it 100% compatible with the Arduino IDE (programming environment). Unlike traditional Arduinos, the regular Moteino does not include an onboard USB-Serial converter, instead you need to use an external FTDI adapter to load sketches, the advantages being lower cost, smaller size. They are compatible with any other Arduino clones that use the popular HopeRF RFM12B transceiver or the newer RFM69 transceiver. Moteino also comes with an optional SPI flash chip for data logging or wireless programming.

What about Moteino-USB?

Moteino-USB includes the USB-serial FTDI chip so you can use it like any other Arduino (direct programming through USB mini). Otherwise it’s no different from the regular Moteino, but it is meant to be USB powered only, and hence is more suitable for permanently powered nodes rather than battery powered (either a master/gateway node interfacing to a PC or a node that can be powered from a USB power supply).

Both Moteino and Moteino-USB are available in the web shop.

Out of box: soldering antenna and headers

Moteinos come without any soldered headers or antennas. Without the wire antenna the range will be only a few feet. The provided wire monopole antenna has to be soldered to the “ANT” pin hole (just above the FLASH chip) to achieve any reasonable range. Regular Moteinos will come with a 1×6 male header that you have to solder before you can power it and upload sketches through an FTDI Adapter. Moteino-USB has built in USB so you only need a mini-USB cable for programming.

Moteino pinout (click to enlarge):

Moteino-USB pinout (click to enlarge):

Specifications for Moteino R1-R4

Microcontroller ATmega328
Transceiver RFM12B (all revisions) and RFM69 W/HW/CW (R3, R4)
Transceivers frequencies 434Mhz (universal), 868Mhz (EU), 915Mhz (US, Australia, etc.)
Operating Voltage 3.3V
Input Voltage (recommended) 3.3V-9V
Input Voltage (max limits) 3.3V – 13V
Digital I/O Pins 14+6 (6 PWM capable: marked with “~” symbol)
Analog Input Pins 8 (2 analog-only pins more than regular Arduinos)
DC Current per I/O Pin 30 mA
DC Current for 3.3V Pin 40 mA
Flash Memory 32 KB of which 1 KB used by DualOptiboot bootloader *
SRAM 2 KB
EEPROM 1 KB
Clock Speed 16 MHz
MISC Onboard LED on pin D9 instead of D13 (D9 is PWM!)
RFM12B or RFM69 SPI-CS on D10
FLASH SPI-CS on D8
A6 and A7 are analog pins only, cannot be used as digital pins

* DualOptiboot is a modified version of Optiboot (size is 1k instead of 512b). For programming purposes you can still use “Arduino Uno” as a target, however if your sketch exceeds 31KB you might have to add an additional entry to your “…Arduino\hardware\arduino\boards.txt” file that limits the upload to 31Kb instead of 31.5KB. Specifically – the entry “uno.upload.maximum_size=32256″ should be “uno.upload.maximum_size=31744″.

Quick comparison

DSC_0042_BW_captions2_price

Why Moteino?

There are actually other very similar projects on the web. In fact I used the JeeNode before for some projects around the house. While a great platform, the “jeeport” format didn’t really work for me, the ports would extend horizontally or perpendicularly on the board, making it hard to use in tight spaces. I wanted to see all the Arduino inputs/outputs clearly marked on the PCB so I don’t have to look at the datasheet all the time to figure out which pin is what. So I made my own wireless Arduino clone using RFM12B/RFM69 transceivers and a SPI Flash footprint for optional external flash memory capability and potential wireless programming. Also smaller, cheaper, cuter, easy to use and program, breadboard-friendly, all SMD components, fully assembled and tested by yours truly. People started asking about them so I decided to publish Moteino as OSHW and make it available for less than any other wireless capable Arduino.

Why the funky name “Moteino”?

Mote + ino, obviously.

Programming & libraries

Quick steps to programming:

  • First, you need to download and install the necessary libraries in your Arduino/libraries folder: RFM12B library, RFM69 library, SPIFlash library
  • Get started with RFM69 example sketches: Sender and Receiver
  • Get started with RFM12B example sketches: Sender and Receiver
  • To upload a sketch, select Arduino Uno in the Tools>Boards menu in the Arduino IDE, and the serial port emulated by your FTDI or USB-serial adapter in Tools>Serial Port
  • An FTDI Adapter that can be used to program Moteinos is available in the shop. If you have a Moteino-USB, a separate FTDI Adapter is not necessary. Other examples of compatible FTDI adapters you can use to power/program your Moteino: USB BUBII, FTDI cables here and hereFTDI friend.

The FTDI header has silkscreen markings for the GND and DTR pins to help you align your FTDI Adapter (black and green wires respectively on the FTDI cable). Usually the PCB based FTDI adapters also have the same markings on their end (see the FTDI Adapter).

The Moteino can be used like any Arduino, but for wireless communications you will need a library for the onboard RFM12B or RFM69 transceiver. In my Github repository you can find a RFM12B library I’ve adapted from Jeelib, and a RFM69 library, both have some basic examples and other projects making use of the library. These are the library I use/recommend/support for Moteino, they are fairly easy to use and very capable (check the Github description for each library specs). Also see this blog entry about the library. Copy the library folder in your “Arduino” libraries folder. See this tutorial on Arduino libraries if you’re not sure how to install an Arduino library.

Wireless Programming

This is an advanced topic. Wireless (“over-the-air”) programming is possible on Moteino R2-R4 (not on MoteinoLeo) if your Moteino has an external FLASH chip soldered (available pre-soldered for you when ordering or separate). There’s a proof of concept and source code described in this blog post. All recent Moteinos (R2-R4) come with the DualOptiboot bootloader which enables them to be wirelessly programmed when a FLASH chip is present.

What’s the marking/label for?

All Moteinos come pre-loaded with sketches. I load them with the basic Send/Receive sketches for each library. Typically one Moteino will be loaded with a receiver sketch and the rest with sender sketches to ensure all can transmit/receive, and also to verify that the FLASH chip (if any) is functional. That way if you power them up you should see sample wireless communication right out of the box. The color label or marker dot indicates which unit is preloaded with the receiver/gateway:

Antenna options and range

Moteinos are shipped with 1/4 wavelength monopole wire that should be soldered to the “ANT”. Each frequency has a specific antenna wire length. Without the antenna Moteinos will only have a few feet range at most. See this forum post about some antenna theory. You can increase the RF performance with 1/2 wavelength (double the 1/4 length) or with dipole antennas. There are some threads in the forum that discuss such options but they are more complicated. The basic monopole wire has an excellent performance to cost ratio.

You can also solder SMA or U.FL connectors between ANT & GND pads and hook up other types of antennas. I have not seen significant RF improvement with these types of antennas (I tested with monopoles) but they might be more appealing or convenient to mount on enclosures. Please see this flickr set for details how to do that:

 

Range is a difficult subject because RF performance is affected by very many factors. Any obstacles between nodes can absorb or deflect the signal. Atmospheric conditions can also have an impact (humidity, rain, snow etc). I was able to test the RFM12B and RFM69W in open air with the basic example sketches, and results were the following:

RFM69HW is a higher power version of RFM69 (20dBm vs 13dBm) and it can reach significantly futher. Other users have done some experiments and have reported various ranges:

Revision History

  • Moteino R4 - same as R3 except it can take either RFM12B or RFM69 transceivers. It replaces R3 and R2. Includes FLASH memory footprint, comes with DualOptiboot, and has a full GND pour on both sides. Needs an FTDI Adapter for programming.
  • Moteino R4-USB – same as R4 but has built in USB which allows direct programming through a mini-USB cable without a separate FTDI Adapter.
  • R3 - same as R2 except with a new transceiver: the RFM69 from HopeRF. Includes the FLASH memory footprint. Loaded with a modified Optiboot bootloader (DualOptiboot) to allow wireless programming.
    Moteino_R3_banner
  • R2 - Green mass produced PCBs. Includes the FLASH memory footprint. Loaded with a modified Optiboot bootloader (DualOptiboot).
    Moteino_R2 Moteino_r2_bunch
  • R1 – Initial version. These were produced at OSHPark (purple), did not include a FLASH footprint, and had slightly different bootloader and fuse settings. Some early orders received this version.
    Moteino_front_back2 Moteino_assembled Moteino_with_RFM12B
  • MoteinoLeo (retired) – Arduino Leonardo clone based on the ATMega32u4 chip and Caterina bootloader. It has been retired, but the design files are still available on Github. For the initial prototype details click here.
    MoteinoLeo_R1_withFlash MoteinoLeo_bottom_compared_small

What about the “FLASH” footprint?

This was introduced in Moteino R2 & R3 and MoteinoLeo to allow SPI flash memory (SOIC JEDEC 3.9/5.3mm body width package) to be soldered onto Moteinos for data logging (all) and wireless programming (Moteino R2 & R3) – the SPI CS select for this is connected to D8. There is now an SPIFlash library available and the Moteino R2 and R3 now comes with DualOptiboot – a bootloader allowing you to reflash them from a flash image stored on the flash chip. See this post for how wireless programming is achieved using DualOptiboot and more details.

FLASH_pinout

Why flash chips and not SD cards that come in much larger sizes at low cost? Because of the size constraints, I could barely fit an extra SOIC package on Moteino, also an SD card slot would increase the cost. A Moteino shield would be more appropriate for an SD slot.

Schematic and design files
They are published in the Moteino Github repository.
PDF schematics: Moteino & MoteinoUSB

YouTube review of Moteino R2, by Alan (w2aev)

How I make Moteinos They are hand assembled using various tools that I built to make the job easier and faster. For instance I am using a home-made SMD metal stencil to spread solder paste to the bare PCBs. I then place the SMD components using a manual home-made PnP (pick and place) “machine”. I reflow the boards in a toaster oven following a reflow profile, and hand solder the RFM12B radios on the bottom. I then set the fuses and load the bootloader using a programming jig.

apply paste

apply paste

bake

bake

programming jig

programming jig

Here’s a video of some assembly action:

33 thoughts on “All about Moteino

  1. This is exactly what I need to shrink my helmet brake light/turn signals down to “no longer a nerd with stuff stuck to his helmet” size! Cannot wait for the radios to be back in stock so I can order both in one shot.

    • Hi

      I’m about to embark on a similar project (first venture into arduino). Would you mind sharing what you did?

      Regards

      Mark

  2. Don’t need it for my current project, but good to know it’s there. I’ve bought two units (for now) with a very specific purpose in mind, but I’m seeing more and more uses for these little buggers the more I think about it.

    ps: agree with Mike; it would be nice if your shop would carry the flash chips, and perhaps the Moteino+RMF12B+flash version
    pps: Allen: blog about it and post the URL already! :D

  3. My first venture into arduino world. Can someone help out with connecting to PC? I get I need a USB to FTDI, and the FTDI Friend (https://www.adafruit.com/products/284) comes with male to male pins. Do I actually solder this to the Moteino or just insert the pins, or do I solder on a header and then insert pins into that?

    Thanks

    Mark

    • Mark, you would solder the provided male header (right angled 1×6 male header) to Moteino. Then you would mate that with the FTDI adapter every time you need to program/test it.

  4. Hi Felix,
    I got the boards today. They are tiny.
    I’m looking forward to attaching one to a formerly RC vehicle and the others to some input sensors and/or a computer.

    Monday ship, Wedneday via US Postal Service. Not bad.

    Dave.

  5. Hi Guys

    Whats the max voltage and current on digital input

    Regards

    Mark

    • Works at 3.3V, pins will accept 5V input in general. I would not try to draw more than ~30mA from any pins.

  6. 1.This has the potential of being a silly question, and yet – how do recommend powering them? Would a LiPo 3.7 batt do the trick?
    2. I’m thinking of importing a project from Nano + Xbee to your great product for reasons of space. I took a look at the “Send” and “Receive” examples and it seems quite different from what I know. Would very much appreciate some tips as to how to make the transition. If the info I’ve provided isn’t enough please let me know. Thanks!

    • Adi – You can power them with a Lipo without issues. Since Lipos are 3.7, connect the power to the “VIN” pin or to the power pin of the FTDI (they are the same). Anything above 3.3V will work just fine, even 2XAA/2XAAA batteries will work even though that’s considered overclocking.
      For a transition from XBee I would recommend reading the RFM12B library writeup, the Moteino page, and then move on to the examples in the github repository. XBees will require some special setup before you can use them, same is partially true for RFM12B, except you do all that in the sketch code which is easier (everything in 1 place). The Send/Receive are very simple examples of how you can make a reliable link between two or more Moteinos or other Arduino clones that use RFM12B transceivers. Hope this helps…

  7. Just curious about the range of these units. I am looking at wireless options for my Arduino, and the XBee’s were the only ones that I found to work but seem more complex than these little modules, and more costly. Want to monitor temperatures in greenhouses and send information to the house when something is not working right. So a few hundred yards at least is what I am looking for,

    Thanks

    • About 100-150m in open air. Indoors it does quite well. You can program repeaters to extend the range.

  8. Nice! I’m sure I’ll find a use for these .. but not sure it’s what I need for my curent project. I have 30 independent switches distributed around a room and I want to know the state of them all at a central laptop (I’m not worried about speed, so polling each switch a few times a second is OK ) – can I do that with just RMF12Bs (plus battery & passive components) at the switches and an arduino with RMF12B talking to USB? – or are the RMF12Bs not quite smart enough? – thanks

    • Mike – the RFM12Bs are only transceivers, no microcontroller on them so all they do is transmit/receive data. Otherwise Moteino wouldn’t make too much sense as an integrated solution.

  9. I’m new to this wireless stuff.

    When it says that there are 128 nodes and 256 possible networks does that mean that I could have 128 Moteino’s communicating with each other?

    I am thinking of a model railway controller app in which there is a central Moteino connected to a PC and many (127?, maybe more) Moteinos in separate locomotives. The PC would use the Moteino to send instructions (speed, lights, sound) to the locos and maybe receive data back from them (battery voltage?).

    Could the “central” Moteino interact with several networks of 127 Moteinos? (This is probably an academic question just for a better understanding).

    Thanks

    …R

    • Yes, all nodes on the same network can talk to each other. You would need a “relay” node to switch between networks to be able to forward messages between networks.
      127 nodes is a lot of traffic if you’re sending often. Jeelabs posted an article on relaying between networks, so perhaps you can adapt some of that logic to the RFM12B library: http://jeelabs.org/2011/01/16/poor-man%E2%80%99s-mesh-network/

  10. Thanks Felix, I guess only a few nodes would be active at any time and there would not be much radio traffic between them but people would probably wish to have every locomotive in a fleet individually addressable.
    Separate question …Your Moteino board is a bit too big for small NGauge model railway locomotives. Looking at the pictures it seems like it might be possible for me to reduce the width by sawing off most of the edges with the connection pads. Obviously I don’t expect you to stand over any warranty if I did this. However it would be a non-starter if there are PCB tracks near the edges of the board and which would be lost. It would be nice to reduce the width by 5 or 6 mm overall – more would be even better.

    …R

  11. I received a couple Moteino R2s (with RF and Flash memory) quicker than expected a couple weeks back. They look beautiful. More importantly, I had them running a test program literally minutes after unpacking (using the stock Arduino IDE and an FTDI adapter). I am seriously a beginner at electronics — and in a few days I was successfully running programs to control an LED matrix via 9v battery. Awesome. And That’s just the beginning. Thank you!

  12. I just ordered some boards with the RFM69 and I’m wondering if you have any measurements of the current draw of the moteino in idle and while transmitting/receiving?

    • You sure could, havent tried that lib, but it might need some adaptation depending on the physical layer implementation. What you use as physical media is almost irrelevant as long as you can abstract that layer.

  13. My units arrived. I see a short length of twisted pair – I assume that’s the right length for an antenna? Where do I solder it on? I assume the through hole labelled ANT?

Comments are closed.