Moteino with trace antenna

I had previously released a MoteinoMEGA with trace antenna, and there is now a regular Moteino with trace antenna. Everything is the same as the MEGA variant, except of course this is the atmega328p based Moteino, the most popular variant. The antenna is tuned to work in the 868-915 bands and should deliver very decent performance, close to the wire monopole. Here it is next to it’s MEGA sister board:

MightyHat R3

A new revision of MightyHat has started to ship out. Most everything is the same. Here is a rundown of the most significant changes:

  • the slide switch that cuts off the battery is replaced with a more robust hooded switch that also has a longer slider which can reach out of a 1/8″ thick acrylic case
  • The RST pin of the LCD is now connected to the RST of the atmega328, (previously wired to A1). This saves the A1 pin and resets the LCD whenever the atmega is reset. This is the only change posted in the RFM69 MightyHat sample sketch and I added a directive setting to make it easy to switch between R2 and R3.
  • enlarged the slot in front of the battery connector for easier wrapping of the battery wiring
  • added a capacitor footprint on the 5V* output rail. This makes it easier to add more capacitance to the boosted voltage when needed.
  • other various cosmetic and silkscreen adjustments

MoteinoMEGA with trace antenna

Over the past few months a friend has helped me create a MoteinoMEGA variant with a trace antenna tuned for between 768Mhz to 1.16GHz. So this should be great for 868-915mhz. I’ve tested this variant myself (915mhz) and I was surprised how well it performs compared to a wire monopole (which will still be better given the type of antenna). I did not do extensive testing but I am pretty confident this turned out as a great antenna and I am offering the remainder of this batch for those eager to have one and perhaps do more testing on their own. Depending on the response I may or may not ever make more of these, we shall see. The same antenna could be used with any other Moteino but I want to see the response of the users before I invest too much capital in new batches of Moteinos. The ANT pad and u.FL footprint are still there if for some reason the user wants to cut off the trace antenna and use one of those instead with a monopole or different antenna. Otherwise everything else is the same, well, except the yellow soldermask which has a nice orange hue from my new PCB supplier. I will offer these with RFM69W/HW in 868/915mhz or without a transceiver, your choice. Enjoy.

MightyHat R2

Revision R2 of MightyHat is now available. Since the changes are not very significant I debated whether this should be really a R1.1 but I don’t like minor revision numbers so I went with R2. Basically it just adds the following main features:

  • Battery power switch – this is a slide switch that can cutoff the battery. During my many hours of testing, it occurred it would be useful to just have an onboard battery switch instead of pulling it in and out. Also if you have the battery tucked tight underneath the board it’s not always really easy to pull the JST connector. Or say if you want to ship a complete Pi+MightyHat+Battery inside an enclosure and don’t want to have it powered up. A side switch is convenient for this purpose:
    If you don’t want the switch then there is a solder jumper behind it which you will need to solder-bridge if you are using a backup battery.
  • Two momentary tactile buttons tied to the remaining available I2C pins which were previously unused (A4 and A5). These will be general purpose buttons to do whatever you like. If you want you can build some menu interaction for the LCD or whatever else. They connect GND to A4 and A5 and the pins should be declared as INPUT_PULLUP. The provided kit buttons have long actuators that rise just above the main power button (to allow pressing them when enclosed), but you could otherwise solder any standard 6mm tactile buttons here.
  • A few power path optimizations and tweaks.
  • I sourced RP-SMA connectors which seem to be a lot more popular than SMA (shown in photo below – note male pin in the center).
  • Besides the new positions/cutouts of the buttons and switch all other physical features remain at the same positions as R1.

I have an enclosure close to finalizing so maybe I will post that when it’s ready for those who’d like to lasercut their own case. I played around with 1/8″ and 1/16″ acrylic and finally settled on 1/8″ because it’s more dimensionally stable and makes for a sturdier case. The thin 1/16″ was light but it was prone to breaking where holes were very close to the edge or between USB/Ethernet connectors. Here are a few snapshots of R2:

Wondering what it takes to put together a kit with all the necessary parts to make a completely functional piece of hardware like this? Consider these facts:

  • The PCB board has some 62 SMD parts on it after picking and placing.
  • Some 13 more through hole parts (and the SMD transceiver) are required to be sourced and soldered separately (some optional like the LCD, buzzer or SMA connector).
  • To make a nice tight fit while avoiding any shorts or touching ontop of the Pi, an optimal height of 17mm is required between the Pi and MightyHat. Standoff combinations were sourced to achieve this height since 17mm is not standard or easy to find stanoff height.
  • Add a  1-cell 3.7v Lithium Polymer battery (optional) to act as a UPS and you are golden. I recommend this 2Ah battery from Adafruit which has decent capacity and attaches nicely with velcro under the Hat.
  • Total height of the Pi+MightyHat with all options installed is just 32mm (about 40mm when enclosed with 1/8″/3mm acrylic).

Finally I need to mention I have made numerous tweaks and improvements to the RFM69 gateway sample sketch for the MightyHat. I added a bunch of defines that make it easy to disable the LCD, wireless programming, or Automatic Transmission Control. Besides making the sketch a lot smaller (LCD has the largest footprint because of fonts and graphics), it allows  running your gateway without an LCD:

Introducing MightyHat!

I’m pleased to introduce a new development and product that I have been working on in the past months: MightyHat !

It’s my first RaspberryPi hat and it it primarily meant to serve as an easy to deploy gateway for the Moteino Framework of wireless devices. It is a combination of ATXRaspi and MightyBoost with a bunch of other features that I long envisioned would be nice to have in such a gateway. Here’s a rundown of that:

  • atmega328p @ 16mhz, 3.3v interfacing with the Pi via seveal GPIO: 2 for the power control (similar to ATXRaspi), 2 for serial (TX, RX), and a pin to RST the atmega328p
  • ability to program it via FTDI header (when Pi is off), from the Pi with avrdude (when the Pi is running), and wirelessly through Moteino’s Wireless Programming capability
  • optional Nokia 5110 84x48px backlit monochrome LCD for anything you want to display, the sample sketch will make use of this, see below for link. This is a great LCD alternative to the 2×20 character LCD I’ve been using before, and cheaper/more common too, and with the great u8glib font support, you can fit really long messages on the screen
  • optional battery (standard 1 cell Lithium Polymer, 2Ah+ recommended) backup can be hot plugged in any time if you want to have backup power. It will also run without a battery without any issues. While plugged, the charging circuit is activated and will charge the battery if external power is present. If external power is lost the battery kicks in to keep your Pi running. The included sample sketch has a voltage threshold that once reached will trigger the Pi to shutdown cleanly
  • Fun fact: a 2000mAh battery will run a typical setup like the one below (Pi B+, wifi dongle, MightyHat + active atmega328p + RFM69HW + LCD) for about 3 hours before it will shutdown the Pi when the battery reaches a low voltage threshold:
  • external power is conveniently provided through the usual micro USB or 2.1mm jack
  • included red/green button makes for a nice power button that will control power to the Pi through the GPIO header and a power path that includes a 5V booster (similar to MightyBoost). The power path to the Pi is latched so that regardless if the atmega328p is reset, the power to the Pi is uninterrupted (as long as USB or battery is plugged in). This makes it possible to reprogram the atmega328p at any time, even directly from the Pi as I will show in a future walkthrough
  • allow RFM69W/HW and LoRa RFM95/96 transceivers to a wide range of low power and long range RF applications
  • the Pi GPIO is doubled to the top of the board where you can solder headers to bring it to the side. The included headers will also protrude and make all pins accessible on top of the PCB already
  • buzzer if you want to get creative with beeps/alerts
  • SMA footprint allows soldering SMA connectors for more aesthetic/commercial looking antennas if you mind the usual wire monopole antenna
  • compact design brings all essential ports to one side (where USB/ethernet is) while allowing easy access to all secondary ports (HDMI, audio, SD card access, etc)

Continue reading

New product: MoteinoMEGA-USB with LoRa footprint

There is a new variant of Moteino available: MoteinoMEGA with LoRa footprint and onboard FTDI USB-serial converter. This is the first MEGA USB variant. It will also work with RFM69HCW radios if you want a MEGA-USB with RFM69, but for now you will need to source your RFM69HCW from somewhere else. Otherwise all sketches and examples should work as before. I have yet to create a pinout diagram for this variant but it’s pretty much the same as the MoteinoMEGA. Here is a shot of both sides, shown with a RFM95 LoRa transceiver soldered on the bottom:

New products!

I am quite happy to announce a few new products (or new revisions), some of which people have been asking for a long time, now finally available at the shop!
First there is the IOShield which is now available as an assembled PCB with optional “24VAC input package” which allows you to place it in places where you have 24VAC input, like I did in the wireless sprinkler controller project.

Then there is a small BellMote run with OSHPark purple PCBs. Completely automate your doorbell with this kit which allows you to detect, trigger, and disable your doorbell, all wirelessly via Moteino gateway.

Next up is the SonarMote which finally has a new revision (R2) which addresses some bugs, has a simpler BOM and is even lower power – just 10uA average when the Moteino is properly slept – sample sketches here. A wide range of applications are possible, from parking sensor, inventory control, sump pump monitor, and others.

Finally we have the MiniBoost which is a small SIP form boost regulator that yields 5V from an input voltage of 2-4V. Up to about 1A is possible from a charged LiPo battery (4V) and will easily carry a moderate load like a RaspberryPi. It uses the same boost regulator as the MightyBoost but the SIP size makes it very versatile for breadboard projects. It’s perfect for projects where you have a main working voltage of 3.3V but you have some sensor that needs a hefty 5V source. Comes with onboard green power LED. It has is the same pinout and size as the legendary 7805 regulators:

It takes a long time to go through prototype stages and then manufacture electronics of high quality, all as a small operation like I have. I hope to get more time to put more documentation and assembly instructions together for these kits and boards. Some of them have already been introduced as prototypes and have a fair amount of information available. There are also other things I’d like to blog about, just not enough time, stay tuned for more!

Sprinkler Controller Automation

Another node type is now available on the Gateway automation interface: a sprinkler controller. This is achievable through a board I designed to be able to control many outputs. I call this board IOShield and it features two 74HC595 serial to parallel shift registers.The IOShields are daisy chainable and can take 24VAC through a buck regulator. Wireless control is done with a regular Moteino or MoteinoUSB and in a daisy chain only the first board would need the regulator and Moteino. These are now available in the web shop. See the overview video and details/code below.

I had an old sprinkler controller which worked just fine. But I had a few things I could be improved:

  • The programming interface was not really intuitive, definitely not user friendly
  • Every spring when it needs adjustment or sprinklers tested and fixes, it’s a pain to turn it on manually and then run in the far end of the yard to check/fix a sprinkler
  • Water is expensive and Michigan weather is unpredictable. I need a finer control of the sprinklers and the ease of turning programs or zones ON/OFF remotely, or when I’m away from home

I took apart the sprinkler controller to figure out how it works. There are 2 boards, one hosts the 24VAC TRIACs and circuitry that powers the solenoids. The other was a controller board with user interface, LCD, buttons etc. This gets power from the first board and controls the TRIACs through a ribbon cable. A quick continuity test reveals the pins of the ribbon connector control the gates of the TRIACs, simple enough.

So I designed the IOShield to be able to take the same 24VAC input and power the Moteino and itself. I have 9 sprinkler zones, but one IOShield will support up to 16 outputs. I can use the TRIAC board and only tap into the 9 zones that are active. I can just use the first board with all the TRIACs and then replace the clunky standalone sprinkler controller board with the IOShield+Moteino combo for completely wireless control and integration to the Gateway. If you have a similar older controller you may be able to do a similar setup with otherwise minimal changes to your sprinkler system. Here’s the hacked controller and control from the Gateway UI:

The RFM69 IOShield example skech for sprinkler control has been posted at Github.

The latest Gateway metric definitions also contain the definition for the sprinkler node, just plug it in and it should pop right on the interface. Sample zones and events have been defined as well, you can easily define your own or make your own schedules in metrics.js. Graphing will show you which zone ran, for how long etc. Enjoy!

SonarMote kits available

I have a limited offering of SonarMote kits. These are great for sump pump monitoring or parking aid (have a long car and a short garage?). Lots of people asked me to put these up, now the’re finally there. See the SonarMote page for more details/code and other project ideas, I will continue to add documentation there. The 1/16″ lasercut acrylic case plans and sample sketches are posted here. They work with 3.7v LiPo batteries which will recharge via the USB connector and they are also programmable via USB serial (FTDI onboard the PCB). They require a Moteino (no radio for projects like parking air or visual/audio feedback distance trackers, or with radio for things like the sump pump). It plugs right into the Gateway Framework and will start monitoring and logging distance as soon as you turn it on:


I love my standalone parking aid sensor based on SonarMote, it will light up the RGB LED green – yellow – then blink red faster and faster as you approach a set limit. When battery is low it blinks blue (every couple months or so on a small LiPo, recharge it via USB). Here are some action photos, also shown with an optional OLED display which plugs right into the SonarMote.

Unfortunately I cannot include LiPo batteries at this time because of the over complicated logistics and restrictions of shipping batteries. Most places online probably are breaking the rules when they ship you more than 2 batteries of certain capacities (by air) … but let them do it, sorry about that.

New ATXRaspi reboot function

ATXRaspi will start to ship with a new reboot function in addition to the shutdown function it had since inception. This was implemented because it was a cool feature to have and also suggested by several ATXRaspi users. See video above for a full overview and setup guide for ATXRaspi.

This will be in revision R2.6 boards but until that is released, revision 2.5 boards that have the reboot function will have a blue dot on the main chip (see photo above). The differences are the following:

  • to reboot: hold the button pressed for at least 0.5s and and less than 2s. The button backlight will dim once the reset threshold is met. Release the button and ATXRaspi will emit a 500ms HIGH pulse on the SHUTDOWN signal pin. It will then blink the button backlight for up to 1 minute while waiting for the Pi to reboot and the BOOTOK signal to be restored by the shutdowncheck script (to become HIGH again).
  • to shutdown – nothing changes: hold the button at least 2s. As before, the button backlight pulses slowly while the Pi shuts down. Once the shutdown is complete and BOOTOK signal goes LOW, ATXRaspi waits a few more seconds and cuts power off to the Pi.

The install script was updated to support the reboot function and is backward compatible with all previous ATXRaspi revisions. Here’s a photo of the required wiring to the GPIO and an example wiring of the chrome button offered at the LowPowerLab shop: