owned this note
owned this note
Published
Linked with GitHub
---
tags: fabacademy
---
# Selecting a board :pager:
![](https://i.imgur.com/OarV4G7.png)
## Basics :computer:
**What is a microcontroller?**
<a href="https://commons.wikimedia.org/wiki/File:Intel_C4004.jpg#/media/File:Intel_C4004.jpg"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/55/Intel_C4004.jpg/1200px-Intel_C4004.jpg" alt="Intel C4004.jpg"></a>
> A microcontroller (MCU for microcontroller unit) is a small computer on a single integrated circuit. A microcontroller contains one or more CPUs (processor cores) along with memory and programmable input/output peripherals.
:::info
More details [here](https://fablabbcn-projects.gitlab.io/learning/fabacademy-local-docs/material/extras/week04/whatisamicrocontroller/#now-actually-what-is-a-microcontroller)
:::
**Microcontroller boards**
![](https://cdn.shopify.com/s/files/1/0438/4735/2471/collections/Types_Boards_2430x810.jpg?v=1628066011)
> A microcontroller board is considered a small computer built on a metal oxide semiconductor circuit chip.
:::warning
We sometimes refer to as an Arduino to any board with a microcontroller - it may be a board made by arduino, sparkfun, or someone else.
:::
**Shields**
![](https://programarfacil.com/wp-content/uploads/2019/05/arduino-shield-02.jpg)
> Shields are boards that can be plugged on top of the (Arduino) PCB extending its capabilities. The different shields follow the same philosophy as the original toolkit: they are easy to mount, and cheap to produce.
:::warning
A shield is not always passive! It can have a microcontroller in it too, and sometimes it can be "stand alone" board if needed.
:::
**SBCs**
![](https://www.raspberrypi.org/pagekit-assets/media/images/0c9cd61678cd088a7d22.jpg)
> A computer with all of its essential components such as RAM, CPU, and GPU built-in. Usually, SBCs are small, about the size of a credit card, or a bit larger but still smaller than the average desktop PC.
:::warning
Raspberry Pi is the SBC manufacturer we use the most. Not all SBCs are Raspberry Pis.
:::
**HATs**
![](https://www.raspberrypi.com/app/uploads/2014/07/HAT-longpins.jpg)
> (Hardware Attached on Top). A HAT is an add-on board for (Raspberry Pi B+) that conforms to a specific set of rules that will make life easier for users.
:::info
In this class, we will talk about different brands/boards/types of boards. We will focus mostly on microcontroller boards.
:::
## Important aspects to keep in mind :eyes:
:::info
**Remember:** a feature only makes a board better if you actually use it!
:::
### 1. Power
![](https://i.imgur.com/46XcdPo.png =x150) ![](https://i.imgur.com/5aU676Z.png =x150) ![](https://i.imgur.com/10PrTrM.png =x150) ![](https://i.imgur.com/qubiFE4.png =x100)
> **Power** - does your project run on batteries or wall power/mains? If it only uses batteries, consider a design that conserves power to run longer between battery changes. Or consider if solar or other power sources might be desirable.
**Questions**
- Does it need portability or is it stationary?
- Related to the above question, is it powered with AC or DC? What are the input voltage ranges?
- AC: Europe 230V; America: 110V
- DC common voltage levels: 5V, 3V3, 1V8 (not so common, yet)
- How can we power it?
- Do we use USB? --> Good for stationary, sometimes usable with power packs. Remember USB is always 5V.
- Does it have a battery connector? JST-2Pin. **Be careful with the polarity!!**
- Can we power the board using the pins?
- What are voltage ranges we need for the peripherals we want to connect?
- If we have a peripheral that uses a digital protocol to communicate -> level shifters
- If we have a peripheral such as an analog sensor with higher range than our maximum voltage -> Voltage divider (one directional)
- Current output (type of circuit)
- PoE
### 2. I/O
![](https://i.imgur.com/qeqKHdz.png =x100) ![](https://i.imgur.com/JfI7z7u.png =x100)
> **Peripherals** are the 'extras' beyond plain number crunching - like digital i/o pins, capacitive touch, ADC, SPI, I2C, UART, I2S, etc...
- Pin amounts
![](https://i.imgur.com/0QNTzMF.png)
- Pin types (ADC, PWM) - clock speed ref. (**Not all the pins in a board are the same - always check the pinout!**)
![](https://electropeak.com/learn/wp-content/uploads/2020/03/Arduino-Buying-Guide-Arduino-MEGA-pinout.jpg)
Some things to look at:
+ For analog sensors: ADC (analog to digital converter) - check resolution for the ADC
+ For making _"fake"_ analog voltages we use PWM (pulse width modulation). For instance, servos are also driven with PWM signals
![](https://www.exploreembedded.com/wiki/images/5/54/0_LPC1768_PWM.gif)
- Buses: what type of communication protocols does the board integrate?
- I2S: for digital audio transmision
- I2C: normally used for networs of peripherals, such as sensors
- SPI: high speed, like SD-cards
- UART: normally used for communication between microcontrollers
### 3. Network
![](https://i.imgur.com/wFfh6qY.png =x200) ![](https://i.imgur.com/kLBqI3L.png =x200) ![](https://i.imgur.com/vnJ1FqC.png =x100)
> **Communications** - does your project need to communicate information to you or other devices? Consider how to do that. Radio-enabled projects are great but they will require a transmitter and receiver so the amount of hardware may be double what you thought. You can communicate via USB to a computer often easily. Or maybe infrared signals?
:::success
**Communication vs. protocol**
**A network** is a group of computers connected with eachother with communication lines.
**The protocols** are the norms/agreements that format the messages and processes between the computers and programs in thos computers to understand eachother
:::
- **How much range?**:
- long distance (lower frequency)
- _RF_: depending on the application, different frequencies
- short distance:
- WiFi: high bandwidth
- BLE: low consumption
- Zigbee...
- Cabled comunication: Although not very common in the microntroller boards we do - ethernet? It can also power the board with PoE!
### 4. Data/Processing capabilities
![](https://i.imgur.com/5YtAuE6.png =x150) ![](https://i.imgur.com/e1M5FTN.png =x150) ![](https://i.imgur.com/uIXK9SF.png =x100) ![](https://i.imgur.com/jCD9gkD.png =x150)
> **Speed** - does your project crunch a lot of numbers or gather huge amounts of data? Then speed may be good. Otherwise if the project is relatively simple, a smaller, slower board may be perfectly fine (and less expensive).
- RAM: ram size will determine how much you can do in your code: how many variables can be used at the same time, and because of that how many libraries, and other things your code can integrate. 2-4kb is kind of small, 32kb is good for many projects. This memory is **volatile** (i.e. it gets erased when the board is unplugged)
- Flash size / External flash: it will determine how big your code can be in general (the totality of the compiled code you _flash_ into the board). 4kb is small, 256kb is very good for many projects. The ESP8266 has 4Mb (or even 16Mb)
- EEPROM: you might need this if you want to store small things *permanently* (i.e. when the board is unplugged it doesn't get erased)
- Data streams: do yo need to handle video/audio at high speed/resolution? **Better use a SBC**.
- Data storage: do yo need to store data on the board? In other words, do you need memory? Maybe use one board that has **SD-card** compatibility!
### 5. Usability
- Size
- Power requirements
- User interface
- Documentation
- Tutorial availability
### 6. Price
> **Price** - what is your budget? Keep this in mind when shopping but don't consider buying anything that will not fulfill the design of your project.
### 7. Programming Interface
![](https://i.imgur.com/q1DzSwE.png =x150) ![](https://i.imgur.com/jsayur0.png =x150) ![](https://i.imgur.com/wvgfUz4.png =x150)
> **Programming** - less of a consideration but important. Your time is valuable, so something easier to program may save you time/money even if its a little more expensive
- External interface needed? (ej. FTDI)
- Arduino IDE compatible
- Platformio compatible
- Other software/hardware tools needed?
:::info
Quoted info taken from the excellent Adafruit guide [How to Choose a Microcontroller
](https://learn.adafruit.com/how-to-choose-a-microcontroller)
:::
## Places to look in
1. [Adafruit](https://learn.adafruit.com)
2. [Arduino](https://docs.arduino.cc)
3. [Sparkfun](https://learn.sparkfun.com)
4. [Github](https://github.com)/[lab](https://gitlab.com) [hackaday](https://hackaday.com) for inspiration/references/documentation - **if there is nothing, we don't recommend to buy it unless you have a lot of experience!**
:::info
Adafruit guide: [Selecting an Arduino](https://learn.adafruit.com/adafruit-arduino-selection-guide)
Adafruit guide: [How to Choose a Microcontroller](https://learn.adafruit.com/how-to-choose-a-microcontroller)
Sparkfun guide: [Choosing an Arduino for Your Project](https://learn.sparkfun.com/tutorials/choosing-an-arduino-for-your-project/all)
[Learn how to choose the right Arduino board for your project.](https://maker.pro/arduino/tutorial/how-to-choose-the-right-arduino-board-for-your-project)
Sparkfun [ARDUINO COMPARISON GUIDE](https://www.sparkfun.com/standard_arduino_comparison_guide)
Seeedstudio: [Arduino Boards Selection Guide](https://www.seeedstudio.com/blog/2020/02/20/arduino-boards-selection-guide/)
:::