Microcontroller vs. Microprocessor for Remote Sensors

2022-11-11
关注

Microcontroller vs. Microprocessor for Remote Sensors
Illustration: © IoT For All

It is easy to feel overwhelmed when you’re building low-power electronics. There are so many different components and technologies that it can be hard to know where to begin. Recently, a MistyWest client wanted to redesign their field-deployed IoT environmental monitor to a smaller, lighter, and more power-efficient package with a longer battery life that could be placed more easily in remote locations. In order to achieve this, they faced a choice of going with a Linux-based single-board-computer with a microprocessor or a microcontroller-based compute platform. Let’s take a look at the differences between a microcontroller and a microprocessor when it comes to designing a successful remote sensor so that you have the information you need to choose the right solution for future applications.

'When it comes to microcontroller vs. microprocessor, you must consider computing power, how resource-intensive your problem is, and several other variables.' -MistyWestClick To Tweet

Microcontroller Kits vs. SBCs

A microcontroller is a small, all-in-one computing platform with features like onboard memory, built-in timers, IO handling, and others for interacting with electrical hardware. Microcontrollers’ common uses are devices like remote controls, toys, industrial equipment, cars, and implantable medical devices. You can find them in microcontroller kits like Arduino.

A microprocessor is similar to a conventional computer CPU, which is only the processor, and needs to be connected to external memory, timers, storage, and IO peripherals in order to function. Microprocessors are generally more powerful and allow for a more granular hardware design by selecting the exact memory, timers, and other features that one needs. You’ll find microprocessors in consumer computing equipment, and the increase of small and cheap single-board computers (SBCs) like Raspberry Pi has enabled them to be used in new applications like smart devices.

Strengths & Weaknesses: Microcontroller vs. Microprocessor

When it comes to microcontroller vs. microprocessor, you must consider computing power, how resource-intensive your problem is, and several other variables. Will your sensor require simple sensor reading (low intensity), image processing (high intensity), or machine vision/AI (very intense)? For development, can you use an off-the-shelf operating system or reuse other people’s code? And how much power consumption or battery life will you require?

Here is a detailed breakdown of each feature:

Strengths and weaknesses between the computing devices

#1: Computing Power

Some microcontrollers are designed with low power consumption in mind and are specified to be run at reduced clock frequencies, meaning the chip computes more slowly but with less power consumption. This makes microcontrollers good for less compute-intensive applications like sensor reading, serial communication, or mechanical control systems, but they don’t tend to have the processing power for computationally intensive tasks, like image processing.

In comparison, there is often much more computing power available on commercial microprocessor boards like Raspberry Pi, which can support more complicated tasks like streaming video or running a local website. There are also microprocessors with additional modules, such as the Nvidia Jetson Nano, which has a graphics processing unit for tasks like machine vision and AI.

#2: Packages, Development Resources, and Support

If you pick an established platform like Arduino or Raspberry Pi, there are many existing open-source libraries and a community that can help debug issues. However, If you pick a more specialized and less common platform, you may be on your own when sorting through documentation and trying to fix the issue. You need to decide if you need the specialized features of a particular platform and trade that against the support.

With embedded Linux solutions, most of the basic drivers for common connections like ethernet, audio, and video are already available, tested, and stable. In contrast, you may need to write the drivers for your particular microcontroller to connect with peripherals, which can be time-consuming and challenging.

Battery Charging

#3: Power Consumption

Microcontroller-based boards usually use less energy than microprocessor-based SBCs. One of the reasons is that microcontrollers generally run at lower clock frequencies than microprocessors, which in turn also means reduced computing power.

#4: Coding Language Support

If you’re running your code on a microcontroller, you’re likely going to need to build your software with a lower-level language like C or C++. On a microprocessor with a Linux distribution, you will have the choice between many more languages. This can help to create POCs (Proof Of Concepts) at a much faster pace. There are many libraries for peripherals like cameras, sensors, etc. written in higher-level languages like Python, for instance. By picking a platform that can run those languages you will be able to leverage those open-source libraries. However, If your solution requires a lot of low-level hardware manipulation, this may not be helpful.

#5: Code Portability

How tightly integrated is the code with the hardware? If you write a bare-metal application for a microcontroller, it will be challenging to switch over to another platform – but projects that are running FreeRTOS, for example, make switching easier. If you’re using a Linux-based SBC and peripherals over a protocol like USB, it will be even easier to change the compute platform because there are often libraries and drivers available. Depending on the tools you are planning to use some platforms might be more flexible to be interchangeable than others.

Boot Time

#6: Boot time

The boot time of an SBC with embedded Linux on it is significantly greater than that of a microcontroller, be it bare-metal or running an RTOS. When utilizing an SBC, an application must not depend on fixed time slots during start-up, and a few seconds for it to come up must be acceptable.

#7: Cost

In general, microcontrollers cost less than microprocessors. As an example, top-of-the-line Teensy costs $26 and the flagship Arduino board (Uno) costs $25, whereas the flagship Raspberry Pi board (Pi 4) starts at $35, and more expensive boards like the Jetson Nano may range up to $130. There is a wide range of costs in both domains and plenty of choices available on the market.

Making the Best Choice

Ultimately, SBCs and microcontroller kits are both solutions for embedded applications that require computing. It is the use case that will inform which selection is the right one to make. SBCs with an embedded Linux OS, even though more costly, offer greater computing power, and allow a quick start to your project, with a wide range of options for your application’s programming language, very active online communities, and advantageous portability. Microcontrollers, on the other hand, are much more energy efficient and allow full control and fine-tuning of their internal configuration – but additional time for the development of features might need to be considered.

When it comes to making the right selection between a microcontroller vs. microprocessor, if a quick prototype for a proof of concept is needed or if the device is going to be used for inference, object localization, or other demanding computing tasks, an SBC is likely the better solution. The portability of the code and the flexibility of the system will simplify development and maintenance significantly.

Tweet

Share

Share

Email

  • Artificial Intelligence
  • Connectivity
  • Data Analytics
  • Edge Computing
  • Hardware Components

  • Artificial Intelligence
  • Connectivity
  • Data Analytics
  • Edge Computing
  • Hardware Components

参考译文
远程传感器微控制器vs.微处理器
当你在制造低功耗的电子产品时,你很容易感到不知所措。有如此多不同的组件和技术,以至于很难知道从哪里开始。最近,MistyWest的一个客户想要重新设计他们的现场部署物联网环境监测仪,使其更小、更轻、更节能,电池寿命更长,可以更容易地放置在偏远地区。为了实现这一目标,他们面临的选择是使用基于linux的带有微处理器的单板计算机,还是使用基于微控制器的计算平台。让我们来看看微控制器和微处理器之间的区别,当涉及到设计一个成功的远程传感器,以便您有您所需要的信息,为未来的应用选择正确的解决方案。微控制器是一种小型的一体化计算平台,具有板载内存、内置计时器、IO处理和其他与电气硬件交互的功能。微控制器的常用用途包括遥控器、玩具、工业设备、汽车和植入式医疗设备。你可以在Arduino等微控制器套件中找到它们。微处理器类似于传统计算机的CPU,它只是一个处理器,需要连接到外部存储器、计时器、存储器和IO外设才能正常工作。微处理器通常更强大,通过选择精确的内存、计时器和其他需要的功能,可以实现更细粒度的硬件设计。你会在消费计算设备中发现微处理器,而像树莓派(Raspberry Pi)这样的小而便宜的单板计算机(sbc)的增加使它们能够用于智能设备等新的应用程序中。当谈到微控制器和微处理器时,你必须考虑计算能力,你的问题有多资源密集,以及其他几个变量。你的传感器需要简单的传感器读取(低强度),图像处理(高强度),还是机器视觉/AI(非常高强度)?对于开发,您是否可以使用现成的操作系统或重用其他人的代码?您需要多少功耗或电池寿命?一些微控制器在设计时考虑到低功耗,并指定以较低的时钟频率运行,这意味着芯片计算更慢,但功耗更低。这使得微控制器很好地应用于较少计算密集型的应用,如传感器读取、串行通信或机械控制系统,但它们往往没有处理计算密集型任务的能力,如图像处理。相比之下,像树莓派(Raspberry Pi)这样的商用微处理器板通常具有更强大的计算能力,可以支持流媒体视频或运行本地网站等更复杂的任务。也有带有额外模块的微处理器,比如英伟达Jetson Nano,它有一个用于机器视觉和人工智能等任务的图形处理单元。如果你选择Arduino或树莓派这样的成熟平台,有许多现有的开源库和社区可以帮助你调试问题。但是,如果您选择的是一个更专业、更不常见的平台,那么在整理文档并试图修复问题时,您可能要靠自己了。您需要决定是否需要特定平台的专门功能,并将其与支持进行交换。对于嵌入式Linux解决方案,用于以太网、音频和视频等常见连接的大多数基本驱动程序都已经可用、经过测试且稳定。相反,您可能需要为特定的微控制器编写驱动程序以连接外设,这可能是耗时和具有挑战性的。 基于微控制器的电路板通常比基于微处理器的sbc使用更少的能量。其中一个原因是微控制器的时钟频率通常比微处理器低,这反过来也意味着计算能力的降低。如果您在微控制器上运行代码,那么您可能需要使用C或c++等较低级别的语言来构建您的软件。在带有Linux发行版的微处理器上,您可以在更多的语言之间进行选择。这有助于以更快的速度创建POCs(概念证明)。有许多外设库,如相机、传感器等,是用Python等高级语言编写的。通过选择一个可以运行这些语言的平台,你将能够利用这些开源库。但是,如果您的解决方案需要大量低级硬件操作,那么这可能没有帮助。代码与硬件的集成程度如何?如果你为微控制器编写一个裸金属应用程序,那么切换到另一个平台将是一个挑战——但是运行FreeRTOS的项目,例如,使切换更容易。如果您正在使用基于linux的SBC和通过USB等协议的外设,则更改计算平台将更加容易,因为通常有可用的库和驱动程序。根据您计划使用的工具,有些平台可能比其他平台更灵活,更易于互换。在SBC上嵌入Linux的引导时间明显大于微控制器,无论是裸金属还是运行RTOS。在使用SBC时,应用程序在启动过程中不能依赖于固定的时隙,它出现几秒钟是可以接受的。一般来说,微控制器的成本低于微处理器。举个例子,最顶级的tenensy售价26美元,旗舰Arduino板(Uno)售价25美元,而旗舰树莓派板(Pi 4)起价35美元,更昂贵的板如Jetson Nano可能高达130美元。这两个领域的成本差别很大,市场上有很多选择。最终,sbc和微控制器套件都是需要计算的嵌入式应用的解决方案。用例将会告知哪一个选择是正确的。带有嵌入式Linux操作系统的sbc,尽管成本更高,但提供了更强大的计算能力,并允许快速启动项目,为应用程序的编程语言提供了广泛的选项,非常活跃的在线社区,以及有利的可移植性。另一方面,微控制器的能源效率更高,并允许完全控制和微调其内部配置-但可能需要考虑额外的时间来开发功能。当涉及到在微控制器和微处理器之间做出正确的选择时,如果需要一个快速的概念证明原型,或者如果该设备将用于推理、对象定位或其他要求较高的计算任务,SBC可能是更好的解决方案。代码的可移植性和系统的灵活性将大大简化开发和维护。
  • en
您觉得本篇内容如何
评分

相关产品

EN 650 & EN 650.3 观察窗

EN 650.3 version is for use with fluids containing alcohol.

Acromag 966EN 温度信号调节器

这些模块为多达6个输入通道提供了一个独立的以太网接口。多量程输入接收来自各种传感器和设备的信号。高分辨率,低噪音,A/D转换器提供高精度和可靠性。三路隔离进一步提高了系统性能。,两种以太网协议可用。选择Ethernet Modbus TCP\/IP或Ethernet\/IP。,i2o功能仅在6通道以太网Modbus TCP\/IP模块上可用。,功能

雷克兰 EN15F 其他

品牌;雷克兰 型号; EN15F 功能;防化学 名称;防化手套

Honeywell USA CSLA2EN 电流传感器

CSLA系列感应模拟电流传感器集成了SS490系列线性霍尔效应传感器集成电路。该传感元件组装在印刷电路板安装外壳中。这种住房有四种配置。正常安装是用0.375英寸4-40螺钉和方螺母(没有提供)插入外壳或6-20自攻螺钉。所述传感器、磁通收集器和壳体的组合包括所述支架组件。这些传感器是比例测量的。

TMP Pro Distribution C012EN RF 音频麦克风

C012E射频从上到下由实心黄铜制成,非常适合于要求音质的极端环境,具有非常坚固的外壳。内置的幻像电源模块具有完全的射频保护,以防止在800 Mhz-1.2 Ghz频段工作的GSM设备的干扰。极性模式:心形频率响应:50赫兹-18千赫灵敏度:-47dB+\/-3dB@1千赫

ValueTronics DLRO200-EN 毫欧表

"The DLRO200-EN ducter ohmmeter is a dlro from Megger."

评论

您需要登录才可以回复|注册

提交评论

iotforall

这家伙很懒,什么描述也没留下

关注

点击进入下一篇

智能电表,LPWAN连接和esim

提取码
复制提取码
点击跳转至百度网盘