0

Feather M0 vs 32u4
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Feather M0 vs 32u4

by haku15 on Sun Dec 13, 2015 7:23 pm

Dear Adafruit,
I’m thinking about which board should I use for my next project and I’ve noticed that you have developed two versions of Feather: one with M0 and one with 32u4.
The former looks from the specs much superior than the latter, yet the selling price is the same.
Why should I prefer the 32u4? Are there some disadvantages with M0? Isn’t the M0 Feather cannibalizing the 32u4 version?
I mean, with M0 I have more RAM, processing power, HW interrupt pins, PWM pin and probably energy efficiency…seems like everything is better, am I right?

Thank you very much for any suggestion
Sincerely

haku15
 
Posts: 72
Joined: Mon Jun 25, 2012 12:45 pm

Re: Feather M0 vs 32u4

by adafruit_support_mike on Mon Dec 14, 2015 2:28 am

They're the same price because the cost of the PCB and connectors is more than the cost of the microcontroller.

The M0 doesn't cut into the utility of ATmega32u4-based Feather boards, ATmega328-based Pro Trinkets, or even ATtiny85-based Trinkets because different jobs require different tools. A list of unused features doesn't support the claim that one chip is better than another for a given job, so the question isn't, "why use an ATtiny85 when you can use an M0?", it's "what makes this chip better for this job than that one?"

If you want to decode and mix multiple MP3 tracks in real time, the M0 is clearly better than the ATtiny85. If you want to debounce a couple of buttons and blink a few LEDs, not so much. You can use the M0 if you want, but it becomes a matter of personal preference instead of technical merit.

You also have to consider the complexity and learning curve for a given platform. As an example, the SAM21D has a GPIO multiplexer that can associate pins with up to eight different functions. That makes the chip highly flexible, but it also means you have to configure the multiplexer to make the pins do anything. To get real value out of the system, you have to know how all the functions map to various pins, what conflicts exist between the mappings, and how to get the features you want working on the pins you've selected. Given the number of possible combinations, you can probably forget about finding a pre-existing library for the configuration you've chosen, and can expect plenty of fun if you try to combine code from different projects. The same is true for the SAM21D's nested interrupt system and seven different clock sources.

For many jobs, configuring the SAM21D with the features you want on the pins you want will require more technical knowledge than solving the actual problem on a simpler chip. That can lead to Sirius Cybernetics Corporation Syndrome: the sense of accomplishment you feel from getting it to do anything at all distracts attention from the fact that you haven't gotten it to do what you want.

In general, it's a good idea to start with the simplest possible platform and ask, "can this do what I want?" If not, move up to the next simplest platform and ask again. When you find a platform that can do what you want, you look at the next one up and ask, "will this make the job easier?" If the answer is yes, move up to the next platform and ask again. If the answer is no, you've probably found the best platform for the job.

adafruit_support_mike
 
Posts: 57131
Joined: Thu Feb 11, 2010 2:51 pm

Re: Feather M0 vs 32u4

by haku15 on Mon Dec 14, 2015 4:21 pm

Mike,
thanks for your help. I was excited about the M0 but now I’m a bit worried LOL
My project would be a GPS tracker based on Fona808, 10 DOF IMU Breakout Board and an RFID Reader. For this I need a microcontroller in a small form factor that can handle 3 HW Interrupts from the boards named before (to wake up from sleep) and that offers more than 32K flash and 2K RAM (probably needed by the project). The Feather M0 seemed to be a good candidate, but if you tell me that it might get complicated and maybe Adafruit libraries might not be easily adapted for M0, then I am not sure anymore.
An Atmega1284 could be an alternative, but it is quite big

haku15
 
Posts: 72
Joined: Mon Jun 25, 2012 12:45 pm

Re: Feather M0 vs 32u4

by adafruit_support_mike on Tue Dec 15, 2015 4:22 am

The interrupts wouldn't be any problem, especially if they're only for wakeup purposes. Memory limits tend to be harder to budge though.

You probably have some learning curve ahead of you.. either digging into the libraries and trimming them down to fit on an ATmega32u4, or learning how to make them work on the M0 platform.

adafruit_support_mike
 
Posts: 57131
Joined: Thu Feb 11, 2010 2:51 pm

Re: Feather M0 vs 32u4

by haku15 on Tue Dec 15, 2015 3:28 pm

I agree, Mike, I'll try and see what I can do.
Thanks again!

haku15
 
Posts: 72
Joined: Mon Jun 25, 2012 12:45 pm

Re: Feather M0 vs 32u4

by bretthoward on Thu Jan 04, 2018 8:50 pm

Sorry to resurrect an old thread but I'm curious.... I just got done building a GPS logger using a 32u4 Adalogger and the GPS wing. I'm seeing that it draws about 30mA. I'm using interrupt driven serial comms and I'm putting the processor to sleep between 1 second arrivals of new NMEA data... Would it be beneficial from a power consumption point of view to go to the M0 for this task? I've also contemplated trying to slow the 32u4 down to 4 or even 2Mhz to save a tiny bit more but it became more pain than it was worth to sort out all the baud rates and what not... Well more to the point I lost interest and moved on to another project... I know that the GPS is 20mA of the budget so I've only got another 10mA to save. But if I was able to get half of that that could translate to an additional 17 hours on my battery...

Oh and if it helps anyone my project just logs GPS locations to the SD card in GPX format and makes a simple CSV file to allow you to monitor battery charge/discharge curves. This took up about 94% of the flash space. When I implemented with TinyGPS I was using about 1.9K of the RAM and when I changed over to NeoGPS I got it down to about 1.55K. I went to NeoGPS so as to have better support for a different GPS module that also supported GLONASS.

bretthoward
 
Posts: 22
Joined: Thu Dec 21, 2017 8:47 pm

Re: Feather M0 vs 32u4

by adafruit_support_mike on Fri Jan 05, 2018 1:35 am

bretthoward wrote:Would it be beneficial from a power consumption point of view to go to the M0 for this task?

Not really. Both the 32u4 and M0 Feathers have a normal operating current of about 9mA.

If you're willing to sleep and wake the microcontroller, you could use a TPL5110 or TPL5111 breakout:

https://www.adafruit.com/product/3435
https://www.adafruit.com/product/3573

They're bot low-power timer chips. If you cut the connection to the power LED they consume less than 100nA while idle.

The TPL5110 controls all power to a load, so the total current is the <100nA for the timer. The TPL5111 can pull a Feather's EN pin low, which will drop its current consumption to about 90uA. That's a thousand times higher than the TPL5110, but it lets the Feather recharge a LiPo while the EN pin is low.

In either case, the microprocessor wakes up when it gets power, runs whatever code you want, and can then toggle a DONE pin to shut itself off again.

adafruit_support_mike
 
Posts: 57131
Joined: Thu Feb 11, 2010 2:51 pm

Re: Feather M0 vs 32u4

by bretthoward on Fri Jan 05, 2018 1:40 pm

Appreciated. I'm about to already do something similar... Being that all GPS messages are the same and starts with a $ you can assume that the first byte received is a $. Right now I go into an "IDLE" power down (which still keeps the UART interrupt alive when using NeoHWSerial). However I've seen reports that you can setup the UART RX line as an interrupt wakeup and only miss one byte with the HW UART and zero bytes with the softserial driver. The plan when I get board enough to go after it is to go into a lower power mode and use the UART RX line to wake up on the first incoming start bit once a second.

When you say cut connection to the power LED? I don't think there really is a power LED unless you are talking about the CHG light but that is powered off the charge input anyway so who cares... I was also going to cut the FIX indicator on the GPS but since it only blinks once every 15 seconds its not really burning all that much...

Thanks for the external timer ideas as that could totally help at other times.... But for now the only time I need the timers are when the processor is awake. I'm already shutting off all the other timers at all times and only wake up timer 0 when the processor is running. Initially that broke some of my longer checks (like to write to the battery file every 5 minutes) but I realized that I can always use the GPS as a timer that is almost assuredly accurate as long as I have a fix. And as a GPS logger if I don't have a fix there is no point in the software running.

bretthoward
 
Posts: 22
Joined: Thu Dec 21, 2017 8:47 pm

Re: Feather M0 vs 32u4

by adafruit_support_mike on Sat Jan 06, 2018 12:12 am

The TPL5110 breakout has an LED that comes on when the power is active. It only uses a couple milliamps of current when it's lit, but its leakage current is around 20uA while the timer is idle. Cutting the jumper to the LED drops the timer's idle current by a factor of about 200.

adafruit_support_mike
 
Posts: 57131
Joined: Thu Feb 11, 2010 2:51 pm

Re: Feather M0 vs 32u4

by bretthoward on Sat Jan 06, 2018 6:25 pm

Gotcha. Thank you!

bretthoward
 
Posts: 22
Joined: Thu Dec 21, 2017 8:47 pm

Please be positive and constructive with your questions and comments.