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

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