Moteino PCBs arrived

Finally after about 3 weeks, the first Moteino PCB batch arrived from OSHPark. I will start assembling and work on the site store. This will be a small run. For this reason, I will not offer PCBs for sale even though someone expressed interest. Since Moteino is 100% open source, anyone can actually submit their own PCBs to OSHPark or other PCB service, the only downside being the long wait.

I already assembled one “production” Moteino to test my home-made metal stencil and the programming jig I made for these. The units I will sell will run Optiboot (same as Arduino Uno) and I’m thinking of pre-loading them with a blinky sketch to blink the on-board LED (on pin D9).

All units will come with header pins for the FTDI header (1×6 straight male, not soldered). Also I’m thinking of the following sale options (other suggestions are welcome):

– Moteino without RFM12B transceiver (this is just an Arduino clone, no wireless capability)
– Moteino with transceiver
– Moteino PCB (in the future)
– Include male header pins for the two rows of I/O pins (+$1)
– Include female headers. Anyone interested in this?
– Soldering options for the headers (I would solder the headers in different available combinations – above/below the board, etc).

Stay tuned for updates.

RFM12B library

I’ve been using the RF12 library from Jeelabs for some time for my Moteino testing. This worked just fine and it was a great starting point. However some things were really confusing and I spent a lot of time redoing the same thing over and over again (eg. copy paste from known working code) just because there was a lot of code-overhead to do simple things like sending, receiving, and ACK management, and of course I couldn’t remember any of the functions or macros. Right from start, the need emerged to tweak it into a more flexible and more configurable library, so I kept hacking and modding it until it dawned on me… a new library had to be born. So I decided to completely rewrite it, and wrap the useful functionality in a dedicated C++ class. I modified some of the core features of the Jeelabs version, like adding another header byte to allow 7-bit source and destination addresses (Jeelabs only supports either source or destination in an attempt to save 1 byte), and allow low level configuration of the radio. This yielded a clean and easy to use, yet powerful library (at least it made my life easy). Here’s a summary:

  • easy API with a few simple functions for basic usage
  • 127 possible nodes on 256 possible networks
  • 66 128 bytes max message length
  • customizable transmit power (8 levels) for low-power transmission control
  • customizable air-Kbps rate allows fine tuning the transmission reliability vs speed (transmitting slower is more reliable but takes more time which implies more power usage)
  • Sleep/Wakeup functionality for power saving
  • Low battery detector with customizable low voltage threshold
  • Interrupt driven
  • Support for targeted ACK instead of broadcasted ACK (possible because of the new source byte in the header)
  • encryption with XXTEA algorithm by David Wheeler, adapted from
  • Support for these chips: ATMega8 family (ATmega168, ATMega328) ATMega2560, ATMega1280, ATMega644P, ATTiny84, ATTiny44, ATMega32u4. So far only tested on ATMega 328/P
  • The source code and examples are on GitHub: RFM12 Library

Continue reading