- What is Moteino? How about Moteino-USB?
- Out of box: solder the antenna and headers
- Pin and I/O diagrams: Moteino and Moteino-USB
- Moteino Specifications
- Comparison to other platforms
- Why Moteino?
- Programming & libraries for RFM12B and RFM69
- What is the label/dot on some of my Moteinos?
- Moteino antenna options and range
- Moteino revisions
- MISC: FLASH memory, Design files, etc
Video introduction to Moteino Rev1:
Video introduction to Moteino Rev3 and RFM69H/RFM69HW transceivers and library:
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.
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.
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.
|Transceiver||RFM12B (all revisions) and RFM69 W/HW/CW (R3, R4)|
|Transceivers frequencies||434Mhz (universal), 868Mhz (EU), 915Mhz (US, Australia, etc.)|
|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 *|
|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″.
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.
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 here, FTDI 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.
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.
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:
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:
- RFM12B: ~150m at 39.2kbps
- RFM69W: 350m+ at 55.5kbps
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:
- RFM69W @ 55.5kbps with 1/2 monopole: 400m+
- RFM69HW @ 1.2bps with dipole: 1.5miles !
- RFM69HW @ 38.4kbps: 560m+:
- 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.
- R2 - Green mass produced PCBs. Includes the FLASH memory footprint. Loaded with a modified Optiboot bootloader (DualOptiboot).
- 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.
- 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.
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.
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.
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.
Here’s a video of some assembly action: