Picking the Right Feather for You

Abstract- The 32u4 or the M0

As our projects continue to evolve alongside with the advances of technology it is important to keep the OPEnS lab up to date with the latest and greatest prototyping technologies at our disposal. There is no example greater than that of the microprocessor. This post will explore two of the most advanced, widely available microprocessors on the market today.

Background and Objective

Since 2010 the Arduino Uno has been the standard in prototyping electronics due to its wide variety of functions, ease of programming, and cost. However, much like any other piece of technology it is becoming outdated by faster, smaller and cheaper microprocessors such as the pro-trinket model released in 2014. (A previous article I wrote linked here highlights the key advantages of the Trinket over the Uno.) Fast forward to early 2016 to the release of adafruits most current line of development microcontrollers, called “Feathers” with a host of companion shields referred to as “Featherwings“, where these processor boards now come integrated with certain features such as WiFi connectivity, Bluetooth, LoRa radio and Shields that allow for RTC data logging, Ethernet connectivity and various display interfaces. The Objective of this article is to discuss the two major types of processors used within the Feather line of microprocessors.

Materials and Methods

Featherwing 32u4 v.s Featherwing M0

Which is best? Well, it depends on a host of things. To begin let’s start with a side by side comparison with specs, cost and common troubleshooting problems that I and others in the maker community have encountered. Differences I found especially imporant are denoted with an *.

At the Feather 32u4’s heart is at ATmega32u4 clocked at 8 MHz and at 3.3V logic, a chip setup that has long been tried and tested. This chip has 32K of flash and 2K of RAM and is very comparable of that of a basic Arduino Uno (excluding the use of EEPROM memory).

At the Feather M0’s heart is an ATSAMD21G18 ARM Cortex M0 processor, clocked at 48 MHz and at 3.3V logic, the same one used in the new Arduino Zero. This chip has a whopping 256K of FLASH (8x more than the Atmega328 or 32u4) and 32K of RAM (16x as much)!

Specs


ATmega32u4.jpg

Programming with the M0: The Basics Proto

  • Cost: 19.95 from Adafruit (Price equivalent only on Basic Proto Model)
  • Measures 2.0″ x 0.9″ x 0.28″ (51mm x 23mm x 8mm) without headers soldered in
  • Light as a (large?) feather – 4.6 grams
  • ATSAMD21G18 @ 48MHz with 3.3V logic/power*
  • 256KB of FLASH + 32KB of RAM*
  • No EEPROM
  • 32.768 KHz crystal for clock generation & RTC
  • 3.3V regulator with 500mA peak current output
  • You also get tons of pins – 20 GPIO pins
  • Hardware Serial, hardware I2C, hardware SPI support
  • PWM outputs on all pins
  • 6 x 12-bit analog inputs
  • 1 x 10-bit analog ouput (DAC)
  • Built in 100mA lipoly charger with charging status indicator LED
  • Higher sustained current draw to processor*
  • Power/enable pin
  • Reset button

Programming with the 32u4: The Basic proto  

  • Cost: 19.95 from Adafruit
  • Measures 2.0″ x 0.9″ x 0.28″ (51mm x 23mm x 8mm) without headers soldered in
  • Light as a (large?) feather – 4.8 grams
  • ATmega32u4 @ 8MHz with 3.3V logic/power*
  • 32K of flash and 2K of RAM*
  • 3.3V regulator with 500mA peak current output
  • You also get tons of pins – 20 GPIO pins
  • Hardware Serial, hardware I2C, hardware SPI support
  • 7 x PWM pins
  • 10 x analog inputs (one is used to measure the battery voltage)
  • Built in 100mA lipoly charger with charging status indicator LED
  • Pin #13 red LED for general purpose blinking
  • Power/enable pin
  • 4 mounting holes
  • Reset button
  • Long Battery Life*

From a purely technical perspective, it is clear that the ATSAMD21G18 ARM Cortex M0 processor is a superior processor in nearly every regard. However, running such a robust processor comes at the cost of power consumption which is likely an important factor in the design of whatever project you are looking at.

Ease of use and support

While specs are an important aspect to consider when selecting which type of feather you are going to work with another key component is the technical support available for the device. Like any new piece of technology, these adafruit products are not without their pitfalls, manly in the support of preexisting header libraries. I have found in my personal experience that the 32u4 model of the feather which uses an older processor found in many Arduino products has much more firmware support and has the ability to repurpose existing Arduino sketches much easier than with the M0.

The ATSAMD21G18 ARM Cortex M0 processor is much newer and more robust, which comes with the issue of not YET having support for many of adafruit and Arduino libraries. However, if your project doesn’t rely on interfacing with pre-existing technology or have dependencies on the old software you will probably be fine.

Discussion

In short, if you are doing projects that otherwise would have been prototyped on a device like an Arduino that doesn’t require a lot of processing power or large complicated scripts and battery consumption is of importance, the best choice would be the Feather32u4.

For more sophisticated projects that don’t require a lot of external dependencies, and for those with a strong background in computer and microprocessor programming, the feather m0 with ATSAMD21G18 ARM Cortex is a workhorse that allows for some pretty sophisticated programming with an abundance of memory and processor speeds.

Troubleshooting Some Common Problems

I “did something” and now when I plug in the Feather, it doesn’t show up as a device anymore so I cant upload to it or fix it…

No problem! You can ‘repair’ a bad code upload easily. Note that this can happen if you set a watchdog timer or sleep mode that stops USB, or any sketch that ‘crashes’ your Feather

  1. Turn on verbose upload in the Arduino IDE preferences
  2. Plug in feather 32u4/M0, it won’t show up as a COM/serial port that’s ok
  3. Open up the Blink example (Examples->Basics->Blink)
  4. Select the correct board in the Tools menu, e.g. Feather 32u4 or Feather M0 (check your board to make sure you have the right one selected!)
  5. Compile it (make sure that works)
  6. Click Upload to attempt to upload the code
  7. The IDE will print out a bunch of COM Ports as it tries to upload. During this time, double-click the reset button, you’ll see the red pulsing LED that tells you its now in bootloading mode
  8. The Feather will show up as the Bootloader COM/Serial port
  9. The IDE should see the bootloader COM/Serial port and upload properly

– Tom DeBell