# Cortex-M0 vs. Cortex-M0+ for an IoT sensor using LoRA [closed]

Although I am an experienced software engineer, I am still quite a novice in electrical engineering. So please bare with me in explaining my requirements:

I have a small garden in my backyard and I would like to add a soil moisture sensor in the ground, connecting it with an RFM95W as a LoRaWAN node.

The sensor will likely take a measurement every 6 to 9 hours, and go to sleep to save battery life.

Whichever board I use will connect to another RFM95W that's a LoraWAN gateway hooked up to an Rpi inside my home, so that I can forward the data to a local LoRa Server (MQTT).

Eventually I hope to get to a point where the board will open a water source when the soil is dry (over PWM motor control -- which I have done with the Pi over bare metal before).

Secondly I hope to run some very basic deep learning on the data, directly on the MCU as discussed in this blog post

Therefore, choosing an ARM MCU seems like a good fit. There's the Cortex-M0 and its successor the M0+.

The problem I have in making the decision between them is based on the following:

1) The M0+ is marketed as a very power efficient MCU and therefore can work well with a battery for a long time

2) The M0 however seems to be very reasonably priced in its development boards, such as the SMT32F vs. the SAMD

Therefore I am wondering if the low power consumption is the case for the difference in price and if I can still get the same performance; i.e. long battery life, from the M0?

• @Maple an ATtiny will not be up to the task of running a practically suitable radio stack for this transceiver, nor will that now ancient core necessarily win on power. LoRa is a radio modulation, it is not a controller, so you cannot connect a sensor directly to it. The Semtech LoRa chip in the mentioned Hope RF RFM95 is an SPI peripheral and needs quite a lot of support code from a host MCU for the typical protocols and frequency hopping schemes utilized with that modulation type. – Chris Stratton Jun 16 '18 at 1:34
• @SamHammamy this type of question is off topic here. The reality is you'll probably change course a few times before you have something deployed with useful battery life after you consider things like the regulator and receive windows (if you want downstream control, which is much more power expensive than upstream reporting). Start with a higher memory resources ARM board for which you can find a good LoRa (or better, LoRaWAN or TTN) example, and once you've learned from that you can port to something that based on that experience feels like a better fit. – Chris Stratton Jun 16 '18 at 1:40
• Personally, I'd get either the NUCLEO-L073RZ and prototype on a high memory variant until I made up my mind what I needed in deployment, or the CMWX1ZZABZ-078 which is the same 192KB M0+ combined with the SX1276 off the RFM95, in a compact module. – Chris Stratton Jun 16 '18 at 5:36
• You have several tasks, first take ANY board, an rpi or whatever and figure out how to configure and use the RFM95W, most of that knowledge can be ported to your final platform. Next do the low power work, most of the MCU vendors have low power products, buy one/some and figure out how to make them run at low power. Also you have to do your power design, understand how much each component uses when sleeping and when not, is this solar, battery, etc. And do that design. it is great to have an overall goal but you have a long road to get there. – old_timer Jun 16 '18 at 16:16
• Expect failure and redesign. if you stick with it you can on each new design extend the battery life or increase the range of your transmission, use a smaller battery, smaller enclosure, etc... – old_timer Jun 16 '18 at 16:17