Skip to content

Microcontroller

Back to Index

Related Feather, Itsy Bitsy, QT Py, RP2040, SBC

Microcontrollers are single purpose computers

  • small embedded development boards
  • limited storage and memory
  • limited processing power

Microcontrollers vs General Purpose Computer

  • Use of microcontrollers is fine for most cases
  • When you need more computational power, you may want to use a Raspberry Pi
    • For example, if you wish to have a web dashboard to interface with
    • Would like to process larger data sets

Comparison of Raspberry Pi to Arduino

Features

Raspberry Pi Arduino
Raspberry Pi is a Microcomputer Arduino is a Microcontroller
Operating System on MicroSD card Bootloader on chip
USB, Video, Camera, Display & Audio USB
I2C &SPI Busses I2C & SPI Buses
Digital I/O Digital I/O and Analog Inputs
5v USB power 5v USB & 8-20v DC power
Commercial patented product Open source design

The Raspberry Pi's schematics are released, but the board itself is not open hardware. The Raspberry Pi Foundation relies on income from the sale of Raspberry Pis to do its charitable work. Reference: https://opensource.com/resources/raspberry-pi

Specs

Raspberry Pi Arduino
Up to 1.5 GHz 64-bit quad-core CPU 16 MHz 8-bit single-core MCU
512 MB to 8 GB RAM 2 Kb - 8 Kb SRAM
26 Digital I/O pins 14 - 54 Digital I/O pins
No Analog inputs 6 - 16 Anallog inputs
Bluetooth & WiFi (some models) No Bluetooth or WiFi
Ethernet (some models) No Ethernet
Expand with HATs Expand with Shields

Extras

Raspberry Pi Arduino
MicroSD card USB Cable
USB (or USB-C) power supply Computer
Keyboard
Mouse
HDMI monitor
Adapter cables as required

NOTE: as the Raspberry Pi is a SBC (Single Board Computer) - you will need all the peripherals for Input and Output, as well as an OS.

NOTE: the Arduino is a microcontroller so that it requires a separate computer to push code/instructions to it

Recap

  • Arduino - precision timing, measure pulse widths to a high degree of accuracy
  • Raspberry Pi - add more intelligence

Using Node-RED on microcontrollers Could Node-RED generate code for MCUs? Up until now, it provides an elegant low-code/no-code solution for IoT but requires a single-board computer to run, like a Raspberry Pi 4B. The Moddable SDK implements JavaScript on MCUs and thus allows to run a Node-RED flow on them.\ ​Supported hardware includes ESP32, Raspberry Pi Pico W, among other options, and proprietary boards like the Moddable Two, built around an ESP32 and a 320×240 touch display The project relies on different components: The flow is designed with Node-RED. ​Node-RED MCU Edition exports it to JavaScript. Moddable translates the JavaScript project into C++ code. Moddable calls the tool-chain of the board to build and link, upload and launch the project. Moddable opens an optional debugger. Node-RED now includes a new pane, MCU (above) with two parts: on top, the selection of the flows to consider for the MCU; below the choice of the targeted board and different options. Targeting MCUs with Node-RED might not be the most optimised solution, especially when displaying a dashboard, but this approach speeds up the development on interfaces for MQTT and GUI.

Resources

https://makezine.com/comparison/boards https://www.digikey.com/en/maker/boards-guide https://media.digikey.com/Resources/Maker/the-original-guide-to-boards-2020.pdf As mentioned by Lady Ada on 8/6/2021 https://youtu.be/UwGtmSZkm2c?t=245

Adafruit_CircuitPython_HTTPServer - Simple HTTP Server for CircuitPython

This page was last updated on 2022-03-29 12:26:07 -0500.